We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am using an MCB900 evaluation board for philips LPC935FA which uses a clock of 7.373MHz. I wanted a 1 second delay so I loaded timer 0 with these values: TH0=0xF1; TL0=0x99 (I used the code architect to get these values). I then used a counter in the software to count this 1,000 times. This ordinarily should give me 1 second delay after which an LED should be switched on. I have used a stop watch to check the accuracy of the timing and it lags behind by as much as 3 seconds. Could anyone help me as to the reason why this happens. Regards, Ade
"if any variable of more than 8 bits is used both in an ISR and outside it MUST be handled inside disabled interrupt." Or, if you don't want to mess up your interrupt latency, re-read the variable until its value is the same on consecutive reads.