question about SCI (MC9S12NE64)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

question about SCI (MC9S12NE64)

1,303 Views
SebK
Contributor I
Hello,
I have a question concerning the SCI of the MC9S12NE64.
The microcontroler will receive data from another device. It will send me 1 Start Bit, 8 Databits, 1 Parity and 2 Stop bits. Unfortunately it seems impossible to configure the MC9S12NE64 to receive a 2nd stop bit. What happens if I ignore this 2nd stop bit? Do I will get a framing error or something similar? I mean, I will receive a stop bit at the correct possition and as I know, the receiver awaits a new start bit for the next pakage. What happens to a 2nd stop bit between stop and start bit?
Can I simply set the MC9S12NE64 to 9 bits (M=1) with parity enabled(9th bit will become the parity bit)?
 
Thanks :smileyhappy:
Labels (1)
0 Kudos
3 Replies

279 Views
mjbcswitzerland
Specialist V
Hi

Take a look also at this rather long thread discussion the SCI on the NE64:

     http://tech.groups.yahoo.com/group/68HC12/message/11707

In my experience it is always ok to send 2 stop bits. Only sending one stop bit where the rx is set up to receive 2 can cause problems.

Regards

Mark Butcher

www.uTasker.com

0 Kudos

279 Views
Alban
Senior Contributor II
Hello,

As the Stop Bit is a 1, the S12 will just see nothing.
The S12 will see the bus idle and won't shout about it.

Mark, the Y! group is great. I hope we'll get a few of the experts coming on this Forum more often... Especially with the great new email notification we'll get on Wednesday morning (OK the thing we should have had from the start).
Still, a major improvement I'm happy Dwayne agreed and went for !

Alban.

0 Kudos

279 Views
bigmac
Specialist III
Hello,
 
I would expect that the presence of a second stop bit in the received data would be seen simply as a delay between the end of one byte, and the start of the next byte.  There should be no framing error since the first stop bit is present at the correct position.
 
For sending data to the other device, the presence of a single stop bit will likely be OK.  Traditionally, the second stop bit was used to provide additional delay for the processing of each byte, following its reception.  Properly buffered data shouldn't really need this delay.  However, if you find that the other device is presenting receive errors, you may need to provide additional delay between characters within your send function.
 
Yes. you would need to set the SCI to 9-bit mode to handle the parity bit.
 
Regards,
Mac
 
0 Kudos