The ADC Demo Design shows one example of hundreds that could be implemented using the Analog to Digital Conversion (ADC) that is a key feature of the Nexus family of devices from Lattice. This demo design can be copied, modified, and included into customer-based designs to simplify the ADC aspect of their design. Or it can provide a reference from which other designs can be created. This demo design is targeted for the CertusPro-NX Versa Evaluation Board.
This demo shows how to process the ADC output when the analog input is from the internal digital temperature readout (DTR), internally divided down supply pins, or external voltage source (provided by the on-board potentiometer R143).
HEX to Seven Segment Module – This is a basic module that asynchronously decodes a 4-bit hexadecimal input into a standard seven segment LED display. This is used to drive the segments of the three digit 7-segment LED on the Versa board to display Voltage or Temperature.
ADC Binary to Volts Module – This module takes the 12-bit ADC result as an input and converts it into a 3-digit Binary Coded Decimal (BCD) Voltage output. This module is based on a state machine that sequentially subtracts a binary value from the ADC result while simultaneously adding to the decimal result.
ADC Binary to Temperature Module – This module uses the ADC result from the DTR channel and converts it into a 3-digit BCD temperature output. This module also implements a state machine to sequentially subtract a binary value from the ADC result while simultaneously adding to the decimal result. A separate state is used for each of the three digits.