??? 10/30/09 15:02 Read: times |
#170250 - Timer Code Responding to: ???'s previous message |
After some research ive decided to use a 16bit timer0 and the Function GATE0 to time the events. I Decided want to incorporate a counter using C/T1 to count the amount of times the laser has being broken.. Heres the code so far.. Ive set up the timer so that every time it overflows its 1/20th of a second. Have i set TMOD Correctly? wat address is the time stored in stored in?
SET TMOD (0101 1101) MOV THO, #76; MOV TL0, #01; MOV TMOD, #01 SETB TR0; JNB TF0, $; MOV B, 0.05; \ Make b 1/20 MOV A, 8CH; \ Move the overflow value into accumulator MUL AB \ Multiply A by B, to find the amount of time it took |
Topic | Author | Date |
LightGate System project 8051 | 01/01/70 00:00 | |
Before you think about assembly language... | 01/01/70 00:00 | |
Focus on timers | 01/01/70 00:00 | |
Timer Code | 01/01/70 00:00 | |
float?![]() | 01/01/70 00:00 |