(2012-07-24, 00:05:16)Mikael Gustafsson Wrote: The FOSC define in settings.inc is set to 500000. It should be set to 8000000 if you are using a 8MHz clock.
It was set in the beginning to 8000000 but I did not succeeded to get it worked so I tried to send a constant char on the tx line in a loop and analyze it with a logic analyzer, I saw that I get the output in around 600 boud, only when I put the 500000 I saw significant output in 9600 on the logic but even then after remove the tx loop I did not succeed to connect.
9600 is not a valid baud rate with 500kHz oscillator and your current UART configuration. The error is 8.5%.
Yes!! This was it!! Thanks!
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?