|
|
View previous topic :: View next topic |
Author |
Message |
ohbailey Guest
|
1, 2, or 3 bits off on RS232 |
Posted: Tue Aug 05, 2003 3:46 pm |
|
|
I'm using a 12F675 with the internal clock and the following:
#use RS232(baud=9600, xmit=PIN_A0, rcv=PIN_A1, bits=9, parity=N)
As a test I am running a loop that does a put('A'); followed by
sleep_ms(200). I am running this through a MAX232 and sending to
a Windows XP machine running Hyperterminal. I always receive data
the is shifted right 1, 2, or 3 bits. If I use a printf statement with a newline and return, the characters are still shifted 1,2, or 3 bits but the newline and return are sent properly. I have tried several different parts thinking the internal oscillator is the problem with the same exact results from one part to the next. Does anyone have any ideas?
Oliver Bailey
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516689 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: 1, 2, or 3 bits off on RS232 |
Posted: Tue Aug 05, 2003 4:08 pm |
|
|
:=I'm using a 12F675 with the internal clock and the following:
:=#use RS232(baud=9600, xmit=PIN_A0, rcv=PIN_A1, bits=9, parity=N)
In the line above, change the bits to 8.
Also, make sure that Hyperterm is setup for 9600 baud,
8 bits, no parity, and no hardware flow control.
I don't know how accurate your internal clock is, in the
12F675, but at least doing the above will give it a chance
to work better.
:=As a test I am running a loop that does a put('A'); followed by
:=sleep_ms(200). I am running this through a MAX232 and sending to
:=a Windows XP machine running Hyperterminal. I always receive data
:=the is shifted right 1, 2, or 3 bits. If I use a printf statement with a newline and return, the characters are still shifted 1,2, or 3 bits but the newline and return are sent properly. I have tried several different parts thinking the internal oscillator is the problem with the same exact results from one part to the next. Does anyone have any ideas?
:=
:=Oliver Bailey
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516690 |
|
|
Sherpa Doug Guest
|
Re: 1, 2, or 3 bits off on RS232 |
Posted: Wed Aug 06, 2003 9:45 am |
|
|
I would avoid Hyperterminal. It has wierd gotchas that have cost me many hours. Instead use the SIO program that came with the compiler, or try this: <a href="http://bray.velenje.cx/avr/terminal/" TARGET="_blank">http://bray.velenje.cx/avr/terminal/</a>
which is what I am currently using.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516719 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|