i need help with a pedestrian counter

Thread Starter

julianiolivar

Joined Jun 14, 2017
2
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. <SNIP>

Moderators note : removed email to avoid spammers
 
Last edited by a moderator:

spinnaker

Joined Oct 29, 2009
7,830
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. <SNIP>

Moderators note : removed email to avoid spammers
Is there a question in all of that? If you want any help then you are going to have to show your work. No one is going to complete your "project" for you.

This sounds like homework yo me.
 
Top