Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC18F45k80 UART Registers

Status
Not open for further replies.
OSCCON = 0b11100101 // OSCILLATOR CONTROL REGISTER

Am I configuring OSCCON register correctly ?

osscn.jpg
 
No need to wory about the last three bits, They are read only ( for stability ) I normally use two or three nop()'s after the command.

8Mhz will be..
OSCCON = 0x60; // b0110 0000.. Don't set bit 7.. That's for sleep mode..
 
I've never had a problem with RS232 and the internal oscillator. However, I always use two stop bits on the transmit end and one on receive end to prevent framing errors. Don't think that is the problem here and like Ian's suggestion of sending a string once per second to check timing.

Mike.

Likewise - the internal oscillators work fine, particularly at 9600 baud, which I tend to use as it's fast enough and reliable. Once you get to 115,200 thing's get a little more 'dodgy' though.

As suggested, flash an LED to check you have the clock set correctly.

But why has he suddenly stopped following the MicroChip tutorial?, and gone back to 'guessing' how his fuses are set.
 
Solution already shown on Microchip forum

You can stand-down and standby....
Thank you for the update. All are not standby and nor stand down. It is not so easy for any newbie to learn it quickly. Don't forget only few days ago I have started working on the pic.
 
You want forum members here to carry on working to find a solution to something that is already solved?
I wanted to post a new problem with a solution in same thread. UART is not a small topic, still I have so many doubts And I am also working on some code, when I think I can't solve the problem myself I will definitely post
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top