However I have hit a new issue. My project requires voltages to be measured. I tried using the ADC Library using a POT across the VCC n GND but somehow I am only getting a "0" as output. I would like to know if My circuit is missing something or is my code alright???
My Setup:
ATMEGA32
1MHz
VCC = 5V
POT = 1K
GLCD for display
Code: Select all
program TESTADC
dim data as word
text as string[7]
main:
Glcd_Set_Font(font5x8, 5, 8, 32)
Glcd_Init(PORTC, 0, 1, 2, 3, 5, 4, PORTD)
while true
data=Adc_Read(0)
WordToStr(data, text)
Delay_ms(10)
Glcd_Write_Text(text,0,0,1 )
wend
end.
Please Advice.
Thank You!