EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

UARTS that generate an interrupt if bit 9 = 1 ? (for RS485 protocol)

Started by Chris Graham January 10, 2005
I am designing an RS485 network, and was reading a Circuit Cellar article by 
Ambekar that describes a protocol that uses 9 bit characters, where a 
non-zero 9th bit indicates that the character is a control character.

The described network used Intel MCS51 UART that can apparently be set to 
generate an interrupt only bit 9 is non-zero.  This way devices on the 
network are not interrupted from other tasks unless a control character is 
received, which seems a useful feature.  Of the  remaining 8 bits, 7 are the 
device address and the 8th indicates the type of control message.

Are there any other microcontrollers that have UARTs with this 
9th-bit-interrupt feature?

Alternatively, how significant is not having it in terms of degraded 
processor performance due to every processor having to check every character 
that is received?

Also, thanks to all those who responded to my earlier questions about I2C 
and RS485.  It has been a great help!

- Chris Graham





I am designing an RS485 network, and was reading a Circuit Cellar article by 
Ambekar that describes a protocol that uses 9 bit characters, where a 
non-zero 9th bit indicates that the character is a control character.

The described network used Intel MCS51 UART that can apparently be set to 
generate an interrupt only bit 9 is non-zero.  This way devices on the 
network are not interrupted from other tasks unless a control character is 
received, which seems a useful feature.  Of the  remaining 8 bits, 7 are the 
device address and the 8th indicates the type of control message.

Are there any other microcontrollers that have UARTs with this 
9th-bit-interrupt feature?

Alternatively, how significant is not having it in terms of degraded 
processor performance due to every processor having to check every character 
that is received?

Also, thanks to all those who responded to my earlier questions about I2C 
and RS485.  It has been a great help!

- Chris Graham





In article <ZAAEd.44958$6l.12781@pd7tw2no>, chrisgr@shaw.ca says...
> I am designing an RS485 network, and was reading a Circuit Cellar article by > Ambekar that describes a protocol that uses 9 bit characters, where a > non-zero 9th bit indicates that the character is a control character. > > The described network used Intel MCS51 UART that can apparently be set to > generate an interrupt only bit 9 is non-zero. This way devices on the > network are not interrupted from other tasks unless a control character is > received, which seems a useful feature. Of the remaining 8 bits, 7 are the > device address and the 8th indicates the type of control message. > > Are there any other microcontrollers that have UARTs with this > 9th-bit-interrupt feature? > > Alternatively, how significant is not having it in terms of degraded > processor performance due to every processor having to check every character > that is received? > > Also, thanks to all those who responded to my earlier questions about I2C > and RS485. It has been a great help! > > - Chris Graham > >
Motorola HC11 A,E, and F (probably others too, I just haven't used them) Motorola HC705C9/A (once again, others in the family I'm sure)
Chris Graham wrote:

