Re: Wait for a string on a serial port

Originally Posted by
flotulopex
Sayzer,
Sorry, i don't understand what I have done wrong with the OSC settings. I'm using an external 8MHz crystal; maybe I should have mentioned it.
I'll give Richard's suggestion (post #10) a try in a little moment and see what it does

Hi Roger,
I know you are using external 8Mhz crystal, that is why you need to tell the chip about it.
In your code, there is no OSC setting. You have it in fuse.
Default OSC setting is internal 4Mhz.
You need to manually choose the OSC value for external source by OSCCON.0 = 0
Otherwise, chip will not know you have selected external HS.
To make sure you are running on the correct speed, have a flip flop on a pin for say 5000ms.
Code:
FlipFlop:
TX_ON = TX_ON ^ 1
PAUSE 5000
Goto FlipFLop
Then, you can see the speed.
Last edited by sayzer; - 15th August 2017 at 09:06.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks