ATAN0063 [APPLICATION NOTE]
9300D–AUTO–03/15
42
6.2 LIN Slave Node Demonstration Quick Start User Guide
The default standalone demonstration software also includes the capability for the Atmel® ATAB664251A board to operate
as a LIN slave node responding to messages from a LIN master node. Among other things, the standalone demonstration
illustrates the use of the LIN SIP for ambient lighting applications by controlling the RGB LED based on messages received
from a LIN master node.
6.2.1 Configuration for Ambient Lighting LIN Slave Node
The Atmel ATAB664251A board should be configured as described in Section 6.1.1 “Configuration for Standalone
Operation” on page 41. In addition, the LIN BUS from the LIN master node should be connected to header X5.
The Atmel AT32UC3C-EK evaluation kit (available separately) can be utilized as the LIN Master. Software is available from
Atmel for this kit to configure it to send ambient lighting messages over the LIN bus in response to actions on the kit’s user
interface, allowing the user to send different RGB values to each of several ambient lighting slave nodes. Each slave node
should respond only to the ambient lighting messages directed to its slave node address.
6.2.2 Ambient Lighting LIN Slave Node Operation
The ambient lighting slave node address of the Atmel ATAB664251A board is selected using the push button (S7)
connected to CS4. Successive presses of this push button increment the slave node addresses from 1 through 7; after
address 7, a press of the push button selects an invalid slave address (meaning the board will not respond to any ambient
lighting messages). A subsequent press of the push button after this starts the sequence again with a slave address of 1.
The selected slave address is displayed in binary code on the LEDs connected to CS6-CS8 (LD25-LD33) with the LEDs
connected to CS6 representing the least significant bit of the binary code. The invalid slave address is indicated by all the
LEDs (LD25-LD33) being off.
The Atmel ATAB664251A board will respond to ambient lighting messages targeted to its slave node address, allowing the
RGB LED on the board to be controlled from a LIN master node.
6.2.3 LIN Messages Supported in the Default Software
In addition to the LIN messages used for ambient lighting control, several other LIN messages are supported in the default
software on the Atmel ATAB664251A board. These LIN messages allow for complete control of the LIN SBC features from a
LIN master node.
Table 6-1. LIN Messages
Message PID Direction(1) Data Notes
Set SBC
configuration
register
0x23 Receive 2 bytes:
Bit 15 to Bit 0: Configuration register
1 - The received value is transferred
over SPI to the LIN SBC.
2 - Ambient lighting operation will not
work properly after this message is
received.
Set PWM period
and duty 0x25 Receive
8 bytes:
Bit 15 to Bit 0:
Bit 31 to Bit 16:
Bit 47 to Bit 32:
Bit 63 to Bit 48:
PWM Period
PWM-1 duty cycle
PWM-2 duty cycle
PWM-3 duty cycle
Period and duty cycles are in terms of
microseconds (us); 1 count = 1µs.
Set watchdog
trigger period 0x26 Receive 1 byte:
Bit 7 to Bit 0: Trigger period
Watchdog trigger period is in terms of
milliseconds (ms); 1 count = 1 ms. A
period of 0 will not generate a trigger.
Ambient lighting 0x2C Receive
4 bytes:
Bit 7 to Bit 0:
Bit 15 to Bit 8:
Bit 23 to Bit 16:
Bit 31 to Bit 24:
Slave node address
Red duty cycle
Green duty cycle
Blue duty cycle
Duty cycles are scaled to 255 counts;
255 counts = 100% duty cycle.
Get SBC status
register and VDIV 0x24 Transmit
4 bytes:
Bit 15 – Bit 0:
Bit 31 – Bit 16:
Status register
VDIV A/D reading
The transmitted value is the value
obtained over SPI from the LIN SBC.
Note: 1. Direction is relative to the Atmel ATAB664251A board configured by default software as a LIN slave