Description of Running Lights

 

Circuit is very simple and straightforward. Two inputs are added just to give an idea of input control and software denouncing. An ATMEL Micro-controller AT89C2051 is used to control the LED glowing one by one to give the effect of running light. Port 1 is used for LED. And Port 3 two pins P3.0 and P3.1 are used as inputs pins to select two different speed of the running lights. A 12 M Hz crystal is used for basic timings of controller. Micro-controller VCC pin has grounded by one 0.1 uF capacitor, it should always to be grounded very near to micro-controller VCC pin to protect by and RFI (Radio Frequency interference).

Schematic Circuit Diagram of the Project

  Power Supply

Software

 

It is written in BASCOM-51 A Holland company offering a

Power basic compiler IDE, Many features at one tool.

Click to download free demo compiler at http://www.mcselec.com 

 

Rem Project Running Light

                        Rem Date 27-10-2005

Rem This module is presented only to serve as an sample for the

Rem AT89C2051 development. Author provides this module as is and

Rem does'nt guarantee its functionality or suitability for any

Rem particuler purpose

Rem Pl.E-Mail any question and suggestion to syedpervez@yahoo.com

 

$regfile = "89c2051.dat"

$crystal = 12000000

Dim Num_1 As Byte

Dim Speed As Integer

Num_1 = &B11111110

Speed = 1000

Do

Debounce P3.0 , 0 , Slow , Sub

                         Debounce P3.1 , 0 , Fast , Sub

 P1 = Num_1

 Waitms Speed

 Rotate Num_1 , Left , 1

 Loop

 Slow:

 Speed = Speed + 100

 If Speed < 2000 Then

 Speed = 2000

 End If

 Return

 Fast:

 Speed = Speed - 100

 If Speed > 100 Then

 Speed = 100

 End If

 Return

 Down load all in one zip file

 

 

 

Hosting by WebRing.