You have no items in your shopping cart.

Subtotal: 0.00

How to Interface Traffic Light 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 CY8C3866 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.

Traffic Light Control

Traffic lights, which may also be known as stoplights, traffic lamps, traffic signals, signal lights, robots or semaphore, are signaling devices positioned at road intersections, pedestrian crossings and other locations to control competing flows of traffic.

About the colors of Traffic Light Control

Traffic lights alternate the right of way of road users by displaying lights of a standard color (red, yellow/amber, and green), using a universal color code (and a precise sequence to enable comprehension by those who are color blind).

In the typical sequence of colored lights:

  • Illumination of the green light allows traffic to proceed in the direction denoted,
  • Illumination of the yellow/amber light denoting, if safe to do so, prepare to stop short of the intersection, and
  • Illumination of the red signal prohibits any traffic from proceeding.

Usually, the red light contains some orange in its hue, and the green light contains some blue, for the benefit of people with red-green color blindness, and "green" lights in many areas are in fact blue lenses on a yellow light (which together appear green).

Interfacing Traffic Light with CY8C3866

The Traffic light controller section consists of 12 Nos. point LEDS are arranged by 4Lanes in CY8C3866 Development Board . Each lane has Go (Green), Listen (Yellow) and Stop (Red) LED is being placed.

Pin Assignment with CY8C3866



LAN Direction

CY8C3866 Lines

LED’s

Traffic Light Controller

NORTH

P1.0

D11-Stop

 

P1.1

D12-Listen

P1.2

D13-Go

WEST

P1.3

D14-Stop

P1.4

D15-Listen

P1.5

D16-Go

SOUTH

P1.6

D17-Stop

P1.7

D18-Listen

P7.0

D19-Go

EAST

P7.1

D20-Stop

P7.2

D21-Listen

P7.3

D22-Go

Note : Make SW30 to “Traffic” label marking position

 



Circuit Diagram to Interface Traffic Light with CY8C3866





C Program to Traffic Light using CY8C3866

**************************************************************************************

Title : Program to read traffic light controller

*************************************************************************************

#include 

void main()

{

for(;;)

{

// LEDX_0 - RED LEDX_1 - YELLOW LEDX_2 - GREEN LEDA_0_Write(0);

LEDA_1_Write(0);

LEDA_2_Write(1);

LEDB_0_Write(1);

LEDB_1_Write(0);

LEDB_2_Write(0);

LEDC_0_Write(1);

LEDC_1_Write(0);

LEDC_2_Write(0);

LEDD_0_Write(1);

LEDD_1_Write(0);

LEDD_2_Write(0);

CyDelay(10000);

LEDA_0_Write(0);

LEDA_1_Write(1);

LEDA_2_Write(0);

CyDelay(3000);

LEDA_0_Write(1);

LEDA_1_Write(0);

LEDA_2_Write(0);

LEDB_0_Write(0);

LEDB_1_Write(0);

LEDB_2_Write(1);

LEDC_0_Write(1);

LEDC_1_Write(0);

LEDC_2_Write(0);

LEDD_0_Write(1);

CyDelay(3000);

LEDA_0_Write(1);

LEDA_1_Write(0);

LEDA_2_Write(0);

LEDB_0_Write(1);

LEDB_1_Write(0);

LEDB_2_Write(0);

LEDC_0_Write(0);

LEDC_1_Write(0);

LEDC_2_Write(1);

LEDD_0_Write(1);

LEDD_1_Write(0);

LEDD_2_Write(0);

CyDelay(10000);

LEDC_0_Write(0);

LEDC_1_Write(1);

LEDC_2_Write(0);

CyDelay(3000);

LEDA_0_Write(1);

LEDA_1_Write(0);

LEDA_2_Write(0);

LEDB_0_Write(1);

LEDB_1_Write(0);

LEDB_2_Write(0);

LEDC_0_Write(1);

LEDC_1_Write(0);

LEDC_2_Write(0);

LEDD_0_Write(0);

LEDD_1_Write(0);

LEDD_2_Write(1);

CyDelay(10000);

LEDD_0_Write(0);

LEDD_1_Write(1);

LEDD_2_Write(0);

CyDelay(3000);

}

}

/* [] END OF FILE */