??? 08/16/04 14:13 Read: times |
#75958 - RE: Stuck on the event timer Responding to: ???'s previous message |
It is my general comment that the way you are going about trying to measure how long something takes to perform in your microcontroller is too complex and will end up being imprecise due to interrupt overlays and latencies.
Amen When I need to measure the performance of a task, algorithm, or processing sequence on my microcontroller I make use of a spare I/O port pin. In the code where the measurement is meant to start I use a single SETB instruction to set the port pin to a high level. Likewise in the code path where measurement is intended to be completed I add in an single CLR instruction to set the port pin back to a low level. It is then possible to simply connect this pulse coming from the port pin into an oscilloscope, digital scope, or logic analyzer to measure its width. One added comment: do remember to disable interrupts during this or the measurement may be false. Erik |
Topic | Author | Date |
Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer | 01/01/70 00:00 | |
RE: Stuck on the event timer![]() | 01/01/70 00:00 |