D: arc SRC KUT51 KUT51LCD.LST KUT51LCD PAGE 1

Size: px
Start display at page:

Download "D: arc SRC KUT51 KUT51LCD.LST KUT51LCD PAGE 1"

Transcription

1 D: arc SRC KUT51.LST PAGE ; Ver 1.1 : Hyper Terminal and LCD supported(line delay=20 ms, bps) 2 3 $mod ; PORT DEFINITION F800 6 LCD_COMMAND_WR EQU 0F800H F801 7 LCD_DATA_WR EQU 0F801H F802 8 LCD_COMMAND_RD EQU 0F802H F803 9 LCD_DATA_RD EQU 0F803H RAM equ 8000h ; RAM start address STACK equ 40h ; STACK area 001B 13 ESC equ 1Bh ; escape code 000D 14 cr equ 0dh ; carriage return code 000A 15 lf equ 0ah ; line feed code ; CPU Reset org ajmp INIT ;Interrupt Service Routines org 3 ; 0003 external INT ljmp RAM B 25 org 000bh ; 000B timer 0 000B 02800B 26 ljmp RAM+0bh org 0013h ; 0013 external INT ljmp RAM+13h B 31 org 001bh ; 001b timer 1 001B 02801B 32 ljmp RAM+1bh org 0023h ; 0023 serial RI and TI ljmp RAM+23h ; MAIN STARTS HERE INIT: mov a,#stack ; set stack pointer 0028 F mov sp,a ; Power-on Sign, LED 4,7 On, 5,6 Off 002A 7590F6 42 mov P1,#0f6h D E4 44 clr a 002E F5D0 45 mov psw,a ; set register bank zero ;initialize serial & LCD port B 48 CALL SERIAL_INIT DE 49 CALL LCD_INIT MENU: LCALL XSTRING D0A0A0A 52 db cr, lf, lf, lf 003D 2A2A2A2A 53 db '****************************************', cr, lf A2A2A2A A2A2A2A A2A2A2A 004D 2A2A2A2A A2A2A2A PAGE 2

2 D: arc SRC KUT51.LST A2A2A2A A2A2A2A 005D 2A2A2A2A A2A2A2A D0A A204B55 54 db '* KUT51 Mini-Monitor Program Ver. 1.1 *', CR, LF 006B F 4D696E D4D6F6E F72 007B F 007F D E B 2E31202A 008F 0D0A A2A2A2A 55 db '****************************************', cr, lf A2A2A2A A2A2A2A 009D 2A2A2A2A 00A1 2A2A2A2A 00A5 2A2A2A2A 00A9 2A2A2A2A 00AD 2A2A2A2A 00B1 2A2A2A2A 00B5 2A2A2A2A 00B9 0D0A 00BB E 56 db 'Ver LCD supported', CR, LF 00BF 312E C3 2D204C43 00C CB 70706F72 00CF D 00D3 0A 00D E 57 db 'Ver Hyper terminal supported', cr, lf 00D8 312E DC 2D E E D 00E8 696E616C 00EC F0 706F F D0A 00F db ' (20ms line delay, 19200bps)', cr,lf,lf,lf 00FC D73206C E C 64656C C C 0D0A0A0A E db 'ENTER THE LETTER FOR YOUR SELECTION:',lf,cr,lf,cr C45 012C PAGE F F

3 D: arc SRC KUT51.LST 013C 4C F4E3A A0D0A0D D20 61 db 'U - "Upload Hex File to RAM"',lf,cr 014C C F C65 015C 20746F D A0D D20 62 db 'G - "GO to Specified Address"',lf,cr 016A 22474F20 016E 746F A E A0D D20 63 db 'D - "Dump External ROM & RAM"',lf,cr D 018D E C F4D D D 01A1 220A0D 01A D20 64 db 'W - "Write External RAM with a Byte"',lf,cr 01A AC B B4 6E616C20 01B D20 01BC C C C8 0A0D 01CA 48202D20 65 db 'H - "Display HELP Menu, Start Again"', lf, cr 01CE D2 706C D C 01DA 50204D65 01DE 6E752C20 01E E EA 61696E22 01EE 0A0D 01F0 0A0A0A0A 66 db lf,lf,lf,lf ;advance to 24th line 01F4 1B 67 db esc 01F getsel: lcall xstring 01F8 0D0A4B55 69 db cr,lf,'kut51>' ;prompt 01FC E B 70 db ESC MOV A, #01H ; CLEAR DISPLAY, HOME CURSOR PAGE B7 73 CALL LCD_COMMAND_WRITE MOV A, #16 ; REQUIRE 1.53MS(SPEC. SHEET) CALL DELAY100US B MOV DPTR, #MSG1 ; DISPLAY 1ST LINE

