up down counter using pic12f609

Thread Starter

baker87

Joined Nov 27, 2011
2
HI, i need to make an up/down counter using a pic12f609 to sn7447 BCD to 7-segment display to count from 0 to 9 and 9 to 0
The control of the counting cycle must b done using two switches
switch 1 = Up (0-9)
switch 2 = down (9-0)
the delay time is 1.5 sec using mplab assembly language
am new to micro controller and i need some ideas to do this task . i have done this using 4-bit counter and bcd to seven segment display i just inverted QA an QD on the 4-bit counter using a Nand gate and D/U on the 4-bit counter is high to count from 0 to 9 and for 9 to 0 i connected the D/U to low . but using pic12f609 i have hard time writing a code for that ...
 

SgtWookie

Joined Jul 17, 2007
22,230
Is this a homework assignment? It kind of sounds like one.

Do you have to use an actual 7-segment display, or can you make one from discrete LEDs?
If the former, you'll have to use a 7447 or similar.
If the latter, you could use Charlieplexing, and skip the 7447.
 

Thread Starter

baker87

Joined Nov 27, 2011
2
Is this a homework assignment? It kind of sounds like one.

Do you have to use an actual 7-segment display, or can you make one from discrete LEDs?
If the former, you'll have to use a 7447 or similar.
If the latter, you could use Charlieplexing, and skip the 7447.
yes i have to use actual 7-segment display and actual 7447
This is actually a project that am working on but we have been just introduced to Micro controller and we have been doing only digital circuit design the whole time i can do this project using 4-bit counter and BCD to 7-segment display
 

thatoneguy

Joined Feb 19, 2009
6,359
It sounds like most of the assignment is for you to create an accurate 1.5mS delay and send a pulse out on a pin for the clock.

The second part is instead of the switching the 7447 directly with gates & switches deciding the behavior, the PIC polls and debounces the switches and sets the appropriate lines high or low.
 

SgtWookie

Joined Jul 17, 2007
22,230
Whatever you do, make certain that:
1) You use GP3 as an input, using a N.O. push button to short it to ground.
2) Use a 10k pull-up resistor from GP3 to Vcc/Vdd.
3) Disable the watchdog timer and reset features.
 

thatoneguy

Joined Feb 19, 2009
6,359
Whatever you do, make certain that:
1) You use GP3 as an input, using a N.O. push button to short it to ground.
2) Use a 10k pull-up resistor from GP3 to Vcc/Vdd.
3) Disable the watchdog timer and reset features.
How will he Learn anything if it doesn't randomly reset or not run at all? :p
 
Top