Hello,
i am currently trying to integrate a timer properly to my project.
I want to set a pin to high for a duration of 1msec. I configured the timer like shown below:
//********TIMER STUFF**********
TMOD = (TMOD & 0xF0) | 0x20; /* Set Mode (8-bit timer with reload) */
TH1 = 256 - 123; /* Reload TL1 to count 133 clocks; overflow each ~0.0001 sec! */
TL1 = TH1;
ET1 = 1; /* Enable Timer 1 Interrupts */
TR1 = 1; /* Start Timer 1 Running */
The problem is, that if i choose a duration smaller than 2msec, the pin is always high. If i choose a duration greater than 2msec. Everything works fine.
Is there a maximum time value for swapping a pin from high to low?
Thanks for your help.