CY3274 Cypress High Voltage Programmable PLC Development Kit Guide, Doc. # 001-53598 Rev. *G
57
Code Examples
6. Generate the configuration by clicking on the menu Build -> Generate Configuration (Ctrl + F6).
This will generate all of the user module assembly and C code needed for the application. Place
an LCD UM and 3 LED UM with the following parameters:
a. LCD UM
i. Name = “LCD” LCD_Port = “Port_4”.
A LCD can be directly connected to the available LCD port.
b. 3 x LED UM (The corresponding LEDs are already hardwired to the respective pins on the
Cypress PLC Development Kits CY3274)
i. Name = “BIU_LED”, Port = “Port_2”, Pin = “Port_2_1”, Drive = “Active High”
ii. Name = “RX_LED”, Port = “Port_2”, Pin = “Port_2_3”, Drive = “Active High”
iii. Name = “TX_LED”, Port = “Port_2”, Pin = “Port_2_5”, Drive = “Active High”
c. Update the BIU, TX and RX ISR code snippets in PLT_1INT.asm from the PLT_1INT.asm file
in the CY3274_PC_Demo example project inside
<Install_Directory> -> Firmware
. Each
ISR enables the appropriate LED when the status is active (for example, turn on TX_LED
when transmitting) or disables the appropriate LED when the status is complete.
i. PLT_BIU_Active_ISR: This ISR is called when the Band In Use is active
ii. PLT_BIU_Complete_ISR: This ISR is called when the Band In Use is no longer set
iii. PLT_TX_Active_ISR: This ISR is called when the Transmitter is actively sending a
message
iv. PLT_TX_Complete_ISR: This ISR is called when the Transmitter has completed sending
the message
v. PLT_RX_Active_ISR: This ISR is called when the Receiver is in process of receiving a
packet
vi. PLT_RX_Complete_ISR: This ISR is called when the Receiver is no longer receiving a
packet
d. Buttons
i. Set P0[4] according to the settings shown below. This pin is used to select the Local Logical
Address of device during the boot up of the device from reset.
ii. Set P0[7] according to the settings shown below. This pin is used to select the mode of
operation (transmitter or receiver) during the boot up of the device from reset.
InterruptType
Terminal Count
ClockSync
Sync to SysClk
TC_PulseWidth
Full Clock
InvertCapture
Normal
Name
ADD_Select
Port
P0[4]
Port
StdCPU
Drive
Pull Up
Interrupt
DisableInt
Initial Value
1
Table 5-2. Parameters
Name
TickTimer
Содержание CY3274
Страница 74: ...74 CY3274 Cypress High Voltage Programmable PLC Development Kit Guide Doc 001 53598 Rev G A 2 2 Ground Layer ...
Страница 75: ...CY3274 Cypress High Voltage Programmable PLC Development Kit Guide Doc 001 53598 Rev G 75 A 2 3 Power Layer ...
Страница 76: ...76 CY3274 Cypress High Voltage Programmable PLC Development Kit Guide Doc 001 53598 Rev G A 2 4 Bottom Layer ...
Страница 77: ...CY3274 Cypress High Voltage Programmable PLC Development Kit Guide Doc 001 53598 Rev G 77 A 2 5 Top Silkscreen ...