You are on page 1of 38
OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Page 2/44 8085 Mi sor Trainer Omega Type OEJ-85A is modified version of our eatlier Type oes eOks Microprocessor BCIXTIAT computer withthe help of 96 bit TTLIO Experimental Interface and Eattor Assembler Software. It is quite 7 efficient system based on Industry Standard Intel 8085A jyp for the purpose of training and prototype ‘development of microprocessor based system. Its hardware is capable of supporting multi proceezor configurstion aigo. The units self contained and requires no other apparatus, Practical experience on this, board carries great educative value for Science and Engineering Students. The Microprocessor trainer is designed to ‘teach the subject of Microprocessor programming and interfacing through practical, essentially designed to teach the | study of : Design student projects Familiarize the components used in typical Microprocessor based instruments ‘Study the signals generated by the Microprocessor. Learn the art of programming in machine language. Design application oriented equipment Design and debugging techniques, etc. Perform input / output experiments. Instruction set of 8085. ooooo000 (Q cru BOB5A Microprocessor @6.144 MHz ‘ ‘Total space ON BOARD is 48KB, Comprising of 16KB monitor EPROMS and 32KB RAM. Battery backup for RAM. No expansion required, PERIPHERALS + 8279 for controlling 24 feather keys (including 6 digit seven segment display). 1 Timerfcounter with three independently programmable counters. ‘Two 8255 for controlling 48 VO lines and same are brought out to FRC 50 pin connector. 18251 for RS 232 ¢ serial communication and firmware for UPDOWN facility for IBM PCIXTIAT computer Built-in cassette interface + Built-in Speaker interface Builtin EPROM programmer for 27128 operating at 12.6V. INTERFACING All buffered & demultiplexed TTL compatible signals brought on a 50 pin FRC SIGNALS. connector including address and data control lines brought out at another 50 pin FRC connector. Several experimental interface modules can be connected to this trainer. They are ADC, DAC, Stepper motor, 8-bit switch input, 8-bit LED output, Relay interface module, etc. and many more are available. Q POWERSUPPLY —:_ SV@1A,#12V@ 500mA. All assembled in a well designed cabinet. Q ACCESSORIES : 60 pin FRC Cable with connector a pin both ends -1. Software floppy for serial communication -1. SOFTWARE CAPABILITIES ‘The Monitor provided in 32K EPROM is capable of assisting the user, entering, editing and running the programs in assembly language. Along with other keys the following keys support these features . Q SET ADDR. : This key allows to examine and optionally update the RAM. EXAMIREG This key allows to examine and optionally update the CPU Registers. Q “GO"&“EXEC” KEYS —: These keys allow running of the user or monitor programs at full speed. Q STEP ‘This key allows running of the user or monitor programs, one instruction at a time FEATURES 1 The unitis operative on 230V, 50 Hz A.C. Mains. =a OMEGA 5 See ‘OMEGA ELECTRONICS, JATPUR-302 00 OPERATING INSTRUCTIONS OMEGA TYPE OEV-85A Page 3/41 KEY DESCPRITIONS: RESET ‘The RESET key causes a hardware reset, and starts the monitor. The message" - EJ 85 * will be displayed across the address and data field of the display. The monitor is ready to accépt a command after reset, and saves no information about the state of any user program before the reset. ‘SET ADDRESS OF MEMORY LOCATION : This is abbreviated as SET/ADR command, The SETIADR command key allows you to read the contents of ROM ‘memory, to examine and modify the contents of RAM memory locations. ‘The address argument denotes the contants of the memory address to be examined, and may be from 1 to 4 hex digits. If you enter longer numbers, only the last 4 digits entered are used. As soon as the number is terminated by the NEXT key, the contents of that location are shown in the DATA field, along with a decimal point atthe right edge of the field. Entering a new number will cause that number to be displayed in the DATA field: however, the contents of the memory location will not be changed until an EXEC or NEXT key is pressed. Pressing NEXT will place the contents displayed in the data field into the displayed memory address. Then the address and contents of the next higher memcry location will automatically be shown. Pressing NEXT while the address FFFF is being displayed will cause address 0000 to be displayed, EXAMPLE : Ifyou wish to examine a memory location 8000h, Then follow the key depressions as shown below one after-the other. The ADDRESS and DATA display responds as shown, KEY FUNCTION ADDRESS FIELD DATA FIELD. RESET 5 oO E J 8 5 ‘SET/ADR 8 o o o s s s 0 0 0. 8 0. = s 0 0 8 0 0 ei ei 0 8 0. o 0. s eI NEXT 8 0 0 0 a g * DENOTES Don'tcare values. NOTE : If you have not depressed 8000 in the same sequence as shown above. You can re-key 8000 in the same sequence again. Only the last four depressions prior to pressing NEXT key will be valid information. Pressing EXEC will place the content displayed in the data field into the memory addressed displayed in the address field and will also terminate the command. ‘Whenever the command changes the content of the memory location, it also verifies that the change has occurred correctly. Ifthe contents of the location do not agree with that the new value should be (ie. ifthe memory location is in ROM or nonexistent), an error message is generated. [SET/ADDR Using SET / ADDR to list the first few monitor locations. The following sequence allows you to view the contents of the location 0000 onwards. KEY FUNCTION ADDRESS FIELD DATA FIELD RESET = oO E J 8 5 |_SETADR, 0 o o o a NEXT 0O oO Oo oO 3 Ee NEXT oO oO oO 4 oO oO NEXT oO oO oO 2 3 2 NEXT ° o oO 3 0 oO ra OMEGA OMEGA ELECTRONICS, JATPUR-302 006 (INDIA) @ LT — Foe Run o { Daoqe = - ogreamrn ©) Se Next Ay REseT L (no PrevIsds Ny) oun J Exe \ Exam REY, A) 05 g OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Pege 4/41 ‘You can also view the contenfs in the previous locations. i) 3 Zz GOPER o 0 o 2 ‘GOIPRY O of 0. 4 o o. ‘GOIPRV, 0 0. o 0 3 E ‘To view the location in forward direction or next location, press NEXT o o 0 4 0 0 RESULT:- ; ‘You can watch the contents both in forward or reverse directions. Using SET/ADR | To enter a small program; KEY FUNCTION ADDRESS FIELD. DATA FIELD, SET/ADR EXT 4 SPH 7 PCL NEXT. C E NEXT o o 0. 8. 8 0. 0. 0. o 0. 0. 0. 0 0. 0 0. 0 0 0 0 0 0 0. 0. 0 0. 0 0 2lcolooloo| co] ca|o2fc2|c2lonlonlo}o}o| NOTE : * Represent unpredictable values. Tecan BO back to previous locations and examine the contents by using GO/PRV key. ADDRESS DATA CORRESPONDING ASSEMBLY LANGUAGE INSTRUCTION 8000 3E MVIA, 47H 8001 47 ‘8002 CF RST 1 “This program will oad the A register with the number 47 and jump back to the monitor. EXAM/REG EXAMINE REGISTERS :- Heese rants enmand allows you te display and modify the contents of the 8086 CPU registers. Pressing the Key blanks tain the adgrese and data fields, and displays a decimal point atthe right edge of the address field. At this point you must press a register Key (register names are denoted by legends on the keyboard). Any other key will generate an errorresponse. _ Ifa register key is pressed, the will appear in the data field, along with a decimal point at to be displayed in the data field; however, the contents of the register will not be changed un pressed, name of the register will appear in the address field, and the contents of the register the right hand edge. Entering a number will cause the number til an EXEC or NEXT key is —> ~~ ‘OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEJ-05A Pago 6/41 Execute the above program and examine tho contents of register. KEY FUNCTION ADDRESS FIELD. DATA FIELD RESET oO 8 5 ‘GOIPRV i 3 0 oO 0. EXEC, NEXT. P c H Q NEXT. P c L s NEXT. = E r t * Denotes Don't care condition. The contents of displays do not make sense. Pressing NEXT will place the contents displayed in the data field into the register namedin the address field, then will splay the name and contents of the next register in sequence (See table-I). Pressing EXEC will place the contents splayed in the data field in the register named in the address field, and will also terminates the command. Pressing NEXT while register PCL is being displayed has the same effect as pressing EXEC. The format for the | register is the lower bits of the accumulator following execution of a RIM instruction. A interrupt mask field denotes a masked condition. A "0" most be entered to use that interrupt. The format for the I register is: — 75 65 55 | INTERRUPT MASK |__ |NTERRUPT ENABLE FLAG —> OMEGA OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) —— OPERATING INSTRUCTIONS OMEGA TYPE OEV-85A Page 6/41 TABLE-I REGISTER DISPLAY SEQUENCE Key display Code Register 7A CPU register A B CPU register B c CPU register C o CPU register D E CPU register E F lz CPU flags bytes t Interrupt mask 4 CPU register H. L CPU register L ‘SPH ~|___ most significant byte of stack pointer ‘SPL Teast significant byte of stack pointer PCH Tost significant byte of program counter PCL Teast significant byte of program counter z Ss zx ACX P X C The flag byte contains the 8085 CPU's condition flags. The format for the flag byte is = For more information about the 8085's INE REGISTER EXAMPLE Using EXAM/REG to initialize the 8085's stack pointer to FFC2 KEY FUNCTION "ADDRESS FIELD EXAM REG SPH E E NEXT C 2, EXEC X= UNDEFINED flags and interrupt mask feature, consult Inte! user's manual. DATA FIELD. OMEGA ELECTRONICS, JAIPUR:302 006 (INDIA) —i> OMEGA Se OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Pago 7/41 ‘GO Pressing the GO/PRV key causes the contents, of the program counter (PCH and PCL) to be displayed in the ‘addressed field, along with a decimal point at the right edge of the field. The program counter is available for change, and. ‘any number entered (a number is optional) becomes the new contents of the program counter. Pressing EXEC key transfers the control of the CPU to the address in the address field (contents of the program counter). Before the transfer of control, the address and data display fields are cleared, and an’E" is displayed atthe left edge of the address field. Pressing any other key but EXEC key generates an error message. The monitor regains control of the CPU only after a RESET or after execution of an RST 0, RST 1, or JMP instruction isin program. IMPORTAN Note that because of the way the GO/PRV and SINGLE STEP commands are implemented in the Monitor, SINGLE. ‘STEP will not work unless the 8085's stack pointeris pointing to an existing portion of RAM memory. fat any time these two commands don't seem to be working, set SPH to FF and SPL to C2 using EXAMIREG, then try itagain. (Locations FFC2 to FFFF are reserved for the monitor program, therefore the stack pointer must be set to FFC2 or lower so.as not tointerfere with the monitor). GO COMMAND EXAMPLE :- Now you can execute the program you entered in SET / ADR of the command. First, check to make sure the 3 location program is in memory, then the program will be executed. KEY FUNCTION "ADDRESS FIELD DATA FIELD SETADR. & 0. 0. 0 NEXT. o 0. 0. 8 8 8 8 + folololo} « EXEC Denotes don't care values. NoT Recall that this small program loads the A register with the number 47 and restarts the monitor. To verify that the A ister now 47 and to get more practice using EXAM/REG, try the following sequence : KEY FUNCTION ADDRESS FIELD DATA FIELD EXAM REG. A = R a 7 Areg now holds 47 0. Z x a 0 EXEC = ‘Area now holds 0 GO = = = 7 7 - 5 8 0 o o 3 o 0 oO 8 0 0 0. 8 0 0 0 8 0. 0 o EXEC o E J z i amy’ OMEGA OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEV-85A Pago 8/41 EXAM REG x a 7 “ NowA. reg holds 47 again ‘Now try placing other values in location 8001 using SET/ADR and use GO to execute the program again, seeing how those values are loaded into the A register after execution. SINGLE STEP :- Pressing the SINGLE/STEP key causes the contents of the program counter (PCH and PCL) to be displayed in the ‘address field of the display along with a decimal point at the right hand edge of the field. The data field contains the contents of the address denoted by the contents of the program counter. The program counter is made available for change, and number entered (a number is optional) becomes the new contents of the program counter. Pressing the NEXT key causes the CPU to execute the one instruction pointed to by the program counter. After execution the monitor regains control of the CPU, and the address and data fields show the new contents of the program. counter (address of next instruction to execute) and contents of the byte addressed by the program counter, respectively. ‘The decimal point is turned on at the right hand edge of the address field, indicating that the program counter is available again. ifthe EXEC key is pressed, no instruction is executed. The address displayed in the address field is made the contents of the program counter and the single step command is terminated. You may now examine or modify registers ‘and memory locations to verify program execution. Pressing the SINGLE/STEP key takes you back to the single step mode, and subsequent pressing of the NEXT key allows you to continue, instruction, through your program. Single stepping is implemented in the OEJ-85A hardware by repeatedly interrupting the processor. Since interrupts cannot ne recognized during the El and Dl instructions of the 8085, single step will not stop at either of these instructions. SINGLE STEP EXAMPLE [KEY FUNCTION ADDRESS FIELD DATA FIELD. ‘SINGLE a o - * * * STEP 8 o o o 5 H. NEXT o o o B E 7 NEXT 0. 0. 0. Cc 2 2 NEXT 0. 0. 0. F F 5 NEXT 0 o 1 © E 4 To resume full speed operation at this point, do the following : EXEC 7 GO. 2 a 7 a E i EXEC - o E J 8 5 NTS VECTOR INTERRUPT : ‘The VECTIINTR key is similar to the GO key in the respect that ittakes control away from the monit e lor and give another program. The interrupt key causes immediate recognition of RST 75 interrupt and control passes to location se in the monitor. This location contains an unconditional branch to instruction location FFCE in user RAM. You may place ‘any instruction you wish in locations FFCE through FFDO (e.g,,a branch to a keyboard interrupt routine). The monitor £265,not regain control without specific action (a RESET command, of a RST1, or JMP 0 program instruction). Ia carina backto the monitor, unless the RST 1 instructions executed, the monitor loses al past information about the Since an interrupt is recogni rdw. Si uncnaganinterut is recognized by the hardware, the meitr cannot lar the eisplay ths the display may remain ——D OMEGH OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE. OEJ-85A Page 9/41 IMPORTANT :- ‘Two conditions must be satisfied for the Vector Interrupt feature to be enabled. 01.Interrupts must be enabled (by executing an El instruction) 02, RST 7.5 must be unmasked (mask reset by the SIM instruction or by modifying the |-Register). PROGRAM DEBUGGING - THE USE OF BREAKPOINT! ‘Along with the "cold start” reset caused when the RESET button is pressed, the monitor also implements a “warm start” procedure. Execution of an RST 1 instruction will cause the monitor to enter this “warm start" routine. The monitor will display the same message as a RESET "- OEJ 85" but all registers and user memory will be preserved in the state they were in atthe time of execution of the RST 1. No system reset or initialization will be performed. By placing RST 1 instructions at key RAM locations where you want to examine the CPU status, you can break from your program and then examine and set memory locations and registers, or single-step a portion of your program. ‘To resume execution ofthe user program, press GO. The PC value of the next instruction appears in the address field of the display. Then press EXEC to continue execution. ERROR CONDITIONS - ILLEGAL KEY :- Ifa key is pressed which is illegal in its context (e.g., a command key is pressed when the monitor is expecting a number), the command is aborted and an error message is generated. This message is in the form of Err’, displayed in the address field. The monitoris then ready to accept a command. The error message will be cleared when a command key is pressed. Therefore, you can cancel a command before you press NEXT or EXEC by pressing any illegal key instead. MEMORY SUBSTITUTION ERRORS :- If the SET/ADR command determines that the contents of a memory location were not changed correctly (ie. location is in ROM or is nonexistence), the command is aborted and an error message is generated. This message also takes the form ~-Err” displayed in the address field. The monitor is then ready to accept a new command. The error ‘message will be cleared when a command key is pressed, MONITOR ROUTINE CALLING ADDRESS: Calling Address Mnemonic Control Input 0363 UPDAD Update Address This updates the address field of the display. The contents of the DE register pair are displayed inthe address field of the display. The contents ofall the CPU registers and flags are affected. 036E UPDDT Update Data This updates the DATA field of the display. The contents of the A register are displayed in HEX notation inthe DATA field of he display. The contents ofall the CPU registers and flags are affected. O2E7 RDKBD Read Keyboard This routine waits until a character is entered on the HEX keypad and upon retum places the value of the characterin the A register. The A, Hand L registers and the flag flip lops.are affected, 0287 ‘OUTPT Output Characters to Display This routine sends a character tothe display with the parameters set up by registers A, B, Hand. 0640 MOV BLOCK Move a block of memory This routine moves a block of memory contents from one place (source block) to another area (destination) of memory address. FF99 Lowbyte of start address of destination FF9A High byte of start address of destination FFOB Start address of source Low byte FFOC High byte of start address of source FFED Lowbyte of END address of source +4 FF9E High byte of END address of source. FFOF Enter “AA” as contents of this location as this FFAO Enter "55" as contents of this location as this nly an interlocking byte only an interlocking byte OMEGA OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OE4J-85A Pago 10/41 __ INPUT / OUTPUT PORT MAP :~ PORT NUMBER DESCRIPTION 23 ‘CONTROL PORT OF TIMER’ 20 COUNTER A PORT. 21 COUNTER B PORT, 22 COUNTER C PORT, 13 8255-1 CONTROL WORD 40 PORT-A un PORT-8. 412 PORT-C MICROPROCESSOR TRAINER OEJ-854 INPUT OUTPUT CONNECTOR DETAILS : 50 PIN WO CONNECTOR ‘50 PIN SYSTEM BUS CONNECTOR-I PCO 128 [por So 1 [25 [as PCH 2_|-27_|- Pe INT 2 |-27 Tag PC2 3_|-28-| Ps ALE 3-28 [Ato PC3 4—| 29 [Pca INTR. ‘4—[-29- [Ant BO | ~30_| P57 RST 0 | Az per} 6 | 31 | eps i 6 {31} a3. PB? 7 | ~32_[ pps READY. 7 [32] Ata. PBS 3_|-33_ [PBs RST6S @ [33 | Ars. PAS 9 | 34 PAA [HULDA 9 [34 ‘0 PAD, 10_| 35 | PAS HOLD 1o[ 35 |p PAT 11 36_| Pas. ‘ourt 41_|~36_[-_p2, PAO, 42 |~37_[ Par GATE 4 12-|-37_| 3 CO 43_|_38_|[Pc7 CLK 13 -|~38_| 4 BCH 1439 | Pcs BEST ‘GATED 14_|-39_| bs poz 15_|~40-| Pcs: ‘OUT? 15 {40 | 6. Pos 46_|—41_| Pca CLK2 16_[ 41] 07 PBO 47] 42 PBT TRAP 17_|~42_ | CLKOUT pB1__| 18 | 43 Pes 1oMM 16_[-43-| AT PB? 49|44_| PBs. [io-R6 19 [ 4a] As PBS 20| 45 | Pea WO-WR 20_|45_[ As. PAO, 21_[ 46 | Par RESET OUT] 21146 Aa PAT 22_|47_[ PAS RD. 22_[-47_| a3. PAD 23_|48_[_ PAS 6255-1 Wet 23_[-48_|_az PAS 24_| 49 | PAs NC 24-49 | At ‘GND | 25 | 50 (GND ‘GND 25 | 50 0) cas OMEGH OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) = OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Page 11/41 DETAILS OF OEJ-85A EDGE CONNECTOR : i INPUT / OUTPUT CONNECTOR - II SYSTEMBUS CONNECTOR-| 1 26 1 26 pco @ = @ PC? soe @ As PCI @ PCS WA e @ A9 Pc2 PCS AE @ © AiO PC3 PCa 8255-1 INR @ © At PBO @ PB7 PORTS RSTS5 @ © Ai2 PBt © PBS AB PB2 © PBS Als PB3 PB4 AIS PAS © PAA Do PAZ © PAS D1 PAI © PAS D2 PAO © PAT GATE1 @ 03 PCO © PC7 ciK1 @ © D4 PCt © PCE 8255 -Il GATE2 @ @ 05 PC2 PCs PORTS OUT2 @ @ 6 PC3 PCa clK2 @ © 07 PBO PB7 TRAP © = © CLKOUT PBI PBS lom @ © A7 PB2 PBS WORD © 46 PBS PB4 TOWR AS PAO PAT RESET OUT MM PAL PAS 8255-1 RD a3 PAZ © PAS PORTS WR 2 PAS @ = =@ PAS 7 __ NC Al GND e@ © GND GND 0 25 50 28 '8256- Control World 28 Port-A 29 Pot-B 2A Port-C }EMORY MAP: Location Desription (0000 - 3FFF 16K Monitor EPROM 27128 4000 - 7FFF 416K Expension EPROM 27128 1800 ‘Keyboard Display controller data location 4900 ‘Command Location ‘8000 - FFFF 32K RAM only > OMEGA He ‘OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Pago 12/41 RAMRESERVED LOCATIONS:- Location Contents, FFC2 User may place a JMP instr a RST 5 routine in locs FFC2 = FFCA FECS IMP to RST 6 routine FEC8 JMP to RST 6.5 routine (Hardware user interrupt) loaded by user FFCB IMP to RST 7 routine FFCE MP to"VECT INTR" koy routine FFD1-FFEB__| Monitor stack (temporary storage used by monitor register images) FFES E Register FFEA D Register FFEB C Register FFEC B Register FFED Flags FFEF ‘A Register Storage for user FFFO L Register register image FFA Interrupt Mask FFF2 Prog. Cntr. - Low byte FFFS Prog. Cntr. - Hi byte FEF4 ‘Stack Ptr. - Low byte FFFS, ‘Stack Ptr. - Hibyte FFFG Current Assests FEF9-FFFC | Output buffer & Temp Locs FFFD Register Pointer FFE Input Buffer B255 1] PORT ASSIGNMENTS: The Input and output ports of OEJ-85A are controlled by 2 Nos. of 8255, Each 8255 can be accessed by address- ng them through OUT instructions. Each 8255 has 24 W/O lines. These 24 U0 lines comprise of 3 Nos of 8-Bit ports, ‘These 2 Nos of 8255 I/O lines are terminated on 0 50 Pin Flange Connector on OEJ-85A. There are 2 Nos of 50 pin (ors to the let of OEV-85A. One on the top (This is system Bus), one in the Bottom, This is 8255 /O connector. 8255-1 8255-11 Each 8265has: Mode control Port: | 13H 28H Port-A 40H 28H Port - 8. aH 29H Port -C 12H 2AH The following table gives you all possible combinations of control bytes that can be sent on 8255-1 or 8255-lI OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Pago 13/41 '5255 PROGRAMMING CONTROL BYTES (WRITE TO 8255 CONTROL PORT): ControlByte | Port-A_| Port-B | Portco-¢3 | Port C4-c7 80 OUT ‘OUT ‘our ‘OUT 81 ‘OUT ‘OUT IN ‘OUT 82 ‘OUT IN ‘our ‘OUT 83 ‘OUT IN IN ‘OUT 38 ‘OUT. ‘OUT ‘our, IN. 89 our ‘OUT IN IN. BA ‘OUT IN ‘OUT, IN. 8B ‘OUT. IN iN IN. 80 IN ‘OUT ‘our, ‘OUT 91 IN ‘out IN. our. 92 IN IN ‘our ‘OUT. 93 IN IN IN ‘our. 98. IN ‘OUT ‘our, IN 99) IN ‘OUT IN IN 9A IN IN ‘OUT IN 98 IN IN, IN IW 3255 MODE DEFINITION FORMAT: [b7Ds_b5_D4_b3 D201 00] [ GROUP-B — Port-C (Lower) Mode Selection O=Mode 0 4=Mode 1 Group-A Port-C (Upper) PUT O=OUTPUT, Port-A. 45INPUT O=OUTPUT, ‘Mode Selection’ (00=Mode 0 jode 1 4x¢Mode 2 ‘Mode Set Flag 1=Active ‘OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Page 14/41 EXAMPLE: ‘TASK :If you want to use Digital to Analog Converter Module to generate Analog signals. Write the following program. This example shows how to configure 6255 Label__| Address [Mnemonic Comments 51 | 2 | 63 8000 vase [31 | c2 | FF _| initiaize stack pointer to FFCZH ‘8003 mvia.60 | 3& | 80 £8255 Control byte is set, so that Ports PA, PB and PC are in Output mode 8005 our.28 | 3 | 28 ‘Mode control port is set now ‘8007 MWA 3e | - is any valid hex number from GO to FF 8009 ‘our,28 | o3 | 28 PA Port number is 28 800b HUT 76 HALT the program. INSERT. Insert command allows the user to insert one or more insertion in the user program Offset Address FF76 LO Limit Insert Addresses FETA HI Limit insert Addresses FETC No. of bytes tobe inserted | FF7E ‘Original Programme start Address FFEO New END Address FFe2 Ot. When this routine is executed, the user program starting insertion to be inserted. The display will show a dot ‘onthe address field on executing this routine informing the operator thatitis ready for accepting newinstruction anywhere in the memory. 02, Then the user should give the starting low insert address data and all the instructions are to be inserted in this way by using the Next key. When the insertion ofthe instruction are over the EXEC key is to be used for termination of the command Now the program is scanned from LOW limit to HI GH limit and OFF STAND is added to all address references between starting insert address and high limit of the program. The program segment which is being inserted may have the address references to other locations in the original program. In such a case no manual modification in the address references is required. lf necessary, the address reference will be changed automatically atthe time of the relocation of the program, ‘However if there are any addresses references inside the program segment which is being inserted, then these ‘address references should be modified while entering this program segment. The number of bytes should be subtracted from these address references. itis very important to set LO LMT to the starting location of the user program and HI LMT to the last location of the program for the proper execution of this command. LOWLIMIT FFEO HIGHLMIT == -FF82 CASSETTE RECORDER INTERFACE: There are many situation where data has to be transmitted through a non-ideal medium. To give three typical ex- amples, a system with electrically isolated elements might require that signals be AC coupled, communications through ‘an audio network (Such as telephone or radio) are greatly bandwidth limited, and some applications (Such as a distrib- tuted network in an industrial environment) must tolerate random electrical noise. Attempting to record data on a cheap _ cassette recorder (The one used for this not cost § 17.00) will reveal all ofthese shortcomings, plus one. The tape speed fluctuates significantly and various as the batteries run down, hence the data rate is inconsistent. cae OMEGA (OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) Z OPERATING INSTRUCTIONS OMEGA TYPE OEV-85A Page 15/41 ‘The recording scheme used here makes very few demands on the transmiting medium. It makes no attempt to transmit DC voltage levels, Instead, data is transmitted by a series of variable length tone bursts. The dominant frequency ‘the tone used ean be selected to be within the passband of the particular medium. Data is transmitted. With each bit Composed of a tome burst, the middle thrid is either a tone burst continuous with the first or a pause. Thus, data is distinguished by the burst pause ratio. HARDWARE DESIGN: ‘These tone bursts are obtained from the 8085 SOD line, using analog signal conditional to eliminate the DC compo- nent of the waveform. (This low frequericy component is due to the single-ended nature of the SOD line : i's deviations from ground are all positive, which unbalances the capacitive input stage of the recorder) ‘SOFTWARE: The algorithm for reading a data bit off the taps is simple and straight forward : I the tone burst is fonger than the pause, the bitis a one. Otherwise, itis a zero. Since only the time ratio is considered, any variation in tape speed will not affect the data determination. ‘After the CRT software analysis, the tape routine are almost trivial. TAPEO is a subroutine for outputting the contents of register C to a cassette recorder. TAPEIN reads 8 bits into register C. wv Bg Mv AOCH CALL BURST Rotate register C through CY: MOV A,O1H RAR RAR : CALL. BURST Clear the accumulator, and output a space: RA CALL BURST Keep cycling until the full 9-bit sequence is finished: DCR B NZ Tol RET ‘The BURST subroutine executes the SIM instruction CYCNO times, atintervals of 29 + 17, (HALFCYC) ‘machine cycles. In between each SIM, bit A7 is complemented. CYCNO should be an even number. If A6 is set upon ‘calling BURST a square-wave will be created. Otherwise, the same code sequence is followed but SOD does not ‘change-thus a space results. BURST MVID, CYCNO a BUI SIM 4) MVIE,HALFCYC =) Buz zl DCR E @ nz Bu2 (70) Rt 80H a DCR D @ NZ But 0) RET (10) INPUT ROUTINE: _TAPEIN uses a subroutine called BITIN to move the data at the SID pinvinto the CY. The maximum rate atwhich SID is read is limited by a delay loop in BITIN. Initialize the bit counter and the register D, which will keep track of the tone burst time, Ifa tone burstis being received ‘when TAPEIN is called, wait until the burstis over: OMEGA ELECTRONICS, JAIPUR-302 006 NDIA) ] TAPEIN, = ww wv mH fl CALL ec CALL ae Now await the start of the next burst, T12 ‘ CALL NC CALL SNC ‘each cycle until the pause is detectec OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Page 16/44 Bs D,00H BITIN TH BITIN TH (Through out this subroutine, a level transition is recognized only afterithas been read once intially and then verified onthe next reading. This provides some degree of software noise immunity). BITIN 112 BITIN 112 ‘The next burst has now arrived, Keep reading the SID pin, decrementing register D (thus making it more negative), 113 F DOR D CALL, BITIN wc 113 CALL, BITIN ae 113 ‘Now continue reading the SID pin, increment the D register (Back towards zero), each cycle until the next burst is received: 114 A INR D CALL, BTN INC TH4 CALL BITIN ANC 114 Now, ifthe burst lasted longer than the space. D was not incremented all the way back to zero: itis still negative; IF ‘space was longer, D was incremented up through zero; itis now positive. In other words, the sign bit of D will now respond to the data bit that would lead to each of these results, move the sign bit into the CY, then rotate it into gister C. Mov AD RAL MOV Ac RAR Mov CA Mv D.00H Continue until the last bit has been received DCR D DZ 113 RET (Notice that the first half ofthis subroutine is incorporated in the second half. In fact, the assembled listing included in ‘Appendix makes use of this fact to eliminate 24 bytes of duplicated code. ‘BTN Mv E,CKRATE (7) Bn : DCR E 4) NZ ert 10) RIM @) RAL ) RET (10) Th one burst frequency and duration, and the TAPEIN sampling rate are determined by HALFCYC, CYCNO, AND —oD_ OMEGA Sas OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OPERATING INSTRUCTIONS OMEGA TYPE OEV-85A Pago 17/44 APPENDIX A ‘There are two types of memories used in Microprocessor Trainer, OEJ-85A 01. Random Access Memory (RAM) 02. Read Only Memory (ROM) ‘Memory constitutes 2 elements, (1) Address, (2) Data. EXAMPLI Itis lke, if you wish to reach your friend at a given address, you will have to reach his correct address and then only youwill meet him. In the context of memory addressing, the address of a particular location has to be specified first and then only the contents (DATA) can be verified (checked). This data can also be replaced. ‘A Microprocessor can access A location in the range of Oth (2*) ‘Address to 65536 (2/15). This is because 8085 Microprocessor has 16 address pin Imagine a road with 65536 houses (planned) you can place a person (Data) in any one of these houses, provided all the houses are built. There is a possibilty that all house may not be there, even though planned, In all probability in a given address there may not be a house at al. Similarly, even though a Microprocessor has the capability to address any one of these locations. It is important to know whether a memory components (IC chips) is there in those specified locations. MICROPROCESSOR PROGRAM CODING SHEET: Name of the programm: Read key board ‘Subroutine : ROKBD Register used : SP, Acc Program executed — : ~—_8000H fromlocation Labet_| Address | Mnemonic | 81 | 62 | 683 | Comments 8000 LXI, SP 31 | c2| FF | Initialize the stack pointer = FFC2 8003 MVIA, 08: 3e | 08 8005 ‘SIM 30 Unmaskinterrupt ‘8006 CALL,ROKBD | cD | E7 | 02 | Read keyboard value in Register A ‘8009 RSTI CF Break point, go back to monitor. rASK: ‘The examples presented demonstrate howto use monitor routines to operate the keyboard and display. After execut- GO 6000 the program waits until a key is pressed. Then the value of the key is placed in the A register and the jOnitor is restarted. Use EXAMIREG to see the that the key value is now in A register. Labet_| Address [Mnemonic 1 | 82 | 83 [ Comments 8000 vxsprece | 31 | c2 | FF | Definestack pointer 8003 MVIA FF 3e | FF Load FF into register A 8005 CALL,uPODT | CD | 6E | 03 | Callupdatedatadisplay subroutine atlocation 036€ ‘8008 HUT 76 HALT the program ULT Atthe end of executing this program, the data display changes to FF. (CE: UPDDT subroutine when invoked display the contents of accumulator on data display. {tthe data display isto used to display any hex value, which might be the result of any operation or the contents of any tion or register, then move that value as contents of accumulator and call UPDDT subroutine. OMEGA OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) ] Name of the program =: Registerused A Program executable: OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Page 18/41 MICROPROCESSOR PROGRAM CODING SHEE" Display the code of any pressed key SP, Ace 8000H from location Label | Address Mnemonic Bi | B2 BS Comments. ‘8000 Uxisp.FrC2 | 31_| c2 | FF | Locatestackpointer at FFC2 8003 MVIA, 08: 3e_| 08 8005, SIM 30 Unmasking interrupt Loop | 8006 CALL,ROKBD | cD | E7 | 02 | Callreadkeyboard subroutine. After reading the keyboard place the key code in Register A. 8009 CALL,UPDDT | CD | 6E 03 Call Update subroutine At this time the contents of Acc are display on datadisplay 800C JMP, LOOP C3 | 06 80 Keep looping. RESULT: displayed on data display INFERENCE : function of each key. OEJ-85A PROGRAM: ‘On executing the above program, whenever a key is pressed (other than RESET and INT 7,5) Its code will be ‘The keyboard can be used as an input peripheral device, and can be logged as part of user's program toredefine the ‘Write a program to output a hexadecimal number on DATA display using OEJ-85A. Itis proposed to display 55h on Data display. Upon entering the following program execute from location 8000h. Label_| Mnemonic ‘Address Bt B2 BS ‘Comments Stat | DUSP,FFCI ‘8000 aH ct FF Initialize stack pointer at location FFC1. This should be the first instruction in your program, MVIA, 55 ‘8003 3 55 ‘ACC = 55 Whenever you want a data tobe displayed on DATA display, bring themintoACC first. CALL DATAdisplay. 8005 cD cE 03 This CALL subroutine residing at 036E will make the contents of ACC to be displayed on DATAdisplay. HLT 8008 76 Haltthe programnow. execute the above program again. PLE IOTE : If you want any other number to be displayed on DATA display, then enter that number in location 8004, and 2 Itis proposed now to display Aah on DATA display. Go to location 8004 and enter AA in that location Execution from location 6000h, OMEGH OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA) OEJ - 85A PROGRAM: A) OPERATING INSTRUCTIONS OMEGA TYPE OE4J-85A Pago 19/41 Write a program to output a 4 digit hexadecimal number on Address display using OEV-85A. Itis proposed to display 55AAh on address display. ‘The following example describes how to display a 16-bit number on OEJ-B5A Upon entering the following program execute from location 8000h, Label [Mnemonic ‘Address. 81 82 | 63 ‘Comments Stat [LXISP,FFCT ‘8000 ET ci | FF Initialize stack pointer at location FFC1. This should be the first instruction in your program. LXID, 55AA, 8003 11 The 4 digit hexadecimal number to be displayed on ‘Address display must be made available in DE pair registers, before calling address display subroutine. display sub CALL, Address | 8006 cD 63 | 03 ‘Address display subroutine is available at_ location 0363. By calling this subroutine contents of DE pair register will be displayed on Address display HUT 8009 76 This halts program execution, NOTE (lower order hex number) and 8005 (higher order hex number). Then execute the above program again. EXAMPLE : It O£J-85A PROGRAM TO READ KEYBOARD: ‘Write a program to display the code of any pressed key. proposed now to display 1234h on Address display. Go to location 8004 and enter 34 in that location and enter 12 in location 8005 Executed from location 8000h. you want any other number to be displayed on ADDRESS display, then enter that number in location 8004 Label Mnemonic Address | B1 B2 B3_ | Comment Stat | LXISPFFC2 e000 | 31 | c2 | FF | Initialize stack pointer at location FFC2. Itshould be the first instruction in your Program. MVIA, 08 8003 3E 08 Data required to set interrupt mask. Whenever keyboard is to be accessed, this step is require. sim 3005 _| 30 Enablemaskinterrupts Loop CALL Rdkbd 8006 cD | E7 02 These routine waits until a Data display cad character is entered on the hex keypad and upon return places the value of the character in ACC. The. ACC, Hand Lregisters and flag flip-flops are affected. CALL DataDisplay | 8009 cD} 6E 03 This CALL subroutine 8006 (Loop) residing at 036E will make the contents of ACC to be displayed on DATAdisplay ‘IMP 6006 (Loop) | 800C c3 | 06 | 80 | Keeptooping. o> : 3 OMEGA OMEGA ELECTRONICS, JAIPUR-302.006 (INDIA) NOTE: On executing the above program, whe: o OPERATING INSTRUCTIONS OMEGA TYPE OEJ-85A Pago 20/41 “displayed on data display except for RESET and INT 7.5 keys. LY Key Pressed Keycode Key Pressed Keycode 0 00 8 0B, 4 ot c oc. 2 02 D 00. 3 03 E OE 4 04 F OF 5 05. EXEC. 10, 6 08 NEXT, 1 7 07 GOPRV 12 el 08, ‘SETADDR 13 9 09) EXAMREG 14 A OA ‘STEP 15 erify the table while executing the above program. never a key is pressed it's code will be stored in Accumulator and EJ-85A PROGRAM FOR 8-BIT DIVISION: Write a program to divide a Hexadecimal number by another Hexadecimal number, Assume that the divisor is in the location 9100h and 1e using repeated subtraction method. the dividend is in the location 9101h. The following program LABEL| ADDRESS Mnemonic] 61 | 62] 63 | comments Stat | LXI SP, FFC2 | 8000 31 | C2 | FF | initialize stack pointer at location FFC2. This should be the first instruction in your program. LDA 9100 8003 3A | 00 | 91 | Load ACC with divisor, which is entered in location 9100 MOVBA ‘8006 7 Move divisor in AGC into Reg. B LDA 9101 ‘8007 3A | 01 | 97 | Load ACC with divident whcih is entered in location 910th LXxI, 0000 | 800A 11/00 | 00 | Clearing 0-E Reg pair for storing quotient value Loop_| SUBB ‘800D 30 Subtracting the divisor from dividend INXD ‘800E 13 Increment the contents of DE reg by one after i CMP B 800F BS ‘Compare value in Reg. B with ACC value “INC 8000 ‘8010 02 [OD | 80 | tfcarry flag is not set then repeat the rS: svbiaction operation PUSHD 01S 5 ‘Transfer the contents of D-E Reg pair on the stack to prevent loss of data while calling the subroutine DATA display ‘CALL 8014 CD | 6E | 03 | This CALL subroutine residing at O36E will Data display make the contents of ACC. (that is remainder) to be displayed on DATA display POP D ‘6017 DT Retrieving the data from the stack and storing in the D-E Reg pair. CALL e078 CD | 63 | 03 | By Calling this subroutine the contents of DE Address Reg pair (that is Quotient) is displayed on the display Address display. ie HLT ‘8018 76 Fait the program TE + Ifyou want to perform any other division operation, then enter the divisor in location 9100 and idendin location 9101 and execute the above program again, PLE: _Itis proposed now to divide 9 by 2. : Go to location 9100 and enter 2 and in location 9104 enter 9. E Execute from location 8000h. 7 >) OMEGR OMEGA ELECTRONICS, JAIPUR-302 006 (INDIA)

You might also like