Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Can Altera GPIO pins read analog values?

I'm a beginner in electronics so forgive me :D,

Hi, can Altera GPIO pins read analog output of a light sensor? the light sensor output is analog and I want to tell the Altera whenever the signal of the sensor is greater than a specific value switch the LED ON.

Can I do that directly? or I have to connect the output of the sensor to an ADC? and if I can, How?

Thanks :)

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What is "analog"? 3.3V or 24V or 4-20 mA? MAX 10 FPGA has integrated ADCs, you should go for it. Other devices need external ADC, for example DE0-Nano board has this feature. From the corresponding schematics you can see how everything is connected together.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Depending on what you need, a simple analog compare circuit might work for you. No reason do all the complexity of adding a D/A converter if you can compare the input value to a known reference.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Simple op-amp comparator should work, but you will need to change the reference by hardware if you want to set different threshold. The MAX10 ADC has a function of allowing you to set threshold. So you just change parameter in software. Much easier than hardware modification.