Hello!
I have used DEFINE OSC 4
and N9600.
I think the Problem is my COM Settings.
What shoul i use there?
Hello!
I have used DEFINE OSC 4
and N9600.
I think the Problem is my COM Settings.
What shoul i use there?
I know how frustrating it can be to get this problem. It cost me several hours (and a dead USB to RS232 dongle) to isolate my problem. It turns out the internal oscillator (4Mhz) on my 12F629 was too far off. I probably killed the internal calibration value by mistake at some other time.
"for a= 0 to 255"
You are getting some data in acceding order. Using printable characters can help by counting the number of correct ascending order before it breaks consistent order. The control characters can be muddying up things. Maybe:
for a=32 to 126 'send only printable characters
Also, characters pacing might help
DEFINE CHAR_PACING 1000 'character pacing of 1ms
My Hyper Terminal setting is on ASCII (chosen from a list in the setup)
In your code, change back to 2400
N2400
And leave the PC program at 2400.
Let us know what happens so we can help more if needed.
Dave
Always wear safety glasses while programming.
Hello!
I have tried this.
INCLUDE "modedefs.bas"
B0 var byte
define OSC 4
DEFINE CHAR_PACING 1000
A var byte
SI var PORTB.7
start:
SERIN si,N2400,B0
if b0 <> "0" then
for a= 32 to 126
serout si,N2400,[a]
next a
endif
goto start
end
And the PIC sends nothing more
It stops sending anything? Or the same garbage? Which?
And I'm with Mike:
"Serial out and serial in on same PIC pin? Normally separate pins. "
Last edited by norohs; - 30th October 2012 at 14:59.
Bookmarks