PIC Traffic Lights Controller with PIC16F84A

Microcontroller Topics
User avatar
gomar2010
Posts: 2
Joined: Thu Apr 21, 2011 4:09 am

Re: PIC Traffic Lights Controller with PIC16F84A

Post by gomar2010 » Thu Apr 21, 2011 4:16 am

Hi sir...
the code that you wrote for 'There the C source code' is the one to program the PIC?
you are connecting pin 4 and 14 to 5 volts, you are connecting LM7805 to both 5 volts and 12 volts, right? you are using three capacitors 0.1, 0.1, and 100 micro farad, is that true?
User avatar
gomar2010
Posts: 2
Joined: Thu Apr 21, 2011 4:09 am

Re: PIC Traffic Lights Controller with PIC16F84A

Post by gomar2010 » Thu Apr 21, 2011 4:42 am

what code shall i use to program the PIC?
I need green to turn for 5 seconds, yellow for 1 second, and red for 5 seconds.
Could you please tell what code i should use?
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: PIC Traffic Lights Controller with PIC16F84A

Post by Neo » Thu Apr 21, 2011 1:17 pm

Thought this is submitted by one of our ROBOT.LK members, I would give you some guidance on this.
the code that you wrote for 'There the C source code' is the one to program the PIC?
what code shall i use to program the PIC?
You could program the PIC using ASM, C or Basic. C is the preferred to program in most of the cases. However you need a C compiler like Hi TECH C to compile the code for the PIC. If you use ASM, then you can use MPLAB which comes with a built-in ASM compiler.

So you can use either the ASM version or C version.
you are connecting LM7805 to both 5 volts and 12 volts, right?
When you supply 12 V to LM7805 power regulator, it makes 5V to your circuit. You could input up to 35V to 7805 according to the spec and get 5V to your circuit.
you are using three capacitors 0.1, 0.1, and 100 micro farad, is that true?
Correct. The 0.1u is the recommended minimum load capacitance to limit high frequency noise.
I need green to turn for 5 seconds, yellow for 1 second, and red for 5 seconds.
DelayBigMs function is used to delay the execution for some given milliseconds. For example, to delay 5 seconds, you need to use as below.

Code: Select all

DelayBigMs (5000); // 5000 msec = 5 sec
I think I have answered all your questions.
nukleng
Corporal
Corporal
Posts: 3
Joined: Thu Jan 31, 2013 11:34 am

Re: PIC Traffic Lights Controller with PIC16F84A

Post by nukleng » Thu Jan 31, 2013 12:05 pm

thx
Post Reply

Return to “Microcontrollers”