[SOLVED] pic 16f1824 problem with internal oscillator

Status
Not open for further replies.
void main()
{
OSCCON=0x70; //setting oscillator to 8Mhz
ANSELA=0X00; //setting porta as digital
UART1_init(9600); // uart initialized with 9600
APFCON0=0X84; //tx and rx setup on porta
while(1)
{
uart1_write('*'); //writing * to terminal

}
}




this is the simple code i finally used
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…