Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] UART Interrupt On Bit 9?

2005-02-15 by Robert Adsett

At 10:46 PM 2/15/05 +0000, Chris wrote:
>Is it possible to set the LPC21xx uart to interrupt only when a
>character with bit 9 set (parity=1) is received?  I'm looking at the
>LPC2138 spec, for example, and I don't a way to do this.
>
>Many microcontrollers can do this and the LPC uart is very complete so
>I thought this may be possible.  Is there a way?

There is a technique I've used on standard PC serial ports ('550 based) 
that I would expect to work called parity modulation.  The idea is to use 
two 8 bit + parity modes, 8 bit + mark and 8 bit + space.  The parity bit 
becomes your 9'th bit.  By interrupting only on a parity mismatch you get 
the equivalent of an interrupt on 9'th bit set.  As with 9 bit mode you can 
then examine the character received and decide to go to full reception or 
continue waiting for the next parity mismatch.

I have not tried this on an LPC and I don't know if there are any dark 
corners in the UART that might give trouble (interactions with the FIFO 
might need to be checked).


I hope that's clear.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.