18F45K22 UART speed wrong

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
Gaston06
Posts: 78
Joined: 25 Oct 2008 22:32

18F45K22 UART speed wrong

#1 Post by Gaston06 » 18 Feb 2019 16:12

Hello, all,

I am trying to establish a communication between a 18F45K22 and my PC, at 9600 bps.
I use the PIC internal clock at 16MHz, and miscellaneous term emulators on the pC.
I join the principal project settings.
My problem is:
- if I write: UART1_init (9600), I get garbage (irrelevant data).
- if I write: UART1_init (153600), then the communication is possible, despite the other side is still at 9600 bps.

I am not satisfied with this trick. What's wrong in my program?

Thank you for any idea on a possible solution. Best regards.

G06
---
Attachments
18F45K22 settings.jpg
18F45K22 settings.jpg (70.31 KiB) Viewed 726 times

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: 18F45K22 UART speed wrong

#2 Post by hexreader » 18 Feb 2019 16:47

Please do not double post

Answer already given on BASIC forum
Start every day with a smile...... (get it over with) :)

Post Reply

Return to “mikroC PRO for PIC32 General”