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.

I need help with my timer project

Status
Not open for further replies.
I can't veiw youtube videos with this computer unless you embed them in the forum. But an up/down counter shouldn't be too hard to make.

What PIC are you using?
How do you want it to time? Based on an input or by clock cycles?
How often do you want it to delay?
How many times do you want it to count?
 

electro_phunk

New Member
I am using pic 16F628A and I want it to coutdown from a max time of 99sec. It will have two 7 segment displays, but for now I am only using one so that I can experiment. The countdown sequence is set with a + 1 sec function and decreased with a -1 sec function. then I need to be able to start it with another button. I think if i can adjust the frequency a led blinks by making it go faster or slower with two different buttons then I should be able to grasp the concept.
 
Try using this link

Use it to find out what kind of a delay you need for a 1 second count interval. Remember to consider how many extra clock cycles are going to be added for each 1 second cycle.

The way that I structure my program is to have a delay of 1 second as a subroutine and have a multiplier variable that is decreased by 1 after each second. Once this multiplier hits 0 then it stops counting and activates the alarm.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top