Microcontroller Lab Manual

Size: px
Start display at page:

Download "Microcontroller Lab Manual"

Transcription

1 Microcontroller Lab Manual

2 PROGRAM TO TRANSFER A BLOCK OF DATA FROM SOURCE TO DESTINATION Write an Assembly Level Program to transfer a source block of Five Bytes, stored at RAM location 20H to 24H, to Destination Location from 30H to 34H. ORG 0000H MOV R0,#20H MOV R1,#30H MOV R2,#05H UP:MOV A,@R0 INC R0 INC R1 DJNZ R2, UP END

3 PROGRAM TO EXCHANGE THE BLOCK OF DATA Write an assembly language program in 8051 to exchange a source block of 5 bytes, stored in internal RAM memory locations from 50h to 54h, with destination block of 5 bytes, stored in internal RAM locations from 70h to 74h. ORG 0000H MOV R0,#50H MOV R1,#70H MOV R2,#05H UP:MOV A,@R0 XCH A,@R1 INC R0 INC R1 DJNZ R2,UP END

4 PROGRAM TO ARRANGE THE NUMBERS IN DESCENDING ORDER Write an assembly language program in 8051 to arrange an array of 5 bytes, stored in internal RAM locations from 30h to 34h, in descending order. ORG 0000H MOV R1,#05H DEC R1 PASS:MOV 02H,R1 MOV R0,#30H BACK:MOV A,@R0 INC R0 MOV B,@R0 CJNE A,B,TEMP TEMP:JNC NEXT DEC R0 INC R0 NEXT:DJNZ R2,BACK DJNZ R1,PASS END

5 Program to arrange the numbers in ascending order Write an assembly language program in 8051 to arrange an array of 5 bytes, stored in internal RAM locations from 30h to 34h, in ascending order. ORG 0000h MOV R1,#05H DEC R1 PASS:MOV 02H,R1 MOV R0,#30H BACK:MOV A,@R0 INC R0 MOV B,@R0 CJNE A,B,TEMP TEMP:JC NEXT DEC R0 INC R0 NEXT: DJNZ R2,BACK DJNZ R1,PASS END

6 PROGRAM TO FIND THE LARGEST ELEMENT IN AN ARRAY Write an assembly language program in 8051 to find the largest element (byte) in a given array of 5 bytes, stored in internal RAM locations from 40h to 44h. ORG 0000H MOV R1,#05H MOV R0,#40H MOV A,@R0 UP:INC R0 MOV B,@R0 CJNE A,B,EXCH SJMP EXIT EXCH:JNC UP XCH A,B EXIT:DJNZ R1,UP END

7 PROGRAM TO ADD TWO 16 BIT NUMBERS Write an assembly language program in 8051 to add two 16-bit numbers 3412h and 7856h. Store the lower byte of result in R5 and higher byte in R6. ORG 0000H MOV R1,#12H MOV R2,#34H MOV R3,#56H MOV R4,#78H CLR C MOV A,R1 ADD A,R3 MOV R5,A MOV A,R2 ADDC A,R4 MOV R6,A END

8 PROGRAM TO SUBSTRACT TWO 16 BIT NUMBERS Write an assembly language program in 8051 to subtract a 16-bit number 3412h from 7856h. Store the lower byte of result in R5 and higher byte in R6. ORG 0000H MOV R1,#56H MOV R2,#78H MOV R3,#12H MOV R4,#34H CLR C MOV A,R1 SUBB A,R3 MOV R5,A MOV A,R2 SUBB A,R4 MOV R6,A END

9 PROGRAM TO MULTIPLY TWO 8 BIT NUMBERS Write an assembly language program in 8051 to multiply two 8-bit numbers. 1 st no. is stored in external RAM location 8000h and 2 nd no. is stored in external RAM location 8001h. Store the result of multiplication in external RAM locations 8002h & 8003h. ORG 0000H MOV DPTR,#8000H MOVX A,@DPTR MOV B,A INC DPTR MOVX A,@DPTR MUL AB INC DPTR MOV A,B INC DPTR

10 END PROGRAM FOR DIVISION OF TWO 8 BIT NUMBER Write an assembly language program in 8051 to Divide two 8-bit numbers. 1 st no. is stored in external RAM location 8000h and 2 nd no. is stored in external RAM location 8001h. Store the result of multiplication in external RAM locations 8002h & 8003h. ORG 0000H MOV DPTR,#8000H MOVX A,@DPTR MOV B,A INC DPTR MOVX A,@DPTR DIV AB INC DPTR MOV A,B

11 INC DPTR END PROGRAM TO FIND THE SQUAR OF THE NUMBER Write an assembly language program in 8051 to find the square of an 8-bit number, stored in external RAM location 8000h. Store the result in external RAM locations 8001h & 8002h. ORG 0000H MOV DPTR,#8000H MOVX MOV B,A MUL AB INC DPTR

12 MOV A,B INC DPTR END PROGRAM TO FIND THE CUBE OF THE NUMBER Write an assembly language program in 8051 to find the cube of an 8-bit number, stored in external RAM location 8000h. Store the result in external RAM locations 8001h & 8002h. ORG 0000H MOV R1,#00H MOV DPTR,#8000H MOVX MOV R1,A MOV B,A

13 MUL AB MOV B,R1 MUL AB INC DPTR MOV A,B INC DPTR END HEX COUNTER (00 TO FF) Write an assembly language program in 8051 to count from 00h to ffh with some delay in between the successive counts and update the count in internal RAM memory location 10h. ORG 0000H MOV A,#00H BACK:INC A

14 MOV 10H,A ACALL DELAY SJMP BACK DELAY:MOV R0,#OFH D3:MOV R2,#0FFH D2:MOV R1,#0FFH D1:NOP NOP NOP NOP DJNZ R1,D1 DJNZ R2,D2 DJNZ R0,D3 RET E:SJMP E END HEX COUNTER (0 TO F) Write an assembly language program in 8051 to count from 0h to fh with some delay in between the successive counts and update the count in internal RAM memory location 10h. ORG 0000H UP:MOV A,#00H BACK:MOV 10H,A

15 ACALL DELAY INC A CJNE A,#010H,BACK SJMP UP DELAY: MOV R0,#0FH D3:MOV R2,#0FFH D2:MOV R1,#0FFH D1:NOP NOP NOP NOP DJNZ R1,D1 DJNZ R2,D2 DJNZ R0,D3 RET E:SJMP E END DECADE COUNTER (0TO 9) Write an assembly language program in 8051 to count from 0 to 9 with some delay in between the successive counts and update the count in internal RAM memory location 10h.

