2012-07-25, 21:28:26
(2012-07-25, 20:35:20)Mikael Gustafsson Wrote: You configure the intosc to 500kHz. Take a look at the OSCCON register in the datasheet again.Yes!! This was it!! Thanks!
9600 is not a valid baud rate with 500kHz oscillator and your current UART configuration. The error is 8.5%.Code:bsf OSCCON, IRCF0 ;bank 1
bsf OSCCON, IRCF1
bsf OSCCON, IRCF2
I thought I set the OSCCON to 8M but I was shifted 1 bit to the right...
It is working now!!
Another question:
I have another PIC24F controller that control the PIC16F and they are connected serially (RS232), I want to load the PIC16F application from the PIC24F (with the BL on the PIC16F), how can I do it? Where can I find the writing protocol so I can program it to the PIC24F? Or maybe there is another way?
Thanks,
Eyal