I will assume you mean 12F683 ?
There is not a PORTA.
Give it a try.. No guarantees...Code:TRISIO = %11111110 ' set GPIO.0 output and all other to inputs ANSEL = %00000010 ' porta.1 to analog, others to digital ADCON0 = %00000100 ' analog input on GPIO.1, Left justify result for 8 bit CMCON0 = %00000111 ' Turn of the comparators GPIO = %00000000 ' set porta to all 0's adcin 1, pulse_width
Bookmarks