ABC of Electronics.com
Electronics Tutorial

Electronics for beginners

navleft
Home |Contact| Disclaimer |Advertise                                                                  ABC of Electronics
navright
lnavl
 Useful Links
lnavr

Indian Scientists

SerialCommunication

Datasheets

8051 Tutorial

555 Timer Tutorial

Calculators  

BEAM ROBOTICS 

WiMAX 

Sensors  

MP3 VS MP4

Chandrayaan  

DIAC TRIAC 

6Sigma Methodology

Electronics Teacher

 

ALBERT EINSTEIN Biography and inventions

 

Electronics Circuits

123Circuits.com

 

Electronics terms

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

 

EMS TRACKING:TRACK YOUR COURIERS

spacer

Electronics Tutorial for Beginners

ABC of Electronics Offering free comprehensive basic electronics tutorial. In this Electronics Tutorial we have explained the basic electronic concepts. Here you can find 8051 Tutorials & 555 Timer Tutorials which are commonly used in electronics. Every effort is made to keep the website up and running smoothly

8051 Timer Basics

8051 has two timers T0(P 3.4) and T1(P 3.5). Timers can be used for generating time delays or as counters as well ,for that we have to provide the pulses externally.

SFR Type

Description of SFR

SFR Address

TH0

High Byte OF Timer 0

8Ch

TL0

Low Byte  OF Timer 0

8Ah

TH1

High Byte OF Timer 1

8Dh

TL1

Low Byte OF Timer 1

8Bh

TCON

Timer Control

88h

TMOD

Timer Mode

89h

                                                     TMOD SFR -Timers

By Using this SFR we can modify timer to be a 16-bit timer, an 8-bit auto reload timer, a 13-bit timer, or 2 separate timers.

In 16 bit mode the timer ranges from 0000-ffffh and on roll over sets the tf flag whereas in the 8 bit auto reload mode the timer ranges from 00-ffh and sets the tf flag here as well on roll over. In auto reload mode we don't have to reload the the values of th and tl registers like we did it in the 16 bit mode.

Bit Number

Type

Working

Timer Type

7

GATE1

Gating Control when set

1

6

C/T1

To decide whether timer is used as a delay generator or as an event counter

1

5

M1

Timer mode bit

1

4

M0

Timer mode bit

1

3

GATE0

Gating Control Purpose

0

2

C/T0

To decide whether timer is used as a delay generator or as an event counter

0

1

M1

Timer mode bit

0

0

M0

Timer mode bit

0

M1

M0

Timer Mode

Description of Mode

0

0

0

13-bit Timer.

0

1

1

16-bit Timer

1

0

2

8-bit auto-reload

1

1

3

Split timer mode

TCON SFR-Timers- TCON REGISTER is the register where we have the tr0,tr1,tf0,tf1 bits.

tr0, tr1 ( timer run)  for timer 0 and timer 1 and tf0,tf1(timer overflow)  for timer 0 and timer 1 respectively.

The Timer Control SFR is used to modify the way in which the 8051's two timers T0 & T1 are operating.

Bit Type Working
7 TF1 Timer 1 Overflow flag
6 TR1 Timer 1 Run control bit
5 TF0 Timer 0 Overflow flag
4 TR0 Timer 0 Run control bit
3 IE1 External Interrupt 1
2 IT1 Interrupt 1 type
1 IE0 External Interrupt 0
0 IT0 Interrupt 0 Type

 

spacer

© Copyright 2008, ABC of Electronics. All Rights Reserved.