tgq
Full Member level 5
osccon 16f88 4mhz
Hi
I try to use PIC 16F88 with internal RC clock @8MHz but it seem not to work ???
What's wrong in my test code ?
DEFINE OSC 8 ' 8 MHz
OSCCON = %01110110 ' Clock configuration
OSCTUNE = %00000000
' PORTA / ADC CONFIGURATION
CMCON = %00000111 ' Disable analog comparators
ANSEL = %00000001 ' Set PORTA.0 to analog input, others to digital
ADCON0 = %11000001 ' Configure and turn on A/D Module.
ADCON1 = %10000000 ' Right Justify A/D result
Pause 500 ' Wait .5 second
loop:
high portB.0
pause 1
low portB.0
pause 1
goto loop
End
Thanks
Hi
I try to use PIC 16F88 with internal RC clock @8MHz but it seem not to work ???
What's wrong in my test code ?
DEFINE OSC 8 ' 8 MHz
OSCCON = %01110110 ' Clock configuration
OSCTUNE = %00000000
' PORTA / ADC CONFIGURATION
CMCON = %00000111 ' Disable analog comparators
ANSEL = %00000001 ' Set PORTA.0 to analog input, others to digital
ADCON0 = %11000001 ' Configure and turn on A/D Module.
ADCON1 = %10000000 ' Right Justify A/D result
Pause 500 ' Wait .5 second
loop:
high portB.0
pause 1
low portB.0
pause 1
goto loop
End
Thanks