16 ORG 0000H UP:MOV A,#00H BACK:MOV 10H,A ACALL DELAY ADD A,#01H CJNE A,#0AH SJMP UP DELAY:MOV R0,#0FH D3:MOV R2,#0FFH D2:MOV R1,0FFH D1:NOP NOP NOP NOP DJNZ R1,D1 DJNZ R2,D2 DJNZ R0,D3 RET E:SJMP E END BCD COUNTER (00TO 99)

17 Write an assembly language program in 8051 to count from 00 to 99 with some delay in between the successive counts and update the count in internal RAM memory location 10h. ORG 0000H MOV A,#00H BACK:DA A MOV 10H,A ACALL DELAY SJMP BACK DELAY:MOV R0,#0FH D3:MOV R2,#0FFH D2:MOV R1,0FFH D1:NOP NOP NOP NOP DJNZ R1,D1 DJNZ R2,D2 DJNZ R0,D3 RET E:SJMP E END

18 PROGRAM TO FIND THE NUMBER ONES AND ZEROS IN A GIVEN 8 BIT DATA Write an assembly language program in 8051 to count number of 1 s and 0 s in a given byte, stored in internal RAM location 40h. Store the count of 1 s in R 3 and count of 0 s in R 2. ORG 0000H MOV A,40H MOV R1,#08H MOV R2,#00H MOV R3,#00H UP:RLC A JNC L1 INC R3 SJMP L2 L1:INC R2 L2:DJNZ R1,UP MOV 41H,R2 MOV 42H,R3 END

19 PROGRAM TO FIND THE POSITIVE AND NEGATIVE NUMBERS IN A GIVEN ARRAY Write an assembly language program in 8051 to count positive and negative bytes in a given array of 8 bytes, stored in internal RAM locations from 50h onwards. Store the count of negative bytes in R 2 and count of positive bytes in R 1. ORG 0000H MOV R0,#50H MOV R1,#00H MOV R2,#00H MOV R3,#08H UP:MOV A,@R0 RLC A JC DOWN INC R1 SJMP L1 DOWN:INC R2 L1:INC R0 DJNZ R3,UP END

20 PROGRAM TO FIND THE ODD AND EVEN NUMBERS IN A GIVEN ARRAY Write an assembly language program in 8051 to count odd and even bytes in a given array of 8 bytes, stored in internal RAM locations from 50h onwards. Store the count of odd bytes in R 2 and count of even bytes in R 1. ORG 0000H MOV R0,#50H MOV R1,#00H MOV R2,#00H MOV R3,#08H UP:MOV A,@R0 RRC A JC DOWN INC R1 SJMP L1 DOWN:INC R2 L1:INC R0 DJNZ R3,UP END

21 PROGRAM TO CONVERT A PACKED BCD TO UNPACK BCD NUMBER Write an assembly language program in 8051 to convert a packed BCD number, stored in internal RAM location 40h, into ASCII numbers. Store the result in internal RAM locations 41h and 42h. ORG 0000H MOV A,40H ANL A,#0FH MOV 41H,A MOV A,40H ANL A,#0F0H SWAP A MOV 42H,A END

22 PROGRAM TO CONVERT ASCII NUMBER TO BCD NUMBER Write an assembly language program in 8051 to convert ASCII numbers, stored in internal RAM locations 40h and 41h, into two digit decimal number. Store the result in internal RAM location 42h. ORG 0000H MOV A,40H MOV R0,A MOV A,41H SUBB A,#30H SWAP A MOV R1, A MOV A,R0 SUBB A,#30H ADD A,R1 MOV 42H,A END

23 PROGRAM TO CONVERT A BCD NUMBER TO ASCII NUMBER Write an assembly language program in 8051 to convert a two digit decimal number, stored in internal RAM location 40h, into ASCII numbers. Store the result in internal RAM locations 41h and 42h. ORG 0000H MOV A,40H MOV R0,A ANL A,#0FH ADD A,#30H MOV 41H,A MOV A,R0 ANL A,#0F0H SWAP A ADD A,#30H MOV 42H,A END

24 PROGRAM TO CONVERT BCD NUMBER TO HEXADECIMAL Write an assembly language program in 8051 to convert a two digit decimal number, stored in internal RAM location 40h into hexadecimal number. Store the result in R 2. ORG 0000H MOV A,40H ANL A,#0FH MOV R1,A MOV A,40H ANL A,#0F0H SWAP A MOV B,#0AH MUL AB ADD A,R1 MOV R2,A END

25 PROGRAM TO CONVERT HEXADECIMAL NUMBER TO BCD NUMBER Write an assembly language program in 8051 to convert a hexadimal number, stored in internal RAM location 30h into decimal number. Store the result in internal RAM locations 50h and 51h. ORG 0000H MOV A,30H MOV R0,#40H MOV R2,#00H UP:MOV B,#0AH DIV AB CJNE A,02H,DOWN SJMP DOWN1 DOWN:INC R0 SJMP UP DOWN1:MOV A,41H SWAP A ADD A,40H MOV 50H,A

26 MOV 51H,B END RAMP WAVE #INCLUDE<REG51.H> SFR P0=0X80; SFR P1=0X90; VOID MAIN(VOID) VOLATILE UNSIGNED CHAR VALUE; WHILE(1); FOR(VALUE=0;VALUE<25;VALUE++) P0=VALUE; P1=VALUE;

27 SEVEN SEGMENT LED DISPLAY #INCLUDE<REG51.H> VOID DELAY(VOID); SBIT X=P1^1; SBIT Y=P1^0; VOID MAIN (VOID) UNSIGNED CHAR a[]=0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f, 0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71; UNSIGNED CHAR M; X=1; Y=0; WHILE(1)

28 FOR(M=0;M<16;M++) P0=a[M]; DELAY(); VOID DELAY(VOID) UNSIGNED INT J,K; FOR(J=0;J<800;J++) FOR(K=0;K<360;K++); SINE WAVE #INCLUDE<REG51.H> #INCLUDE<STDIO.H> UNSIGNED CHAR SINE_VAL; UNSIGNED INT COUNT; VOID MS_DELAY(UNSIGNED CHAR R1); UNSIGNED CHAR SINE_TAB[48]=0x80,0x90,0xa1,0xb1,0xc0,0xcd,0xda,0xe5,0xee,0xf6,0xfb,0xfe, 0xff,0xfe,0xfb,0xf6,0xee,0xe5,0xda,0xcd,0xc0,0xb1,0xa1,0x90,0x80,0x70,0x5f,0x4 f,0x40,0x33,0x26,0x1b,0x12,0x0a,0x05,0x02,0x00,0x02,0x05,0x0a,0x12,0x1b,0x26,0x33,0x40,0x4f,0x5f,0x70; VOID MAIN(VOID)

