UroBoros
Advanced Member level 2
- Joined
- May 5, 2004
- Messages
- 642
- Helped
- 19
- Reputation
- 38
- Reaction score
- 8
- Trophy points
- 1,298
- Location
- Cochin - India
- Activity points
- 6,463
Picstudent said:Hai
Which is the suitable and available crystal frequency and timer mode combination so that I can get an exact one second interupt on 89S51?
rellutzu said:To create a time window of 1sec use a register, decremented/increment(choose one) each time the counter overflows(655535->0). And prefed this register with a value that multiplied with 65536 equals roughly 1 sec.
You'll need 15.25 fed in this register.Decrement/Increment the reg 15 times and the last time prefed in the timer the 65536-0.25*65356-X.
X is the time (use a debugger to measure exactly) taken between the overflow of the
timer and the comparison of different routines used for jumps and comparison .It will be tens of Us .
Picstudent said:Also how to count time elapsed during instructions in ke*il like stopwatch in MPLAB?
Even if this is 8-bit processor, counting to almost as much as you want is not that complicated .. in 250µs the multiplication is 4000 and this can be done in less than 10 lines of code..How are you going to count 1000, when you only have registers of 8 bits(counting up to 255)?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?