Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Communication problem [solved]
#7
(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.
Code:
            bsf        OSCCON, IRCF0    ;bank 1
            bsf        OSCCON, IRCF1
            bsf        OSCCON, IRCF2
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?

Thanks,

Eyal
Reply


Messages In This Thread
Communication problem [solved] - by egoltzman - 2012-07-20, 22:18:15
RE: Communication problem - by Mikael Gustavsson - 2012-07-21, 21:49:03
RE: Communication problem - by egoltzman - 2012-07-21, 21:59:47
RE: Communication problem - by Mikael Gustavsson - 2012-07-24, 00:05:16
RE: Communication problem - by egoltzman - 2012-07-24, 07:17:48
RE: Communication problem - by Mikael Gustavsson - 2012-07-25, 20:35:20
RE: Communication problem - by egoltzman - 2012-07-25, 21:28:26
RE: Communication problem - by Mikael Gustavsson - 2012-07-29, 23:05:56

Forum Jump:


Users browsing this thread: 1 Guest(s)