Home
program - Pantech Solutions
Contents
1. PROGRAM ADDRES OPCOD MNEMONIC S E S COMMENTS Load 8500 address into 8100 3A 00 85 LDA 8500 Accumulator Move Accumulator value into 8103 47 MOV B A B register Load 8501 address into 8104 3A 01 85 LDA 8501 Accumulator Move Accumulator value into 8107 4F MOV C A C register 8108 FE 00 CPI 00 If X2 0 then result is 0 and exit If carry is zero then jump into 810A CA 16 81 JZ 8116 8116 Clear ACC and flags add the B 810D AF XRA A as many as the C Add B register with 810E 80 ADD B Accumulator 810F OD DCR C Decrement C register 8110 CA 16 81 JZ8116 Store the result and exit 8113 C3 OE 81 JMP 810E Multiply start address 810E Store the content of 8116 32 02 85 STA 8502 Accumulator into 8502 8119 CF RST 1 Break point Join the Technical Community Today http www pantechsolutions net 6 2 16 BIT MULTIPLICATION OF TWO DATA S INPUT e Multiplicand X1 Low Byte in 8500 High Byte in 8501 e Multiplier X2 in 8502 8 bit value only OUTPUT e Result is stored at 8503 Low Byte amp 8504 High Byte e Result is also in HL If the result exceeds FF value then the carry flag is SET Join the Technical Community Today http www pantechsolutions net FLOW CHART Transfer the multiplicand and multiplier to 2 separate register Is the multiplier is zero Initialize temporary register pair to zero Add the multiplicand with the temporary Decrement the multiplier NO
2. J7 GND 1 2 DO DICE D2 D3 D4 D5 DG O DI O Ai A2 A3 A4 A5 AG A7 A8 O A9 ATO Aad 12 A Aja A14 6 Ai5 O INTO INTI 4 O RD WR A O EA SSFER 5 CS7 CS8 5 2 AG RXD 2 78 TXD VEC 49 O GND _ el HEADER 25X2 Join the Technical Community Today http www pantechsolutions net 3 KEYBOARD CONNECTOR 1 PC6 K B CLK 4 GND 1 PC6 K B CLK 5 VCC 4 9PIN D TYPE FEMALE NO ith Join the Technical Community Today http www pantechsolutions net 8251 UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER BAUD CLOCK Baud clock for 8251 is programmable provided by Channel 2 of 8253 INPUT CLOCK FOR 8251 3 072 MHz DRIVERS USED MAX 232 is used for transmitting receiving of characters 8251 UART I O ADDRESS 8251 CONTL 00 REG 01 u11 8251 D2 SKT DATA Join the Technical Community Today http www pantechsolutions net 5 LCD INTERFACE DEVICE USED 16 x 2 20 x 4 LCD module JP1 P LeD 2 a R a 10K DI D2 m D ae J gg RW o ou Dod ooo g a D6 D7 Sheek etek FWONM DCOONDOARWNM SN 2X16 LCD C SYSTEM MAPPING I O mapped I O SOCKET NO FUNCTION ADDRESS CONNECTOR NO LCD 40 ir COMMAND 41 LCD DATA
3. NO PROGRAM Join the Technical Community Today http www pantechsolutions net ADDRESS OPCODE MNEMONICS COMMENTS 8100 06 00 MVI B 00 Initialize 00 into B register 8102 2100 85 LXI H 8500 Load 8500 value into H register Load the count value into the C 8105 4E MOV C M register 8106 OD DCR C If C 1 no process 8107 CA 2081 JZ8120 Jump into 8120 program end 810A 23 INX H Increment the H register by one Get the byte pointed by m 810B 7E MOV A M pointer 810C 23 INX H Move the m pointer to next byte 810D BE CMP M Compare with ACC 810E DA 1881 JC 8118 If Acc lt m then no swapping 8111 56 MOV D M Else swap the bytes 8112 77 MOV M A Load Accumulator value into M 8113 2B DCX H Decrement H value by one Load D register value into 8114 72 MOV M D pointer Now move m pointer to the next 8115 23 INX H byte 8116 06 01 MVI B 01 Set the swap flag 8117 oD DCR C Decrement the count If C is not equal O then jump 8119 C2 0B 81 JNZ810B 810B 811C 5 DCR B After C 0 check the swap flag If it is set then once again continue the process at the final stage B will not set so the pgm 811D CA0081 JZ 8100 will terminate 8120 CF RST1 Break point Join the Technical Community Today http www pantechsolutions net 6 8 DESCENDING ORDER INPUT e 8500 No of elements in an array amp 8501 starting address of this array OUTPUT e The array elements are stor
4. _D8500 Enter the starting Address Enter Key al 8500 3E 12 MVI A 12 Enter the Space Bar Key 8500 06 12 MVI B 12 Enter the Space Bar Key 4 5 M MODIFY EXTERNAL MEMORY Using this command the user can display modify any external memory address Modify External Memory Join the Technical Community Today http www pantechsolutions net Press H for Enter the Starting Address help _M8500 4 6 R REGISTER DISPLAY EXAMPLE Press H for Enter the Starting Address help R Enter Key Pal A FF Enter the Space Bar Key Enter the Space Bar Key Join the Technical Community Today http www pantechsolutions net 4 7 T TRANSFER COMMAND EXAMPLE T8500 8600 9000 Press Enter Key The above command transfer the memory content starting from source start address 8500 to destination start address 8600 till source end address 9000 is reached Starting address 8500 End address 8600 Destination 9000 address Press H for help T8500 8600 9000 Enter Key 2 Join the Technical Community Today http www pantechsolutions net Transfer Complete Enter Key for Exit Command 4 8 N LOCAL MODE When this key is depressed on PC keyboard the PS 8051 Kit starts working through local 101 keyboard Serial communication is disabled Following message will appear in the L
5. 6 RESET This key is located in the main 8086 board On depressing this key the program starts executing from the Join the Technical Community Today http www pantechsolutions net UTET E l ilfENN0lI NNNNNNNNNNN EeNN d dd FyFy yu lt xz lt beginning or reset address 0000 On power on reset it Display PAN 85 in local LCD display amp 2 3 POWER SUPPLY DETAILS PS trainer kit will work at O 9v 1 amp from the PS power supply Provision is made in PS power supply to bring out on the front panel DC regulated voltage output for interfacing with add on cards 9V 1 amp Supply Turned OFF sla Supply Turned ON POWER SWITCH Sa 2 4 KEYBOARD DETAILS 101 PC type keyboard is interfaced to Microcontroller through its port pins Communication between keyboard Join the Technical Community Today http www pantechsolutions net and Microcontroller takes place using 2 wires one for serial clock and serial data CHAPTER 3 COMMANDS AND KEYS 3 1 RESET This key is located in the main 85L board On depressing this key the program starts executing from the beginning or reset address 0000 On power on reset it Display PS 85 in local LCD display 3 2 H Help Menu This key is used go PS 85L help menu and it will display the following commands Depressing the space bar key increments to display the next command Join the Technical Community Today http www pante
6. Transfer zero to the result Is the multiplier is zero YES Transfer the temporary register content to Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS COMMENTS 8100 2A 00 85 LHLD 8500 Load 8500 value into HL pair 8103 54 MOV D H Move the Highest Byte into D register 8104 5D MOV E L Move the Lowest Byte into E register 8105 3A 02 85 LDA 8502 Load 8502 value into Accumulator 8108 4F MOV C A Move Accumulator value into C register 8109 FE 00 CPI 00 If X2 0 then result is 0 and exit 810B CA 19 81 JZ8119 If carry is zero then jump into 8119 Initialize the HL register into 0 add HL as 810E 210000 LXI H 0000 many as C 16 bit addition between HL and DE added 8111 19 DAD D value in HL register 8112 OD DCR C Decrement the C register 8113 CA 19 81 JZ 8119 Store the result and exit 8116 C3 1181 JMP 8111 Jump multiply multiply 8111 Store the content of Accumulator into 8119 22 03 85 SHLD 8503 8503 811C CF RST 1 Break point 6 3 8 BIT DIVISION OF TWO DATA S INPUT e 8500 Dividend amp 8501 Divider OUTPUT 8502 Quotient amp 8503 Reminder EXAMPLE Join the Technical Community Today http www pantechsolutions net e 8500 OA amp 8501 02 that is 0A 02 RESULT 8502 05 Quotient amp 8503 00 Reminder FLOW CHART Transfer the
7. 0 86 STA 3600 8508 76 HLT 6 To verify the code depress D starting address and depress space bar to see next memory location For Ex D8500 and press spacebar till the end of the program 7 To execute the program Depress G staring address for Ex G8500 8 To see the result depress M result address for Ex M8600 Join the Technical Community Today http www pantechsolutions net 9 To view the output in the Register depress R and press enter key in keyboard PROCEDURE 2 TO ENTER THE OPCODE Follow the same procedure till step 4 1 Depress M starting address of the program for Ex M8500 For ex M8500 press enter Type the opcode 3E space bar Type the opcode 12 space bar and continue the same till the end of the program ADDRESS OPCODES MNEMONICS 8500 3E 12 MVI A 12H 8502 06 12 MVI B 12H 8504 80 ADD B 8505 320086 STA 8600 8508 76 HLT Join the Technical Community Today http www pantechsolutions net 2 To view the code depress D starting address and depress space bar to see next memory location For Ex D8500 and press spacebar till the end of the program 3 To execute the program Depress G staring address for Ex G8500 4 Tosee the result depress M result address for Ex M8600 5 To view the output in the Register depress R and press enter key in keyboard Note 1 M is used for displaying the result for Ex M
8. 4 CD ROM which contains a Sample programs b PS 8085 Board User manual 5 User and Technical reference manual 6 Keyboard 101 keys Join the Technical Community Today http www pantechsolutions net 7 20 pin FRC cable 8 50 pin FRC cable Note If you are missing any part of the kit please contact Our support executive 1 2 PS 8085 BOARD OVERVIEW Power jack LCD 16 2 Power On Switch 20 Pin I O Header PS 2 Keyboard 8255 PPI eee 8251 USART EEPROM 27C256 8253 Timer 8085 CPU 20 Pin I O Header 6 144 MHz Crystal 20 Pin IYO RAM 50 Pin Bus Header HY62256 Header Join the Technical Community Today http www pantechsolutions net The PS 85 board is based on Intel 8085 Microprocessor which operates at 6 144 MHz The board can operate using the 101 104 PC keyboard supplied along with the trainer kit and 2 Line by 16 character LCD display or from the PC Microprocessor s Address Data and Control bus pins are brought to the 50 pin FRC connector PS 85 is equipped with powerful software monitor in 27C128 EPROM The monitor supports Video terminals RS232C interface 101keyboard and LCD display The board has 32KB CMOS static RAM type 62256 1 3 PS 8085 SPECIFICATIONS gt 8085 Microprocessor operating at 6 144 MHz Join the Technical Community Today http www pantechsolutions net gt 16KB powerful software monitors 27C128 EPROM gt Three 16 bi
9. 50B 3600 MVI M 00 850D C31285 JMP COMMON 8510 3601 LOOP1 MVI M 01 8512 23 COMMON INX H 8513 05 DCR B 8514 C207 JNZ LOOP 8517 76 HLT PROCEDURE 1 Key in the opcodes from the address specified 2 Execute the program and check for results at locations 8650 through 8657 Join the Technical Community Today http www pantechsolutions net Pantech solutions creates information packed technical documents like this one every month And our website is a rich and trusted resource used by a vibrant online community of more than 1 00 000 members from organization of all shapes and sizes Join the Technical Community Today http www pantechsolutions net q l N U W Ww w u oO o I A I _ _H H H ODPIUIIEI UDODI DO D O U V oR mwcw K lt Y N _ _ _ M _ _ y_ What do we sell Our products range from Various Microcontroller development boards DSP Boards FPGA CPLD boards Communication Kits Power electronics Basic electronics Robotics Sensors Electronic components and much more Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology Join the Technical Community Today http www pantechsolutions net
10. 8107 OD DCR C Decrement the count value 8108 DA 20 81 JC 8120 If the count 1 then continue 810B CA 1C 81 JZ 811C Get the num and exit 810E 7E MOV A M Get the byte pointed by M pointer 810F 23 INX H Move the pointer to the next byte 8110 BE CMP M Compare with Accumulator 8111 D2 1581 JNC 8115 If ACC gt M then no swapping Else get the large no in to 8114 7E MOV A M Accumulator 8115 OD DCR C Decrement the count value 8116 C20F 81 JNZ 810F If C O then jump 81F0 8119 C3 OF 81 JMP 811D Else Jump into 811D Store the biggest number into 811C 7E MOV A M Accumulator 811D 320185 STA 8501 The result is stored into 8501 8120 CF RST 1 Break Point 6 10 VERIFYING THE PORTS OF 8255 Join the Technical Community Today http www pantechsolutions net FLOW CHART Cstart gt Load the data in temporary Output to port C Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRES OPCOD MNEMONIC S E S COMMENTS 8100 3E 80 MVI A 80 Load the value 80 into Accumulator 8102 D3 23 OUT 23 Output to control register 8104 3E 44 MVI A 44 Load data 44 into Accumulator 8106 D3 20 OUT 20 Output to port A 8108 3E 88 MVI A 88 Load data 88 into Accumulator 810A D3 21 OUT 21 Output to port B 810C 3E FF MVI A FF Load data FF into Accumulator 810E D3 22 OUT 22 Output to port C 8110 CF RST1 Break point 6 11 SQUARE WAVE GENERATION USING 8253 54 OUT
11. 8500 2 M is used to entering the Opcode 3 M is used for entering the data Note There are two ways to enter the program Join the Technical Community Today http www pantechsolutions net 1 Mnemonics method 2 Opcode method Sample program is given to enter the program in both the methods CHAPTER 5 PROGRAMMING DETAILS PROGRAMMING 8085 OVERVIEW 8085 Microprocessor can access 64kb of external memory using its 16 bit Address and memory read write signals It has following set of register A Register accumulator B C D E H L F Flag Register Of these BC DE and HL in combination will act as 16 bit registers Internally it has Arithmetic Logic Unit ALU Join the Technical Community Today http www pantechsolutions net Instruction decoder temporary register and timing and control units INTERRUPTS The 8085 have 5 interrupt which are listed below External Interrupt vector to address 9FC1 to 9FC4 RST 5 5 Interrupt vector to address 9FC7 RST 6 5 Interrupt vector to address 9FC4 RST 7 5 Interrupt vector to address 9FC1 TRAP Interrupt vector to address 9FCA REGISTERS gt Aor Accumulator used for all logical and Arithmetical operations gt B C D E H and L register are general purpose register gt Program Counter is 16 bit register capaple of addressing from 0000 FFFF Join the Technical Community Today http www pantechsolutions net gt Stack Pointer is an 16 bit
12. 8651 and the XORed result will be stored at 8652 DATA 8650 43 8651 64 RESULT 0100 0011B 0110 0100B XOR 0010 0111B 8652 27 PROGRAM ADDRESS OPCODE MNEMONICS 8500 3A 50 86 LDA 8650 8503 47 MOV B A 8504 3A 51 86 LDA 8651 8507 A8 XRA B 8508 32 52 86 STA 8652 850B 76 HLT Join the Technical Community Today http www pantechsolutions net PROCEDURE 1 Key in the opcodes from the address specified 2 Enter data to be XORed at 8650 and 8651 3 Execute the program and check for results at 8652 6 ASCII TO DECIMAL CONVERSION OBJECTIVE To convert the ASCII number in memory to its equivalent decimal number EXAMPLE Let the ASCII number be at location 8650 and the result be stored at 8651 DATA 8650 35 RESULT 8651 05 DATA 8650 3A RESULT 8651 FF So if the decimal number got is not a valid one FF will be stored as the result to indicate the error Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS 8500 2150 86 LXI H 8650 8503 7E MOV A M 8504 DE 30 SUI 30 8506 FE 0A CPI 0A 8508 DA OD 85 JC LOOP 850A 3E FF MVI A FF 850C 23 LOOP INX H 850D 77 MOV M A 850F 76 HLT PROCEDURE 1 Key in the opcodes from the address specified 2 Enter data at 8650 3 Execute the program and check at 8651 for result 4 Try changing data and check res
13. CD display Normal Mode 4 9 B BAUD RATE Press the B Baud rate will be displayed on LCD Cur Baud 2400 150 Enter the Space Bar Key Join the Technical Community Today http www pantechsolutions net Cur Baud 2400 9600 Enter Key Da Set the 9600 Baud Rate Baud Rates 150 300 600 1200 2400 4800 9600 4 10 S SERIAL MODE KEY When this key is depressed the system starts communicating through RS232C connector All keys are disabled except Reset and L The system displays the following message PS 85L communicates with a remote Terminal or PC through the 9 pins RS 232 connector Serial Mode Join the Technical Community Today http www pantechsolutions net 4 10 PROGRAMMING THE 8085 TRAINER KIT 1 2 3 4 5 PROCEDURE 1 TO ENTER THE MNEMONICS Initially connect the 9V adaptor to J8 connector Switch ON the PAN 85 kit using slide Switch SW1 PAN 85 will be displayed on the LCD Connect the Keyboard in PS 2 connector Depress A starting address of the program for Ex A8500 For ex A8500 enter key Type the mnemonics MVI A 12press Enter key Type the mnemonics MVI B 12 press Enter key and continue the same procedure till the end of the program Join the Technical Community Today http www pantechsolutions net 8500 3E 12 MVI A 12H 8502 06 12 MVI B 12H 8504 80 ADD B 8505 32 0
14. D 77 MOV M A Store that ASCII at 8501 Now HL 8502 Increment H register by 810E 23 INX H one 810F Move Register B value into 78 MOV A B Accumulator 8110 CD 1581 CALL 8115 Now convert the lower nibble to ASCII 8113 77 MOV M A Store that ASCII at 8502 8114 CF RST 1 Break point This function converts the ASCII value lower nibble of Acc to its Join the Technical Community Today http www pantechsolutions net ADDRESS OPCODE MNEMONICS COMMENTS 8115 E6 OF ANI OF Mask the higher nibble 8117 FE OA CPI OA Check is it greater then 9 8119 DA1E 81 JC811E If A not gt 9 then simply add 30 If A not gt 9 then add 37 to get the 811C C6 07 ADI 07 ASCII value 811E C6 30 ADI 30 8120 C9 RET Return into Main 6 7 ASCENDING ORDER INPUT e 8500 No of elements in an array amp 8501 starting address of this array OUTPUT e The array elements are stored in ascending order amp store in same array EXAMPLE e Input 8500 05 count 8501 08 04 03 07 01 e Output 8501 010304 07 08 Join the Technical Community Today http www pantechsolutions net FLOW CHART Move the first data into the temporary register Load the counter with the number of elements in the If the temp reg data lt next data Swap the next data and the YES Set the swap flag Is the count is zero NO YES Decrement the swap flag Is the swap flag is zero
15. DCR C Decrement the count 8119 C20B 81 JNZ810B If Cis not equal 0 then jump 810B 811C 5 DCR B After C 0 check the swap flag If it is set then once again continue the process at the final stage B will not set 811D CA 00 81 JZ8100 so the pgm will terminate 8120 CF RST1 Break point Join the Technical Community Today http www pantechsolutions net 6 9 FIND THE BIGGEST NUMBER IN AN ARRAY INPUT e 8500 No of elements in an array amp 8510 starting address of this array OUTPUT e The Biggest number stored ACC and 8501 EXAMPLE e Input 8500 05 count 8510 08 04 03 07 01 e Output 8501 08 Join the Technical Community Today http www pantechsolutions net FLOW CHART Load in number of elements in an array to a YES Move the data to a result register NO Move the data to a Temporary register C stor gt NO Is there counter is zero Is the counter is one If the next data lt temp reg data YES Decrement the counter Is the counter is zero YES Store the temporary register value to result Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS COMMENTS 8100 211085 LXI H 8510 Load 8510 value into H register Load the count value into 8500 8103 3A 00 85 LDA 8500 address 8106 4F MOV C A Load the count value into C Register
16. F CMA 8504 325186 STA 8650 8507 76 HLT PROCEDURE 1 Key in the opcodes into memory from 8600 2 Enter data to be complemented at 8650 3 Execute the program and check for results Join the Technical Community Today http www pantechsolutions net 4 Try changing data at 8650 and execute the program each time and check results 4 MASK OFF MOST SIGNIFICANT FOUR BITS OBJECTIVE To place the LN of the contents of memory location 8650 in memory location 8651 Clear the HN of the number EXAMPLE The contents of 8650 are B8 The result will be stored at 8651 DATA 8650 B8 RESULT 8651 08 PROGRAM ADDRESS OPCODE MNEMONICS 8500 3A50 86 LDA 8650 8503 E6 ANI OF 8504 325186 STA 8650 8507 76 HLT Join the Technical Community Today http www pantechsolutions net PROCEDURE 1 Key in the opcodes from the address specified 2 Enter data at 8650 3 Execute the program and check for result at 8651 4 Change data at 8650 and execute each time and check for result at 8651 5 LOGICAL OPERATIONS OBJECTIVE To learn about logical instructions available with 8085A like AND OR XOR NOT AND OR XOR NOT XYZ XYZ XYZ XZ 000 000 000 01 010 101 011 10 100 011 101 111 111 110 Join the Technical Community Today http www pantechsolutions net Where X Y are two inputs Z is the output EXAMPLE The two numbers to be XORed are at memory locations 8650 and
17. PUT e This program will generate the square wave of Frequency 625 KHz e Observe the wave form at pin no 10 of 8253 IC FLOW CHART Join the Technical Community Today http www pantechsolutions net Initialize the control register Load 02 into LSB of counter 2 Load 00 into MSB of counter 2 PROGRAM ADDRES OPCOD MNEMONIC S E S COMMENTS 8100 3E B7 MVI A B7 Load the control word into Accumulator O P the ACC data into control register I O 8102 D3 13 OUT 13 addr13 8104 3E 02 MVI A 02 Load the LSB count into the Accumulator 8106 D3 12 OUT 12 O P the ACC data into counter2 8108 3E 00 MVI A 00 Load MSB count into Accumulator 810A D3 12 OUT 12 O P the ACC data into counter2 810C CF RST1 Break point ADDITIONAL PROGRAMS ON 8085 TRAINER KIT 1 8 BIT ADDITION OBJECTIVE Join the Technical Community Today http www pantechsolutions net To add two 8 bit numbers in memory and store the result in memory EXAMPLE The two data to be added are at 8650 and 8651 The result is stored at 8652 DATA 8650 23 8651 35 RESULT 8652 58 PROGRAM ADDRESS OPCODE MNEMONICS 8500 3A50 86 LDA 8650 8503 47 MOV B A 8504 3A51 86 LDA 8651 8507 80 ADD B 8508 3252 86 STA 8652 850B 76 HLT PROCEDURE 1 Key in the opcodes from the address specified Join the Technical Community Today http www
18. avssneanaate 24 4 5 M MODIFY EXTERNAL MEMORY 25 4 6 R REGISTER DISPLAY n 26 4 7 T TRANSFER COMMAND n 27 4 8 N LOCAL MODE 28 4 9 B BAUD RATE 28 4 10 S SERIAL MODE KEY n 29 1 Initially connect the 9V adaptor to J8 connector 30 REGISTER orrenda 35 CHAPTER 6 EXAMPLE PROGRAMS 36 6 1 8 BIT MULTIPLICATION OF TWO DATA S 37 6 2 16 BIT MULTIPLICATION OF TWO DATA S 40 6 3 8 BIT DIVISION OF TWO DATA S 42 6 4 16 BIT DIVISION OF TWO DATA S 45 6 5 2 DIGIT BCD TO BINARY HEXA decimal CONVERSATION rr 47 6 6 BINARY Hex TO ASCII CONVERSION 50 6 7 ASCENDING ORDER 54 6 8 DESCENDING ORDER rr 57 6 9 FIND THE BIGGEST NUMBER IN AN ARRAY 60 Join the Technical Community Today http www pantechsolutions net 6 10 VERIFYING THE PORTS OF 8255 62 6 11 SQUARE WAVE GENERATION USING 8253 54 Join the Technical Community Today http www pantechsolutions net CHAPTER 1 INTRODUCTION 1 INTRODUCTION The PS 8085 board which demonstrates the capabilities of the 40 pin 8085 various families Sample programs are provided to demonstrate the unique features of the supported devices The PS 8085 Board Kit comes with the following 1 PS 8085 Board 2 Sample devices INTEL 8085 NEC 8085 3 Cross cable RS232
19. chsolutions net KEY FUNCTIONS A lt BEG gt ASSEMBLE B BAUD RATE D lt BEG gt DISASSEMBLE E lt BEG gt lt END gt EXAMINE G lt BEG gt EXECUTE H HELP COMMANDS L lt OFFSET gt DOWN LOAD M lt ADDR gt MODIFY N NORMAL MODE Q QUIT R lt REG gt REGISTER DISPLAY S SERIAL MODE T BLOCK TRANSFER lt START gt lt END gt lt DS gt U lt BEG gt lt END gt UP LOAD CHAPTER 4 OPERATING INSTRUCTIONS 4 1 POWER ON Connect the PS 8051 board to the power having the following specifications Join the Technical Community Today http www pantechsolutions net 9V DC 1 Amp Switch on the power supply after ensuring the correct voltages Following message will appear on the LCD display PAN 85 KKK On power on or after reset the display shows PAN 85 as a sign on message The prompt character is displayed in the next line informing the user that the board is ready to accept the commands 4 2 PROGRAM ENTRY USING ASSEMBLER 1 ENTERING MNEMONICS Example Press H for help Join the Technical Community Today http www pantechsolutions net A8500 4 Enter Key Enter the starting Address User program from start address 8500 Display the following and waits for the user data to be typed in the second line Example 8500 MVI A 12 Enter key 8502 MVI B 12 Enter
20. dividend and divisor to 2 separate register r1 and Initialize the temporary register to zero If dividend is lt divisor Store the dividend in reminder register Subtract dividend divisor Store the result in dividend Increment temporary register 1 Store the temporary register 2 to quotient If dividend is lt divisor Join the Technical Community Today http www pantechsolutions net D PROGRAM ADDRES OPCOD MNEMONIC S E S COMMENTS Load 8501 value into 8100 3A 01 85 LDA 8501 Accumulator Move Accumulator value into 8103 47 MOV B A Register B Load 8500 value into 8104 3A 00 85 LDA 8500 Accumulator 8107 OE 00 MVI C 00 Count for quotient 8109 B8 CMP B Check for A lt B 810A DA 12 81 JC 8112 If A lt B then go to store Subtract the Register B with 810D 90 SUB B Accumulator 810E OC INR C Increment the C register 810F C3 09 81 JMP 8109 Jump into 8109 8112 32 03 85 STA 8503 Store Reminder value into 8503 Move Register C value into 8115 79 MOV A C Accumulator Store the Quotient value into 8116 32 02 85 STA 8502 8502 8119 CF RST 1 Break point Join the Technical Community Today http www pantechsolutions net 6 4 16 BIT DIVISION OF TWO DATA S INPUT e 9200 Dividend Low Byte amp 9201 Dividend High Byte e 9202 Divider Low Byte OUTPUT e 9300 Quotient Low Byte amp 9301 Quoti
21. ed in descending order amp store in same array EXAMPLE e Input 8500 05 count 8501 08 04 03 07 01 e Output 8501 030704 03 01 Join the Technical Community Today http www pantechsolutions net FLOW CHART Load the counter with the number of elements in the Move the first data into the temporary register If the temp reg data gt next data Swap the next data and the Set the swap flag Is the count is zero Decrement the swap flag Is the swap flag is zero Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS COMMENTS 8100 06 00 MVI B 00 Initialize 00 into B register 8102 210085 LXI H 8500 Load 8500 value into H register Load the count value into the C 8105 4E MOV C M register 8106 OD DCR C If C 1 no process 8107 CA 2081 JZ 8120 Jump into 8120 program end 810A 23 INX H Increment the H register by one 810B 7E MOV A M Get the byte pointed by m pointer 810C 23 INX H Move the m pointer to next byte 810D BE CMP M Compare with ACC 810E DA 1881 JNC 8118 If Acc gt m then no swapping 8111 56 MOV D M Else swap the bytes 8112 77 MOV M A Load Accumulator value into M 8113 2B DCX H Decrement H value by one 8114 72 MOV M D Load D register value into pointer 8115 23 INX H Now move m pointer to the next byte 8116 06 01 MVI B 01 Set the swap flag 8117 OD
22. ent High Byte e 9302 Reminder Low Byte amp 9303 Reminder High Byte EXAMPLE e 9200 OA Low Byte amp 9201 OA High Byte e 9202 02 Low Byte RESULT e 9300 05 Low Byte amp 9301 05 High Byte gt Quotient e 9302 00 Low Byte amp 9303 00 High Byte gt Reminder Join the Technical Community Today http www pantechsolutions net FLOW CHART Transfer dividend and divisor to 2 separate register Initialize a quotient register pair to zero Perform the 16 Bit subtraction Increment quotient register pair NO If dividend is lt divisor YES Store the reminder register value to separate result register pair Store the quotient register value to separate result register pair Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS 9100 2A 00 92 LHLD 9200 9103 3A 02 92 LDA 9202 9106 4F MOV C A 9107 1100 00 LXI D 0000 910A 7D BACK MOV A L 910B 91 SUB C 910C 6F MOV L A 910D D2 1191 JNC SKIP 9110 25 DCR H 9111 13 SKIP INX D 9112 7C MOV A H 9113 FE 00 CPI 00 9115 C2 0A 91 JNZ BACK 9118 7D MOV A L 9119 B9 CMP C 911A D2 0A 91 JNC BACK 911D 22 02 93 SHLD 9302 9120 EB XCHG 9121 22 00 93 SHLD 9300 9124 76 HLT 6 5 2 DIGIT BCD TO BINARY HEXA decimal CONVERSATION Join the Technical Community Today http www pantechs
23. key a Program end Enter The Mnemonics Enter The Mnemonics EXIT COMMAND Double Enter you get the main menu Join the Technical Community Today http www pantechsolutions net Press H for help 2 PROGRAM ENTRY USING OPCODE Modify External memory Press H for Enter the starting Address help _M8500 Enter Key al 8500 4A _ 8500 Enter the Opcode 4A 3E Enter the Space Bar Key Join the Technical Community Today http www pantechsolutions net 8501 Enter the Opcode 56 12 Enter the Space Bar Key EXIT COMMAND Double Enter you get the Main Menu ENTERING G EXECUTING COMMAND Press H for Enter starting address help _G8500 Pai After executing DISPLAY Enter Key Executing display To Exit Execution Mode PRESS RESET Switch Join the Technical Community Today http www pantechsolutions net 4 3 ENTERING RESULT COMMAND Press H for help M lt address gt 24 _ lt Address gt 4 4 DISASSEMBLER Enter the memory location Enter key DE You get the output 8 bit data Disassemble converts the hex byte stored in the memory into equivalent mnemonics To enter into disassemble mode type D in the command mode followed by the memory address EXAMPLE Press H for help Join the Technical Community Today http www pantechsolutions net
24. lse Add with C register 8118 32 10 85 STA 8510 Store Accumulator value into 8510 811B CF RST 1 Break point Join the Technical Community Today http www pantechsolutions net 6 6 BINARY Hex TO ASCII CONVERSION INPUT e Binary Hex Byte in 8500 OUTPUT e ASCII of higher nibble in 8501 amp lower nibble in 8502 EXAMPLE e Input 8500 A1 e Output 8501 41 ASCII of A amp 8502 31 ASCII of T Join the Technical Community Today http www pantechsolutions net FLOW CHART Move the binary data to a temporary register 1 amp temporary register 2 To mask the higher nibble of the register 1 NO If the value gt 9 Join the Technical Community Today http www pantechsolutions net If the value gt 9 YES Add 07 Add 30 Store it in Memory location for higher nibble Join the Technical Community Today http www pantechsolutions net PROGRAM ADDRESS OPCODE MNEMONICS COMMENTS 8100 210185 LXI H 8500 Load 8500 value into H register 8103 Move M register value into 7E MOV A M Accumulator 8104 Move Accumulator value into B AT MOV B A register 8105 23 INX H Increment the H register by one 8106 Each binary bit of the ACC is rotated OF RRC right by one 8107 OF RRC 8108 OF RRC 8109 OF RRC 810A CD 1581 CALL 8115 Now convert the lower nibble to ASCII 810
25. ng are the I O addresses for 8255 GPIO Join the Technical Community Today http www pantechsolutions net SOCKET NO FUNCTION ADDRESS CONNECTOR NO CONTL REG 23 U8 PORTA 20 J1 PORT B 21 GPIO PORT C 22 J5 GPIO I amp GPIOI The following are the I O addresses for 8255 GPIO Il SOCKET NO FUNCTION ADDRESS CONNECTOR NO CONTL REG 33 U9 PORT A 30 J4 PORT B 31 GPIO Il PORT C 33 J5 GPIO I amp GPIOI TIMER INTERFACE 8253 Programmable Interval Timer SYSTEM MAPPING I O mapped I O Join the Technical Community Today http www pantechsolutions net CHANNEL 2 Input clock 3 MHz Output clock Depends on selection of baud rate Used for Baud rate generation for 8521 USART I O ADDRESS SOCKET NO FUNCTION ADDRESS CONNECTOR NO CONTL REG 13 U10 CHENNALO 10 J7 CHENNAL 1 11 CHANNEL 2 12 2 2 CONNECTOR DETAILS 1 20 pin expansion connectors A 20 Pin FRC connector is used to interconnect with the Interface cards like ADC DAC SWITCH LED RELAY buzzer Interfaces etc Pin details are given below Join the Technical Community Today http www pantechsolutions net D Cc ree R10 vcc 2 20 PIN FRC 20 PIN FRC 20 PIN FRC 2 50 pin expansion connector The 50 Pin FRC connector is used to interconnect with the Interface cards like 8255 8279 8253 8251 8259 8257 and the pin details are given below
26. olutions net FLOW CHART Get the number from 8500 address Mask upper nibble amp store the number as A Get the number again from Accumulator Mask lower nibble exchange nibble positions of result and store it as B Multiply B with 10 until B 0 amp decrement B by one Is multiplication complete YES Add B value with Accumulator Store the result into address 8510 Join the Technical Community Today http www pantechsolutions net INPUT 8500 BCD value OUTPUT Result is stored at 8510 PROGRAM ADDRES OPCOD MNEMONIC S E S COMMENTS 8100 3A 00 85 LDA 8500 Load 8500 value into Accumulator 8103 47 MOV B A Move Accumulator value into B register 8104 Mask upper nibbles amp store it into E6 OF ANI OFH Accumulator 8106 4F MOV C A Move Accumulator value into C register 8107 78 MOV A B Load Register B value into Accumulator 8108 Mask lower nibbles amp store it into E6 FO ANI FOH Accumulator 810A OF RRC Convert MSB into unpacked B register 810B OF RRC 810C OF RRC 810D OF RRC 810E 47 MOV B A Move Accumulator value into B register The content of ACC X OR with the content 810F AF XRAA of register 8110 16 0A MVI D OAH Store multiplier 10 value into D register 8112 82 ADD D Add the 10 value with Accumulator 8113 05 DCR B Decrement the B register by one If multiplication is not complete jump into 8114 C2 12 81 JNZ 8108 8108 8117 81 ADD C E
27. pantechsolutions net 2 Enter data at 8650 and 8651 as specified in the Example 3 Execute the program and check for the result at 8652 4 Change data at 8650 and 8651 and execute each time and check for result 2 8 BIT SUBTRACTION OBJECTIVE To subtract two 8 bit numbers in memory and to store the result also in memory EXAMPLE Let the data to be subtracted be 24 from 49 DATA 8650 49 8651 24 RESULT 8652 25 PROGRAM Join the Technical Community Today http www pantechsolutions net ADDRESS OPCODE MNEMONICS 8500 215086 LDA 8650 8503 7E MOV A M 8504 23 INX H 8505 96 SUB M 8506 23 INX H 8507 77 MOV M A 8508 76 HLT PROCEDURE 1 Key in the opcodes from the address specified 2 Enter data that is needed for execution at 8650 and 8651 3 Execute the program and check for results at 8652 4 Try changing data and check for results each time 3 ONE S COMPLEMENT OBJECTIVE To find the One s Complement of the data at memory location 8650 and store the result at 8651 Join the Technical Community Today http www pantechsolutions net EXAMPLE The example given is to find the One s complement of 8F and store it in memory location 8651 The number 8F is at memory location 8650 DATA 8650 1000 1111 B RESULT 8651 0111 0000 B PROGRAM ADDRESS OPCODE MNEMONICS 8500 3A5086 LDA 8650 8503 2
28. r li e Mew j Moe e mot REFERENG R MANYA GAHNICA anal oul Mie E m Sss PS 8085 Trainer Kit MICRO CONTROLLER BOARDS JS RT SUC III IVTTTITITITITTTTI TIA TABLE OF CONTENTS CHAPTER 1 INTRODUCTION 5 E INTRODUCTION nn 5 1 2 PS 8085 BOARD OVERVIEW 0ccccseeceeeeees 6 1 3 PS 8085 SPECIFICATIONS 7 CHAPTER 2 SYSTEM DESCRIPTION 9 2 1 HARDWARE DESCRIPTION 9 2 2 CONNECTOR DETAILS 12 1 20 pin expansion connectors 12 2 50 pin expansion connector 13 The 50 Pin FRC connector is used to interconnect with the Interface cards like 8255 8279 8253 8251 8259 8257 and the pin details are given below 13 2 3 POWER SUPPLY DETAILS n 17 2 4 KEYBOARD DETAIL sccossssscesscosssescenseees 17 CHAPTER 3 COMMANDS AND KEYS 18 ARRE 18 3 2 HHEelp MeNUu icraalairaa 18 CHAPTER 4 OPERATING INSTRUCTIONS 19 dd POWERro Nei 19 4 2 PROGRAM ENTRY USING ASSEMBLER 20 Join the Technical Community Today http www pantechsolutions net 1 ENTERING MNEMONICS ee 20 ENTERING G EXECUTING COMMAND 23 4 3 ENTERING RESULT COMMAND 24 AA DISASSEMIBLER ssutsrnctescsctasnattendtientcsaceuns
29. register it is initialized a value of 9F00 gt Status Flag register keeps track of flags BREAK POINT DISPLAY IN LOCAL MODE When break point is encountered all the register values are saved and the Acc A XX Value is displayed in the LCD display Now use SPACE key to check register values one by one CHAPTER 6 EXAMPLE PROGRAMS This chapter describes the technique for development programs in PS 85L board For the development of programs it is essential to get familiar with the machine code of 8085 Microprocessor or mnemonics of instruction set Join the Technical Community Today http www pantechsolutions net 6 1 8 BIT MULTIPLICATION OF TWO DATA S INPUT e Multiplicand in 8500 e Multiplier in 8501 OUTPUT e Result is stored at 8502 e Result is also in Accumulator If the result exceeds FF value then the carry flag is SET Join the Technical Community Today http www pantechsolutions net FLOW CHART Transfer the multiplier and multiplier to 2 separate NO YES Is the multiplier is zero Transfer zero in result Initialize the content of a temporary register to zero Add the multiplicand with the temporary register and store it in temporary register Decrement the multiplier Is the multiplier is zero YES Transfer the temporary register value to result register Join the Technical Community Today http www pantechsolutions net
30. t programmable timers from 8253 8254 gt 48 Programmable 1 0 lines from two nos of 8255 gt Serial interface using 8251 gt 50 Pin FRC connector for system bus expansion gt 20 pin FRC connectors for user interface from 8255 gt 9 Pin D type female connector for RS 232C interface and 9 Pin gt Six numbers of selectable baud rates from 150 to 9600 gt 101 PC type keyboard for entering user address data and for commands gt Built in line by line Assembler and Disassembler Join the Technical Community Today http www pantechsolutions net gt User friendly software monitor for loading and executing programs with break point facility gt Facility to connect to PC CHAPTER 2 SYSTEM DESCRIPTION 2 1 HARDWARE DESCRIPTION PROCESSOR CLOCK FREQUNCY 8085 operates at 16 144 MHz clock MEMORY Monitor EPROM 0000 3FFF SEGMENT System RAM 8000 8FFF SEGMENT A000 FFFF Reserved for Monitor program User RAM Area 8500 FFFF Join the Technical Community Today http www pantechsolutions net ALLOCATION OF EPROM START END ADDRESS SOCKET ICUSED TOTAL ADDRESS NO CAPACITY 0000 3FFF U3 27256 32K BYTE ALLOCATION OF RAM START END ADDRESS SOCKET ICUSED TOTAL ADDRESS NO CAPACITY 0000 FFFF U4 62256 32K BYTE PARALLEL INTERFACE 8255 Programmable peripheral interface SYSTEM MAPPING I O mapped 1 0 The followi
31. ult each time at 8651 7 BCD TO HEX CONVERSION OBJECTIVE Join the Technical Community Today http www pantechsolutions net Convert two BCD numbers in memory to the equivalent hex number EXAMPLE The BCD digits are at locations 8650 and 8651 and result will be stored at 8652 DATA 8650 02 MSD 8651 09 LSD RESULT 8652 1DH 29D PROGRAM ADDRESS OPCODE MNEMONICS 8500 215086 LXI H 8650 8503 7E MOVA 8504 87 ADDA 8505 47 MOV B A 8506 87 ADDA 8507 87 ADDA 8508 80 ADD B 8509 23 INX H 850A 86 ADD M 850B 23 INX H 850C 77 MOV M A 850D 76 HLT Join the Technical Community Today http www pantechsolutions net PROCEDURE 1 Key in the opcodes from the address specified 2 Enter data at 8650 and 8651 for execution 3 Execute the program and check for result at 8652 4 Try changing data and check result each time 8 HEX TO BINARY FORM OBJECTIVE Convert an 8 bit hex number to its binary form and store in memory EXAMPLE Let the data be 5A DATA 5A 0101 1010 B RESULT 8650 0 LSB 8651 1 8652 0 8653 1 8654 1 8655 0 8656 1 8657 0 MSB PROGRAM Join the Technical Community Today http www pantechsolutions net ADDRESS OPCODE MNEMONICS 8500 215086 LXI H 8650 8503 0608 MVI B 08 8505 3E5A MVI A 5A 8507 OF LOOP RRC 8508 DA1086 JC LOOP1 8
Download Pdf Manuals
Related Search
Related Contents
Samsung SH07AP4E User Manual FR-A701 catalog - Mitsubishi Electric Australia Samsung F1035JF 用户手册 2-4L41C 2-4M41. 4L42C 4M42 Charge! New Regulated Voltage Control System Copyright © All rights reserved.
Failed to retrieve file