Found in PbP 2.21 examples ... ADC7x file ...
may be you've had it in your PbP Folder for the past ten years !!! ( LOL !!!! )Code:' Access PIC16C7x A/D Include "modedefs.bas" ' Include serial modes SO con 0 ' Define serial output pin ADCON1 = 0 ' Set PortA 0-3 to analog inputs ADCON0 = $41 ' Set A/D to Fosc/8, Channel 0, On Pause 1 ' Wait for channel to setup loop: ADCON0 = $45 ' Start conversion Pause 1 ' Wait for conversion Serout SO,N2400,[#ADRES,10] ' Send variable to serial out Goto loop
no reason for such adc's use not to work ... once "trimmed" to your Pic's specifics !!! ( and of course supported by your version of the compiler !!! )
Alain
PS: IF you ONLY use the AN 5, AN 6, AN 7 adc inputs ( 0 > 4 shared by comparators ... are to let aside !!! ) ... I think a program compiled for 16F877 can work with a 16F877A ...




Bookmarks