Documente Academic
Documente Profesional
Documente Cultură
The microprocessor is the core of computer systems. Nowadays many communication, digital entertainment, portable devices, are controlled by them. A designer should know what types of components he needs, ways to reduce production costs and product reliable.
CPU: Central Processing Unit I/O: Input /Output Bus: Address bus & Data bus Memory: RAM & ROM Timer Interrupt Serial Port Parallel Port
General-purpose microprocessor
CPU for Computers No RAM, ROM, I/O on CPU chip itself ExampleIntels x86, Motorolas 680x0
Many chips on mothers board
Data Bus
RAM
ROM
I/O Port
Timer
Microcontroller :
A smaller computer On-chip RAM, ROM, I/O ports... ExampleMotorolas 6811, Intels 8051, Zilogs Z8 and PIC 16X
CPU
RAM ROM
A single chip
I/O Port
Serial Timer COM Port Microcontroller
On-chip RAM
Timer 1 Timer 0
Counter Inputs
CPU
Serial Port
OSC
Bus Control
4 I/O Ports
P0 P1 P2 P3
TxD RxD
Address/Data
8051 (8031)
Vcc
10 K
P0.0 DS5000 P0.1 P0.2 8751 P0.3 P0.4 8951 P0.5 P0.6 P0.7
Port 0
Registers
A B R0 R1 R2 R3 R4 R5 R6 Some 8051 16-bit Register PC PC DPTR DPH DPL
7FH
The register used to access the stack is called SP (stack pointer) 30H register. 2FH The stack pointer in the20H 1FH 8051 is only 8 bits wide, 18H which means that it can 17H take value 00 to FFH. 10H 0FH When 8051 powered up, the SP register contains08H 07H value 07. 00H
Bit-Addressable RAM
Jump if A=0
Jump if A/=0 Decrement and jump if A/=0
CJNE A,byte
CJNE reg,#data JC JNC JB JNB JBC
Jump if A/=byte
Jump if byte/=#data Jump if CY=1 Jump if CY=0 Jump if bit=1 Jump if bit=0 Jump if bit=1 and clear bit
Logic Required Conversion Time < 100ms Easy Interface to Most Microprocessors Will Operate in a Stand Alone Mode Differential Analog Voltage Inputs Works with Band gap Voltage References TTL Compatible Inputs and Outputs On-Chip Clock Generator 0V to 5V Analog Voltage Input Range (Single + 5V Supply) No Zero-Adjust Required
1. All voltages are measured with respect to GND, unless otherwise specified. The separate AGND point should always be wired to the DGND, being careful to avoid ground loops. 2. For VIN(-) VIN(+) the digital output code will be 0000 0000. Two on-chip diodes are tied to each analog input (see Block Diagram) which will forward conduct for analog input voltages one diode drop below ground or one diode drop greater than the V+ supply. Be careful, during testing at low V+ levels (4.5V), as high level analog inputs (5V) can cause this input diode to conduct - especially at elevated temperatures, and cause errors for analog inputs near full scale. As long as the analog VIN does not exceed the supply voltage by more than 50mV, the output code will be correct. To achieve an absolute 0V to 5V input voltage range will therefore require a minimum supply voltage of 4.950V over temperature variations, initial tolerance and loading.
3. With V+ = 6V, the digital logic interfaces are no longer TTL compatible. 4. With an asynchronous start pulse, up to 8 clock periods may be required before the internal clock phases are proper to start the conversion process. 5. The CS input is assumed to bracket the WR strobe input so that timing is dependent on the WR pulse width. An arbitrarily wide pulse width will hold the converter in a reset mode and the start of conversion is initiated by the low to high transition of the WR pulse (see Timing Diagrams). 6. CLK IN (pin 4) is the input of a Schmitt trigger circuit and is therefore specified separately.
AGAIN: clr p3.7 ;Chip select setb P2.5 ;RD=1 clr P2.6 ;WR=0 setb P2.6 ;WR=1- low to high transition WAIT: jb P2.7, WAIT ;wait for INTR clr p3.7 ;generate cs to ADC clr P2.5 ;RD=0 -High to low transition ;read digital o/p mov A, P1 mov P0,P1 sjmp AGAIN
Pin # 1 2 3 4 5 6 7 8 9 10
Description CS - Chip Select (Active Low) RD - Read (Active Low) WR - Write (Active Low) CLK IN - Clock IN INTR - Interrupt (Active Low) Vin+ - Analog Voltage Input Vin- - Analog Voltage Input AGND - Analog Ground Vref/2 - Voltage Reference / 2 DGND - Digital Ground
11 12 13 14 15 16 17 18 19 20
DB7 - Data Bit 7 (MSB) DB6 - Data Bit 6 DB5 - Data Bit 5 DB4 - Data Bit 4 DB3 - Data Bit 3 DB2 - Data Bit 2 DB1 - Data Bit 1 DB0 - Data Bit 0 (LSB) CLKR - Clock Reset Vcc - Positive Supply or Vref
This IC is basically a Motor driver. It consists of four inputs , four outputs , four grounds and two enables for each motors. We can drive two motors using single L293D chip.