You have no items in your shopping cart.

Subtotal: 0.00

How to Interface Switch with CY8C3866 PSOC3 Development Board

PSoc 3 Development kit

The PSoc 3 Development kit is specifically designed to help students to master the required skills in the area of embedded systems. The kit is designed in such way that all the possible features of the microcontroller will be easily used by the students. The kit supports FX2LP Programmer which is done through USB port.

Cypress 8051 core (CY8C3866), PSoc 3 Development kit is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 8-bit Microcontrollers. It integrates on board CAPSENSE BUTTONS, CAPSENSE LINEAR SLIDER, UART, ADC, DAC, Relay, Buzzer, Seven Segment, Serial EEPROM, Temperature Sensor LM35, Matrix Keypad, Switch, LED, Stepper Motor Driver, Traffic Light Controller, RTC, LCD & GLCD Display to create a stand-alone versatile test platform. User can easily engage in Development in this platform, or use it as reference to application Development.


A switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. A switch may be directly manipulated by a human as a control signal to a system, or to control power flow in a circuit.

Interfacing Switch with CY8C3866

Figure shows how to interface the switch to microcontroller. A simple switch has an open state and closed state. However, a microcontroller needs to see a definite high or low voltage level at a digital input.

A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it is open or closed. A resistor placed between a digital input and the supply voltage is called a "pull-up" resistor because it normally pulls the pin's voltage up to the supply.

We now want to control the LED by using switches in CY8C3866 Development Board. It works by turning ON a LED & then turning it OFF when switch is going to LOW or HIGH.

The CY8C3866 Development board has eight numbers of point LEDs, connected with I/O Port lines (P0.0 – P0.7) to make port pins high. Eight switches, connected with I/O port lines (P3.0 – P3.7) are used to control eight LEDs.

Pin Assignment with CY8C3866


Slide Switch

CY8C3866A lines

Input Logic Selection



















Circuit Diagram to Interface Switch with CY8C3866

Program to switch ON and OFF LED using CY8C3866


Title : Program to Blink LEDs controlling by switches



void main()


uint8 a0; for(;;)


a0 = SW_Read();