Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller •...
Transcript of Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller •...
![Page 1: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/1.jpg)
Microcontroller Interfacing
![Page 2: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/2.jpg)
Output Levels
![Page 3: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/3.jpg)
Interpretation of Timing
Diagrams
![Page 4: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/4.jpg)
Analog to Digital Converters
• Sampling rate (MHZ)
• Sampling resolution (bits)
• Interface type (parallel or serial)
• Reference voltage (volt)
• Input range (unipolar or bipolar)
• Sample-and-hold circuit usually inside chip
• Note: Analog antialiasing filter must be in place
![Page 5: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/5.jpg)
ADC Technologies
![Page 6: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/6.jpg)
Parallel Interface Example
![Page 7: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/7.jpg)
Serial Interface Example
![Page 8: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/8.jpg)
Memory
• External interface possible in most cases
• Nonvolatile EPROM
• Voltile RAM (SRAM, DRAM, etc.)
• Nonvolatile EEPROM
• Nonvolatile FLASH
• Refer to timing diagram for each to know how
to interface with microcontroller
![Page 9: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/9.jpg)
Temperature Sensors
• Thermistors (PTC, NTC)
![Page 10: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/10.jpg)
Optical Sensors
• Switches
• Isolators
![Page 11: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/11.jpg)
Magnetic Sensors
• LVDT
• Hall effect
![Page 12: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/12.jpg)
Mechanical Switch
![Page 13: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/13.jpg)
Motor Interfacing
• Stepper motor
![Page 14: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/14.jpg)
Motors
• DC motor
![Page 15: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/15.jpg)
Motors
• Brushless DC
![Page 16: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/16.jpg)
TRIACs
![Page 17: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/17.jpg)
Microcontrollers
• Which microcontroller to use?
– 8051
– PIC
– ARM
– AD
– TI
![Page 18: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/18.jpg)
8051 Summary
• Selection of microcontroller
• Definition of pins
• Block diagram
• Instruction set
• Memory map
• I/O ports
• Timers
• Interrupts
• UART
• Practical development
![Page 19: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/19.jpg)
Microcontroller Architecture
![Page 20: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/20.jpg)
Microcontroller Selection
![Page 21: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/21.jpg)
Pin Diagram
![Page 22: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/22.jpg)
![Page 23: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/23.jpg)
![Page 24: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/24.jpg)
![Page 25: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/25.jpg)
![Page 26: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/26.jpg)
![Page 27: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/27.jpg)
![Page 28: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/28.jpg)
![Page 29: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/29.jpg)
![Page 30: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/30.jpg)
![Page 31: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/31.jpg)
![Page 32: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/32.jpg)
Addressing Modes
![Page 33: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/33.jpg)
Addressing Modes
![Page 34: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/34.jpg)
![Page 35: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/35.jpg)
![Page 36: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/36.jpg)
![Page 37: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/37.jpg)
I/O Ports
![Page 38: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/38.jpg)
![Page 39: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/39.jpg)
![Page 40: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/40.jpg)
UART
![Page 41: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/41.jpg)
Practical Development
![Page 42: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/42.jpg)
Standard Software Development
Process1. Create or edit an ASCII text file containing the human readable
source code, also known as the program instructions.
2. Translate the source code to machine-readable binary instruction code using a language translator. This is accomplished using an assembler or compiler.
3. Load the program memory with the binary instruction code into the processor’s program memory chip. For the SDK, the program is downloaded into program memory on the SDK.
4. Execute the program to test it and find program errors. For the SDK, this “debugging” process is facilitated using a special program (debugger or monitor) resident on the SDK.
5. Once the problem is located, the source code is corrected by repeating this process until all errors are corrected.
![Page 43: Microcontroller Interfacing - k-space.org · 8051 Summary • Selection of microcontroller • Definition of pins • Block diagram • Instruction set • Memory map • I/O ports](https://reader033.fdocuments.us/reader033/viewer/2022052210/5b7a8a457f8b9a460c8c158f/html5/thumbnails/43.jpg)