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.

PGA 450 as LIN master?

Other Parts Discussed in Thread: PGA450-Q1

Dear Clancy,

In my application i am going to use 4 sensor, 3 of them will work like the slave, I would like to know can we implement the slave schedule in one sensor to make it master.

Could you help, how we can send the PID through PGA450 that will work as a master on the bus.

  • Hi Priyank,

    Slave scheduling can be achieved through the implementations suggested in the Automatic Slave Node Position Detection (SNPD) for PGA450-Q1 Application Report (www.ti.com/.../slda038.pdf).

    This effort will require modification to the 8051 source code already on the web. You'll need a master and slave variant of the program.

    Here's a conceptual implementation I am working on:
    For example, four custom commands will need to be created such that master PGA450-Q1 waits for an incoming "Request for PID" command from the slave expecting PID assignment. The master then executes a "Program PID" to write the PID to the unassigned slave. The slaves that are already programmed will also process the "Program PID" command, but should perform an internal check to ignore the "Program PID" command based on an internal flag that indicates the device has already been previously programmed. The flag is set after the first instance of the slave being assigned a PID. If a slave is removed from the system, the master device should execute a "Roll Call" command to determine which PIDs are still present on the LIN bus. If a slave is non-responsive, the master then knows it must re-execute the "Assign PID Commands" to prepare each slave for PID re-assignment. The slaves already programmed will maintain the same PID, while the new slaves will be reassigned with the correct PID based on its position on the bus.

    The above example assumes you are using the Figure 3 depiction from Application Report.
    Once we have a tested/working example, we will provide the source code on the web.
  • Hi Akeem,
    Thanks for your reply !!
    In my application i have 4 sensor connected on a single LIN bus.
    my question is how i can make one PGA450 sensor as a master and other 3 sensor as slaves on the bus.
    PGA450 as a Slave ---> firmware available and works fine.
  • Hello,
    How did you eventually make one of the PGA450's a master on the bus. I don't understand what Akeem described. Aren't the devices LIN slaves by default?
  • Oluwatoni,

    My example above describes a scenario in which one known PGA450-Q1 is programmed with the master-firmware, while the other three are programmed with the slave-firmware. To answer your question: Yes, in typical applications, the PGA450-Q1 is intended to be a slave device on the LIN bus. The currently available example source code is the slave-firmware. The master-source/firmware does not exist at this time.
    However, the PGA450-Q1's 8051 MCU gives the device flexibility to programmed as a master device (just as you would program an external MCU to act the master). This is why two source/firmware outputs are required for an application with one PGA450-Q1 master, and multiple PGA450-Q1 slaves.

    Are you trying to develop one master-slave firmware, such that you only need to load one firmware onto all devices? If so, I am not certain that this is possible, since a dedicated master must initiate the auto-addressing sequence.

    A single-master-slave firmware is possible if the devices are manually programmed with their own address, such that i.e. address 0x00 executes the master-segment of code, and the other addresses execute the slave-segment. This approach defeats the point of auto-slave-addressing.

    I'm certain there is a single firmware solution, that leverages an external MCU and/or switches to support the automatic single-master, multi-slave addressing scheme. Is there an external master MCU that will be connected to the LIN bus or UART port of one of the PGA450-Q1 devices?
  • Hello Akeem,

    Thanks for replying.

    I'm trying to control a few PGA450s on a LIN bus and I wanted to know if I could make one device a master and make the rest slaves, or if I should set up an external MCU as the LIN master.

    An external Linux computer (Raspberry pi or similar) will be connected to the UART or to the LIN bus. The LIN bus would be preferred.

    I'm currently trying to emulate a LIN frame using a UART connection to the transciever on board the PGA450EVM board but that has not worked.