This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Calculating Small time increments

I need to measure small portions of time (at least 500us) while using Keil's RTX51 with a System Slice of 20ms. I'm assuming that RTX51 already has a realtime counter that tracks clock ticks (or at least Timer0 overflows) since initialization. Does anyone know the variables/registers it uses for this. I cannot find any reference to tracking time that's less than one System Slice in the RTX manual

Normally I would set up another timer to do this tracking but Timer1 and Timer2 are already being used for UART and I2C functions. I have a fall back plan to use Timer1 (even while in use as a baud rate generator) but using system variables would be much cleaner

Parents
  • Funny you should mention about ignoring the byte gap of the RTU mode. For lack of simpler solutions. I've also decided to ignore the byte gap and solely rely on checking the incoming stream to make sure it conforms to my supported commands. This gives me 6 points of reference to check, plus that LRC checksum nighmare.

    This adds to my serial interrupts overhead, but in the end it is extremely unlikely my system will falsely activate on someone else's command. I'm glad to see that other designer's have also followed this route

Reply
  • Funny you should mention about ignoring the byte gap of the RTU mode. For lack of simpler solutions. I've also decided to ignore the byte gap and solely rely on checking the incoming stream to make sure it conforms to my supported commands. This gives me 6 points of reference to check, plus that LRC checksum nighmare.

    This adds to my serial interrupts overhead, but in the end it is extremely unlikely my system will falsely activate on someone else's command. I'm glad to see that other designer's have also followed this route

Children
No data