Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 16f877a Traffic Light System (need help)

Status
Not open for further replies.

FinalDK

New Member
I'm having difficulties doing my project. I'm doing a normal traffic light system (4 lanes, NORTH,SOUTH,EAST,WEST) but I can't seem to get it right both hardware and programming-wise. I'm using MATLAB IDE v8.63, programmer PICkit 2, HI-TECH Universal ToolSuite (HI-TECH ANSI C Complier). Currently using PIC16f877a only (no others). I have more to this project but I can't get even the normal traffic light sequence right. Please help, I will hopefully get the circuit diagram done in about 4-5 hours time from now.

A total of 16 LED (2 green, 1 red, 1 yellow, for each corner)
I'm also going to put 4 RF interupt inside as input to interrupt the sequences. Any help will be very useful. I'm not sure about the about of PORTS (not the issue about QUANTITY but USAGE)
 
Need more info?
4 RF interrupts? assuming remote control?
Every traffic light I have seen use 1 red, 1 green, 1 yellow and sometimes an arrow.
must be Eurpoean or ?
 
MrDEB : Yes, 4 RF interrupts. I'm doing the interrupt for the case of emergency vehicles (mainly ambulance) stuck in traffic. Somewhat prioritizing the lane of the emergency vehicle. 4 lights, yes, European (left-side of the road). Green has 2, one for going straight and another to turn right. The right arrow doesn't need red and/or yellow since in my country it's understood that you can't turn right when the green light to the right isn't turned up. I understood on how to do the sequences but I have problem that I'm unable to apply in real-time, mainly programming or hardware. Simulations worked fine. I perhaps has some error in the program so I need some samples to refer on. I checked around and most are not using the same PIC or has add-ons (like timer or other PIC). I'm trying not to play things that I have no clue whatsoever.
 
I'm also doing a project same as this. I'm not a best programmer. I already implemented the code for 4 way junction. But the problem is it's not working properly. Can you help me please? First i want implement the normal traffic light system. Please check my code and let me know the modification that I want to correct. Hope any one can help me!
 
Last edited:
i considered 4 way junction and take J1,J2,J3,J4 as junction1, junction2,junction3,junction4... Coding might be confused..
 
Status
Not open for further replies.

Latest threads

Back
Top