4 D: arc SRC KUT51.LST 020E 1204F4 79 CALL LCD_PRINT C0 81 MOV A, #0C0H ; CURSOR TO SECOND LINE HOME B7 82 CALL LCD_COMMAND_WRITE MOV DPTR, #MSG2 ; DISPLAY 2ND LINE F4 85 CALL LCD_PRINT C LCALL CHR_IN 021F 545F 88 anl a,#5fh ; uppercase to lowercase Check_Dump: 0221 B CJNE A, #'D', Check_Write ; IF NOT D, THEN CHECK L F 92 AJMP RUN_DUMP ; D, RUN DUMP MEMORY Check_Write: 0226 B CJNE A, #'W', Check_Go ; IF NOT L, THEN CHECK J E7 95 AJMP RUN_WRITE ; W, RUN WRITE BYTE 022B 96 Check_Go: 022B B CJNE A, #'G', Check_Upload ; IF NOT J, THEN CHECK P 022E 61A2 98 AJMP RUN_GO ; J, RUN JUMP TO ADDRESS Check_UPload: 0230 B CJNE A,#'U',Help_MENU ; IF NOT P, THEN CHECK I E1 101 AJMP RUN_UPLOAD ; U, RUN UPLOAD PROGRAM Help_MENU: 0235 B cjne a, #'H',other_key ACALL WAIT ; default - wait, then show menu 023A LJMP MENU 023D 107 other_key: 023D LCALL XSTRING A0D db lf,cr,'### Incorrect Key Input("H" for HELP) ###' E F C B E C F C B 1B 110 db ESC 026C 0201F5 111 ljmp getsel ;Display external data memory (hex and ASCII) 026F 114 RUN_DUMP: 026F LCALL XSTRING ; ASK FOR START ADDRESS A0D454E 116 db lf,cr,'enter 2-BYTE START ADDRESS:',lf,cr A 322D E PAGE A E 3A0A0D B 117 db ESC ACALL READHEX ; PUT START ADDR IN DPTR 0294 F MOV DPH,A ACALL READHEX F0 121 ANL A,#0F0h ; START ON 16-BYTE BOUNDARY 029A F MOV DPL,A ; HAVE START ADDRESS IN DPTR 4

5 D: arc SRC KUT51.LST C 910E 124 acall lfcr ;SET UP ROW COUNTER 029E mov r1,#10h ; Fixed to 00-ffh 02A0 910E 128 ACALL LFCR ; GO TO NEXT LINE TO START A2 130 LOUTLOOP: 02A MOV R0,#16 ; SET UP BYTE COUNTER 02A4 E MOV A,DPH ; AT START OF LINE OUTPUT ADDR 02A6 917F 133 ACALL WRBYTE 02A8 E MOV A,DPL 02AA 917F 135 ACALL WRBYTE 02AC MOV A,#' ' ; AND SPACE TO MAKE IT TIDY 02AE ACALL CHR_OUT 02B0 C push dpl 02B2 C push dph ; save line start address on stack 02B4 140 BOUTLOOP: 02B4 E0 141 MOVX A,@DPTR ; OUTPUT ROW ONE BYTE AT A TIME 02B5 917F 142 ACALL WRBYTE 02B MOV A,#' ' 02B ACALL CHR_OUT 02BB A3 145 INC DPTR 02BC D8F6 146 DJNZ R0,BOUTLOOP 02BE D pop dph 02C0 D pop dpl ; restore line start address 02C2 51CD 149 acall dascii 02C4 910E 150 ACALL LFCR 02C6 D9DA 151 DJNZ R1,LOUTLOOP 02C8 910E 152 acall lfcr 02CA 0201F5 153 LJMP getsel ; return to command mode 154 ; 02CD dascii: mov r0,#16 ; initalize loop count 02CF mov a,#' ' 02D acall chr_out ; put out couple of spaces 02D acall chr_out 02D5 E0 159 dasci1: movx a,@dptr ; get the byte 02D6 547F 160 anl a,#07fh ; mask parity bit 02D8 C3 161 clr c 02D subb a,#' ' ; subtract ascii space 02DB jnc dasci2 ; jump if displayable 02DD 740E 164 mov a,#('.'-' ') ; load "." minus space if not displayable 02DF dasci2: add a,#' ' ; make it ascii again 02E acall chr_out 02E3 A3 167 inc dptr ; bump data pointer 02E4 D8EF 168 djnz r0,dasci1 ; and loop 'till done 02E ret ; return and do next line E7 171 RUN_WRITE: PAGE 6 02E ACALL XSTRING 02E9 0A0D454E 173 db lf,cr,'enter THE 2-BYTE STARTING ADDRESS YOU WISH TO CHANGE:' 02ED F F5 322D F FD E

