EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LINbus implementation with soft uart on LPC

Started by Martijn Broens April 25, 2009
Hi all,

did anyone ever do a LINbus implementation on LPC with a soft uart?

I'd like to learn more on this topic and i'm thinking of keeping this as a fallback scenario for external communication. and the reason for a soft uart would be that this will nearly alway work even when there are no more HW uarts left.

would someone be willing to share this

thanks in advance,
Martijn

An Engineer's Guide to the LPC2100 Series

Hi,

implementing a software uart is a bit resource hungry. At 20Kbit / sec
you have an interrupt each 50 uS. This interrupt is then responsible to
generate/sample the next bit on the serial line. If you delay the
interrupt, the communication will be mixed up (if you want to do
oversampling to make the UART more noise tolerant, then the picture is
even worst). If you use a timer for input capture and output generation
then things are a bit better, but I think timers are as rare resources
as uarts.
While it is possible to implement a software uart, it is only a useful
solution in some rare cases. It is better to use an external uart, or a
second dedicated 8 bit MCU just for LIN which is connected to the SPI or
I2C interface of the main unit (LPC chip).

Foltos

Martijn Broens wrote:
> Hi all,
>
> did anyone ever do a LINbus implementation on LPC with a soft uart?
>
> I'd like to learn more on this topic and i'm thinking of keeping this as a fallback scenario for external communication. and the reason for a soft uart would be that this will nearly alway work even when there are no more HW uarts left.
>
> would someone be willing to share this
>
> thanks in advance,
> Martijn
>
>
Hi,

by the way. Try this link
http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10689.pdf

Foltos

Martijn Broens wrote:
> Hi all,
>
> did anyone ever do a LINbus implementation on LPC with a soft uart?
>
> I'd like to learn more on this topic and i'm thinking of keeping this as a fallback scenario for external communication. and the reason for a soft uart would be that this will nearly alway work even when there are no more HW uarts left.
>
> would someone be willing to share this
>
> thanks in advance,
> Martijn
>
>
--- In l..., Foltos wrote:
>
> Hi,
>
> by the way. Try this link
> http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10689.pdf
>
> Foltos
>
> Martijn Broens wrote:
> > Hi all,
> >
> > did anyone ever do a LINbus implementation on LPC with a soft uart?
> >
> > I'd like to learn more on this topic and i'm thinking of keeping this as a fallback scenario for external communication. and the reason for a soft uart would be that this will nearly alway work even when there are no more HW uarts left.
> >
> > would someone be willing to share this
> >
> > thanks in advance,
> > Martijn
> >
> >
> >
> >
> >
> >

Memfault Beyond the Launch