29 WHILE(1) IF(COUNT<48) P0=SINE_TAB[COUNT]; P1=SINE_TAB[COUNT]; COUNR=COUNT++; ELSE COUNT=0; VOID MS_DELAY(UNSIGNED CHAR R1) WHILE(R1) R1--; PROGRAM TO FIND THE SMALLEST ELEMENT IN AN ARRAY ORG 0000H MOV R1,#05H MOV R0,#40H MOV UP:INC R0 MOV CJNE A,B,EXCH SJMP EXIT EXCH:JC UP XCH A,B

30 EXIT:DJNZ R1,UP END SQUARE WAVE #INCLUDE<REG51.H> VOID MAIN(VOID) VOID DELAY(INT); UNSIGNED CHAR CH=0x00; P0=0x00;

31 WHILE(1) P0=CH; DELAY(50); P0=~CH; DELAY(50); VOID DELAY(INT N) INT I; FOR( I=0;I<N;I++); STAIRCASE #INCLUDE <REG51.H> VOID DELAY (VOID); SFR P0=0X80; SFR P1=0X90; VOID MAIN(VOID)

32 UNSIGNED CHAR M; WHILE(1) FOR(M=0;M<255;M++) P0=M; P1=M; DELAY(); M=M+0X33; P0=M; P1=M; DELAY(); VOID DELAY(VOID) UNSIGNED INT I,J; FOR(I=0;I<10;I++) FOR(J=0;J<36;J++); STEPPER MOTOR(CLOCKWISE) #INCLUDE<REG51.H> VOID DELAY(); VOID MAIN(VOID)

33 UP:DELAY(); P2=0X99; DELAY(); P2=0XCC; DELAY(); P2=0X66; DELAY(); P2=0X33; DELAY(); GOTO UP; VOID DELAY() UNSIGNED INT X=10000,Y; FOR(Y=0;Y<=X;Y++) Y++; STEPPER MOTOR(ANTICLOCKWISE) #INCLUDE<REG51.H> VOID DELAY();

34 VOID MAIN(VOID) UP:DELAY(); P2=0X33; DELAY(); P2=0X66; DELAY(); P2=0XCC; DELAY(); P2=0X99; DELAY(); GOTO UP; VOID DELAY() UNSIGNED INT X=10000,Y; FOR(Y=0;Y<=X;Y++) Y++; TRIANGLE WAVE

35 #INCLUDE<REG51.H> SFR P0=0x80; SFR P1=0x90; VOID MAIN(VOID) UNSIGNED CHAR M,N; WHILE(1) FOR(M=254;M>0;M--) P0=M; P1=M; FOR(N=1;N<255;N++) P0=N; P1=N; MICROCONTROLLER OBJECTIVE TYPE QUESTIONS

36 1. The internal RAM memory of the 8051 is: A.32 bytes B. 64 bytes C.128 bytes D.256 bytes Answer: Option C 2. This program code will be executed continuously: STAT: MOV A, #01H JNZ STAT A.True B.False Answer: Option A 3. The 8051 has 16-bit counter/timers. A.1 B. 2 C.3 D.4 Answer: Option B 4. The address space of the 8051 is divided into four distinct areas: internal data, external data, internal code, and external code. A.True B.False Answer: Option A 5. Data transfer from I/O to external data memory can only be done with the MOVX command. A.True B.False Answer: Option A

37 6. The 8051 can handle interrupt sources. A.3 B. 4 C.5 D.6 Answer: Option C 7. The special function registers are maintained in the next 128 locations after the general-purpose data storage and stack. A.True B.False Answer: Option C 8. The special function registers are maintained in the next 128 locations after the general-purpose data storage and stack. A.True B.False Answer: Option A 9. This statement will set the address of the bit to 1 (8051 Micro-controller): SETB 01H A.True B.False Answer: Option B 10. MOV R1 will: A.Copy R1 to the accumulator B. Copy the accumulator to R1 C.Copy the contents of memory whose address is in R1 to the accumulator D.Copy the accumulator to the contents of memory whose address is in R1 Answer: Option C

38 11. A label is used to name a single line of code. A.True B.False Answer: Option A 12. The following program will receive data from port 1, determine whether bit 2 is high, and then send the number FFH to port 3: READ: MOV A,P1 ANL A,#2H CJNE A,#02H,READ MOV P3,#FFH A.True B.False Answer: Option A 13. Device pins XTAL1 and XTAL2 for the 8051 are used for connections to an external oscillator or crystal. A.True B.False Answer: Option A 14. When the 8051 is reset and the line is HIGH, the program counter points to the first program instruction in the: A.internal code memory B. external code memory C.internal data memory D.external data memory Answer: Option A

39 15. An alternate function of port pin P3.4 in the 8051 is: A.Timer 0 B. Timer 1 C.interrupt 0 D.interrupt 1 Answer: Option A 16. Both registers TL0 and TL1 are needed to start Timer 0. A.True B.False Answer: Option B 17. The I/O ports that are used as address and data for external memory are: A.ports 1 and 2 B. ports 1 and 3 C.ports 0 and 2 D.ports 0 and 3 Answer: Option C. 18. The last 96 locations in the internal data memory are reserved for general-purpose data storage and stack. A.True B.False Answer: Option A 19. Microcontrollers often have: A.CPUs B. RAM C.ROM D.all of the above

40 Answer: Option D 20. The 8051 has parallel I/O ports. A.2 B. 3 C.4 D. Answer: Option C 21. The total external data memory that can be interfaced to the 8051 is: A.32K C.128K B. 64K D.256K Answer: Option B 22. Which of the following instructions will load the value 35H into the high byte of timer 0? A.MOV TH0, #35H B. MOV TH0, 35H C.MOV T0, #35H D.MOV T0, 35H Answer: Option A 23. Bit-addressable memory locations are: A.10H through 1FH B. 20H through 2FH C.30H through 3FH

41 D.40H through 4FH Answer: Option B 24. The 8-bit address bus allows access to an address range of: A.0000 to FFFFH B. 000 to FFFH C.00 to FFH D.0 to FH Answer: Option C 25. The contents of the accumulator after this operation MOV A,#0BH ANL A,#2CH will be A B C D Answer: Option C 26. The start-conversion on the ADC0804 is done by using the: A. B. CS line C.INTR line D.V ref/2 line Answer: Option A 27. This program code will be executed once: STAT: MOV A, #01H JNZ STAT A.True B.False

