XOn/XOff SCI1

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

XOn/XOff SCI1

3,695件の閲覧回数
BoloMestre
Contributor I
How I make to inform a device hardwired in the SCI1 that already I caught the sent byte so that this device can send me the next byte?
ラベル(1)
0 件の賞賛
返信
4 返答(返信)

902件の閲覧回数
bigmac
Specialist III
Hello BoloMestre,
 
SCI handshaking is not usually applied on a character-by-character basis, but is generally used to stop and re-start a continuous data stream.  Typically the received chararacters will be placed in a FIFO (circular) buffer, generally under  interrupt control.  Hence, the receive buffer needs to be monitored, so that when it is nearly full the stream can be stopped, and re-started again when the buffer becomes nearly empty.
 
The handshaking originates from the receiving SCI and is sent back to the data source, and may use either a "hardware" method (control of CTS or DTR signal), or a "software" method (sending Xon or Xoff control characters).  When sending a Xoff character to stop the data stream, there could be a delay of several characters before it takes effect, so this should occur before the buffer is completely full.  Similarly, the Xon character should be sent before the receive buffer completely empties.
 
The "hardware" method is generally preferred, if the signal is available, because it will be more responsive.  The choice of CTS or DTR signal would need to match the sending end - the chosen signal is made inactive to stop the stream, and active to re-start the stream.
 
Regards,
Mac
 
 
 
0 件の賞賛
返信

902件の閲覧回数
BoloMestre
Contributor I

Hi BigMac,

When I am for receiving the data is set the bit OverRun, collision of data, therefore my interest for the HandShake. I tried to place an interruption but this never is not had access. Perhaps of this form I obtain to all catch the sent frame, since I do not possess no wire leaving the device, only RX and TX.

I am using CW 3,1, with a board AXMAN EVB9S12NE64.

 

0 件の賞賛
返信

902件の閲覧回数
imajeff
Contributor III
A common solution is to slow down the baud rate.

I'm curious what kind of hardware you are communicating with having the problem... The NE64 and what else?
0 件の賞賛
返信

902件の閲覧回数
rocco
Senior Contributor II
Hi, BoloMestre:

If you are getting Overrun errors, then the problem is with the firmware. If the firmware isn't responding quick enough to keep up with the data coming in, how could it be quick enough to send an XOFF in time?

With a good, interrupt driven SCI driver, you should never get overrun errors. I run packets continuously at 500 Kbaud, both in and out, on a meager HC08, with no overruns. In my case, I send and receive the data from the interrupt service routine, buffer it, and then process it in the background.

Let us know if you need help with your SCI routines.
0 件の賞賛
返信