top of page

MICROCONTROLLERS AND INTERFACING

​

​

​

The term embedded system is a very common term in the sense that users do not recognize a system as an embedded system but rather as an everyday product that they constantly use. Microprocessors are widely used in embedded system products. An embedded system uses a microprocessor to perform a specific task. For example, a printer is an example of an embedded system since the processor inside it performs only one task which is getting the data and then printing it.. In an embedded system there is only one application software that is typically burned into ROM.​ Embedded products are very common. They span home products such as appliances, intercom, telephones garage door openers etc;  office products such as security systems, fax machines, microwave, copiers etc;  auto products such as trip computers, engine control, air bags, ABS, instrumentation etc.. Topics covered in this class are:

 

SYSTEM NUMBERS AND ARITHMETIC:

​

  • To understand the hardware and software of a microprocessor based system, one must understand the basics of number systems. In this chapter, the fundamentals of numbering and coding systems are explained. Logic gates, memory and memory types, memory address decoding and I/O address decoding are also explained. The topics explained in this chapter are:​

    • Binary Number System (base 2).

    • Octal Number System (base 8).

    • Hexadecimal number system (base 16).

    • Basic Logic Gates.

    • Computer System Major Components.

    • Semiconductor Memories Capacity, Organization and Access Time.

    • Memory Types. ROM, PROM, EPROM, UV-PROM , EEPROM, Flash and MROMs.

    • Random Access Memories, SRAM, NV-RAM and DRAM.

    • Memory and I/O Address Decoding

​

​

 

THE 8051 MICROPROCESSORS:

​

  • The 8051 Microprocessor is an early version microprocessor that is designed by INTEL Corporation. It is a very convenient microprocessor for the purpose of explaining microprocessors in general besides the fact that many applications have been designed which are 8051 based.. There are various members in the 8051 family such as the 8052, 8031 as well as various versions of the 8051 itself such as the 8751, AT89C51 and the DS5000. The topics explained in this chapter are:

    • The Contrast Between Microcontroller and Microcomputer.

    • The Concept of Embedded Systems.

    • Microprocessor Speed Variation, Packaging and Memory.

    • The 8051 Microprocessor Family.

    • The 8051 Microprocessor Versions.

​

 

​

THE 8051 INTERNAL REGISTERS AND INTRODUCTION TO ASSEMBLY  LANGUAGE PROGRAMMING:

​

  • To fully understand a microprocessor, its internal structure must be explored.  That will help understand how to configure it when it is used in real life applications. Since the processor used is the 8051, the arithmetic logic unit, internal register set and the memory structure are explained. Without the specific knowledge of the processor, it  is very hard to use it to scan events at a low level and then control other events at low level as well. In addition to exploring the internal structure of the processor, learning how to control those registers to perform specific tasks, require the teaching of assembly language as well as some form of a high level language. The topics explained in this chapter are:

    • Internal Registers of the 8051 processor.

    • Assembly Language Instructions and the MOV Instruction.

    • Describe the Execution Details of Some Assembly Language Instructions.

    • Describe The RAM Memory Space Allocation and The Use of Memory Stacks.

    • Explain What Register Banks are and How to Manipulate Them.

​

​

​

ASSEMBLY LANGUAGE INSTRUCTION AND PROGRAMMING:

​

  • In the previous chapter, assembly language was introduced. In this chapter, assembly language is discussed in details. In the sequence of instructions to be executed, it is often necessary to transfer program control to different locations in the program. To achieve that, branch, jump and call instructions are utilized.The topics explained in this chapter are:

    • Assembly Language Program Loops.

    • Conditional Jump Instructions.

    • Long and Short Jump Instructions.

    • Target Addresses Calculations for Instructions.

    • Subroutines the Memory Stack.  

    • Crystal Frequency and Machine Cycles.

    • Machine Cycles and Time Delay Generations.


​

​

I/O PORT PROGRAMMING:

​

  • In his chapter, the microcontroller ports that are used to read the state of switches such as single throw single pole, single throw double pole switches, light switches and many more 2 position devices are explained. Sensors can also be fed into those ports to be read. Sensors such as a vehicle door ajar sensor, an oxygen sensor and many others.The topics explained in this chapter are:

    • The Four Ports of the 8051 Microcontroller.

    • Assembly Language to Use the I/O Ports for Input or Output Operations.

    • I/O bit Manipulation and Programming.

    • Immediate and Register Addressing Modes.

    • Memory Access Using Various Addressing Modes.

    • Bit Addresses for I/O and RAM Operations.