42 Answer: Option B 28. Which of the following instructions will move the contents of register 3 to the accumulator? A.MOV 3R, A B. MOV R3, A C.MOV A, R3 D.MOV A, 3R Answer: Option C 29. Which of the following statements will add the accumulator to register B. R3 C.ADD R3, A D.ADD A, R3 Answer: Option C 30. Data transfer from I/O to external data memory can only be done with the MOV command. A.True B.False Answer: Option B 31. This program code will read data from port 0 and write it to port 2, and it will stop looping when bit 3 of port 2 is set: STAT: MOV A, PO MOV P2,A

43 A.True JNB P2.3, STAT B. False Answer: Option A 32. Which of the following commands will move the value at port 3 to register 2? A.MOV P2, R3 B. MOV R3, P2 C.MOV 3P, R2 D.MOV R2, P3 Answer: Option D 33. The number of data registers is: A.8 B. 16 C.32 D.64 Answer: Option C 34. The end-of-conversion on the ADC0804 is done by using the: A. B. CS line C.INTR line D.V ref/2 line Answer: Option A 35. When the 8051 is reset and the line is LOW, the program counter points to the first program instruction in the: A.internal code memory B. external code memory C.internal data memory

44 D.external data memory Answer: Option B 36. The designs of a centigrade thermometer and a PWM speed-control circuit can be implemented by the A.True B.False Answer: Option A 37. What is the difference between the 8031 and the 8051? A.The 8031 has no interrupts. B. The 8031 is ROM-less. C.The 8051 is ROM-less. D.The 8051 has 64 bytes more memory Answer: Option B 38. The I/O port that does not have a dual-purpose role is: A.port 0 B. port 1 C.port 2 D.port 3 Answer: Option B 39. To interface external EPROM memory for applications, it is necessary to demultiplex the address/data lines of the A.True B.False Answer: Option A 40. The contents of the accumulator after this operation MOV A,#02H MOV RO,#04H MUL A,RO

45 will be: A.02H C.06H B. 04H D.08H Answer: Option D 41. The following command will copy the accumulator to the location whose address is 23H: MOV 23H,A A.True B. False Answer: Option A 42. The special function registers can be referred to by their hex addresses or by their register names. A.True B.False Answer: Option A 43. The contents of the accumulator after this operation MOV A,#2BHORL A,00H will be: A.1B H B. 2B H C.3B H D.4B H Answer: Option B 44. The following program will cause the 8051 to be stuck in a loop: LOOP: MOV A, #00H

46 A.True JNZ LOP B.False Answer: Option B 45. Which of the following commands will copy the contents of RAM whose address is in register 0 to port 1? P1, R0 B. R0, P1 C.MOV R0 D.MOV P1, R0 Answer: Option C 46. The statement CALL READ passes control to the line labelled READ. A.True B.False Answer: Option A 47. Which of the following commands will copy the contents of location 4H to the accumulator? A.MOV A, 04H B. MOV A, L4 C.MOV L4, A D.MOV 04H, A Answer: Option A

47 48. The microcontroller is useful in systems that have nonvariable programs for dedicated applications. A.True B.False Answer: Option A 49. The total amount of external code memory that can be interfaced to the 8051 is: A.32K C.128K B. 64K D.256K Answer: Option B 50. The ADC0804 has resolution. A.4-bit C.16-bit B. 8-bit D.32-bit Answer: Option B 51. A HIGH on which pin resets the 8051 microcontroller? A.RESET C.PSEN B. RST D.RSET Answer: Option B 52. An alternate function of port pin P3.1 in the 8051 is: A.serial port input B. serial port output C.memory write strobe D.memory read strobe Answer: Option B 53. Which of the following instructions will move the contents of the accumulator to

48 register 6? A.MOV 6R, A B. MOV R6, A C.MOV A, 6R D.MOV A, R6 Answer: Option B 54. The following command will rotate the 8 bits of the accumulator one position to the left: RL A A.True B.False Answer: Option A 55. An alternate function of port pin P3.0 (RXD) in the 8051 is: A.serial port input B. serial port output C.memory write strobe D.memory read strobe Answer: Option A

S.J.P.N Trust's. Hirasugar Institute of Technology, Nidasoshi.

S.J.P.N Trust's. Hirasugar Institute of Technology, Nidasoshi. S.J.P.N Trust's Tq: Hukkeri Dist: Belagavi DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING LABORATORY MANUAL Name of the Lab: Microcontroller Laboratory Semester: V Subject Code: 15EEL57 Staff Incharge:

More information

Microcontroller Intel [Instruction Set]

Microcontroller Intel [Instruction Set] Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers

More information

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman Microprocessors 1 The 8051 Instruction Set Microprocessors 1 1 Instruction Groups The 8051 has 255 instructions Every 8-bit opcode from 00 to FF is used except for A5. The instructions are grouped into

More information

1. Write A Program to move a block of data within the internal RAM

1. Write A Program to move a block of data within the internal RAM UNIT 2: Example Programs. 1. Write A Program to move a block of data within the internal RAM Org 0h start1: mov r0,#40h ;r0 pointed to internal RAM 40h mov r1,#30h ;r1 pointing to internal RAM 030h mov

More information

Programming of 8085 microprocessor and 8051 micro controller Study material

Programming of 8085 microprocessor and 8051 micro controller Study material 8085 Demo Programs Now, let us take a look at some program demonstrations using the above instructions Adding Two 8-bit Numbers Write a program to add data at 3005H & 3006H memory location and store the

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit

More information

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture Department of Electrical Engineering Lecture 4 The 8051 Architecture 1 In this Lecture Overview General physical & operational features Block diagram Pin assignments Logic symbol Hardware description Pin

More information

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING

UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING Instructions Alphabetical List of Instructions ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller EE4380 Fall 2001 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas 8051 Architecture Programmer s View Register Set Instruction Set Memory

More information

Module Contents of the Module Hours COs

Module Contents of the Module Hours COs Microcontrollers (EE45): Syllabus: Module Contents of the Module Hours COs 1 8051 MICROCONTROLLER ARCHITECTURE: Introduction to Microprocessors and Microcontrollers, the 8051 Architecture, 08 1 and pin

More information

Contents 8051 Instruction Set BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter I : Control Transfer Instructions Lesson (a): Loop Lesson (b): Jump (i) Conditional Lesson (c): Lesson (d): Lesson (e):

