Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use an inbuilt ADC in a CPLD?

Not open for further replies.


Newbie level 6
Jul 9, 2009
Reaction score
Trophy points
Activity points
machxo mini schematics


I use a cpld (LCMXO2280 from Lattice Semi) to control an SMPS.

It has an in-built ADC circuit which I can use to sense the SMPS o/p voltage. I referred the datsheet but nothing much is mentioned about the same. How do you think can I make use of the in-built ADC in LCMXO2280? I see an A2D_IN pin. How can I get the ADC output?

If I program the device like,

input A2D_in; //analog i/p
reg [15:0] A2D_out; //to store o/p of inbuilt A2D
A2D_reg <= A2D_pin;

Can I have the ADC output in 16bit A2D_out register?

Please help.

Thanks and regards,

analog to digital converter cpld

Hello Febin,

you must be mistaken. The MachXO doesn't have an A to D converter, nor has is an analog input!
I guess you are referring to the mixed signal product from Lattice.


machxo comparator

oopz. sorry about that. i mentioned it wrong. I am using the machXO mini development kit that has an in-buit A2D converter. LCMXO2280 is the heart if this mini development kit. And I would like know how to use the A2D converter on this kit. Like, how to access A2D's output?? how do I know where is this value stored and how many bits is A2D's digital output? I tracked the A2D input signal in the circuit provided in MACHXO'S datasheet and it ends up in a pin called D2A, which has to be an analog output. I could not get much info about this from the datasheet. Please help.

sorry once again for getting the question wrong.

warm regards,

cpld analog comparator

I am using the machXO mini development kit that has an in-buit A2D converter.
It hasn't. It's equipped with an analog comparator and a RC circuit as building block for a very basic single slope AD. Hopefully, you'll find a respective Lattice demonstration project, otherwise you can figure out the intended operation yourself. It's simple!

As FvM wrote, it looks like you have to find out yourself. Maybe a local representative can help you further with advanced documentation.

But with the comparator stuffed on the board, don't expect too much!

I would recommend hooking up a serial (SPI or I²C) ADC/DAC. There are plenty to choose from...

Regards & good luck

PS have you bought this kit on the web or via a local disti/rep?

Not open for further replies.

Part and Inventory Search

Welcome to