ı wrote this code.
What i see on lcd is the values getting bigger .Started 90,100,108,120,145
How can i use first analog five input pins in 16f877a...
which setting is wrong ???DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 5
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE OSC 4
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 100
SYMBOL VERI=PORTA.5
deneme var byte
ADCON1=10000010
TRISA=%11111111
basla:
LCDOUT $FE,1
adcin veri,deneme
LCDOUT $fe,2,#deneme," "
pause 3000
goto basla
end
Bookmarks