More information

Assembly Language programming (2)

Assembly Language programming (2) EEE3410 Microcontroller Applications LABORATORY Experiment 2 Assembly Language programming (2) Name Class Date Class No. Marks Arithmetic, Logic and Jump instructions Objectives To learn and practice the

More information

Principle and Interface Techniques of Microcontroller

Principle and Interface Techniques of Microcontroller Principle and Interface Techniques of Microcontroller --8051 Microcontroller and Embedded Systems Using Assembly and C LI, Guang ( 李光 ) Prof. PhD, DIC, MIET WANG, You ( 王酉 ) PhD, MIET 杭州 浙江大学 2011 Chapter

More information

ET355 Microprocessors Thursday 6:00 pm 10:20 pm

ET355 Microprocessors Thursday 6:00 pm 10:20 pm ITT Technical Institute ET355 Microprocessors Thursday 6:00 pm 10:20 pm Unit 4 Chapter 6, pp. 139-174 Chapter 7, pp. 181-188 Unit 4 Objectives Lecture: BCD Programming Examples of the 805x Microprocessor

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP Digital Blocks Semiconductor IP 805 Microcontroller General Description The Digital Blocks Microcontroller Verilog IP Core is complaint with the MCS 5 Instruction Set and contains standard 805 MCU peripherals,

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

SN8F5000 Family Instruction Set

SN8F5000 Family Instruction Set SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.

More information

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP Digital Blocks Semiconductor IP DB805C-FSM 805 Microcontroller FSM Finite State Machine General Description The Digital Blocks DB805C-FSM IP Core contains Digital Blocks compact DB805C CPU Core & GPIO

More information

Digital Blocks Semiconductor IP

Digital Blocks Semiconductor IP 805 SFR Bus Digital Blocks Semiconductor IP 805 Microcontroller Configurable Peripherals General Description The Digital Blocks (Configurable Peripherals) Microcontroller Verilog IP Core is complaint with

More information

~: Simple Programs in 8051 assembly language :~

~: Simple Programs in 8051 assembly language :~ ~: Simple Programs in 8051 assembly language :~ Here some simple programs of 8051 are given to understand the operation of different instructions and to understand the logic behind particular program.

More information

Microcontroller. Instruction set of 8051

Microcontroller. Instruction set of 8051 UNIT 2: Addressing Modes and Operations: Introduction, Addressing modes, External data Moves, Code Memory, Read Only Data Moves / Indexed Addressing mode, PUSH and POP Opcodes, Data exchanges, Example

More information

TUTORIAL Assembly Language programming (2)

TUTORIAL Assembly Language programming (2) 8051 Assembly Language programming (2) TUTORIAL 4 EEE3410 Microcontroller Applications 1. Write the instructions to move value 34h into register A and value 3Fh into register B, then add them together.

More information

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING Instructions Alphabetical List of Instructions ACALL: Absolute Call ADD, ADDC: Add Accumulator (With Carry) AJMP: Absolute Jump ANL: Bitwise AND CJNE: Compare

More information

Programming Book Microcontroller Kit. Rev 3.0 January, Wichit Sirichote

Programming Book Microcontroller Kit. Rev 3.0 January, Wichit Sirichote Programming Book1 8051 Microcontroller Kit Rev 3.0 January, 016 016 Wichit Sirichote 1 Contents Overview...3 SAFTY INFORMATION...3 Tools...3 Experiment 1 Blinking LED...4 Experiment Binary number counting...9

More information

8051 Microcontrollers

8051 Microcontrollers 8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 15, 2016 8051 INSTRUCTIONS JUMP, LOOP AND CALL INSTRUCTIONS 8051 INSTRUCTIONS Repeating a sequence of instructions

More information

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following.

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following. MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following. (9M) 1) Describe the instructions SWAP A and MOVX@DPTR,A with one example. (3Marks) SWAP A

More information

Dodatak. Skup instrukcija

Dodatak. Skup instrukcija Dodatak Skup instrukcija Arithmetic Operations [@Ri] implies contents of memory location pointed to by R0 or R1 Rn refers to registers R0-R7 of the currently selected register bank 2 ADD A,

More information

Contents. Join the Technical Community Today!

Contents. Join the Technical Community Today! Contents CHAPTER 1: INTRODUCTION... 5 1. WELCOME... 5 1.2 PS 8051 BOARD OVERVIEW... 6 1.3 PS 8051 SPECIFICATIONS... 7 CHAPTER 2: SYSTEM DESCRIPTION... 9 2.1 HARDWARE... 9 2.2 MAPPING OF DEVICES... 11 2.2.1

More information

Q. Classify the instruction set of 8051 and list out the instructions in each type.

Q. Classify the instruction set of 8051 and list out the instructions in each type. INTRODUCTION Here is a list of the operands and their meanings: A - accumulator; Rn - is one of working registers (R0-R7) in the currently active RAM memory bank; Direct - is any 8-bit address register

More information

WINTER 14 EXAMINATION Subject Code: Model Answer Page No: 1/ 26

WINTER 14 EXAMINATION Subject Code: Model Answer Page No: 1/ 26 WINTER 14 EXAMINATION Subject Code: 17509 Model Answer Page No: 1/ 26 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer

More information

Microcontroller and Applications

Microcontroller and Applications S.Y. Diploma : Sem. IV [DE/EJ/ET/EN/EX/EQ/IS/IC/IE] Microcontroller and Applications Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 70 Q.1 Attempt any FIVE of the following : [10] Q.1(a) Define

More information

MODEL ANSWER WINTER 17 EXAMINATION Subject Title: Microcontroller and applications

MODEL ANSWER WINTER 17 EXAMINATION Subject Title: Microcontroller and applications Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

UNIT-III ASSEMBLY LANGUAGE PROGRAMMING. The CPU can access data in various ways, which are called addressing modes

UNIT-III ASSEMBLY LANGUAGE PROGRAMMING. The CPU can access data in various ways, which are called addressing modes 8051 Software Overview: 1. Addressing Modes 2. Instruction Set 3. Programming 8051 Addressing Modes: UNIT-III ASSEMBLY LANGUAGE PROGRAMMING The CPU can access data in various ways, which are called addressing

More information

Instruction Set Of 8051

Instruction Set Of 8051 Instruction Set Of 8051 By Darshan Patel M.Tech (Power Electronics & Drives) Assistant Professor, Electrical Department Sankalchand Patel college of Engineering-Visnagar Introduction The process of writing

More information

C51 Family. Architectural Overview of the C51 Family. Summary

