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.
Hi, I was just got a basic doubt about timers. Is it possible to read 8051 timer register. one of the timer for example timer0 starts when an external event occurs and stops until the event is finished. Once the timer stops I need to read value of the timer to check the time taken for the event to take place. I cant use the timer in counter mode since I dont have any signal coming to pins P3^5, P3^4.
regards. Raghun
Ya timer0 registers can be read & written like any register, TH0, TL0, The value can be moved to accumulator or R1, B.. using mov A, TH0 and accessed from there. If T1, T0 pins not working, could try Tx thru pin3.1 ie via SBUF to PC, could o/p to port 1 or 2 onto LED or any other o/p device.
Rgds, Hems.