




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
very nic book for deep knowledge of 8051. this book also useful for learn programming of embedded system
Typology: Study Guides, Projects, Research
1 / 617
This page cannot be seen from the preview
Don't miss anything!
The 8051 Microcontroller and Embedded Using Assembly and C Muhammad Ali Mazidi Janice Gillispie Mazidi Second EditionSystems CONTENTS Introduction to ComputingThe 8051 Microcontrollers^ Rolin D. McKinlay ^ ^^8051 Branch InstructionsI/O Port Programming (^8051) Arithmetic & Logic Instructions 805180518051 Assembly Language ProgrammingAddressing ModesProgramming in CHardware Connection and Hex FileTimer/Counter Programming And Programs in Assembly and C ^ ^^8051 Interrupts Programming (^8051) 8051 Real World Interfacing I: LCD,ADC AND SENSORSLCD and Keyboard 8051 Serial Port ProgrammingInterfacing to External MemoryInterfacing with 8255 Interfacing in Assembly and C^ in Assembly and C
Numbering and coding systems Digital primer Inside the computer
Know the weight of each bit in a binarynumber Add them together to get its decimalequivalentEx. Convert 11001 Use the concept of weight to convert adecimal number to a binary directly
to decimal 2 Weight:^
4 3 22
2 1 22
(^02)
Digits:^
Sum:^
Ex. Convert 39
to binary (^10) 32 + 0 + 0 + 4 + 2 + 1 = 39 Therefore, 39
F 1111 15
E 1110 14
D 1101 13
C 1100 12
B 1011 11
A 1010 10
(^91001) 9
(^81000) 8
(^70111) 7
(^60110) 6
(^50101) 5
(^40100) 4
(^30011) 3
(^20010) 2
(^10001) 1
(^00000) 0
HexBinary Decimal
Convert to binary first and thenconvert to hex Convert directly from decimal to hexby repeated division, keeping track ofthe remaindersEx. Convert 45^10
to hex 32 16 8 4 2
Ex. Convert 629
to hex 10 512 256 128 64
Convert from hex to binary and then todecimal Convert directly from hex to decimalby summing the weight of all digitsEx. 6B2= 0110 1011 0010^16
2 1024 512 256
10
If the second digit is greater than thefirst, borrow 16 from the precedingdigitEx. Perform hex subtraction: 59F – 2B859F^ LSD: 15 – 8 = 7– 2B^
16 2E^
The ASCII (pronounced
“ask-E”) code
assigns binary patterns for^ ¾^ Numbers 0 to 9^ ¾^ All the letters of English alphabet,uppercase and lowercase^ ¾^ Many control codes and punctuationmarks The ASCII system uses 7 bits torepresent each code
z7A Z5A
y 79 Y 59
…... ......
d 64 D 44
c 63 C 43
b 62 B 42
a 61 A 41
SymbolHex SymbolHex Selected ASCII codes
AND gate Computer Science Illuminated, Dale and Lewis OR gate Computer Science Illuminated, Dale and Lewis
Tri-state buffer Inverter Computer Science Illuminated, Dale and Lewis XOR gate Computer Science Illuminated, Dale and Lewis
Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN
Half adder Full adder
Digital Design, Mano
Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN
4-bit adder
Digital Design, Mano