6 D: arc SRC KUT51.LST D 594F F E 031D 47453A A0D284E 174 db lf,cr,'(note : Writing to ROM will NOT cause an ERROR)', lf,cr F A C E F F4D C 033C 6C204E4F E C 52524F A0D B 175 db ESC ACALL READHEX ; FIRST GET THE TWO ADDRESS BYTES 0356 F MOV DPH,A ACALL READHEX 035A F MOV DPL,A 035C C PUSH DPH ; SAVE THE ADDRESS 035E C PUSH DPL MOV A,#' ' ; SPACE BETWEEN ADDRESS AND DATA ACALL CHR_OUT 0364 E0 184 MOVX A,@DPTR ; SHOW THE CURRENT DATA F 185 ACALL WRBYTE ACALL XSTRING A0D454E 187 db lf,cr,'enter THE BYTE TO BE WRITTEN(IN HEX):',lf,cr 036D F20 037D E E D 58293A0A D B 188 db ESC ACALL READHEX ; GET THE NEW VALUE 0395 D POP DPL 0397 D POP DPH 0399 F0 192 ; MOVE THE NEW VALUE TO MEMORY A lcall xstring PAGE 7 039D 0D 195 db cr 039E 1B 196 db ESC 197 ;******* 039F 0201F5 198 LJMP getsel ; return to command mode 199 ; 200 ; ;Go to address 03A2 202 RUN_GO: 03A ACALL XSTRING 03A4 0A0D454E 204 db lf,cr,'enter THE 2-BYTE JUMP DESTINATION ADDRESS:',lf,cr 03A

7 D: arc SRC KUT51.LST 03AC B0 322D B A 03B8 554D BC C0 494E C4 494F4E20 03C CC A 03D0 0A0D 03D2 1B 205 db ESC 03D ACALL READHEX ; FIRST GET THE JUMP ADDRESS 03D5 F MOV DPH,A 03D ACALL READHEX 03D9 F MOV DPL,A 03DB 910E 210 ACALL LFCR 03DD 910E 211 ACALL LFCR DF E4 213 clr a 03E ; JUMP TO THE ADDRESS ;Load hex file into memory 03E1 217 RUN_UPLOAD: 03E1 910E 218 ACALL LFCR 219 ;ACALL LFCR 03E3 220 U_RUN1: 03E ACALL CHR_IN ; GET RID OF : AT START OF LINE 03E5 B43AFB 222 CJNE A,#':', U_RUN1 03E ACALL READHEX 03EA JZ ALLREAD ; LAST RECORD HAS 01 IN RECORD TYPE 03EC FD 225 MOV R5,A ; LOAD BYTE COUNT FOR LINE INTO R5 03ED ACALL READHEX ; READ HIGH BYTE OF START ADDRESS 03EF F MOV DPH,A 03F ACALL READHEX ; READ LOW BYTE OF START ADDRESS 03F3 F MOV DPL,A 03F ACALL READHEX ; READ RECORD TYPE 00 = DATA, 01 = END 03F7 231 READLOOP: 03F ACALL READHEX 03F9 F FA A3 234 INC DPTR ; MOVE DPTR TO NEXT BYTE ADDRESS 03FB DDFA 235 DJNZ R5,READLOOP ; DECR BYTE COUNTER, JNZ 03FD ACALL READHEX ; GET RID OF CHECKSUM, NO CHECKING FF 61E1 238 AJMP RUN_UPLOAD ; GET NEXT LINE ALLREAD: ACALL READHEX ; READ ADDRESS ACALL READHEX ; READ ADDRESS PAGE ACALL READHEX ; READ RECORD TYPE ACALL READHEX ; READ LAST CHECKSUM ACALL CHR_IN ; CR=HyperTerm. last char=0dh B 0201F5 246 LJMP getsel ; DONE, GO BACK TO MENU E 740A 248 LFCR: MOV A,#lf ACALL CHR_OUT D 250 MOV A,#cr ACALL CHR_OUT 7

