Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre









Chapter 1
Types of Memory

Chapter 2
Special Function Registers

Chapter 3
Basic Registers

Chapter 4
Addressing Modes

Chapter 5
Program Flow

Chapter 6
Low Level Information

Chapter 7

Chapter 8
Serial Port Operations

Chapter 9

Additional Features in 8052

8052 Instruction Set

8051 Microcontroller
Mode 0 -13 Bit Timer

Author : Craig Steiner

Source : 8052.com

Book : The 8051/8052 Microcontroller:
 Architecture, Assembly Language, And Hardware Interfacing (Paperback)

13-bit Time Mode (mode 0)

Timer mode "0" is a 13-bit timer. This is a relic that was kept around in the 8051 to maintain compatibility with it’s predecessor, the 8048. Generally the 13-bit timer mode is not used in new development.

When the timer is in 13-bit mode, TLx will count from 0 to 31. When TLx is incremented from 31, it will "reset" to 0 and increment THx. Thus, effectively, only 13 bits of the two timer bytes are being used: bits 0-4 of TLx and bits 0-7 of THx. This also means, in essence, the timer can only contain 8192 values. If you set a 13-bit timer to 0, it will overflow back to zero 8192 machine cycles later.

Again, there is very little reason to use this mode and it is only mentioned so you won’t be surprised if you ever end up analyzing archaic code which has been passed down through the generations (a generation in a programming shop is often on the order of about 3 or 4 months).

  <<< Click here to come back on (8051 - Timers)

<<<<  Back to 8051 / 52  Microcontroller Tutorial