microcontroller task- reaction timer+generating the delay of 1ms using TMR0

Thread Starter

GautamVK

Joined Dec 5, 2010
10
Hello there

I have task to complete urgently.. and i am looking for codes for PIC16F628... If you have or if you come across the codes for the following task below! please forward it!

TASk:

By pressing SW1, user starts the operation of the program. It waits until SW1 is released by the user, and generates a random number RND in the range of 0..7 and displays it using LD3, LD2 and LD1 (this action would normally hidden from the user,or be used for an electronic dice) for 0.5s. The program then switches LD3, LD2 and LD1 off, and switches LD4 on for 0.5 + RND*0.2s. After that it measures time after which the user presses SW2, and displays the result using all the LEDs with the resolution of 10ms (or all LEDs if the time was over 1s)

The preipheral program must use TMR0 to generate Pricise 1ms delay instead of the program provided.
The interrupt program must set LD6 on when TMR0 interrupt occurs.
The Question: Why you may want to use your program instead of the program provided.

Thanks plenty!
 
Last edited:
Top