PIC16F818 int config

Status
Not open for further replies.

TKS

New Member
hi, i was wondering how i could

set the internal config bits to 8MHz..

the data spec says that you have to set 111 to bit 7 to 5 but i have no idea how to do this..

i want to do this when i program the device soow not when i'm in code.

TKS
 

You simply write that value to the OSCCON register, it's fully explained in the datasheet. You have to do this in your program code (only two lines), you can't do it from the programmer - although you must set the config fuses (in the programmer) to use the internal oscillator.

Code:
movlw b'01110000'
movwf OSCCON

It's as easy as that!.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…