Download presentation
Presentation is loading. Please wait.
Published byMorgan Golden Modified over 6 years ago
1
ES C263 Microprocessor Programming and Interfacing
Pawan Sharma Lecture
2
Last Lecture Instruction Set Architecture
3
Today’s Lecture Design Example PC Boot Process
4
Design Example
5
Design a microprocessor based system to control
pH of a solution in a reactor tank. User enters desired pH (0-14) and controller gain Reactor tank is provided with three pH sensors, to compute the average pH. Reactor tank has three inputs. (acid flow, base flow effluent discharged from factory controlled by valves) Motorised valve
6
Valve Control Controlled by stepper motors 1 step is by 1.8 degrees rotation Valve opening = kP * error Where error = desired pH – measured pH. Error positive- close fully acid valve and open base valve accordingly Error negative- close fully base valve and open acid valve accordingly. 0 – 360 degrees correspond to 0 to 200 steps.
7
Stepper Motor sequence: A B C D 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1
ACW CW Use a 4- bit port driver (nearly 1 A current)
8
pH sensor Vout pH 7 14 Voltage output 60mV/pH -420mV mV
9
Interfacing Analog to Digital Converter
8-bit ADC I0 I7 D0 D7 Start A B C EOC OE ALE ADC 0809
10
Input Keys Numeric keys 0 – 9 Function keys pH, kP, enter Matrix Keypad interfacing!! - 2 four bit ports.
11
Display Device and storage
Two digit Display Two seven segment display devices to display pH Memory Interfacing ROM (4KB) - FF000H – FFFFFH SRAM (4K) H – 00FFFH
12
System Block Diagram CPU Memory I/O Interface Parallel I/O Serial I/O
Data Address Control
13
Method of Approach Identify input and output devices Memory requirements Suitable memory and I/O interfacing Assembly Language Programming Assumptions made
14
PC Boot Process
15
The code performs POST (Power On Self test)
Powered on CPU starts executing code located from FFFF0H – called BIOS and operates in the real mode of operation. The code performs POST (Power On Self test) After POST, CPU reads the boot sector (floppy, hard disk – sequence set in BIOS features) Checks for AA55H at 07DFEH ( Boot signature) The first sector of the bootable disk, contains the boot loader program or the MBR or grub/LILO. The BIOS loads the MBR in RAM starting at address 07C00H and executed. Loads DL (one of the CPU registers) with 00h if the boot sector was loaded from drive A 80h if the boot sector was loaded from drive C This way, the bootsector can determine which drive it was booted from. After the completion of the boot loader program, the control is transferred to the OS.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.