Back to the 2024 paper

Module 4: Memory and I/O Interfacing

20247m

What is a Timer circuit? Explain the Timer operations associated to 8051 microcontrollers by using Timer Registers.

Worked SolutionAI Assisted

Timer Circuit & Operations in 8051

8051 has two 16-bit timers/counters T0/T1 (8052 adds T2). Each has THx/TLx, controlled by TMOD (GATE, C/T, M1,M0) and TCON (TFx, TRx).

Modes: Mode0 13-bit, Mode1 16-bit, Mode2 8-bit auto-reload, Mode3 split TL0/TH0 as two 8-bit (T1 stops).

Timer vs Counter: Timer counts machine cycles (Fosc/12, internal), Counter counts external pulses on T0 (P3.4)/T1 (P3.5) falling edge.

Operation: Set TMOD e.g., MOV TMOD,#01H (T0 mode1 timer), load THx/TLx =65536-counts, SETB TRx starts, TFx sets on overflow (interrupt if ET0/1+EA). GATE=1 allows INTx pin gating.

Baud use: Timer1 mode2 auto-reload for serial baud. Programming example for delay as in Q12.

Control via TCON bits.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.