8 D: arc SRC KUT51.LST RET 253 ; 254 ; WAIT PAUSES FOR A FRACTION OF A SECOND. FREQUENCY UNKNOWN 255 ; FF 256 WAIT: MOV A,# F0FF 257 WAIT1: MOV B,#-1 041C D5F0FD 258 DJNZ B,$ 041F DEC A F7 260 JNZ WAIT RET 262 ; 263 ; THE TEXT STRING MUST END WITH AN ESC CHARACTER 264 ; XSTRING: 0423 D POP DPH ; LOAD DPTR WITH FIRST CHAR 0425 D POP DPL 0427 E4 268 XSTR_1: CLR A MOVC A,@A+DPTR ; FETCH FIRST CHAR IN STRING FD 270 XSTR_2: JNB TI,$ ; WAIT UNTIL TRANSMITTER READY 042C C CLR TI ; MARK AS NOT READY 042E F MOV SBUF,A 0430 A3 273 INC DPTR 0431 E4 274 CLR A MOVC A,@A+DPTR ; GET NEXT CHARACTER 0433 B41BF3 276 CJNE A,#ESC,XSTR_2 ; LOOP UNTIL ESCAPE READ MOV A,# ; RETURN TO CODE AFTER ESCAPE 279 ; 280 ; READS THE SERIAL PORT AND ECHO BACK FD 281 CHR_IN: JNB RI,$ 043C C CLR RI 043E E MOV A,SBUF F 284 ANL A,#7Fh ACALL CHR_OUT RET 287 ; 288 ; SENDS A CHARACTER(ASCII) IN A OUT THE SERIAL PORT CHR_OUT: FD 290 JNB TI,$ 0448 C CLR TI 044A F MOV SBUF,A 044C RET ; ASCII CHARACTER IN A --> HEX 296 ; LOWER NIBBLE = HEX, UPPER NIBBLE = 0 044D 297 ASC2HEX: 044D C2D7 298 CLR CY 044F SUBB A,#'0' PAGE F5F0 300 MOV B,A A 301 SUBB A,#10 ; subtract 10 decimal D JB CY,A2LT E5F0 303 MOV A,B 045A SUBB A,#7 045C F5F0 305 MOV B,A 045E E5F0 306 A2LT10: MOV A,B RET ; CONVERTS THE LOWER NIBBLE IN A TO AN ASCII CHARACTER RETURNED IN A HEX2ASC: F 311 ANL A,#0Fh 0463 C2D7 312 CLR CY

9 D: arc SRC KUT51.LST 0465 F5F0 313 MOV B,A A 314 SUBB A,# E5F0 315 MOV A,B 046B 20D JB CY,H2LT10 046E ADD A,# H2LT10: ADD A,#'0' RET 320 ; 321 ; READS TWO ASCII CHARACTERS FROM THE SERIAL PORT AND 322 ; CONVERTS THEM INTO A BYTE RETURNED IN A. USES 323 ; REGISTER 2 IN THE FIRST BANK READHEX: ACALL CHR_IN D 326 ACALL ASC2HEX 0477 C4 327 SWAP A ; HIGH ORDER NIBBLE IS FIRST ONE 0478 FA 328 MOV R2,A ; SAVE THE HIGH ORDER NIBBLE ACALL CHR_IN 047B 914D 330 ACALL ASC2HEX 047D 4A 331 ORL A,R2 ; PUT NIBBLES TOGETHER IN A 047E RET ; WRITES BYTE IN A TO THE SERIAL PORT AS TWO ASCII 335 ; CHARACTERS. USES REGISTER 2 IN THE FIRST BANK. 047F FA 336 WRBYTE: MOV R2,A 0480 C4 337 SWAP A ACALL HEX2ASC ACALL CHR_OUT 0485 EA 340 MOV A,R ACALL HEX2ASC ACALL CHR_OUT 048A RET ; SERIAL INIT 048B 346 SERIAL_INIT: 048B MOV SCON,#52h 048E MOV TMOD,#20h mov pcon, #80h ; SMOD = 1 for 19200bps (0 for 9600) DFD 350 MOV TH1,#0FDh ; #0FDH=9600/19200 BAUD 0497 D28E 351 SETB TR1 ; START TIMER FOR SERIAL PORT ; WAIT UNTIL LCD READY BIT SET LCD_READY: 0499 C0E0 355 PUSH ACC 049B 90F MOV DPTR, #LCD_COMMAND_RD 049E 357 LCD_READY0: PAGE E E0 358 MOVX A,@DPTR 049F 20E7FC 359 JB ACC.7, LCD_READY0 ; LOOP IF BUSY FLAG = 1 04A2 D0E0 360 POP ACC 04A RET ; SEND DATA TO LCD 364 ; INPUT : A = OUTPUT CHARACTER 04A5 365 LCD_DATA_WRITE: 04A5 C PUSH DPL 04A7 C PUSH DPH A CALL LCD_READY AB 90F MOV DPTR,#LCD_DATA_WR 04AE F