C51 Family. Architectural Overview of the C51 Family. Summary Architectural Overview of the C51 Family C51 Family Summary 1. Introduction............................................................ I.1. 1.1. TSC80C51/80C51/80C31.................................................................

More information

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code:

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code: MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code: I m p o r t a n t I n s t r u c t i o n s t o e x a m i n e r s : 1) The answers should be examined by key

More information

ELEG3923 Microprocessor Ch.6 Arithmetic and Logics

ELEG3923 Microprocessor Ch.6 Arithmetic and Logics Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.6 Arithmetic and Logics Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Arithmetic instructions Signed number operations Logic

More information

Dragonchip. Instruction Set Manual

Dragonchip. Instruction Set Manual Dragonchip Instruction Set Manual Version 3.1 July 2004 The Objective of this document is to provide the user a detail description to the each instruction set used in Dragonchip s MCU family. There are

More information

Microcontroller and Embedded Systems:

Microcontroller and Embedded Systems: Microcontroller and Embedded Systems: Branches: 1. Electronics & Telecommunication Engineering 2. Electrical & Electronics Engineering Semester: 6 th Semester / 7 th Semester 1. Explain the differences

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller 1 Salient Features (1). 8 bit microcontroller originally developed by Intel in 1980. (2). High-performance CMOS Technology. (3). Contains Total 40 pins. (4). Address bus is of 16 bit

More information

ELEG3923 Microprocessor Ch.9 Timer Programming

ELEG3923 Microprocessor Ch.9 Timer Programming Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.9 Timer Programming Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Programming 8051 Timers Counter programming Timer programming

More information

DR bit RISC Microcontroller. Instructions set details ver 3.10

DR bit RISC Microcontroller. Instructions set details ver 3.10 DR80390 8-bit RISC Microcontroller Instructions set details ver 3.10 DR80390 Instructions set details - 2 - Contents 1. Overview 7 1.1. Document structure. 7 2. Instructions set brief 7 2.1. Instruction

More information

8051 Programming using Assembly

8051 Programming using Assembly 8051 Programming using Assembly The Instruction Addressing Modes dest,source ; dest = source A,#72H ;A=72H A, # r ;A= r OR 72H R4,#62H ;R4=62H B,0F9H ;B=the content of F9 th byte of RAM DPTR,#7634H DPL,#34H

More information

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS

MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS MASSEY UNIVERSITY PALMERSTON NORTH CAMPUS EXAMINATION FOR 159.233 COMPUTER SYSTEMS Semester One June 2008 Time allowed: THREE (3) hours This exam contains THREE (3) questions ANSWER ALL THREE (3) QUESTIONS

More information

Principle and Interface Techniques of Microcontroller

Principle and Interface Techniques of Microcontroller Principle and Interface Techniques of Microcontroller --8051 Microcontroller and Embedded Systems Using Assembly and C LI, Guang ( 李光 ) Prof. PhD, DIC, MIET WANG, You ( 王酉 ) PhD, MIET 杭州 浙江大学 2014 Chapter

More information

Embedded Controller Programming

Embedded Controller Programming Embedded Controller Programming Counters, Timers and I/O in Assembly Language Ken Arnold Copyright 2000-2004 Ken Arnold 1 Outline Timer/Counters Serial Port More 8051 Instructions Examples Copyright 2000-2004

More information

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code:

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code: MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code: 17534 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given

More information

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5 MICROCONTROLLER AND PLC LAB-436 SEMESTER-5 Exp:1 STUDY OF MICROCONTROLLER 8051 To study the microcontroller and familiarize the 8051microcontroller kit Theory:- A Microcontroller consists of a powerful

More information

8051 Microcontroller Assembly Programming

8051 Microcontroller Assembly Programming 8051 Microcontroller Assembly Programming EE4380 Fall 2002 Class 3 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Topics Machine code 8051 Addressing Modes

More information

Application Brief D-005

Application Brief D-005 Interfacing the Avago HDSP-2xxx LED Alphanumeric Displays with the Intel 8751H Microcontroller Application Brief D-005 Introduction The HDSP-21xx/-25xx series of products is ideal for applications where

More information

Introduction To MCS-51

Introduction To MCS-51 Introduction To MCS-51 By Charoen Vongchumyen Department of Computer Engineering Faculty of Engineering KMITLadkrabang 8051 Hardware Basic Content Overview Architechture Memory map Register Interrupt Timer/Counter

More information

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1)

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1) Department of Electrical Engineering Lecture 5 8051 Assembly Language Programming (1) 1 In this Lecture 8051 programming model Assembly language syntax Operation codes and operands Machine instructions

More information

MICROPROCESSOR LABORATORY MANUAL

MICROPROCESSOR LABORATORY MANUAL MICROPROCESSOR LABORATORY MANUAL T.C. AYDIN ADNAN MENDERES UNIVERSITY ENGINEERING FACULTY ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT Prepared by: Res. Asst. Abdullah GÜLDEREN Aydın 2019 Contents 1.

More information

8051 Programming: Arithmetic and Logic

8051 Programming: Arithmetic and Logic 8051 Programming: Arithmetic and Logic EE4380 Fall 2002 Class 4 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Topics Signed and Unsigned arithmetic Binary

More information

Control Transfer Instructions Jump, Loop, and Call. ECE473/573 Microprocessor System Design, Dr. Shiue

Control Transfer Instructions Jump, Loop, and Call. ECE473/573 Microprocessor System Design, Dr. Shiue Control Transfer Instructions Jump, Loop, and Call 1 Jump Instructions JZ label ; Jump if A=0 JNZ label ; Jump if A!=0 DJNZ reg, label ; Decrement and Jump if A (or reg.)!=0 CJNE A, byte ; Compare and

More information

INSTRUCCIONES ARITMETICAS ERROR! MARCADOR NO DEFINIDO.

INSTRUCCIONES ARITMETICAS ERROR! MARCADOR NO DEFINIDO. INSTRUCCIONES ARITMETICAS ERROR! MARCADOR NO DEFINIDO. ADD A,Rn Add register to 28..2F 1 12 X X X accumulator ADD A,direct Add direct byte 25 2 12 X X X to accumulator ADD A,@Ri Add indirect RAM 26..27

More information

M.S ENGINEERING COLLEGE NAVARTNA AGRAHARA,SADAHALLI P.O, BANGALORE

