Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
AIM: To Study about the software and development board of 8051 microcontroller with
introduction of Embedded System. SOFTWARE USED: KEIL VISION.
TYPES OF MICROCONTROLLERS
Microcontrollers can be classified on the basis of internal bus width, architecture, memory and instruction set.
The 8-bit microcontroller When the ALU performs arithmetic and logical operations on a byte (8-bits) at an instruction, the microcontroller is an 8-bit microcontroller. The internal bus width of 8-bit microcontroller is of 8-bit. Examples of 8-bit microcontrollers are Intel 8051 family and Motorola MC68HC11 family. The 16-bit microcontroller When the ALU performs arithmetic and logical operations on a word (16-bits) at an instruction, the microcontroller is a 16-bit microcontroller. The internal bus width of 16-bit microcontroller is of 16-bit. Examples of 16-bit microcontrollers are Intel 8096 family and Motorola MC68HC12
Ashutosh 1 2363014
and MC68332 families. The performance and computing capability of 16 bit microcontrollers are enhanced with greater precision as compared to the 8-bit microcontrollers. The 32-bit microcontroller When the ALU performs arithmetic and logical operations on a double word (32-bits) at an instruction, the microcontroller is a 32-bit microcontroller. The internal bus width of 32-bit microcontroller is of 32-bit. Examples of 32-bit microcontrollers are Intel 80960 family and Motorola M683xx and Intel/Atmel 251 family. The performance and computing capability of 32 bit microcontrollers are enhanced with greater precision as compared to the 16-bit microcontrollers. Embedded microcontroller When an embedded system has a microcontroller unit that has all the functional blocks (including program as well as data memory) available on a chip is called an embedded microcontroller. For example, 8051 having Program & Data Memory, I/O Ports, Serial Communication, Counters and Timers and Interrupt Control logic on the chip is an embedded microcontroller. External memory microcontroller When an embedded system has a microcontroller unit that has not all the functional blocks available on a chip is called an external memory microcontroller. In external memory microcontroller, all or part of the memory units are externally interfaced using an interfacing circuit called the glue circuit. For example, 8031 has no program memory on the chip is an external memory microcontroller.
Ashutosh
2363014
MICROCONTROLLER ARCHITECTURE
There are mainly two categories of processors, namely, Von-Neumann (or Princeton) architecture and Harvard Architecture. These two architecture differ in the way data and programs are stored and accessed. Von-Neumann architecture Microcontrollers based on the Von-Neumann architecture have a single _data_ bus that is used to fetch both instructions and data. Program instructions and data are stored in a common main memory. When such a controller addresses main memory, it first fetches an instruction, and then it fetches the data to support the instruction. The two separate fetches slows up the controllers operation. The Von-Neumann architectures main advantage is that it simplifies the microcontroller design because only one memory is accessed. In microcontrollers, the contents of RAM can be used for data storage and program instruction storage. For example, the Motorola 68HC11 microcontroller Von- Neumann architecture. Example: An Instruction Read a byte from memory and store it in the accumulator as follows: Cycle 1:- Read instruction Cycle 2 - Read data out of RAM and put into Accumulator
Harvard Architecture Microcontrollers based on the Harvard Architecture have separate data bus and an instruction bus. This allows execution to occur in parallel. As an instruction is being pre-fetched, the current instruction is executing on the data bus. Once the current instruction is complete, the next instruction is ready to go. This pre-fetch theoretically allows for much faster execution than VonNeumann architecture, on the expense of complexity. The Harvard Architecture executes instructions in fewer instruction cycles than the Von-Neumann architecture. For example, the Intel MCS-51 family of microcontrollers and PIC microcontrollers uses Harvard Architecture. The same instruction (as shown under Von-Newman architecture) would be executed as follows: Cycle 1: - Complete previous instruction - Read the Move Data to Accumulator instruction Cycle 2: - Execute Move Data to Accumulator instruction
Ashutosh 3 2363014
- Read next instruction Hence, each instruction is effectively executed in one instruction cycle.
Ashutosh
2363014
P3.6 WR (external data memory write strobe) P3.7 RD (external data memory read strobe) VCC: Supply voltage VSS: Circuit ground potential
Ashutosh
2363014
APPLICATIONS OF MICROCONTROLLERS
Microcontrollers have innumerable applications. Some applications of their simple applications are in 1. biomedical instruments like an ECG LCD display cum recorder, patient monitor system. 2. communication systems like numeric pagers, cellular phones, cable TV terminals and so on. 3. peripheral controllers of a computer such as the keyboard controller, printer controller, LAN controller. 4. a CNC machine controller. 5. electronic data acquisition and supervisory control system etc.
RESULT
Software and Development Board of 8051 C have been studied.
Ashutosh
2363014
EXPERIMENT NO. 2
AIM: Write an assembly language program to add, subtract, multiply and divide two 8 bit
numbers using 8051 microcontroller. SOFTWARE USED: KEIL VISION.
1. Addition: ORG 000H MOV A, #08H MOV R1, #04H ADD A, R1 MOV P0, A END Output:
Ashutosh
2363014
2. Subtraction: ORG 000H MOV A, #08H MOV R1, #04H SUBB A, R1 MOV P0, A END Output:
Ashutosh
2363014
3. Multiplication: ORG 000H MOV A, #04H MOV B, #02H MUL AB MOV P0, A END Output:
Ashutosh
10
2363014
4. Division: ORG 000H MOV A,#08H MOV B,#04H DIV AB MOV P0,A END Output:
Ashutosh 11 2363014
CONCLUSION
The study and verification of addition, subtraction, multiplication and division parameters of 8051 and development board have been done in lab.
EXPERIMENT NO. 3
AIM: Write an assembly language program to toggle the LED on Port 1 using 8051
microcontroller.
SOFTWARE USED: KEIL VISION. HARDWARE: PC, Development Board, Microcontroller IC and Data Cables.
Ashutosh 12 2363014
PROGRAM
ORG 000H START:MOV P1, #00H ACALL DELAY MOV P1, #0FFH ACALL DELAY SJMP START DELAY:MOV R3, #55H HERE:DJNZ R3, HERE RET END
OUTPUT
Ashutosh
13
2363014
CONCLUSION
The study and verification of toggle parameters of 8051 and development board have been done in lab.
Ashutosh
14
2363014
EXPERIMENT NO. 4
AIM: Write an assembly language program to generate 10kHz square wave using 8051
microcontroller.
SOFTWARE USED: KEIL VISION. HARDWARE: PC, Development Board, Microcontroller IC and Data Cables. PROGRAM
ORG 000H AGAIN:MOV TMOD, #01H MOV TL0, #0D2H MOV TH0, #0FFH SETB TR0 BACK:JNB TF0, BACK CLR TR0 CPL P1.0 CLR TF0 SJMP AGAIN END
OUTPUT
Ashutosh
15
2363014
CONCLUSION
The study and verification of timers of 8051 and development board have been done in lab.
Ashutosh
16
2363014
EXPERIMENT NO. 5
AIM: Write an assembly language program to generate 10kHz square wave using interrupts in
8051 microcontroller.
SOFTWARE USED: KEIL VISION. HARDWARE: PC, Development Board, Microcontroller IC and Data Cables. PROGRAM
ORG 000H LJMP MAIN ORG 000BH CPL P2.1 RETI ORG 0030H MAIN:MOV TMOD, #01H MOV TL0, #0D2H MOV TH0, #0FFH MOV IE, #82H SETB TR0 HERE:MOV A, P0 MOV P1, A SJMP HERE END
OUTPUT
Ashutosh
17
2363014
CONCLUSION
The study and verification of interrupt parameters of 8051 and development board have been done in lab.
Ashutosh
18
2363014
EXPERIMENT NO. 6
AIM: Write an assembly language program to find sum of first ten numbers from 1 to 10 using
8051 microcontroller. SOFTWARE USED: KEIL VISION.
OUTPUT
Ashutosh
19
2363014