10 D: arc SRC KUT51.LST AF 1204FF 374 CALL DELAY40US B2 D POP DPH 04B4 D POP DPL 04B RET ; SEND COMMAND TO LCD 381 ; INPUT : A = OUTPUT COMMAND 04B7 382 LCD_COMMAND_WRITE: 04B7 C PUSH DPL 04B9 C PUSH DPH BB CALL LCD_READY BD 90F MOV DPTR, #LCD_COMMAND_WR 04C0 F0 389 A C1 1204FF 391 CALL DELAY40US ; REQUIRE 39US DELAY(SPEC. SHEET) C4 D POP DPH 04C6 D POP DPL 04C RET ; LCD CURSOR POSITION 398 ; INPUT: A = LINE NUMBER - 0 ~ ; B = DIGIT NUMBER = DISPLAY DATA RAM(DDRAM) - 0 ~ 15 04C9 400 LCD_CURSOR: 04C9 B CJNE A, #0, LCD_CURSOR1 ; 2ND LINE 04CC E5F0 402 MOV A, B ; 1ST LINE 04CE ADD A, #80H 04D0 91B7 404 CALL LCD_COMMAND_WRITE 04D RET 04D3 406 LCD_CURSOR1: 04D3 B CJNE A, #1, LCD_CURSOR_ERR 04D6 E5F0 408 MOV A, B 04D8 24C0 409 ADD A, #0C0H 04DA 91B7 410 CALL LCD_COMMAND_WRITE 04DC RET 04DD 412 LCD_CURSOR_ERR: 04DD RET ;INITIALIZE THE LCD PAGE 11 04DE 416 LCD_INIT: 04DE MOV A, #150 ; PAUSE FOR 15MS 04E CALL DELAY100US E MOV A, #38H 04E5 91B7 421 CALL LCD_COMMAND_WRITE ; SET 8-BIT, 2-LINE, 5X8 FONT E MOV A, #08H 04E9 91B7 424 CALL LCD_COMMAND_WRITE ; DISPLAY ON, CURSOR OFF, BLINK OFF EB 740E 426 MOV A, #0EH 04ED 91B7 427 CALL LCD_COMMAND_WRITE ; DISPLAY ON, CURSOR ON, BLINK OFF EF MOV A, #06H 04F1 91B7 430 CALL LCD_COMMAND_WRITE ; CURSOR INCRE.(MOVES RIGHT), NO SHIFT 10

11 D: arc SRC KUT51.LST F RET ; SEND A STRING TO LCD 435 ; INPUT: DPTR = STRING ADDRESS 04F4 436 LCD_PRINT: 04F MOV A, #0 ; MOVC INDEX = 0 04F MOVC ; READ CHAR F JZ LCD_PRINT01 ; STRING END '00' F9 91A5 442 CALL LCD_DATA_WRITE FB A3 444 INC DPTR 04FC 80F6 445 SJMP LCD_PRINT ; REPEAT LOOP 04FE 446 LCD_PRINT01: 04FE RET ; 40 MICROSECOND DELAY 451 ; MHZ = 1 MACHINE CYCLE = US 452 ; 2(CALL) + 35 = 37 ( US) 04FF 453 DELAY40US: 04FF C PUSH 1 ; (2) SAVE REGISTER R D 455 MOV R1, #13 ; (1) 20 DJNZ INSTR = 40US 0503 D9FE 456 DJNZ R1, $ ; (2 X 14) = D POP 1 ; (2) RESTORE REGISTER R RET ; (2) ; ACC*100US DELAY 461 ; INPUT: ACC =? (100 US APPROX.) 462 ; 2(CALL) = 102 (110 US) DELAY100US: 0508 C PUSH 1 ; (1) SAVE REGISTER R A 466 DELAY100US01: 050A 792E 467 MOV R1, #46 ; (1) 46 X 2 DJNZ INS. X = us 050C D9FE 468 DJNZ R1, $ ; (2 X 46) = E D5E0F9 469 DJNZ ACC, DELAY100US01 ; (2) D POP 1 ; (2) RET ; (2) 473 PAGE MSG1: B 475 DB ' KUT51-LCD ',00H C 2D4C MSG2: DB '!!! READY!!! ',00H D ; 480 END VERSION 1.2i ASSEMBLY COMPLETE, 0 ERRORS FOUND 11

