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

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
// Process Frame2.
// the Frame2 buffer with the measured resistance
// Now check the bResponseError variable.
// then set the Response Error bit in the 2nd data byte (MSB) of Frame2
October 25, 2006
// Start the ADC and Start Conversion
ADC_Start(ADC_MEDPOWER);
ADC_StartAD();
// Enable Global Interrupts
M8C_EnableGInt;
// Infinite loop
while(1)
{
// corresponding bit in the bLED variable
// Read the LIN status
TransferStatus = (char)l_ifc_read_status();
// Check if Frame1 has been successfully received.
// update the LEDs with the data received.
if (BufferFrame1[0] & bfLAST_TRANSACTION_OK)
{
}
Resistance = CheckResistance();
TempBuffer[0] = (BYTE)Resistance;
TempBuffer[1] = ((BYTE)(Resistance >> 8)) & 0x7F;
// Update the Frame2 buffer with the prepared data
l_bytes_wr(Frame2, 1, 2, TempBuffer);
// Clear the Last Transaction Ok flag
BufferFrame1[0] &=
// Read the Frame1 buffer into TempBuffer
l_bytes_rd(Frame1, 0, 9, TempBuffer);
// Clear the Last Transaction OK Flag
TempBuffer[0] &= ~bfLAST_TRANSACTION_OK;
// Update Status Byte in Frame1 Buffer
l_bytes_wr(Frame1, 0, 1, TempBuffer);
// Now check the data bytes and set or clear the
bLED = 0;
for(i=0;i < 8 ; i++)
{
}
// Update Port 1 with LED data
PRT1DR = bLED;
if(TempBuffer[i+1] == 0)
{
}
else
{
}
bLED = bLED | ((BYTE)0x01 << (7-i));
bLED = bLED & (~(0x01 << (7-i)));
Call the CheckResistance function and update
~bfLAST_TRANSACTION_OK;
Cypress Semiconductor – Rev. **
If this variable is a non-zero
If yes,
5. Demonstration Projects
53

Related parts for CY3220LINBUS-RD