Searching \ for 'RS232 full duplex in aPIC16F84...?possible ?' 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/microchip/ios.htm?key=rs232
Search entire site for: 'RS232 full duplex in aPIC16F84...?possible ?'.

Truncated match.
PICList Thread
'RS232 full duplex in aPIC16F84...?possible ?'
1999\11\05@075418 by paulb

flavicon
face
Roberto Fernandes T Neto wrote:

> What I'm doing in my firmware is: I send a bit. While I'm sending this
> bit, I start to check the RS input. After I checked, I do something
> else. Then, I send the next bit, and the cycle starts all over again.

 You use an algorithm which polls three times the bitrate, rather than
interrupts when the input changes.  This might be using a timer
function, or may be using isosynchronous/ interlaced code.

 The rationale is that you only want to use *one* interrupt or pseudo-
interrupt function to make things simple.  Using 1/3 bit sampling
intervals to receive characters means that a start bit detected on a
given poll must have actually occurred in the 1/3 bit time since the
last poll, and so the next poll and every third thereafter will always
sample somewhere in the middle third of the bit-time.

 This poll then drives the receiver state machine which looks for a
start on each poll, then checks it on the following poll and this being
confirmed as a start bit, the data is clocked in every third poll
thereafter.  The *same* polls drive the transmit state machine which on
starting a character, sets the start bit and clocks data bits every
third poll thereafter followed by one or two stop bits.

 All this makes a single relatively simple process, isochronous if
necessary.
--
 Cheers,
       Paul B.

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