​

​

 

ARITHMETIC AND LOGIC INSTRUCTION INSTRUCTIONS AND PROGRAMMING:

​

  • Continuously real life data is read and processed by computers. Microcontrollers ane no exceptions. When data is read into the microcontroller through either the I/O ports ar any other port depending on the type of data read, it is logically analyzed and in most situations, some calculations are involved. In order to achieve that, the microcontroller utilizes the use of the arithmetic and logic instructions. The topics explained in this chapter are:

    • Arithmetic Instructions.

    • Signed Number Concepts and Arithmetic Operations,

    • Logic & Compare Instructions.

    • Rotate Instructions and Data Serialization.

    • Unsigned data Additions and Subtractions.

    • Unsigned Data Multiplications and Divisions.

    • Binary Coded Decimal (BCD) Packing, Unpacking, and Arithmetic.

​

 

​

THE 8051 TIMER PROGRAMMING IN ASSEMBLY AND C:

​

  • Timers and Counters are necessary in almost all electronic applications and they are frequently used in real life applications. The 8051 has two timers which are essentially counter register but can be either used as counters or timers in the context of the applications. When used as timers, they can provide time delays to control operations or they can be used as timers to count parts on an assembly line for example. The topics explained in this chapter are: 

    • The 8051 Timers and Their Associated Registers

    • The 8051 Timers Modes of Operation.

    • Timer Programming in Assembly and C.

    • Counter Programming in Assembly and C.


                                                                                                                                                                                                    


The 8051 SERIAL PORT AND ITS PROGRAMMING:

​

  • The basis of Local area Networks  (LAN) is the serial transmission and reception of data. At its core, this is accomplished through the use of the microcontroller serial port. The transmission and reception of data is controlled by the microcontroller through programming. The topics explained in this chapter are:

    • The Basics of Serial Communications.

    • The 8051 Connection to the RS232.

    • The 8051 Serial Port Programming in Assembly and C.

​

​

​

THE LCD AND KEYBOARD INTERFACING:

​

  • Liquid Crystal Displays are used everywhere nowadays. They can display data such as keyboard key presses, Vehicle Speed and RPM, and a whole slew of other displays such as those associated with appliances, Automotive and Industrial applications. The topics explained in this chapter are:

    • Liquid Crystal Display Description and Control Instructions.

    • LCD Interfacing to the 8051 Microcontroller.

    • Keyboard Interfacing to the 8051 Microcontroller.

​

​

​

THE ADC, DAC AND SENSOR INTERFACING:

​

  • ​How do real life application get processed by computers? The proper interfaces must be used in order for the microcontroller to understand real life data which is analog in nature and also relay information to the real world. Therefore, analog data must be converted to the type of data that the microcontroller understands which is digital. on the other hand, data that has been processed by the microcontroller which is digital, must be converted to the analog form that is understood by the real world. The topics explained in this chapter are:

    • The Digital to Analog Converter (DAC).​

    • The Different Types of DACs 

    • The Analog to Digital Converters (ADC).

    • The Different Types of ADCs.

    • Sensor Interfacing to the 8051 Microcontrollers.

    •  

​

RELAYS, AND MOTOR CONTROL:

​​

  • ​Microcontrollers are also used to control motor movements, speed and directions. Motors are used in a lot of applications. Their control is getting to be so advanced in such a way there is precision in their speed and position.  They are used in industrial application to control conveyor lines, in automotive to control things that are taken for granted such as wind shield wipers. Most of all they are used in hybrid and electric vehicles. The topics explained in this chapter are:

    • Describe the Basic Operation of a Relay.

    • The 8051 and Relay Interface.

    • The basic Operation of an Optoisolator.

    • The 8051 and Optoisolator Interface.

    • The Basic Operation of a Stepper Motor.

    • The 8051 and Stepper Motor Interface.

    • Programs to Control and Operate a Stepper Motor.

    • ​

bottom of page