Searching \ for 'RS232 revisited' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=rs232
Search entire site for: 'RS232 revisited'.

Truncated match.
PICList Thread
'RS232 revisited'
1999\09\14@105256 by Quentin

flavicon
face
Picsters
I've read the past posts on RS232 in the last couple of weeks. Steve
Thackery's email (Start and stop bits) and Comlite32 have cleared up a
lot of mysteries about RS232 (Finally decided to try and master it).
Also some examples on the Net helped.

Here come the Q's though:
My PIC is going to read 3 bytes of data which is looped out of the PC
with a 105 millisecs (according to Comlite32 and I am not even sure if
it is millisecs) delay between the 3 bytes. The first byte is just a set
ASCII character to tell the PIC the next two bytes are data. The PIC
then uses this data and return to read the serial line again.
As the PIC can start checking at anytime in the data stream, I would
like to know if anybody know a good way to synchronize with the data
stream?

I don't like the idea of checking for a long delay, so obviously I must
check for the first byte (ASCII character). To do that, I must first
find the start bit and then check if the byte is the ASCII. Any good
ideas on how to do that?

I can not modify the data stream or talk back to the PC.

Maybe I am missing the obvious here so any help will be appreciated.

Quentin

1999\09\14@151115 by Dave Johnson

flavicon
face
Quentin wrote:

>I would
>like to know if anybody know a good way to synchronize with the data
>stream?
When I did my bit-bang serial on a 16F84, I used an interrupt to notify
me when the data started arriving.

It was based heavily on microchip's app note 510, you might want to look
at that.

Dave Johnson

1999\09\14@200323 by Richard Prosser

flavicon
face
When I've done this I send a series of characters "I think I used "J" for
some reason. the receiver then only has to adjust its RX bit pattern to find
the "J" and respond that it has acquired sync. (or just wait for start of
data)

You can get real clever and send a string which decodes to reveal the bit
offset you're receiving but I didn't have any trouble with the simple
approach.

Richard

> {Original Message removed}

1999\09\15@044100 by netquake

flavicon
face
I'm not sure I understad correctly what you want to achieve but
perhaps you can detect you start bit by attaching the line to pic
external interrupt pin. That way you may do your rs-232 comm.
in your interrupt routine.
Hope it helps.

{Quote hidden}

------------------------------------
netQ <spam_OUTnetquakeTakeThisOuTspaminnocent.com>
http://virtuaweb.com/picprog
"Home of amateur PIC programmers..."

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzV38BkAAAEEALfWv9j3f+tZ+z2IW+2o9Ebx4bUGnHjHPqIe0a6yVKawaeV/
Y4I6L2/A0ddbVMG8+qJ0MvHNkr3DzYkpW+hTl9zAzXkKBdZ3GA5bbvot7entl/O2
YDtRWUV730koxBo5iFFUbJH5kbmkox+h3znj34zPnZNWzNaqOAwol3wABfBNAAUT
tBxOZXRRIDxuZXRxdWFrZUBpbm5vY2VudC5jb20+
=0bVU
-----END PGP PUBLIC KEY BLOCK-----

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...