MICROCONTROLLER 8051
AT 89C51 MICROCONTROLLER HARDWARE The 89C51 micro controller generic part number actually includes a whole family of micro controllers that have numbers ranging from 8031 to 8751 and are available in N-channel metal oxide silicon (NMOS) and complementary metal oxide silicon (CMOS) construction in a variety of package types. Before we get into the programming aspects, let us look into the architecture of a generic 89C51, housed in a 40-pin DIP. The block diagram of the 89C51 in above figure shows the following feature: (a) Internal ROM and RAM (b) I/O ports with programmable pins (c) Timers and counters (d) Serial data communication The 89C51 architecture consist of these specific features: Eight bit CPU with registers A(the accumulator)and B 8-bit program status word (PSW) 16-bit program counter (PC) and data pointer (DPTR) 8-bit stack pointer (SP) Internal ROM or EPROM (8751) of 0 (8031) to 4k (89C51) Internal RAM of 128 bytes: ○ ○ ○
4 register banks , each containing 8 registers 16 bytes , which may be addressed at the bit level 80 bytes of general purpose data memory
Thirty-two input /output pins arranged as four 8-bit ports : P0 – P3 Two 16 – bit timer/counters: T0 and T1 Full duplex serial data receiver/transmitter: SBUF Control registers: TCON, TMOD, SCON, PCON, IP and IE Two external and three internal interrupt sources (m) Oscillator and clock circuits The programming model of the 89C51 in figure shows the 89C51 as a collection of 8- and 16-bit registers and 8-bit memory locations. A pin out of the 89C51 packaged in a 40-pin DIP. In our project we have used two micro controllers (AT 89C51);one as a master and one as a slave. The slave micro controller reads the signal from the sensors and transmits it to the master. The master receives the data from the slave and uploads the data into PC. It also sends the control signal to control the conveyer belt.