Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] LIN on LPC2129

2006-03-30 by Tennessee Carmel-Veilleux

On Mar 29, 2006, at 5:11 PM, Duke Whisky wrote:

> Hello,
>
>  There is a simple tip to generate the 13-bit break without having to 
> implement
>  external glue logic. The LIN bus operates at know (an relatively low)
>  bitrates.
>
>  The idea is to change the value of the prescaler that defines the 
> baudrate in
>  the UART. You can calculate a "virtual" baudrate that make an 
> eight-bit long
>  0x00 byte as long as 13-bits at the nominal LIN bus bitrate.
>
>  After the break has been sent, you can switch back to the normal 
> prescaler
>  value for the LIN bus speed and go on with the rest of the frame. I 
> Haven't
>  checked if the prescaler settings possible with an LPC2129 allow this 
> with
>  enough accuracy to mach the constraints of the LIN spec, but I think 
> it
>  should work.

You are absolutely right. I am sorry about that :) I remembered the 
break character being a toggling 12 bits + start, but I was wrong. The 
break is 12 bits of '0' + start and the SYNC is 'U' (10101010 on the 
line). One of my colleagues is working on a LIN master co-processor 
using a 16F690 to offload the work from my LPC2129 and also to be 
reused by other MCUs. That's why I had it in mind. I guess I should 
have better checked my facts. Thanks for bringing-up this solution ! I 
have actually used a similar solution for RS-232 arbitration (special 
start condition) on another project and didn't even remember it !

Best Regards,

Tennessee Carmel-Veilleux

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.