CY3220LINBUS-RD Cypress Semiconductor Corp, CY3220LINBUS-RD Datasheet - Page 49

KIT REF DESIGN LIN BUS

CY3220LINBUS-RD

Manufacturer Part Number
CY3220LINBUS-RD
Description
KIT REF DESIGN LIN BUS
Manufacturer
Cypress Semiconductor Corp
Series
PSoC®r
Datasheet

Specifications of CY3220LINBUS-RD

Main Purpose
Interface, LIN
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
CY8C27143, CY8C27443
Processor To Be Evaluated
CY8C27143-24PXI and CY8C27443-24PXI
Interface Type
RS-232
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
428-1926
LIN Bus 2.0 Reference Design
5.3
5.3.1
The master does the following:
1. Initialize the hardware and LIN core.
2. Configure the nodes in the network using the node configuration functions.
3. Initialize the Schedule to Schedule1.
4. Inside an infinite loop:
5.3.2
void main()
{
BYTE i;
BYTE Temp;
October 25, 2006
// Enable resistive pullups for (DIP Switches)
PRT2DR = 0xFF;
// Switch off all the LEDs
PRT1DR = 0xFF;
// Update Frame1 buffer with the DIP switch status
UpdateFrame1();
// Start the Transmitter
Transmitter_Start(Transmitter_PARITY_NONE);
// Initialize LIN Master
l_ifc_init();
// Enable interrupts
M8C_EnableGInt;
// Configure the Nodes in the cluster
NodeConfiguration();
// Read node information from the nodes in the cluster
ReadNodeInformation();
// Set the Schedule to Schedule1
l_sch_set(Schedule1, 0);
// Infinite loop
while (1)
{
Check if Frame1 (VL1_CEM_Frm1) has completed. If yes, update the Frame1’s buffer with the master’s switch status.
This new switch status will be transmitted to slave 1 when Frame1 is due the next time.
Check if Frame2 (VL1_CPM_Frm1) has completed. If yes, read the resistance information transmitted by slave 1 from
Frame2’s buffer and transmit this over the serial port.
Check if Frame3 (VL1_DIA_Frm1) has completed. If yes, update LED 5 and LED 6 with the switch status sent by slave
2.
Check if Frame4 (VL1_CPM_Frm2) has completed. If yes, update Frame5’s buffer with the status of SW1 and SW2 of
slave 1. When Frame5 (VL1_CPM_Frm2) is due, this information is sent to slave 2, which, in turn, controls the LEDs.
// Check if the Lin is ready for the next frame to be
// sent.
// to initiate the next frame transfer
if (LinMaster_fIsLinReady())
{
Example Project for Master (CEM)
Description
Example Master Program
If yes, then call the l_sch_tick function
Cypress Semiconductor – Rev. **
5. Demonstration Projects
47

Related parts for CY3220LINBUS-RD