LIN driver for .net?

Is there a already existing LIN driver for .net? I’m working on a project to interface an existing LIN device to a FEZ Cobra board. A quick google search didn’t find anything.

The part i’m using is a MCP2021 which Microchip has written a example library for in regular old C, and if a .net driver doesn’t exist I’ll look at the Microchip example and write one based on that.

Thanks for any help.

LIN is basically a UART with special LIN physical layer. You should be able to do it all right from the serial port class

Thats what I figured, however I was hoping for some code examples that would be more illuminating about the details than the code I’ve found sofar.

That is application code not interface drivers you need.

No code is available but LIN should be simple. The master send a request and you only have to respond. If you are making a bus master then it is more work but for a slave, it is really easy.

I am also looking for LIN application. Any body has luck finding any doc that can help how to write master application.
I think GHI should come up wih LIN application as it use in automotive industry and GHI is part of it.

That’s the beauty of software engineering, if it don’t exist, you can write your own. :slight_smile:

As the original post was 3 years ago and you still can’t find any C# code for LIN it’s most likely that very few people are using C# and embedded for LIN development.

That said, there is nothing stopping you from writing your own if you really do need it.

We are currently implementing a LIN interface as part of our commercial product.
In our case the specifications are provided by the car manufacturers, even for the low level interface.
Basically all you need is a LIN chip like TJA1021T/20 and connect it to one of the UART’s.
In SW you setup the UART as usually and send receive the data. Additionally you need to generate a break, which you can do by Register access only, as far as we have seen it.

1 Like

Hi Reinhard

Do you have any sample code for UART to LIN Break out? Only for slave module
Your help is much appreciated

Hi Ford,
we do not have LIN slave Code, we use it for master only.
But the Problem you will get with implementing a LIN slave in NETMF is, that you only have about 7 to 8 milli seconds (at 19200 baud) to send the Frame data after you receive a request frame Header.
This is not doable in NETMF in a reliable way, except you use RLP. But with RLP you Need implement the whole UART Interface first.