i have a analog signal i want to process the signal but i cant program my micro to do it...
any1 can help me with code? analog input USART output. plz note which pin is in and which is out!
You can try with two things basically as you have written Atmega16 So I am telling w.r.t that,
First Initialize ADC,
This Involves the bit setting responsible to start ADC and set Prescaler(Optional),
Then secondly make a Function to read ADC this happens
over a certain condition like (Wait for the Conversion mechanism to be completed), then read the value in the respective register,
then assign a Variable which receives the ADC converted data,
and finally Transmit that data via UART
So process is finally
HTML:
main() {
// Initialize UART
// Initialize ADC
while(1)
{
// get data to a variable via Reading ADC
delay();
//Transmit the variable through Tx of UART
}
}
It is using one ADC channel and one digital output connected to an isolation circuit. What should the circuit (micro) do ? Read ADC value and do what ?