' Define ADCIN parameters
Define ADC_BITS 10 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
adval var word ' Create adval to store result
TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Low PORTE.2 ' LCD R/W line low (W)
Pause 500 ' Wait .5 second
loop:
ADCIN 0, adval ' Read channel 0 to adval
' Adval contains your analog reading you decide in which way use it with your code here
Pause 100 ' Wait .1 second
Goto loop ' Do it forever
End
can anyone tell me all the pins that used for this code....this code is for PIC18F4550
what is 3=rc means?? can PIC operates correctly just using these codes??
Define ADC_BITS 10 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uS
adval var word ' Create adval to store result
TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Low PORTE.2 ' LCD R/W line low (W)
Pause 500 ' Wait .5 second
loop:
ADCIN 0, adval ' Read channel 0 to adval
' Adval contains your analog reading you decide in which way use it with your code here
Pause 100 ' Wait .1 second
Goto loop ' Do it forever
End
can anyone tell me all the pins that used for this code....this code is for PIC18F4550
what is 3=rc means?? can PIC operates correctly just using these codes??