• 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.

help with pedestrian counter

Status
Not open for further replies.

Juliani Olivar

New Member
Hi everybody!

I'm Juliani and i'd like to do a pedestrian counter but i don't know how I can start, I mean, I know how it have to work but i don't know enough about programming languages for microcontrollers. I know basic things and i would be really grateful if somebody can help me with the code. It has some specifications:

- Pic 16f84A

- Two 7-segment displays (tens and units)

- It must work with 2 signals : red(PORTA .1) and green (PORTA .2)

-When the microcontroller receives a positive pulse(1) for example in PORTA .1 (red), the counter has to start counting internally the time while the port is set (only shows in the 7-segment display the number 1 to indicate that it is counting in the moment). When the signal is stopped, the counter will stop counting and it has to save the counted time in a variable or i dont know, but the pedestrian counter has to show that counted time when it receives the signal for second time but decreasing (20, 19, 18, 17, 16...2, 1) .

-I mean, for example, in the first time the counter counted 20seconds. That time will be shown in the second cycle and at the same time the counter will be counting again and it will do the same, it will show the counted time in the next cycle. It never will stop counting.

-i have to consider if the counter receives another different time. We know that it never stops counting (it always compare the counted times). So, if it receives more time in this cycle that in the first one, the counter shows the number 1 in the 7-segment units and only add the extra time in the next cycle. And if it receives less time, the counter stops showing the decreasing time and it does a subtraction to show the correct time in the next cycle.

-When the decreasing time is shown, the number 0 can't appear. (05,04,03,02,01) The counter only has to show the number (5,4,3,2,1)


I really need to finish this project but as i said, i know a little bit about programming languages.

I'd appreciate your help!

Here is my email address if you prefer. DO NOT DISCLOSE EMAIL.. Or the bots will be after you!
 
Last edited by a moderator:

KMoffett

Well-Known Member
Juliani,

You're missing one thing. You have a lot of internal operational concepts, but not the purpose of the project.

Ken
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top