Hi cyberbiota,
Put 10F2* into search box and hit enter.
----------------------------------
Hi cyberbiota,
Put 10F2* into search box and hit enter.
----------------------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi,
As far as I can see from reading the datasheet everything is controled by the ADCON0 register. Here's my untested shot at it:
May work, may not, have a look at section 7.0 in the datasheet.Code:Result var BYTE TRIS = %00000001 'Set GP0 Input, rest as outputs. ADCON0.7 = 0 'Set GP1 as digital ADCON0.6 = 1 'Set GP0 as analog ADCON0.0 = 1 'Turn ADC module ON ADConvert: ADCON0.3 = 0 ADCON0.2 = 0 'Select AN0 for covertsion. ADCON0.1 = 1 'Start conversion. While ADCON0.1 = 1 'ADCON0.1 will be reset when conversion is done WEND 'so lets wait here 'till then. Result = ADRES 'Store result. Toggle GPIO.1 'Or whatever..... Pause 250 Goto ADConvert 'Do it again.
/Henrik Olsson.
Henrik and Sayzer-
Thanks for all of the info. I never thought of trying the wildcard extension in the search box...duh!!!
peter
Bookmarks