M.S ENGINEERING COLLEGE NAVARTNA AGRAHARA,SADAHALLI P.O, BANGALORE M.S ENGINEERING COLLEGE NAVARTNA AGRAHARA,SADAHALLI P.O, BANGALORE-562110 Department of Electronics and Communication Microcontroller Lab [10ECL48] IV SEM Prepared by: Tejaswini Naveen H 1 I. Non Interfacing

More information

TUTORIAL. Donal Heffernan University of Limerick May Tutorial D.Heffernan 2000,

TUTORIAL. Donal Heffernan University of Limerick May Tutorial D.Heffernan 2000, 8051 TUTORIAL Donal Heffernan University of Limerick May-2002 8051 Tutorial D.Heffernan 2000, 2001 1 Blank 8051 Tutorial D.Heffernan 2000, 2001 2 Some reference material: Test books + MacKenzie Scott.

More information

Assembly Language programming (3)

Assembly Language programming (3) EEE3410 Microcontroller Applications LABORATORY Experiment 3 Assembly Language programming (3) Name Class Date Class No. Marks Conditional Program Branching and Subroutine Call in 8051 Objectives To learn

More information

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices

CPEG300 Embedded System Design. Lecture Interface with Peripheral Devices CPEG300 Embedded System Design Lecture 0 805 Interface with Peripheral Devices Hamad Bin Khalifa University, Spring 208 Typical Devices for an Electronics System Power generation PWM control Input devices

More information

Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports.

Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports. 8051 Architecture 1 Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports. In most cases, all that is missing is the software to define the operation of the

More information

2. Write an 8051 program to generate a square wave of 25 khz at pin P2.3 using XTAL = 12 MHz. Solution:

2. Write an 8051 program to generate a square wave of 25 khz at pin P2.3 using XTAL = 12 MHz. Solution: Assignment 2 1. Assume that 5 binary data items are stored in RAM locations starting at 50h, as shown below. Write a program to find the sum of all the numbers. The calculation is in 16-bit format and

More information

8051 Interfacing and Applications Microcontroller

8051 Interfacing and Applications Microcontroller 8051 Interfacing and Applications Objectives: At the end of this chapter, we will be able to: List the different devices that can be interfaced with 8051 Understand the working principle. Develop the following

More information

Figure Programming model

Figure Programming model LAB 1: Intel 8051 CPU PROGRAMMING DATA TRANSFER INSTRUCTIONS OBJECTIVES At the end of the laboratory works, you should be able to write simple assembly language programs for the Intel 8051 CPU using data

More information

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor Subject Name: Microprocessor and Microcontroller Year: 3 rd Year Subject Code: CS502 Semester: 5 th Module Day Assignment 1 Microprocessor

More information

MICROCONTROLLER LAB Version 1.0 Aug 2017

MICROCONTROLLER LAB Version 1.0 Aug 2017 1 Channabasaveshwara Institute of Technology (An ISO 9001:2015 Certified Institution) NH 206 (B.H. Road), Gubbi, Tumkur 572 216. Karnataka. Department of Electrical & Electronics Engineering MICROCONTROLLER

More information

Report Title: Digital Voltmeter using 89C51

Report Title: Digital Voltmeter using 89C51 VIVEKANAND EDUCATION SOCIETY'S INSTITUTE OF TECHNOLOGY Approved by AICTE & Affiliated to Mumbai University ELECTRONIC WORKSHOP - 2 REPORT Report Title: Digital Voltmeter using 89C51 PROJECT MEMBERS: 1.

More information

NAME as31 - An Intel 8031/8051 assembler. SYNOPSIS as31 [-h] [-l] [-s] [-v] [-Aarg] [-Ffmt] [-Ofile] infile.asm

NAME as31 - An Intel 8031/8051 assembler. SYNOPSIS as31 [-h] [-l] [-s] [-v] [-Aarg] [-Ffmt] [-Ofile] infile.asm NAME as31 - An Intel 8031/8051 assembler SYNOPSIS as31 [-h] [-l] [-s] [-v] [-Aarg] [-Ffmt] [-Ofile] infile.asm DESCRIPTION As31 assembles infile.asm into one of several different output formats. The output

More information

EE6502- MICROPROCESSOR AND MICROCONTROLLER

EE6502- MICROPROCESSOR AND MICROCONTROLLER . EE6502- MICROPROCESSOR AND MICROCONTROLLER UNIT III - 8051 MICROCONTROLLER PART - A 1. What is Microcontroller? A device which contains the microprocessor with integrated peripherals like memory, serial

More information

Highlights. FP51 (FPGA based 1T 8051 core)

Highlights. FP51 (FPGA based 1T 8051 core) Copyright 2017 PulseRain Technology, LLC. FP51 (FPGA based 1T 8051 core) 10555 Scripps Trl, San Diego, CA 92131 858-877-3485 858-408-9550 http://www.pulserain.com Highlights 1T 8051 Core Intel MCS-51 Compatible

More information

Q.1. A) Attempt any THREE of the following:

Q.1. A) Attempt any THREE of the following: Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

MCS -51 Programmer s Guide and Instruction Set

MCS -51 Programmer s Guide and Instruction Set MCS -51 Programmer s Guide and Instruction Set November 1992 Order Number 270249-003 COPYRIGHT INTEL CORPORATION 1996 MCS -51 PROGRAMMER S GUIDE AND INSTRUCTION SET CONTENTS PAGE MEMORY ORGANIZATION 1

More information

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC. MICROCONTROLLERS AND APPLICATIONS 1 Module 1 Module I Introduction to Microcontrollers: Comparison with Microprocessors Harvard and Von Neumann Architectures - 80C51 microcontroller features - internal

More information

CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS

CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS Addition of Unsigned Numbers The instruction ADD is used to add two operands Destination operand is always in register A Source operand can be a register,

More information

8051 Core Specification

8051 Core Specification 8051 Core Specification Authors: Jaka Simsic Simon Teran jakas@opencores.org simont@opencores.org Rev. 0.1 August 14, 2001 First Draft www.opencores.org Rev 0.1 First Draft 1 of 26 Revision History Rev.

More information

What Registers are available? Programming in Assembler. Assembler Programming - like early Basic. Assembler Data Movement Instructions

What Registers are available? Programming in Assembler. Assembler Programming - like early Basic. Assembler Data Movement Instructions Programming in Assembler Need knowledge of CPU 8051 Programmers model what registers are available? what memory is available? code memory (for programs) data memory (for variables and the stack) what instructions

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 17 EXAMINATION Subject Name: Microcontroller Model Answer Subject Code: 17534 I m p o r t a n t I n s t r u c t i o n s t o e x a m i n e r s : 1) The answers should be examined by key words and

More information

