Help traffic light system using PicBasic Pro


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Help traffic light system using PicBasic Pro

    Hi,

    I suggest you start with:

    Properly document the HW with schematics.
    Make sure you can flash each LED in a simple program to make sure the PIC is running and that you can control each LED
    And that you can read the sensor you have mentioned.


    When that is done (which normally is the hardest part of a project) then you make a flow chart of what you want the software to do. Do you want to use delays or a real time clock with timers.

    I am sure there are many people here that will help you correct the code but I doubt anyone will write your school project for free. Also I don't think it is a great idea if you get the code and HW setup here... and then even cant answer the most simple question when challenged by your teacher. Code is really a personal skill and if I were your teacher I would ask to make sure you know what you have done and not copied a already finished project from internet.

    Oh.. by the way you might end up learning something that can be useful in the future..

    so show us your best efforts and we will all help... ask for help when you get stuck and we will all help .. but dont ask us to do your homework

    at least that is how I look at it
    Last edited by Jumper; - 4th May 2013 at 15:31.

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Help traffic light system using PicBasic Pro

    Ditto. I'm thinking we can point in the right direction but no one will write code unless they get a credit card number.

    As for NS and EW, if you're traveling on a road and come to a light controlled intersection more than likely the oncoming traffic has the same color of lights displayed to them. You didn't say you had to control left turn lanes so I'm assuming you only have to control the major travel lanes. Only an insurance agent would want perpendicular paths to be the same. You also said you didn't have to build any circuitry so just recognizing that the N and S would be the same as well as E and W would be the same will save you some time in programming.

    The whole rate thing for car measurement kinda throws me off. Usually you monitor how many cars are stacked up and adjust accordingly. If you did the car/minute you'd have to turn the sensors off during the stopped periods and turn them on at some point to measure traffic flow rates. You'd also have to take into account traffic legal speed during the sensed periods.

    Jumper is correct in that you really need to get each LED blinking or at least turning on and off when you think they should. This ensures you can control them and that you've connected the PIC correctly.

    Next step would be to post some code and/or schematic and you'll be overjoyed at the response. Though, as you're claiming to be an ME student, I'm surprised you haven't asked for a schematic.

    Anyway, just my thoughts.

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Help traffic light system using PicBasic Pro

    Quote Originally Posted by Jumper View Post
    Hi,

    but dont ask us to do your homework

    at least that is how I look at it
    That was my first thought when I read the first post - I graduated already, I don't want to do someone ELSE'S homework!
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  4. #4
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default Re: Help traffic light system using PicBasic Pro

    Hi David,

    It looks like you are way in over your head with this project. I really have to ask the question I haven't seen asked yet but what are you studying in school? Has your instructor run the class through any training on programming?

    Anyway, I want to push you in the right direction. Goto http://www.ecrostech.com/General/Tra...ghts/Steps.htm
    and look at the little video of their demo board. ALSO READ THE INFORMATION ON THE MAIN PAGE. It will also tell you that you have along ways to go with your project. It points out some of the things the other members here have pointed out to you regarding trying to just light an LED with your chip. Even though the demo board was built around a different family of microcontrollers it is adaptable to the 16F877A chip you are wanting to use. And at a great cost. $15.00 for the demo board with parts less the micro.

    After looking at the demo board working did you notice the North/South and East/West lights working? Kinda neat huh?

    One of my first projects was building a traffic light from a PICBASIC book I bought on-line. It was great. I did a traffic control project for my home town back in 2001 and really got into the electronics of traffic lights. I found alot of things on-line. You need some time to explore.

    Anyway, go to that site and spend some time looking through it. Put your thoughts together and try things in small steps and work your way up.

    If it helps, Nuts and Volts magazine ran a series on learning to work with PICs that might help. They also put the articles together in book form.

    I'm looking forward to watching your progress here. Now get to work!

    BobK
    Last edited by BobK; - 7th May 2013 at 02:31. Reason: Correct some grammar

Similar Threads

  1. conversion from picbasic to picbasic pro
    By winjohan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st November 2011, 18:00
  2. PICBasic Pro vs. Proton Dev System
    By hjsong in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th February 2007, 04:17
  3. PICBasic Pro vs Proton PICBasic
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd November 2006, 16:11
  4. Get picbasic pro
    By Nicksterjack in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th March 2005, 12:14
  5. PicBasic Pro & PicBasic syntax different
    By Billyc in forum General
    Replies: 5
    Last Post: - 16th April 2004, 21:19

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts