C 8 0 5 1 F 3 3 6 / 7 / 8 / 9
Rev. 0.3
9
5.4. Switches and LEDs
Two push-button switches are provided on the target board. Switch SW1 is connected to the RESET pin of the
C8051F338. Pressing SW1 puts the device into its hardware-reset state. Switch SW2 is connected to the
C8051F338’s general purpose I/O (GPIO) pin through headers. Pressing SW2 generates a logic low signal on the
port pin. Remove the shorting block from the header to disconnect SW2 from the port pins. The port pin signal is
also routed to a pin on the J1 I/O connector. See Table 1 for the port pins and headers corresponding to each
switch.
One touch sensitive (contactless) switch is provided on the target board. The operation of this switch needs
appropriate code running on the C8051F338 MCU that can sense the state of the switch. All the four shorting
blocks should be present on header J11 to properly connect this switch to the MCU.
Three LEDs are provided on the target board to serve as indicators. The red LED labeled PWR is used to indicate
the presence of power to the target board. The green LED labeled with port pin name P1.3 is connected to the
C8051F338’s GPIO pin P1.3 through the header J3. Remove the shorting block from the header to disconnect the
LED from the port pin. The port pin signal is also routed to a pin on the J1 I/O connector. Another red LED labeled
USB is used to indicate a valid USB connection via the connector P2. See Table 1 for the port pins and headers
corresponding to each LED.
Table 1. Target Board I/O Descriptions
Description
I/O
Header(s)
SW1
Reset
none
SW2
P0.7
J3[3–4]
SW3 (Touch Sense Switch) P1.0, P2.0, P2.1, P2.3
J11
Green LED (P1.3)
P1.3
J3[1–2]
Red LED (PWR)
Power
none
Red LED (USB ACTIVE)
USB Active
none