12 D: arc SRC KUT51.LST PAGE A2LT C ADDR 045EH ACC D ADDR 00E0H PREDEFINED ALLREAD C ADDR 0401H ASC2HEX C ADDR 044DH B D ADDR 00F0H PREDEFINED BOUTLOOP C ADDR 02B4H CHECK_DUMP C ADDR 0221H NOT USED CHECK_GO C ADDR 022BH CHECK_UPLOAD C ADDR 0230H CHECK_WRITE C ADDR 0226H CHR_IN C ADDR 0439H CHR_OUT C ADDR 0445H CR NUMB 000DH CY B ADDR 00D7H PREDEFINED DASCI C ADDR 02D5H DASCI C ADDR 02DFH DASCII C ADDR 02CDH DELAY100US C ADDR 0508H DELAY100US C ADDR 050AH DELAY40US C ADDR 04FFH DPH D ADDR 0083H PREDEFINED DPL D ADDR 0082H PREDEFINED ESC NUMB 001BH GETSEL C ADDR 01F5H H2LT C ADDR 0470H HELP_MENU C ADDR 0235H HEX2ASC C ADDR 0461H INIT C ADDR 0026H LCD_COMMAND_RD NUMB F802H LCD_COMMAND_WR NUMB F800H LCD_COMMAND_WRITE C ADDR 04B7H LCD_CURSOR C ADDR 04C9H NOT USED LCD_CURSOR C ADDR 04D3H LCD_CURSOR_ERR C ADDR 04DDH LCD_DATA_RD NUMB F803H NOT USED LCD_DATA_WR NUMB F801H LCD_DATA_WRITE C ADDR 04A5H LCD_INIT C ADDR 04DEH LCD_PRINT C ADDR 04F4H LCD_PRINT C ADDR 04FEH LCD_READY C ADDR 0499H LCD_READY C ADDR 049EH LF NUMB 000AH LFCR C ADDR 040EH LOUTLOOP C ADDR 02A2H MENU C ADDR 0036H MSG C ADDR 0514H MSG C ADDR 0525H OTHER_KEY C ADDR 023DH P D ADDR 0090H PREDEFINED PCON D ADDR 0087H PREDEFINED PSW D ADDR 00D0H PREDEFINED RAM NUMB 8000H READHEX C ADDR 0473H READLOOP C ADDR 03F7H RI B ADDR 0098H PREDEFINED RUN_DUMP C ADDR 026FH RUN_GO C ADDR 03A2H PAGE 14

13 D: arc SRC KUT51.LST RUN_UPLOAD C ADDR 03E1H RUN_WRITE C ADDR 02E7H SBUF D ADDR 0099H PREDEFINED SCON D ADDR 0098H PREDEFINED SERIAL_INIT C ADDR 048BH SP D ADDR 0081H PREDEFINED STACK NUMB 0040H TH D ADDR 008DH PREDEFINED TI B ADDR 0099H PREDEFINED TMOD D ADDR 0089H PREDEFINED TR B ADDR 008EH PREDEFINED U_RUN C ADDR 03E3H WAIT C ADDR 0417H WAIT C ADDR 0419H WRBYTE C ADDR 047FH XSTRING C ADDR 0423H XSTR_ C ADDR 0427H NOT USED XSTR_ C ADDR 0429H 13

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

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

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

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

8051 Single Board Monitor Programming. Minmon - Yeralan & Ahluwalia. PaulMon1 & PaulMon2 - Paul Stoffregen

8051 Single Board Monitor Programming. Minmon - Yeralan & Ahluwalia. PaulMon1 & PaulMon2 - Paul Stoffregen 8051 Single Board Monitor Programming Monitor Program Available Monitor Program Minmon - Yeralan & Ahluwalia Programming and Interfacing the 8051 Microcontroller PaulMon1 & PaulMon2 - Paul Stoffregen http://www.pjrc.com/tech/8051

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

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

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

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

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

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

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

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

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

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

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

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

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1 Version 1 1. (20 Points) Given the class A network address 117.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 4,000 subnets? b. (5 Points) What is

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

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

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

Chapter Family Microcontrollers Instruction Set

