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

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
5. Demonstration Projects
// Process Frame3.
// has been any change in value on the switches connected to Port2.
// there is a change, update the Frame3 buffer with the new value and also
// set the bfDATA_READY flag in the first byte of the buffer, so that next
// time the Master sends this frame, the slave will respond with the updated
// switch value
/* Uncomment this section if Goto Sleep function is desired
// Check if the Goto Sleep Flag has been set.
*/
}
5.5
5.5.1
Following are the functions performed by slave 2:
1. Initialize the hardware resources for the indicator LEDs, DIP switches and the LIN core.
2. Clear the response error bit.
3. Inside an infinite Loop:
5.5.2
void main()
{
// Initialize LIN
// Initialize Parameters
// Initialize Status bytes of all frames
54
}// End of While loop
l_ifc_init();
bLinNAD = 2;
PRT0DR = 0x24;
PRT1DR = 0x00;
IndicatorFlag = 0;
// Clear the Response Error bit
BufferFrame1[0] = 0 | bfRESPONSE_ERROR_BYTE;
BufferFrame2[0] = 0;
Indicator_Start();
Update Frame1 (VL1_DIA_Frm1) buffer with the status of SW1 and SW2.
Check if Frame2 (VL1_CEM_Frm2) is complete. If yes, check the status of SW7 and SW8 of slave 1 sent in this frame
and control the blinking LEDs accordingly.
Check if the GOTO_SLEEP flag has been set. If yes, enter the low-power mode.
if(bResponseError) BufferFrame2[2] |= RESPONSE_ERROR_MASK;
if (PreviousValue != PRT2DR)
{
}
if(TransferStatus & bfSTATUS_GOTO_SLEEP)
{
}
Example Project for Slave 2 (DIA)
Description
Example Slave 2 Program
PreviousValue = PRT2DR;
TempBuffer[1] = PRT2DR;
TempBuffer[0] = bfDATA_READY;
l_bytes_wr(Frame3, 0, 2, TempBuffer);
GoToSleep();
This frame is an Event triggered one.
// Init LIN Physical core
// Init the NAD
// Make Switch Inputs Pull Up
// Switch off LED1 and LED2
// Clear the Indicator flags
Cypress Semiconductor – Rev. **
If set, call the GoToSleep Function
So look if there
LIN Bus 2.0 Reference Design
Only if
October 25, 2006

Related parts for CY3220LINBUS-RD