Show Menu
Cheatography

test 8051 Cheat Sheet by

registers

TMOD
G | C/T | M1| M0 | G | C/T | M1 | M0
SCON
SM0|SM­1|SM2| REN | T8 | R8 | TI | RI
IE
EA| - | ET2 | ES | ET1|EX­1|E­T0|EX0
TCON
F1| R1| F0| R0| IE1| IT1| IE0| IT0

BAUD RATE

Baud Rate
TH1 (Decimal)
TH1 (HEX)
9600
-3
FD
4800
-6
FA
2400
-12
F4
1200
-24
E8

PRIORITY ORDER

Interrupt
number
pin
INT0
0
P3.2
TF0
1
P3.4
INT1
2
P3.3
TF1
3
P3.5
RI+TI
4
P3.0(R­x)+­P3.1­(Tx)
 

TIMERS

SET TMOD
INITIALIZE TL , TH
Start Timer TR=1
Poll [ While(TF == 0); TR=0; TF=0; ]

SERIAL

TMOD = 0X20
TH1= -3 (BAUD RATE)
SCON = 0X50
SBUF= data;
poll/ISR for TI/ RI

INTERRUPT

ISR definition
void fxn() interrupt [] {}
enable interrupts IE
                   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          C Reference Cheat Sheet
          C program Cheat Sheet
          Informática Industrial GIEI UCA Cheat Sheet