Chapter Family Microcontrollers Instruction Set Chapter 4 8051 Family Microcontrollers Instruction Set Lesson 5 Program Flow Control and Interrupt Flow Control Instructions 2 Branch instructions- Jump to new value of Program Counter (PC) LJMP address16

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

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

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

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

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

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

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

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

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

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1 Version 1 1. (20 Points) Given the class A network address 119.0.0.0 will be divided into a maximum of 15,900 subnets. a. (5 Points) How many bits will be necessary to address the 15,900 subnets? b. (5

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

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

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

CIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1

CIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1 Version 1 1. (20 Points) Given the class A network address 121.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 8,100 subnets? b. (5 Points) What is

More information

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. NOTE: Router E should only be used for Internet traffic. Router A Router

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

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

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

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

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

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

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next

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

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

User-defined Download Application Note

User-defined Download Application Note User-defined Download 1. Applied Products: SM59XX Series, SM59DXX Series, SM59RXX Series. 2. Object: User can define command as entry ISP password through ISAP software to run programming. 3. Operation

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

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1 Version 1 Instructions Write your name on the exam paper. Write your name and version number on the top of the yellow paper. Answer Question 1 on the exam paper. Answer Questions 2-4 on the yellow paper.

More information

Introduction to uc & Embedded Systems

Introduction to uc & Embedded Systems Introduction to uc & Embedded Systems Prepared by, Tamim Roshdy Embedded Systems What is an embedded system? An embedded system is an application that contains at least one programmable computer (typically

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

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

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

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

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

CPEG300 Embedded System Design. Lecture 3 Memory

CPEG300 Embedded System Design. Lecture 3 Memory CPEG300 Embedded System Design Lecture 3 Memory Hamad Bin Khalifa University, Spring 2018 Review Von Neumann vs. Harvard architecture? System on Board, system on chip? Generic Hardware Architecture of

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

Chapter Addressing Modes

Chapter Addressing Modes Chapter 5 8051 Addressing Modes 1 Sections 5.1 Immediate and register addressing modes 5.2 Accessing memory using various address modes 2 Objective 程式中的資料可能是放在 Register 中, 或在 RAM 中某一位址上, 或在 ROM 一塊特殊區域放置資料,

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

Assembly Language programming (1)

Assembly Language programming (1) EEE3410 Microcontroller Applications LABORATORY Experiment 1 Assembly Language programming (1) Name Class Date Class No. Marks Familiarisation and use of 8051 Simulation software Objectives To learn how

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

CIS-331 Final Exam Spring 2015 Total of 115 Points. Version 1

CIS-331 Final Exam Spring 2015 Total of 115 Points. Version 1 Version 1 1. (25 Points) Given that a frame is formatted as follows: And given that a datagram is formatted as follows: And given that a TCP segment is formatted as follows: Assuming no options are present

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

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1 Version 1 Instructions 1. Write your name and version number on the top of the yellow paper and the routing tables sheet. 2. Answer Question 2 on the routing tables sheet. 3. Answer Questions 1, 3, 4,

More information

4. Specifications and Additional Information

4. Specifications and Additional Information 4. Specifications and Additional Information AGX52004-1.0 8B/10B Code This section provides information about the data and control codes for Arria GX devices. Code Notation The 8B/10B data and control

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

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

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

System & Program Developments of 8051

System & Program Developments of 8051 System & Program Developments of 8051 Program Structure and Design Introduction Advantages and Disadvantages of Structured Programming The Three Structures: statements, loops, choice Pseudo Code Syntax

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

MicroConverter Technical Note - uc007 User Download (ULOAD) Mode

MicroConverter Technical Note - uc007 User Download (ULOAD) Mode 1.0 INTRODUCTION : The ADuC83X family ( big memory family ) all integrate a large program memory space, with 62kBytes of flash/ee program memory available to the user. As with the standard MicroConverter

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

Chapter 9. Programming Framework

Chapter 9. Programming Framework Chapter 9 Programming Framework Lesson 1 Registers Registers Pointers Accumulator Status General Purpose Outline CPU Registers Examples 8-bitA (Accumulator) Register 8-bit B Register 8-bitPSW (Processor

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

Chapter 09. Programming in Assembly

Chapter 09. Programming in Assembly Chapter 09 Programming in Assembly Lesson 03 Programming Approach for Main and Interrupt Service Routines in 8051 Program Approach for programming Main Program Instructions 3 Main program initial instructions

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

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) Summer 2016 EXAMINATIONS.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) Summer 2016 EXAMINATIONS. Summer 2016 EXAMINATIONS Subject Code: 17534 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 answer scheme. 2) The

More information

8051 Instruction Set

8051 Instruction Set 8051 Instruction Set 23-ug-16 ptkarule@rediffmail.com 1 Programmers Model of 8051 7FH 30H 2FH 20H 1FH 00H General Purpose Bit addressable Register Banks 1FH 18H 17H 10H 0FH 08H 07H 00H R7 R6 R5 R4 R3 R2

More information

CONTENTS. 1.0 Introduction Description of the Circuit Installation Connection of Power Supply 4

CONTENTS. 1.0 Introduction Description of the Circuit Installation Connection of Power Supply 4 1 CONTENTS PAGE NO 1.0 Introduction 2 2.0 Description of the Circuit 3 3.0 Installation 3 3.1 Connection of Power Supply 4 3.2 Connection of Output Signals to Relay Contacts 4 3.3 Interfacing to ESA Trainers

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

