Microcontroller Atmel ADC Converter

Discussion in 'Embedded Systems and Microcontrollers' started by miniElectronics, Oct 2, 2009.

  1. miniElectronics

    Thread Starter Member

    Aug 4, 2009
    20
    0
    Hi,

    I have this chip atmega164pv from atmel. And coding in C using CodeVision. I have 2 sensors which i want to convert signal using ADC function and compare the results and have 2 output signals.

    Example. if Sensor1 is more than 5% higher then Sensor2 so it will be a high signal on Output1 until it is equal or less then 5% high then Sensor2. At same function for Sensor2.

    How can i do this in CodeVision?
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Select this microcontroller, tell CoceVision how you want the outputs, PWM etc and let it genarate the code which setups these things. Then use a simple ADC read instruction (CodeVision user manual) to read the ADC.
     
Loading...