Posted by: chang October 2, 2012
need help on Microprocessor
Login in to Rate this Post:     0       ?        
 Here i have posted my question ...i did the first part i need help on part ..how to put interupt and timer0.please if any one write the code for me.

Design a circuit using the PIC12F615 that counts from 0 to 9, then resets to 0 and starts counting 
again after reaching 9.  It should have one input that reads one of the momentary pulse switches.  
Use 4 of the GPIO ports on the PIC12 to drive the A, B, C, and D inputs to the 7-segment display 
driver.  
2. Create a software program in PIC12 assembly language that causes the hardware to count from 0 
to 9.  When it reaches 9 the counter should roll over to 0 and start counting again.  The program 
should recognize when the pulse switch is released (after being pressed) and immediately reverse 
direction, outputting the next lower digit in the sequence.  The digits should be illuminated for 500 
milliseconds.  After 500 milliseconds the display should go dark for 100 milliseconds before 
displaying the next digit.  When the pulse switch is pressed and released again the counter should 
start counting up following the same pattern it followed when switching from up to down.  
Subsequent switch press and releases should alternately change the direction of count.
3. Create a state diagram (flow chart) that shows the program’s operation.
4. Modify the software so that the counter changes direction when the switch is depressed, but does 
nothing when the switch is released.  Each time the switch is pressed the counter should change 
the direction (up or down) in which it is counting.  The hardware platform should not be modified 
between parts 2 and 3.
Read Full Discussion Thread for this article