CPEG300 Embedded System Design. Lecture 6 Interrupt System

CPEG300 Embedded System Design. Lecture 6 Interrupt System CPEG300 Embedded System Design Lecture 6 Interrupt System Hamad Bin Khalifa University, Spring 2018 Correction Lecture 3, page 18: Only direct addressing mode is allowed for pushing or popping the stack:

More information

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families The Microcontroller Lecture Set 3 Architecture of the 8051 Microcontroller Microcontrollers can be considered as self-contained systems with a processor, memory and I/O ports. In most cases, all that is

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

Application Brief D-002

Application Brief D-002 HCMS-29xx and HCMS-39xx Interfacing the Avago Technologies HCMS-29xx / HCMS-39xx LED Alphanumeric Displays with the Intel 8751H Microcontroller Application Brief D-002 Introduction The HCMS-29xx/HCMS-39xx

More information

RAM loader program for 80C51 family applications

RAM loader program for 80C51 family applications www. 查询 供应商 Author: Greg Goodhue The following program allows an 80C51 family microcontroller to load most of its code into a RAM over a serial link after power up and execute out of the RAM for normal

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

Y51 Microcontroller. Technical Manual

Y51 Microcontroller. Technical Manual Y51 Microcontroller Technical Manual Disclaimer Systemyde International Corporation reserves the right to make changes at any time, without notice, to improve design or performance and provide the best

More information

C1098 JPEG Module User Manual

C1098 JPEG Module User Manual C1098 JPEG Module User Manual General Description C1098 is VGA camera module performs as a JPEG compressed still camera that can be attached to a wireless or PDA host. Users can send out a snapshot command

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

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

Mod-3: Interrupts,Timer operation,serial communication 1

Mod-3: Interrupts,Timer operation,serial communication 1 Mod-3: Interrupts,Timer operation,serial communication 1 Module-3 Contents: Interrupts - interrupt sources - interrupt handling programming examples. Timers operation different modes waveform generation-

More information

Interrupt Programming: Interrupts vs. Polling Method:

Interrupt Programming: Interrupts vs. Polling Method: UNIT 4: INTERRUPT PROGRAMMING & SERIAL COMMUNICATION WITH 8051: Definition of an interrupt, types of interrupts, Timers and Counter programming with interrupts in assembly. 8051 Serial Communication: Data

More information

Arithmetic and Logic

Arithmetic and Logic 8051 - Arithmetic and Logic EE4380 Fall 2001 Class 8 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Signed Arithmetic - Concepts Representation of the sign

More information

INTEGRATED CIRCUITS. AN440 RAM loader program for 80C51 family applications

INTEGRATED CIRCUITS. AN440 RAM loader program for 80C51 family applications INTEGRATED CIRCUITS RAM loader program for 80C51 family applications Greg Goodhue June 1993 Author: Greg Goodhue The following program allows an 80C51 family microcontroller to load most of its code into

More information

Legacy documentation refer to the Altium Wiki for current information. TSK51x MCU

Legacy documentation refer to the Altium Wiki for current information. TSK51x MCU Summary Core Reference CR0115 (v2.0) March 13, 2008 The TSK51x is a fully functional, 8-bit microcontroller, incorporating the Harvard architecture. This core reference includes architectural and hardware

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

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

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

;~~~~~~~~~~~~ ;P4-6-1.ASM ~ ;~~~~~~~~~~~~ SYMBOLS RS REG P2.0 EN REG P2.1 PICK REG P3.0 RELAY0 REG P3.1 RELAY1 REG P3.6 RELAY2 REG P3.

;~~~~~~~~~~~~ ;P4-6-1.ASM ~ ;~~~~~~~~~~~~ SYMBOLS RS REG P2.0 EN REG P2.1 PICK REG P3.0 RELAY0 REG P3.1 RELAY1 REG P3.6 RELAY2 REG P3. ;~~~~~~~~~~~~ ;P4-6-1.ASM ~ ;~~~~~~~~~~~~ SYMBOLS RS REG P2.0 EN REG P2.1 PICK REG P3.0 RELAY0 REG P3.1 RELAY1 REG P3.6 RELAY2 REG P3.7 PASS1 REG 70H PASS2 REG 71H TURN REG 72H IN_CODE REG 73H TIME REG

More information

JUMP, LOOP AND CALL INSTRUCTIONS

JUMP, LOOP AND CALL INSTRUCTIONS JUMP, LOOP AND CALL INSTRUCTIONS After you have understood the tutorial on Introduction to assembly language which includes simple instruction sets like input/output operations, now it s time to learn

More information