I never use PIC1400 but the following work on 16F877 without using ADCIN, maybe you can use a part of it. Compare both datasheet may help if there's any difference between both
Code:
A_D_Val VAR BYTE
TRISA = %11111111 ; Set PORTA to all input
ADCON1 = %00000010 ; Set PORTA analog and LEFT justify result
ADCON0 = %11000001 ; Configure and turn on A/D Module
Pause 500
Start:
ADCON0.2 = 1 ;Start Conversion
ConversionNotcomplete:
pause 10
if ADCON0.2 = 1 Then ConversionNotComplete
adval = ADRESH
Lcdout $fe, 1,"Result=",DEC A_D_Val
Pause 200
Goto Start
hope this may help!!!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks