This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Digital input with LIN Bus communication on embedded target

Other Parts Discussed in Thread: TLIN1029-Q1, MSP430G2553
Hi everyone,
For a graduation project, I need to design a digital input interface that communicates over LIN Bus for automotive applications.
In simple words, what I need to design:
10 buttons (on/off) can be pressed by the user, and when a button is clicked, a LIN Bus message needs to be send to a ECU.
So I figured I need a LIN bus chip, with at least 10 digital inputs, and a LIN bus output. The system needs to work on 12v and I know what the LIN bus message should look like. (identifier and data).
I am experienced with using simulink arduino, simulink real time and olimexino, but i have no programming experience. I have seen that Texas Instruments holds a blockset for programming C2000 processors and one of them includes a LIN bus output: TMS320F2803x
But this is a complete microcontroller with a huge amount of inputs and outputs. Are their any simpler chip that can be driver by the blockset in Simulink, for example, this quad lin transceiver seems what I am looking for: http://www.ti.com/product/TLIN2024-Q1
Every help or tip is welcome!
  • The LIN specification specifies both the electrical parameters of the LIN bus, and the protocol that the master and the slave(s) speak with each other.

    The transceiver chip is responsible for the electrical interface, but does not contain any intelligence, and must always be connected to some controller.

    The TMS320F2803x has a LIN interface, but it works at the 3.3 V logic level, so it must be paired with a transceiver (you need only a single-channel one, e.g., TLIN1029-Q1). If the TMS is too complex for you, the MSP430's UART is also LIN compatible. Google tells me that there is some Simulink target for the MSP430G2553, but it does not mention LIN support, so you cannot avoid doing actual programming.

  • Hi Peter,

    Just to add on to the excellent feedback from Clemens above, you may want to reference this app note to get a better understanding of how LIN works:

    www.ti.com/.../slla383.pdf

    Good luck with your project!

    Max
  • Thank you for you detailed answer. I'm still looking into this, since I cannot complete my project without it.

    Could you tell me a little more about the workflow for such a project?

    I buy a launchpad that holds the MSP430 and connect it to my computer (over usb?). I then convert my simulink model either by the Simulink coder or by manual programming to a C++ code for the microcontroller and flash it?

    I am now looking how I could create custom blocks for the embedded target, but not being able to program is a real handicap.

    Regards, Peter

  • One of the steps would have to be "learn programming C", so I cannot see that you will be able to complete it in a short amount of time.
  • Hi Peter,

    Thanks for using the MSP430 device. I'm not sure whether the code generated by Simulink coder could work on MSP430. BUT normally you should do some porting or create some code to let the generated code work for the new device.

    In addition to Clemens, I could just suggest you to start to learn how to develop your application with MSP430 device from the home page of MSP430 which you could get everything needed for a developer.
    www.ti.com/.../overview.html
  • Hi Peter,

    There are 2 options to program an MSP430 from MathWorks tools:

    1) Use our Embedded Coder Target for Energia, which supports the MSP430G2.  This support provides simple blocks, so its fairly easy to get up and running so you can experiment with the board and your system.

    2) Use the regular workflow, which is to generate C code for your algorithm, and import that algorithm C code into Code Composer Studio (CCS) where you integrate the C code to a project and use CCS for deployment and debugging with your board.

    Cheers,

    -Brian

**Attention** This is a public forum