> I am designing an RS485 network, and was reading a Circuit Cellar article by > Ambekar that describes a protocol that uses 9 bit characters, where a > non-zero 9th bit indicates that the character is a control character. > > The described network used Intel MCS51 UART that can apparently be set to > generate an interrupt only bit 9 is non-zero. This way devices on the > network are not interrupted from other tasks unless a control character is > received, which seems a useful feature. Of the remaining 8 bits, 7 are the > device address and the 8th indicates the type of control message. > > Are there any other microcontrollers that have UARTs with this > 9th-bit-interrupt feature? > > Alternatively, how significant is not having it in terms of degraded > processor performance due to every processor having to check every character > that is received? > > Also, thanks to all those who responded to my earlier questions about I2C > and RS485. It has been a great help! > > - Chris Graham > >
As far as I can recall all of the microcontrollers that I have looked at have been able to interrupt in this way. It's a _very_ popular thing to do in a microprocessor UART -- it just isn't done in the PC UART :(. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
In article <10u5mkgde1potdd@corp.supernews.com>, 
tim@wescottnospamdesign.com says...
> > As far as I can recall all of the microcontrollers that I have looked at > have been able to interrupt in this way. It's a _very_ popular thing to > do in a microprocessor UART -- it just isn't done in the PC UART :(. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > >
Ever seen a PIC? The PIC UART "supports" 9 bit transmission and reception, BUT there is no INT on 9th bit. They treat the 9th bit like a parity bit and you can look at the bit to determine if the byte is an address or data byte in 9 bit mode. Just like with a PC you are just forcing MARK or SPACE parity. Works OK, but you still have to interrupt on every data byte. They may have gotten better with the support lately, but I just pulled the data book on the 18F452 (pretty recent) and it does not support interrupt on 9th bit. Jim
James Beck wrote:

> In article <10u5mkgde1potdd@corp.supernews.com>, > tim@wescottnospamdesign.com says... > >> >>As far as I can recall all of the microcontrollers that I have looked at >>have been able to interrupt in this way. It's a _very_ popular thing to >>do in a microprocessor UART -- it just isn't done in the PC UART :(. >> > > Ever seen a PIC? > The PIC UART "supports" 9 bit transmission and reception, BUT there is > no INT on 9th bit. They treat the 9th bit like a parity bit and you can > look at the bit to determine if the byte is an address or data byte in 9 > bit mode. Just like with a PC you are just forcing MARK or SPACE > parity. Works OK, but you still have to interrupt on every data byte. > They may have gotten better with the support lately, but I just pulled > the data book on the 18F452 (pretty recent) and it does not support > interrupt on 9th bit. > > Jim
Actually I don't usually look closely at PICs -- first, because the AVR has a nicer architecture, and second because I haven't had occasion to use an 8-bit microprocessor in a long time. The real point is that if you need such a feature you should check data sheets and make darn sure that it's there before committing to one processor or another. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Monday, in article <ZAAEd.44958$6l.12781@pd7tw2no>
     chrisgr@shaw.ca "Chris Graham" wrote:

>I am designing an RS485 network, and was reading a Circuit Cellar article by >Ambekar that describes a protocol that uses 9 bit characters, where a >non-zero 9th bit indicates that the character is a control character. > >The described network used Intel MCS51 UART that can apparently be set to >generate an interrupt only bit 9 is non-zero. This way devices on the >network are not interrupted from other tasks unless a control character is >received, which seems a useful feature. Of the remaining 8 bits, 7 are the >device address and the 8th indicates the type of control message. > >Are there any other microcontrollers that have UARTs with this >9th-bit-interrupt feature?
Most of not all of the Renesas H8/H8S/H8SX and H8Tiny range, probably SH range as well as they use a lot of the same peripherals.
>Alternatively, how significant is not having it in terms of degraded >processor performance due to every processor having to check every character >that is received?
Well that depends on the data rate of the link, and what else is happening. In other words can the application handle all the extra data discarding and how many channels are operating. Consider that one of the processors I use is the H8/306x range all with three UARTs that can do this at the same time, it then becomes an issue of overheads. A little bit of extra coding could make the application more stable and enable synchronisation to the network in hot plugging to be more beneficial. -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.gnuh8.org.uk/> GNU H8 & mailing list info <http://www.badweb.org.uk/> For those web sites you hate
there are now several mcu with this functionnality..
one other is the Z8 Encore! mcu from zilog.. and the Z8 Encore! can work
with the SCI and I2C and SPI concurrently, on the same application.. that's
not the same pin used for any of them, they are really different
peripherals, contrary to many other mcu like AVRs or PICs..

"Chris Graham" <chrisgr@shaw.ca> a &#4294967295;crit dans le message de
news:ZAAEd.44958$6l.12781@pd7tw2no...
> I am designing an RS485 network, and was reading a Circuit Cellar article
by
> Ambekar that describes a protocol that uses 9 bit characters, where a > non-zero 9th bit indicates that the character is a control character. > > The described network used Intel MCS51 UART that can apparently be set to > generate an interrupt only bit 9 is non-zero. This way devices on the > network are not interrupted from other tasks unless a control character is > received, which seems a useful feature. Of the remaining 8 bits, 7 are
the
> device address and the 8th indicates the type of control message. > > Are there any other microcontrollers that have UARTs with this > 9th-bit-interrupt feature? > > Alternatively, how significant is not having it in terms of degraded > processor performance due to every processor having to check every
character
> that is received? > > Also, thanks to all those who responded to my earlier questions about I2C > and RS485. It has been a great help! > > - Chris Graham > > > > >

The 2024 Embedded Online Conference