MODULE-1. Short Answer Questions

MODULE-1. Short Answer Questions MODULE-1 Short Answer Questions 1. Give the comparison between microprocessor and microcontroller. It is very clear from figure that in microprocessor we have to interface additional circuitry for providing

More information

Unit-I. 1. INTRODUCTION TO MICROCONTROLLERS. Micro controller, types, selection of a microcontroller and applications

Unit-I. 1. INTRODUCTION TO MICROCONTROLLERS. Micro controller, types, selection of a microcontroller and applications Department of Technical Education DIPLOMA COURSE IN ELECTRONICS AND COMMUNICATION ENGINEERING Fourth Semester MICROCONTROLLERS AND APPLICATION Contact Hours/Week : 04 Contact Hours/Semester : 64 CONTENTS

More information

LCD AND KEYBOARD INTERFACING

LCD AND KEYBOARD INTERFACING LCD AND KEYBOARD The 8051 Microcontroller and Embedded Systems: Using Assembly and C Mazidi, Mazidi and McKinlay Chung-Ping Young 楊中平 Home Automation, Networking, and Entertainment Lab Dept. of Computer

More information

Lab-Report Microprocessors

Lab-Report Microprocessors Lab-Report Microprocessors Digital Voltage Meter (DVM) NO YES Name: Dirk Becker Course: BEng 2 Group: A Student No.: 9801351 Date: 05/May/1999 1. Contents 1. CONTENTS... 2 2. INTRODUCTION... 3 3. THE PROJECT...

More information

AL8051S 8-BIT MICROCONTROLLER Application Notes

AL8051S 8-BIT MICROCONTROLLER Application Notes AL8051S 8-BIT MICROCONTROLLER Application Notes 6-14-2012 Table of Contents GENERAL INFORMATION... 3 FEATURES... 3 Key features... 3 Design features... 3 INTERFACE... 4 Symbol... 4 Signal description...

More information

LAB FILE of EE1531: MICROCONTROLLER & EMBEDDED SYSTEMS LAB

LAB FILE of EE1531: MICROCONTROLLER & EMBEDDED SYSTEMS LAB LAB FILE of EE1531: MICROCONTROLLER & EMBEDDED SYSTEMS LAB Name: Registration Number: Programme: B. Tech. (Electrical & Electronics Engineering) Section: Batch: Session: July-Nov, 2016 General Instructions

More information

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization Program Memory The 80C51 has separate address spaces for program and data memory. The Program memory can be up to 64k bytes long. The lower 4k

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

8051 Microcontrollers

8051 Microcontrollers 8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 8, 2016 Controller vs Processor Controller vs Processor Introduction to 8051 Micro-controller In 1981,Intel corporation

More information

WINTER 14 EXAMINATION

WINTER 14 EXAMINATION Subject Code: 17534 WINTER 14 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2)

More information

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution 1. (a) 1. (b) T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution Priority modes. 1) Fully Nested Mode : It is a general purpose mode. IR 0 highest priority IR 1 lowest

More information

Chapter 3. Bit Addressable Area. By DeccanRobots

Chapter 3. Bit Addressable Area. By DeccanRobots Chapter 3 Bit Addressable Area By DeccanRobots What is Bit Addressable Area? FFh 2Fh 20h 00h Data Memory General purpose Memory Area Bit Addressable Memory Registers Memory Area from 20H to 2FH is Bit

More information

EXPERIMENT NO.1. A Microcontroller is a complete computer system built on a single chip.

EXPERIMENT NO.1. A Microcontroller is a complete computer system built on a single chip. EXPERIMENT NO.1 AIM: Study of 8051 Microcontroller TOOLS: 8051 kit THEORY: Salient Features of 8051 A Microcontroller is a complete computer system built on a single chip. It contains all components like

More information

C51 Family. C51 Family Programmer s Guide and Instruction Set. Summary

C51 Family. C51 Family Programmer s Guide and Instruction Set. Summary C51 Family Programmer s Guide and Instruction Set Summary 1. Memory Organization.................................................... I.3.2 1.1. Program Memory.......................................................................

More information

UNIT MICROCONTROLLER AND ITS PROGRAMMING

UNIT MICROCONTROLLER AND ITS PROGRAMMING M i c r o p r o c e s s o r s a n d M i c r o c o n t r o l l e r s P a g e 1 UNIT-7 8051 MICROCONTROLLER AND ITS PROGRAMMING INTRODUCTION The microcontroller incorporates all the features that are found

More information

80C451 operation of port 6

80C451 operation of port 6 INTRODUCTION The features of the are shared with the 80C5 or are conventional except for the operation of port 6. The flexibility of this port facilitates high-speed parallel data communications. This

More information

INTEGRATED CIRCUITS. AN408 80C451 operation of port 6

INTEGRATED CIRCUITS. AN408 80C451 operation of port 6 INTEGRATED CIRCUITS March 1988 INTRODUCTION The features of the are shared with the 80C51 or are conventional except for the operation of port 6. The flexibility of this port facilitates high-speed parallel

More information

CS 320. Computer Architecture Core Architecture

CS 320. Computer Architecture Core Architecture CS 320 Computer Architecture 8051 Core Architecture Evan Hallam 19 April 2006 Abstract The 8051 is an 8-bit microprocessor designed originally in the 1980 s by the Intel Corporation. This inexpensive and

More information

Assembly Language Programming Assignment 1

Assembly Language Programming Assignment 1 U08809 Microprocessors Assembly Language Programming Assignment 1 1. Write a short assembly program that illustrates the use of the direct addressing mode, and the use of the MUL function 2 number2 slot

More information

MICROCONTROLLER BASED WATER LEVEL CONTROL SYSTEM

MICROCONTROLLER BASED WATER LEVEL CONTROL SYSTEM MICROCONTROLLER BASED WATER LEVEL CONTROL SYSTEM The present concept implements controlling of pump which pumps water from the sump (underground tank) to the overhead tank, using 8951 microcontroller.

More information

build_char macro P1,P2,P3,P4,P5,P6,P7,P8 ;Macro for building a custom character

build_char macro P1,P2,P3,P4,P5,P6,P7,P8 ;Macro for building a custom character hold macro nop nop nop nop endm disp_str macro string ;Macro for sending string to LCD irpc char, if nul 'char' exitm endif mov a,#'char' lcall data_in endm endm build_char macro P1,P2,P3,P4,P5,P6,P7,P8

More information

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka INTRODUCTION Microcontroller vs General Purpose Microprocessor General-purpose microprocessors contains No RAM No

More information