Home

8279 – STUDY CARD - Electro Systems Associates

image

Contents

1. DATA PORT 0080H ADDRESS OPCODE LABEL MNEMONICS COMMENTS 0000 2000 ORG 2000H 0000 2000 BE 00 30 MOVW SI 3000 0000 2003 BO 00 MOVB AL 00 0000 2005 BA 82 00 MOVW DX 82 INITIALIZE 8279 0000 2008 EE OUTB DX AL 0000 2009 BO 90 AL 90 0000 200B EE OUTB DX AL 0000 200C B9 08 00 MOVW CX 08 0000 200F BO 00 CLEAR MOVB AL 00 CLEAR THE 0000 2011 BA 80 00 MOVW DX 80 DISPLAY 0000 2014 EE OUTB DX AL 0000 2015 E2 F8 LOOP 200F 0000 2017 BA 82 00 BACK MOVW DX 82 0000 201A EC INB AL DX 0000 201B 24 07 ANDB AL 07 0000 201D 74 F8 72 2017 0000 201F BE 00 30 MOVW 5 3000 0000 2022 0 40 AL 40 READ FIFO 0000 2024 OUTB DX AL 0000 2025 BA 80 00 MOVW DX 80 0000 2028 EC INB AL DX 0000 2029 24 1F ANDB AL 1F 0000 202B B4 00 MOVB AH 00 0000 202D 89 Cl MOVW CX AX 0000 202F 03 1 ADDW SI CX 0000 2031 BA 82 00 MOVW DX 82 0000 2034 BO 94 MOVB AL 94 ADDRESS 0000 2036 OUTB DX AL DISPLAY 0 0000 2027 80 00 MOVW 80 0000 203 0 MOVB AL 0000 203 OUTB 0000 2030 82 00 MOVW DX 82 0000 2040 BO 95 MOVB AL 95 0000 2042 OUTB DX AL 0000 2043 BA 80 00 MOVW DX 80 0000 2046 8A 04 MOVB AL ST 0000 2048 OUTB 0000 2049 9 2017 0000 3000 ORG 3000 0000 3000 60 B5 F4 66 LOOP DB OF3H 60H 0B5H 0F4H 66H 0000 3005 D6 D7 70 F7 76 DB OD6H 0D7H 7
2. 0000 2044 8A 04 BC2 MOVB AL ST A 0000 2046 MOVW DX OFFCO 0000 2049 EE OUTB DX AL 0000 204A 46 INCW SI 0000 204B E8 05 00 CALL DLY Provide some delay 0000 204E E2 F4 LOOP BC2 between characters 0000 2050 9 CD EE MP BCK Repeat infinitely 0000 2053 51 DLY PUSH Delay routine 0000 2054 B9 00 00 MOVW CX 0000 0000 2057 E2 FE LOOP 2057 0000 2059 59 POP CX 0000 205A C3 RET 0000 2100 ORG 2100 Display look up 0000 2100 97 83 97 93 DB 97 83 97 93 table 0000 2104 87 13 F3 00 DB 87 13 0F3 00 0000 2108 D6 E6 06 87 0 6 0E6 0D6 87 0000 210C 97 73 DE 00 DB 97 73 0 00 0000 2110 60 73 5 60 DB 60 73 0 5 60 0000 2114 77 00 04 00 77 00 04 00 33 Program to scan Hex keypad and to display code Seven Segment display using Encode method ADDRESS OP CODES LABELS MNEMONICS COMMENTS 0000 2000 BB 00 00 MOVW BX 00 0000 2003 BA C2 FF MOVW DX OFFC2 0000 2006 BO 00 MOVB 00 0000 2008 OUTB DX AL Routine to clear 0000 2009 80 90 AL 90 11 display LEDs 0000 200B OUTB DX AL 0000 200C 89 08 00 MOVW CX 08 0000 200F BO 00 MOVB 00 0000 2011 BA CO FF MOVW DX OFFCO 0000 2014 EE RPT OUTB DX AL 0000 2015 E2 FD LOOP RPT 0000 2017 50 20 BCK MOVW SI 2050 0000 201A BA C2 FF MO
3. 78 74 90 18 8 79 90 4 93 90 F0 09 90 802E 802F 8032 9000 9000 9003 9006 B9 80 04 71 00 F1 90 00 Fl 90 11 08 00 F1 00 00 90 F1 90 97 04 81 81 80 F6 00 80 00 D6 04 MOV A R1 CJNE 1 406 8025 SJMP 8 ORG 90 DB 04H DB 77H DB 00H CMD PORT DATA PORT START 1 TABLE 032 00H 97H DOH 04H 04H ESA IN THE DISPLAY FEILD OF EQU 181 EQU F180H ORG 8000H MOV DPTR F181 MOV A FF MOVX DPTR A MOV R2 90 MOV R3 00 MOV DPTR F181 MOV A 90 MOVX DPTR A MOVA 11H MOVX DPTR A MOV RO 08 MOV A 00 MOV DPTR F180 MOVX DPTR A DEC RO RO 0 8015 R1 00 MOV DPTR 9000 A MOVC A A DPTR MOV DPTR F180 MOVX DPTR A INC 1 MOV DPTR 9000 MOV 1 JNE R1 04 8025 SJMP 8032 ORG 9000H DB 04H 97H D6H DB 77H 04H 04H DB 00H QO 8279 8279 5 STUDY CARD USER MANUAL Display ESA THE STUDY CARD Divide CLK FREQ Initialize 8279 Right entry Decoded Scan keyboard Reading Table display ESA 32 3 PROGRAM DISPLAY THE VALUE OF THE KEY PRESSED IN ENCODE METHOD 8000 8000 8003 8006 8008 8009 800B 800E 8010 8012 8014 8016 8017 8019 801A 801C 801 8021 8022 8023 8024 8027 802 802
4. 10 8 8 bit character display Right entry 1 1 16 8 bit character display Right entry For description of right and left entry See interface considerations Note that when decoded scan is set in keyboard mode the display is reduced to 4 characters independent of display mode set KKK 0 0 0 Encoded scan keyboard 2 key Lockout 0 0 1 Decoded Scan keyboard 2 key Lockout O 1 0 Encoded Scan keyboard N key Rollover 0 1 1 Decoded Scan keyboard N key Rollover 1 0 0 Encoded Scan Sensor Matrix 1 0 1 Decoded Scan Sensor Matrix 1 1 O Strobed input Encoded Display Scan 1 1 1 Strobed Input Decoded Display Scan HOR 8279 8279 5 STUDY CARD USER MANUAL 7 Program Clock MSB LSB b All timing and multiplexing signals for the 8279 are generated by an internal prescaler This prescaler divides the external clock pin 3 by a programmable integer Bits PPPPP determine the value of this integer which ranges from 2 to 31 Choosing a divisor that yields 100 kHz will give the specified scan and debounce times For instance if pin 3 of the 8279 is being clocked by a 2 MHz signal PPPPP should be set to 10100 to divide the clock by 20 to yield the proper 100 kHz operating frequency Read FIFO Sensor RAM M ELSES CPU sets 8279 for a read of the FIFO Sensor RAM first writing this command 5 keyboard Mode the Auto increment flag AI and the RAM address bits AAA are irrelevant The
5. 8008 D3 81 OUT 81H 800A 3E 00 CLEAR MVI A 00H 800C D3 80 OUT 80H 800E 05 800 78 8010 00 CPI 00H 8012 C2 0A 80 JNZ CLEAR 8015 3E 10 A 10H 8 8 bit character display 8017 D3 81 OUT CMD_PORT Right entry SDD 8279 8279 5 STUDY CARD USER MANUAL 21 8019 90 90 801 D3 81 OUT CMD_PORT 801D 06 08 MVI B 08H 801F 21 0081 LXI H DISTBL Look up table to display 8022 7E BACK MOV A M SESA 8023 D3 80 OUT 80H 8025 CD 4A 80 CALL DELAY Provide some delay 8028 23 INX H 8029 05 DCR B 802A 78 MOV A B 802B FE 00 CPI 00 802D C2 22 80 JNZ BACK 8030 3E 90 MVI 90 8032 D381 OUT CMD PORT 8034 06 08 MVI B 08H 8036 21 0881 LXI H DISTBL 8 Look up table to display MOV A M 8039 7E OUT 80H 803A D3 80 CALL DELAY Delay Routine 803C CD 4A 80 INX H 803F 23 DCR B 8040 05 MOV A B 8041 78 CPI 00 8042 FE 00 JNZ BACKI 8044 C2 39 80 JMP BEGIN 8047 C3 19 80 RET 804A C9 DELAY LXI D 804D 11 FFFF REP DCXD 804E 1B MOV A D 804F 8050 B3 JNZ REP 8053 C2 4D 80 RET 8054 C9 ADDRESS OPCODE LABLE MNEMONIC COMMENTS ORG 8100H 8100 97 83 97 93 87 DISTBL ELECTRO 8105 13 F3 04 SYSTEMS 8108 D6 E6 D6 87 97 810D 73 DE 00 QO 8279 8279 5 STUDY CARD USER MANUAL 22 3 Program to scan hex keypad
6. Mov Rl to DPL Pop DPL Pop DPH Push DPH Push DPL Mov R2 to DPH Mov Rl to DPL Pop DPL Pop DPH 33 805 FO MOVX DPTR A Reading Table 805B 8C 83 MOV 83 R4 Mov R4 to DPH 805D 8D 82 MOV 82 R5 Mov R5 to DPL 805 4 8060 93 A A DPTR 8061 90 1 80 MOV DPTR F180 8064 FO MOVX DPTR A 8065 OB INC R3 8066 02 80 27 LJMP 8027 9000 ORG 9000H 9000 60 5 DISP DB F3H 60H B5H 9003 FA 66 D6 DB F4H 66H D6H 9006 D7 70 DB D7H 70H F7H 9009 Tor DB 76H 77H C7H 900C 93 5 97 DB 93H E5H 97H 900F 17 00 DB 17H 00H 9011 76 7 93 DB 76 7 93 9014 5 97 17 E5H 97H 17H 9017 00 DB OOH 4 Example program for ESA 51E trainer pressed on the display field of the to display the value of the key study card using encode method Execute program from 8000H Place jumpers on the study card for encode mode as given in the first page 8000 ORG 8000H 8000 90 1 81 MOV DPTR 0F181H Clk Divide 8003 74 MOV A 03CH 8005 FO MOVX DPTR A 8006 74 00 A 00H Key amp Disp Mode set 8008 FO MOVX DPTR A 8009 74 90 MOV A 90H 800B FO MOVX DPTR A 800C 90 Fl 80 MOV DPTR 0F180H Clear Disp 800F 4 CLR A 8010 78 06 MOV RO 06H 8012 FO CLEAR MOVX DPTR A 8013 D8 FD DJNZ RO CLEAR 8015 7 30 SET MOV R2 30H 8017 90 1 81 MOV DPTR 0F181H Check
7. The two 4 bit ports may be blanked independently These two ports may also be considered as one 8 bit port BD 23 Blank Display This output is used to blank the display during digit switching or by a display blanking command SDD 8279 8279 5 STUDY CARD USER MANUAL FUNCTIONAL DESCRIPTION Since data input and display are an integral part of many microprocessor designs the system designer needs an interface that can control these functions without placing a large load on the CPU The 8279 provide this function for 8 bit microprocessors The 8279 have two sections keyboard and display The keyboard section can interface to regular typewriter style keyboards or random toggle or thumb switches The display section drives alphanumeric displays or a bank of indicator lights Thus the CPU is relieved from scanning the keyboard or refreshing the display The 8279 is designed to directly connect to the microprocessor bus The CPU can program all operating modes for the 8279 These modes include Input Modes e Scanned keyboard with encoded 8 x 8 key keyboard or decoded 4 x 8 key keyboard scan lines key depression generates a 6 bit encoding of key position Position and shift and control status are strobed in the FIFO Keys are automatically debounced with 2 key lockout or N key rollover e Scanned Sensor Matrix with encoded 8 x 8 matrix switches or decoded 4 x 8 matrix switches scan lines
8. 14 15 17 2 15 16 18th enryO 1 2 3 4 5 6 7 8 9 10 1 12 13 14 15 17 18 15 16 LEFT ENTRY MODE AUTO INCREMENT Right Entry Right entry is the method used by most electronic calculators The first entry is placed in the right most display character The next entry is also placed in the right most character after the displays shifted left one character The left most character is shifted off the end and is lost Display RAM 1 entry 1 2 4 5 6 7 8 9 10 11 12 13 14 15 0 Address 1 2 3 4 5 6 7 8 9 10 12 13 14 15 0 1 1 2 entry 3 4 5 6 7 8 9 10 11 12 13 1415 0 1 2 1 2 13 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 14 15 16 17th entry 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 2 18th entry 2 3 4 5 6 7 8 9 10 1 12 13 1415 0 1 314 16 17 18 RIGHT ENTRY MODE AUTO INCREMENT HOR 8279 8279 5 STUDY CARD USER MANUAL 12 Note that now display position and register address do not correspond Consequently entering character to an arbitrary position in the Auto Increment mode may have unexpected results Entry starting at Display RAM address 0 with sequential entry is recommended Auto Increment In the Left Entry mode Auto Incrementing causes the address where the CPU will next write to be incremented by one and the character appears in the next location With non Auto Incrementing the entry 15
9. 87 0 5 2 Program to display ELECTRO SYSTEMS INDIA using Encode method ADDRESS OP CODES LABELS MNEMONICS COMMENTS 0000 2000 B9 08 00 MOVW CX 08 0000 2003 BO 00 MOVB 1 00 0000 2005 BA C2 FF MOVW DX OFFC2 Routine to clear 0000 2008 EE OUTB DX AL all displays 0000 2009 BO 90 MOVB 1 90 0000 200B EE OUTB DX AL 0000 200C BO 00 RPT MOVB 1 00 0000 200E BA FF MOVW DX OFFCO 0000 2011 EE OUTB DX AL 0000 2012 E2 F8 LOOP RPT 0000 2014 BA C2 FF MOVW DX OFFC2 28 8 bit Character 0000 2017 BO 10 MOVB AL 10 display Right 0000 2019 EE OUTB DX AL entry Encoded 0000 201A BA C2 FF MOVW DX OFFC2 Scan keyboard 0000 201D BO 90 MOVB 1 90 Write to 8279 0000 201 EE OUTB DX AL display RAM 0000 2020 BE 00 21 MOVW SI 2100 Routine to display 0000 2023 B9 08 00 MOVW CX 08 ELECTRO 0000 2026 8A 04 BCO MOVB AL ST 0000 2028 BA CO FF MOVW DX 0000 202B OUTB 0000 202 46 XNCW SI 0000 202D E8 23 00 CALL DLY Provide some delay 0000 2030 2 4 LOOP BCO between characters 0000 2032 B9 08 00 MOVW CX 08 Routine to display 0000 2035 8A 04 1 MOVB AL ST SYSTEMS 0000 2037 BA CO FF MOVW DX OFFCO 0000 203A OUTB DX AL 0000 203 46 INCW SI 0000 203C E8 14 00 CALL DLY Provide some delay 0000 203F E2 F4 LOOP between characters 8279 8279 5 STUDY CARD USER MANUAL 29 0000 2041 9 08 00 MOVW CX 08 Routine to display
10. Key status open or closed stored in RAM addressable by CPU e Strobed Input Data on return lines during control line strobe is transferred to FIFO Output Modes e 8 or 16 character multiplexed displays that can be organized as dual 4 bit or single 8 bit Bo Do A3 D Right entry or left entry display formats Other features of the 8279 include Mode programming from the CPU Clock prescaler Interrupt output to signal CPU when there is keyboard or sensor data available An 8 byte FIFO to store keyboard information 16 byte internal Display RAM for display refreshes The CPU can also read this RAM PRINCIPLES OF OPERATION The following is a description of the major elements of the 8279 Programmable keyboard Display interface device Refer to the block diagram in Figure 3 HOR 8279 8279 5 STUDY CARD USER MANUAL 4 x DISPLAY ADDRESS REGISTE RS DISPLAY REGISTERS OUT 0 3 OUT 0 3 AND TIMING TIMING AND gt KEYBOARD 8X8 FIFO SEN DEBOUNCE AND SOR CONTROL lt RETURN SCAN COUNTER 8 4 2 em a 510 3 RLO 7 SHIFT INTERNAL BLOCK DIAGRAM OF 8279 pO 8279 8279 5 STUDY CARD USER MANUAL Control Data Buffer The I O control section uses the CS and WR lines to control data flow to and from the various internal registers and buffers data flow to and from the 8279 is enabled by CS The character
11. Note that switches are not necessarily the only things that can be connected to the return lines in this mode Any logic that can be triggered by the scan lines can enter data to the return line inputs Eight multiplexed input ports could be tied to the return lines and scanned by the 8279 MSB LSB In Strobed input mode the data is also entered to the FIFO from the return lines The data is entered by the rising edge of a CNTL STB line pulse Data can come from another encoded keyboard or simple switch matrix The return lines can also be used as a general purpose strobed input MSB LSB HOR 8279 8279 5 STUDY CARD USER MANUAL 11 Display Left Entry Left Entry mode is the simplest display format in that each display position directly corresponds to a byte or nibble in the Display RAM Address 0 in the RAM 15 the left most display character and address 15 or address 7 in 8 character display is the right most display character Entering characters from position zero causes the display to fill from the left The 17 97 character is entered back in left most position and filling again proceeds from there Display RAM entry 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Address 1 2 entry 0 1 2 34 5 0 7 8 9 10 11 12 13 14 15 1 2 16 entry 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 112 15 16 17th entry 0 1 2 3 4 5 6 7 8 9 10 11 12 13
12. and to display Seven Segment Display using encode method CMD_PORT EQU 81H DATA_ PORT EQU 80H ADDRESS OPCODE LABLE MNEMONIC COMMENTS 8000 3E 00 MVI A 00H 8002 D3 81 OUT 81H 8004 3E 90 MVI A 90H 8006 D3 81 OUT 81H 8008 OE 08 MVI C 08H 800A 3E 00 CLEAR MVI A 00H To clear all the digits 800C D3 80 OUT 80H 800E 0 DCR 800 79 MOV 8010 00 00 8012 2 80 JNZ CLEAR 8015 DB 81 BACK IN 81 Read 8279 status 8017 E6 07 ANI 07H is character available 8019 CA 15 80 JZ BACK 801C 210081 LXI H DISTBL 801F 3E 40 MVI A 40H Read FIFO 8021 D3 81 OUT 81H 8023 DB 80 IN 80 8025 E6 1F ANI Mask shift and control keys 8027 6F MOV L A 8028 3E 94 MVI 94H Address to display 0 802A D3 81 OUT 81H 802C 3E F3 A Address to display scanned 802E D3 80 OUT 80H value 8030 3E 95 MVI A 95H 8032 D3 81 OUT 81H 8034 7E MOV 8035 D3 80 OUT 80H 8037 C3 15 80 JMP BACK 8100 F3 60 B5 F4 66 DISTBL 012 3 8105 D6 D7 70 F7 4567 8109 76 77 C7 93 ES 89AB 810E 97 17 00 CDEF 8111 76 T C7 93 5 8116 97170 SDD 8279 8279 5 STUDY CARD USER MANUAL 23 5 0 DEMONSTRATION PROGRAMS FOR 8086 SERIES KITS 5 EXAMPLE PROGRAMS FOR ESA 86 88 2 TRAINER 1 PROGRAM TO DISPLAY THE VALUE OF THE KEY PRESSED IN THE DISPLAY FIELD USING ENCODE METHOD COMMAND PORT 0082H
13. bit is asserted 1 the FIFO status is cleared and the interrupt output line is reset Also the Sensor RAM pointer is set to row 0 Cr the Clear All bit has the combined effect of Cp and it uses the Cp clearing code on the Display RAM and also clears FIFO status Furthermore it resynchronizes the internal timing chain End Interrupt Error Mode Set For the sensor matrix modes this command lowers the IRQ line and enables further writing into RAM The IRQ line would have been raised upon the detection of a change in a sensor value This would have also inhibited further writing into the RAM until reset For the N key rollover mode if the bit is programmed to 1 the chip will operate in the special Error mode For further details see Interface Considerations Section HOR 8279 8279 5 STUDY CARD USER MANUAL 9 Status Word The status word contains the FIFO status error and display unavailable signals This word is ready by the CPU when A is high and CS are low See interface considerations for more detail on status word Data Read Data is read when Ap CS and are all low The source of the data is specified by the Read FIFO or Read Display commands The trailing edge of RD will cause the address of the RAM being read to be incremented if the Auto Increment flag is set FIFO reads always increment if no error occurs independent of Aj Data Write Data that is written with C
14. both to the same RAM address and display position Entry to an arbitrary address in the Auto Increment mode has no undesirable side effects and the result is predictable Display RAM 1 0 1 2 3 4 5 6 217 address 1 2 0 1 2 3 4 5 6 7 1 2 command 100101010 1 2 3 4 5 6 7 1 2 s enry 0 1 2 3 4 5 6 7 1 2 3 4 enry 0 1 2 3 4 5 6 7 1 2 3 4 In the Right Entry mode Auto Incrementing and Incrementing have same effect as in Left Entry except if the address sequence 15 interrupted Display RAM l entry 1 2 3 4 5 6 7 0 Address 1 2 entry 2 3 4 5 6 7 0 1 1 2 Command 10010101 2 3 4 5 6 7 0 1 1 2 a entry 3 4 5 6 7 0 1 2 3 1 2 4 entry 4 5 6 7 0 12 3 314 112 RIGHT ENTRY MODE AUTO INCREMENT Stating at an arbitrary location operates as shown below 13 SDD 8279 8279 5 STUDY CARD USER MANUAL Command 10010101 0 1 2 3 4 5 6 7 lt islay RAM address Enter next at Location 5 Auto Increment I entry 1 2 3 4 5 6 7 0 2 2 3 4 5 6 7 0 1 sh entry 4 5 6 7 8 11 12 13 9 entry 5 6 7 8 9 2 3 4 RIGHT ENTRY MODE AUTO INCREMENT Entry appears to be from the initial entry point 8 16 Character Display Formats If the display mo
15. of the information given or desired by the CPU is identified by Ap A logic one means the information is a command or status A logic zero means the information is data RD and WR determine the direction of data flow through the Data Buffers The Data Buffers are bi directional buffers that connect the internal bus to the external bus When the chip is not selected CS 1 the devices are in a high impedance state The drivers input during WR CS and output during RD CS Control and Timing Registers and Timing Control These registers store the keyboard and display modes and other operating conditions programmed by the CPU The modes are programmed by presenting the proper command on the data lines with and then sending a WR The command is latched on the rising edge of WR The command is then decoded and the appropriate function is set The timing control contains the basic timing counter chain The first counter is a N prescaler that can be programmed to yield an internal frequency of 100 kHz that gives a 5 1 ms keyboard scan time and a 10 3 ms debounce time The other counters divide down the basic internal frequency to provide the proper key scan row scan keyboard matrix scan and display scan times Scan Counter The scan counter has two modes In the encoded mode the counter provides a binary count that must be externally decoded to provide the scan lines for the keyboard and display In the decoded mode the scan coun
16. 01A BE 00 21 MOVW 51 2100 Display ESA 0000 201D 8A 04 MOVB AL ST 0000 2015 OUTB DX AL 0000 2020 46 INCW SI 0000 2021 2 F4 LOOP 2017 0000 2023 3 0000 2100 ORG 2100 0000 2100 04 97 D6 77 DB 04H 97H D6H 77H 0000 2106 04 04 00 DB 04H 04H 00H pO 8279 8279 5 STUDY CARD USER MANUAL 27 5 DEMONSTRATION PROGRAMS FOR ESA 86 88 TRAINER 8279 REGISTER ADDRESSING The addresses for 8279 registers on this card for use with ESA 86 88E Trainer are as follows COMMAND DATA PORT FFC2H 1 Program to display ESA PVT LTD using Decode method ADDRESS OP CODES LABELS MNEMONICS COMMENTS 0000 2000 B9 08 00 MOVW CX 08 0000 2003 BO 00 MOVB AL 00 0000 2005 BA C2 FF MOVW DX OFFC2 Routine to clear 0000 2008 EE OUTB DX AL all displays 0000 2009 BO 90 MOVB AL 90 0000 200B EE OUTB DxX AL 0000 200C BO 00 RPT MOVB 1 00 0000 200 MOVW 0000 2011 OUTB DX AL 0000 2012 E2 F8 LOOP RPT 0000 2014 2 MOVW DX OFFC2 28 8 bit Character 0000 2017 BO 01 MOVB 1 01 display Left entry 0000 2019 EE OUTB DX AL Decoded scan keybd 0000 201A BA C2 FF MOVW DX OFFC2 0000 201D BO 90 MOVB AL 90 Write to 8279 0000 201F EE OUTB DX AL display RAM 0000 2020 BE 00 21 MOVW 51 2100 Routine to Displa
17. 06 3E 90 MVI A 90H 8008 D3 81 OUT 81H 800A 3E 00 CLEAR MVI A 00H 800C D3 80 OUT 80H 800E 05 DCR B 800F 78 MOV A B 8010 FE 00 CPI 00H 8012 C2 0A 80 JNZ CLEAR 8 8 bit character display 8015 3E 01 A 01H 8017 D3 81 OUT 81H Left entry Decoded scan keyboard 8019 3E 90 MVI A 90H 801B D3 81 BEGIN OUT 81H 801D 06 04 MVI 04H 801F 21 0081 LXI H DISTBLI Look up table to display 8022 7E MOV A M SESA 8023 D3 80 BACK OUT 80H 8025 CD 73 80 CALL DELAY Provide some delay 8028 23 INX H 8029 05 DCR B 802A 78 MOV A B 802B FE 00 CPI 00 802D C2 22 80 JNZ BACK 8030 CD 73 80 CALL DELAY 8033 CD 73 80 CALL DELAY 8036 3E 90 90 8038 D381 OUT CMD PORT 803A 06 04 MVI B 04H 803C 210581 LXI H DISTBI2 Look up table to display 803F 7E MOV A M PVT 8040 D3 80 OUT 80H 8042 73 80 CALL DELAY 8045 23 INX H 8046 05 DCR B 8047 78 MOV A B 8048 FE 00 CPI 00 804A C2 3F 80 JNZ BACKI 804D CD 73 80 CALL DELAY 8050 CD 73 80 CALL DELAY SDD 8279 8279 5 STUDY CARD USER MANUAL 16 ADDRESS OPCODE LABLE MNEMONIC COMMENTS 8053 3E 90 MVI A 90H 8055 D3 81 OUT CMD PORT 8057 06 04 04 8059 210A 81 LXI H DISTBL3 Look up table to display 805C 7 2 5 LTD 8050 D3 80 OUT 80 805 73 80 CALL DELA Y 8062 23 INX H 8063 05 DCR B 8064 78 MOV A B 8065 FE 00 CPI 00 8067 C2 5C 80 JNZ
18. 0H 0F7H 76H 0000 300A 71 C7 93 5 97 DB 77H 0C7H 93H 0E5H 97H 0000 300F 17 00 76 77 C7 DB 17 00 76 77 0 7 0000 3014 93 E5 97 17 00 DB 93H 0E5H 97H 17H 00H SDD 8279 8279 5 STUDY CARD USER MANUAL 24 2 PROGRAM TO DISPLAY ESA DISPLAY FIELD USING DECODE METHOD EXECUTE PROGRAM FROM 2000H 0000 2000 ORG 2000H Clear Display 0000 2000 BO 90 MOVB AL 90 0000 2002 BA 82 00 MOVW DX 82 0000 2005 OUTB DX AL 0000 2006 80 00 MOVB AL 00 Left entry decoded 0000 2008 EE OUTB DX AL Scan keyboard 0000 2009 B9 08 00 MOVW 08 0000 200C BO 00 RPT MOVB 400 0000 200E BA 80 00 MOVW 80 0000 2011 OUTB DX AL 0000 2012 E2 F8 LOOP 200C 0000 2014 9 04 00 MOVW 04 0000 2017 B8 00 00 MOVW AX 00 0000 201A BE 00 21 MOVW SI 2100 Display ESA 0000 201D 8A 04 LOOP MOVB AL SI 0000 201 EE OUTB DX AL 0000 2020 46 INCW SI 0000 2021 E2 FA LOOP 201D 0000 2023 CC INT 3 0000 2100 ORG 2100H 0000 2100 04 97 D6 77 DB 04H 97H D6H 77H 0000 2106 04 04 00 DB 04H 04H 00H 3 PROGRAM TO DISPLAY ESA IN DISPLAY FIELD USING ENCODE METHOD 0000 2000 ORG 2000H Clear Display 0000 2000 0 90 MOVB AL 90 0000 2002 BA 82 00 MOVW DX 82 0000 2005 EE OUTB DX AL 0000 2006 BO 00 AL 00 Left entry encoded 0000 2008
19. 38 D381 OUT CMD PORT 803A 06 04 MVI B 04H 803C 210581 LXI H DISTBI2 Look up table to display 803F 7E MOV A M PVT 8040 D3 80 OUT 80H 8042 CD 73 80 CALL DELAY 8045 23 INX H 8046 05 DCR B 8047 78 MOV A B 8048 FE 00 CPI 00 804A C2 80 JNZ BACKI 804D CD 73 80 CALL DELAY 8050 CD 73 80 CALL DELAY SDD 8279 8279 5 STUDY CARD USER MANUAL 20 ADDRESS OPCODE LABLE MNEMONIC COMMENTS 8053 3E 90 MVI A 90H 8055 D3 81 OUT CMD PORT 8057 06 04 04 8059 210A 81 LXI H DISTBL3 Look up table to display 805C 7 2 5 LTD 8050 D3 80 OUT 80 805 73 80 CALL DELA Y 8062 23 INX H 8063 05 DCR B 8064 78 MOV A B 8065 FE 00 CPI 00 8067 C2 5C 80 JNZ 2 806A CD 73 80 CALL DELAY 806D CD 73 80 CALL DELAY 8070 C3 19 80 JMP BEGIN 8073 11 FF FF DELAY LXI D Delay Routine 8076 1B REP DCX D 8077 7A MOV A D 8078 B3 ORA E 8079 C2 76 80 JNZ REP 807C 9 8070 ORG 8100 8100 0497 D6 77 00 DISTBLI ESA 8105 00 37 E3 87 00 DISTBL2 PVT 810 00 83 87 5 00 DISTBL3 LTD 2 Program to Display ELECTRO SYSTEMS on Seven Segment Display using decode method CMD_PORT EQU 81H DATA_ PORT EQU 80H ADDRESS OPCODE LOOP MNEMONIC COMMENTS ORG 8000H 8000 06 08 MVI B 08H Routine to clear all the 7 Segment 8002 3E 00 MVI A 00H Display 8004 D3 81 OUT 81H 8006 3E 90 MVI A 90H
20. 8 8020 802 8032 8034 8035 8037 8039 803 803D 803E 803F 8041 8042 8044 8046 8048 8049 804B 804D 804F 8051 8053 8054 8056 8058 T9 90 74 FO 74 90 7A 79 7C 7B FO 74 FO 78 74 90 FO 18 E8 B4 90 54 60 90 74 89 54 D0 DO 74 FO 74 89 74 DO DO 81 F1 00 1 1 80 90 00 90 08 00 1 00 1 07 F8 F1 40 83 82 83 82 1 82 83 94 83 82 83 82 95 82 83 07 81 81 80 5 81 81 CMD PORT DATA PORT CLEAR BACK EQU F181H EQU ORG 8000 MOV SP 407 MOV DPTR F181 MOV A FF MOVX DPTR A MOV A 00 MOV DPTR F181 MOV R2 4F1 MOV 1 80 4 90 MOV R3 00 MOV 90 MOVX DPTR A MOV RO 08 MOV A 00 MOV DPTR F180 MOVX DPTR A DEC RO MOV A RO CJNE A 00 801C MOV DPTR F181 MOVX A DPTR ANL A 07 JZ 8027 MOV DPTR F181 MOV A 40 MOVX DPTR A PUSH 83 PUSH 82 MOV 83 R2 MOV 82 1 MOVX DPTR A MOVX A DPTR ANL A 1F MOV R5 A POP 82 POP 83 MOV A 94 MOVX DPTR A MOV A F3 PUSH 83 PUSH 82 MOV 83 R2 MOV 82 1 MOVX DPTR A MOV A 95 POP 82 POP 83 QO 8279 8279 5 STUDY CARD USER MANUAL Divide CLK FR EQ Initialize 8279 Clear Display Push DPH Push DPL Mov R2 to DPH
21. 8279 STUDY CARD 1 INTRODUCTION Electro Systems Associates Private Limited ESA manufactures trainers for most of the popular microprocessors viz 8085 Z 80 8031 8086 88 68000 and 80196 ESA offers a variety of modules which can be interfaced to these trainers These modules can be effectively used for teaching training in the Laboratories The 8279 Study Card incorporates Intel s 8279 The interface is designed to study the features available in 8279 Functional description of 8279 implementation of the circuit and some sample programs for different trainers are presented in this Manual 2 DESCRIPTION OF THE CIRCUIT The 8279 Study Card provides 6 nos of 8 Digit Seven Segment Display and 4 x 4 Matrix Hex Keypad The keypad includes shift and control keys for key scanning option User can find the design details about the keypad and display interface to 8279 in Appendix B Schematics The study card has got two 26 Pin J3 amp J4 connectors and a 50 Pin P1 connector for interfacing with different trainers The details about 8279 i e programming 8279 and pin details etc are presented in the next section Jumpers are provided on the study card for encode and decode modes of operation of 8279 For decode method Place the jumpers as follows 12 JP2 23 JP3 23 JP4 12 JP5 23 For encode method Place the jumpers as follows JP1 OPEN JP2 12 JP3 12 JP4 23 JP5 12 HOR 8279 8279 5 S
22. 8279 will automatically drive the data bus for each subsequent read A 0 in the same sequence in which data first entered the FIFO Allsubsequent reads will be from the FIFO until another command 15 issued In the sensor Matrix Mode the RAM address bits AAA select one of the 8 rows of the Sensor RAM If the Al flag 15 set AI 1 each successive read will be from the subsequent row of the sensor RAM Read Display RAM EN CPU sets 8279 for a read of the Display RAM first writing this command address bits AAAA select one of the 16 rows of the Display RAM If the AI flag is set A 1 this row address will be incremented after each following read or write to the Display RAM Since the same counter is used for both reading and writing this command sets the next read or write address and the sense of the Auto increment mode for both operations Write Display RAM br The CPU sets up the 8279 for a write to Display RAM by first writing this command After writing the command with A 1 all subsequent writes with Ao 0 will be to the Display RAM The addressing and Auto increment functions are identical to those for the Read Display RAM However this command does not affect the source of subsequent Data Reads the CPU will read from whichever RAM Display or FIFO Sensor which was last specified If indeed the Display RAM was last specified the Write Display RAM will nevertheless change th
23. BA BO 2043 2046 2048 2049 3000 3000 3005 300A 300F F3 D6 77 17 00 00 82 90 08 00 80 F8 82 07 F8 00 40 80 1 00 C8 F1 82 94 80 F3 82 95 80 04 CB 60 D7 C7 00 30 00 00 00 00 30 00 00 00 00 00 5 70 93 76 4 F7 E5 77 0080 LABEL CLI EAR BACK 66 76 97 C7 LOOP MNEMONICS ORG 2000H MOVW SI 3000 MOVB AL 00 MOVW DX 82 OUTB DX AL AL 90 OUTB DX AL MOVW CX 08 MOVB AL 00 MOVW DX 80 OUTB DX AL LOOP 200F MOVW DX 82 INB AL DX ANDB AL 07 JZ 2017 MOVW SI 3000 MOVB AL 40 UTB DX AL OVW 80 NB AL DX NDB AL 1F OVB AH 00 OVW CX AX DDW SI CX OVW DX 82 OVB AL 94 TB DX AL X 80 L F3 82 1 95 X AL X 80 ST UTB DX AL MP 2017 Zu Pa lt lt lt z m z ogrou t g gt lt lt Du Q lt lt gt gt gt H EO C4 ORG 3000H COMMENTS INITIALIZE 8279 CLEAR THE DISPLAY READ ADDRESS TO DISPLAY 0 DB OF3H 60H 0B5H 4 66H DB OD6H 0D7H 70H 0F7H 76H DB 77H 0C7H 93H 01 E5H 97H DB 17H 00H 76H 77 SDD 8279 8279 5 STUDY CARD USER MANUAL H 0C7H 26 0000 3014 93 5 97 17 00 DB 93 0 5 97 17 0 2 PROGRAM TO
24. BACK2 806A CD 73 80 CALL DELAY 806D CD 73 80 CALL DELAY 8070 C3 19 80 JMP BEGIN 8073 11 FF FF DELAY LXI D OFFFFH Delay Routine 8076 1B REP DCX D 8077 A D 8078 B3 ORA E 8079 2 76 80 JNZ 807 9 8070 ORG 8100 8100 04 97 D6 77 00 DISTBL1 ESA 8105 00 37 E3 87 00 DISTBL2 PVT 810A 00 83 87 5 00 DISTBL3 LTD 1 Program to Display ELECTRO SYSTEMS on Seven Segment Display using Encode method CMD_PORT EQU 81H DATA_ PORT EQU 80H ADDRESS OPCODE LOOP MNEMONIC COMMENTS ORG 8000H 8000 06 08 MVI B 08H Routine to clear all the 7 Segment 8002 3E 00 MVI A 00H Display 8004 D3 81 OUT 81H 8006 3E 90 MVI A 90H 8008 D3 81 OUT 81H 800A 3E 00 CLEAR A 00H 800C D3 80 OUT 80H 800E 05 DCR B 800F 78 MOV A B 8010 FE 00 CPI 00 8012 C2 0A 80 JNZ CLEAR 8015 3E 10 A 10H 8 8 bit character display SDD 8279 8279 5 STUDY CARD USER MANUAL 17 8017 D3 81 OUT Right entry 8019 3E 90 BEGIN MVI A 90H 801B D3 81 OUT CMD_PORT 801D 06 08 MVI B 08H 801F 21 0081 LXI H DISTBL Look up table to display 8022 7E BACK MOV A M ELECTRO 8023 D3 80 OUT 80H 8025 CD 4A 80 CALL DELAY Provide some delay 8028 23 INX H 8029 05 DCR B 802A 78 MOV A B 802B FE 00 CPI 00 802D C2 22 80 JNZ BACK 8030 3E 90 MVI 90 8032 D381 OUT CMD PORT 8034 06 08
25. CS low and A high The status logic also provides an IRQ signal when the FIFO is not empty In Scanned Sensor Matrix mode the memory is a Sensor RAM Each row of the Sensor RAM is loaded with the status of the corresponding row of sensor in the sensor matrix In this mode IRQ is high if a change in a sensor is detected HOR 8279 8279 5 STUDY CARD USER MANUAL 6 Display Address Registers Display The Display Address Registers hold the address of the word currently being displayed read write address is programmed by CPU command They also can be set to auto increment after each read or write The Display RAM can be directly read by the CPU after the correct mode and address is set The addresses for the A and B nibbles are automatically updated by the 8279 to match data entry by the CPU The A and B nibbles can be entered independently or as one word according to the mode that is set by the CPU Data entry to the display can be set to either left or right entry see Interface Considerations for details SOFTWARE OPERATION 8279 commands The following commands program the 8279 operating modes The commands are sent on the Data Bus with CS low and Aj high and are loaded to the 8279 on the rising edge of WR Keyboard Display Mode Set MSB LSB Code 00 K Where DD 15 Display Mode 15 keyboard Mode DD O O 8 8 bit character display Left entry 00 16 8 bit character display Left entry
26. DISPLAY ESA IN DISPLAY FIELD USING DECODE METHOD EXECUTE PROGRAM FROM 2000H 0000 2000 ORG 2000 Clear Display 0000 2000 BO 90 MOVB AL 90 0000 2002 BA 82 00 MOVW DX 82 0000 2005 EE OUTB DX AL 0000 2006 BO 00 MOVB AL 00 Left entry decoded 0000 2008 EE OUTB DX AL Scan keyboard 0000 2009 9 08 00 MOVW 08 0000 200C BO 00 RPT AL 00 0000 200E BA 80 00 MOVW 80 0000 2011 EE OUTB DX AL 0000 2012 F2 F8 LOOP 200C 0000 2014 9 06 00 MOVW CX 06 0000 2017 8 00 00 LOOP1 MOVW 00 0000 201A 00 21 MOVW 51 2100 Display ESA 0000 201D 8A 04 MOVB AL ST 0000 2015 OUTB DX AL 0000 2020 46 INCW SI 0000 2021 2 F4 LOOP 2017 0000 2023 3 0000 2100 ORG 2100 0000 2100 04 97 06 77 DB 04H 97H D6H 77H 0000 2106 04 04 00 DB 04H 04H 00H 3 PROGRAM TO DISPLAY ESA IN DISPLAY FIELD USING ENCODE METHOD 0000 2000 ORG 2000 Clear Display 0000 2000 BO 90 MOVB AL 90 0000 2002 BA 82 00 MOVW DX 82 0000 2005 EE OUTB DX AL 0000 2006 0 00 MOVB AL 00 Left entry encoded 0000 2008 EE OUTB DX AL Scan keyboard 0000 2009 B9 08 00 MOVW CX 08 0000 200 80 00 RPT MOVB AL 00 0000 200E BA 80 00 MOVW DX 80 0000 2011 OUTB DX AL 0000 2012 E2 F8 200C 0000 2014 B9 06 00 MOVW CX 06 0000 2017 8 00 00 LOOP1 MOVW AX 00 0000 2
27. EE OUTB DX AL Scan keyboard 0000 2009 B9 08 00 MOVW CX 08 0000 200C BO 00 RPT MOVB AL 00 0000 200E BA 80 00 MOVW DX 80 0000 2011 EE OUTB DX AL 0000 2012 E2 F8 LOOP 200C 0000 2014 B9 08 00 MOVW CX 08 0000 2017 B8 00 00 MOVW AX 00 0000 201A BE 00 21 MOVW SI 2100 Display ESA 0000 201D 8A 04 LOOP MOVB AL ST 0000 2015 OUTB DX AL 0000 2020 46 INCW SI 0000 2021 2 2010 0000 2023 3 0000 2100 ORG 2100 0000 2100 04 97 06 77 DB 04H 97H D6H 77H HOR 8279 8279 5 STUDY CARD USER MANUAL 25 0000 2106 04 04 00 DB 04H 04H 00H SB EXAMPLE PROGRAMS FOR ESA 86 88 3 TRAINER 1 PROGRAM TO DISPLAY THE VALUE OF THE KEY PRESSED IN THE DISPLAY FIELD USING ENCODE METHOD ADDRESS 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 2000 2000 2003 2005 2008 2009 200 200 200 2011 2014 2015 2017 201 2018 2010 201 2022 2024 COMMAND PORT 0082H DATA PORT OPCODE 0 UJ FA B9 BO BA E2 BA EC 24 74 2025 2028 2029 202 202D 202 2031 2034 2036 2027 20 203 2030 2040 2042 24 B4 8B 03
28. FIFO Status For Key 801A EO SCN A DPTR Entry 801B 54 07 ANL A 407H 801D 60 FB JZ SCN 801F EA MOV A R2 FIFO Ram Address 8020 FO MOVX DPTR A 8021 15 82 DEC DPL 8023 MOVX A DPTR 8024 54 1F A 1FH 8026 F9 MOV R1 A 8027 74 94 MOV A 94H 8029 INC DPTR 802A FO MOVX DPTR A 802B 74 F3 MOV A 0F3H 802D 15 82 DEC DPL 802F FO MOVX DPTR A SDD 8279 8279 5 STUDY CARD USER MANUAL 34 8030 8032 8033 8034 8037 8039 80 803 803 803 8040 8041 8042 8045 9000 9005 900 900 9011 9016 74 FO 75 89 4 93 90 4 02 D6 77 93 76 17 95 83 82 F1 38 80 60 D7 7 5 C7 00 90 80 DS 15 B5 70 97 93 FA 157 5 66 76 00 97 CJN D MOV DPL R1 A SET MOV A 95H DPTR MOVX DPTR A PH 90H MOVC A A DPTR MOV DPTR 0F180H MOVX DPTR A DPTR R2 MOV A R2 A 38H SCN ORG DB DB DB DB DB DB 9000H OF3H 60H B5H F4H 66H OD6H 0D7H 70H OF 7H 76H 77H OC7H 93H 97H 17H 00H 76H 0C7H 93H OE5H 97H 17 00 SDD 8279 8279 5 STUDY CARD USER MANUAL 35
29. ISPLAY FEILD OF THE STUDY CARD ENCODE METHOD EXECUTE PROGRAM FROM 8000H PLACE JUMPER JP1 IN USING TRAINER 8000 8000 90 8003 74 8005 8006 7A 8008 7B 800A 90 800D 74 800F FO 8010 74 8012 FO 8013 78 8015 74 8017 90 801A FO 801B 18 801C B8 801 79 8021 90 8024 4 8025 93 8026 90 8029 FO 802 09 802 90 F1 90 00 1 90 00 08 00 1 00 00 90 F1 90 81 81 80 F6 00 80 00 CMD DATA START PORT PORT 1 EQU F181H EQU F180H ORG 8000H MOV DPTR F181 MOV A FF MOVX DPTR A MOV R2 90 MOV R3 00 MOV DPTR F181 MOV A 90 MOVX DPTR A MOV A 00 MOVX DPTR A MOV RO 08 MOV A 00 MOV DPTR F180 MOVX DPTR A DEC RO RO 0 8015 MOV R1 00 MOV DPTR 9000 Q Ci GI MOVC A A DPTR MOV DPTR F180 MOVX DPTR A INC 1 MOV DPTR 9000 QO 8279 8279 5 STUDY CARD USER MANUAL Divide CLK FREQ Initialize 8279 Left entry Encoded Scan keyboard Reading Table 31 802 802 8032 9000 9000 9003 9006 2 PROGRAM DISPLAY 9 80 04 3 1 00 06 FE 97 04 D6 04 TABLE USING DECODE METHOD 8000 8000 8003 8005 8006 8008 800A 800D 800F 8010 8012 8013 8015 8017 801A 801B 801C 801F 8021 8024 8025 8026 8029 802A 802 90 74 F0 7 7 90 74 F0 74
30. MVI B 08H 8036 21 0881 LXI H DISTBL 8 Look up table to display SYSTEMS 8039 7E MOV A M 803A D3 80 OUT 80H Delay Routine 803C CD 4A 80 CALL DELAY 803F 23 INX H 8040 05 DCR B 8041 78 MOV A B 8042 FE 00 CPI 00 8044 C2 39 80 JNZ BACKI 8047 C3 19 80 JMP BEGIN 804A 11 FF LXI D 804D 1B DELAY DCX D 804E MOV A D 804F B3 ORAE 8050 C2 4D 80 JNZ REP 8053 C9 RET 8054 ADDRESS OPCODE LABLE MNEMONIC COMMENTS ORG 8100 8100 97 83 97 93 87 DISTBL ELECTRO 8105 13 F3 04 SYSTEMS 8108 D6 E6 D6 87 97 810D 73 DE 00 SDD 8279 8279 5 STUDY CARD USER MANUAL 18 2 Program to scan to display Seven Segment Display using encode method CMD_PORT EQU 81H DATA_ PORT EQU 80H ADDRESS OPCODE LABLE MNEMONIC COMMENTS 8000 3E 00 MVI A 00H 8002 D3 81 OUT 81H 8004 3E 90 MVI A 90H 8006 D3 81 OUT 81H 8008 OE 08 MVI C 08H 800A 3E 00 CLEAR MVI A 00H To clear all the digits 800C D3 80 OUT 80H 800E 0 DCR 800 79 MOV 8010 00 00 8012 2 80 JNZ CLEAR 8015 DB 81 BACK IN 81 Read 8279 status 8017 E6 07 ANI 07H is character available 8019 CA 15 80 JZ BACK 801C 210081 LXI H DISTBL 801F 3E 40 MVI A 40H Read FIFO 8021 D3 81 OUT 81H 8023 DB 80 IN 80 8025 E6 1F ANI Mask shift and control keys 8027 6F MOV L A 8028 3E 94 MVI 94H Address to di
31. S and WR low is always written to the Display RAM The address is specified by the latest Read Display or Write Display command Auto Incrementing on the rising edge of WR occurs if A set by the latest display command INTERFACE CONSIDERATIONS Scanned Keyboard Mode 2 key Lockout There are three possible combinations of conditions that can occur during debounce scanning When a key is depressed the debounce logic is set Other depressed keys are looked for during the next two scans If none are encountered it is a single key depression and the key position is entered into the FIFO along with the status of CNTL and SHIFT lines If the FIFO was empty IRQ will be set to signal the CPU that there is an entry in the FIFO If the FIFO was full the key will not be entered and the error flag will be set If another closed switch is encountered no entry to the FIFO can occur If all other keys are released before this one then it will be entered to the FIFO If this key is released before any other it will be entirely ignored A key is entered to the FIFO only once per depression no matter how many keys were pressed along with it or in what order they were released If two keys are depressed within the debounce cycle it is a simultaneous depression Neither key will be recognized until one key remains depressed alone The last key will be treated as a single key depression Scanned Keyboard Mode N Key Rollover With N key Rollover each key depres
32. TUDY CARD USER MANUAL 1 8279 8279 5 PROGRAMMABLE KEYBOARD DISPLAY INTERFACE THEORY MCS 85 Compatible 8279 5 Simultaneous Keyboard Display Operations Scanned Keyboard Mode Scanned Sensor Mode Strobed Input Entry Mode 8 Character Keyboard FIFO 2 Key Lockout or N Key Rollover with Contact Debounce Dual 8 or 16 Numerical Display Single 16 Character Display Right or Left Entry 16 Byte Display RAM Mode Programmable from CPU Programmable Scan Timing Interrupt Output on Key Entry The Intel 8279 is a general purpose programmable keyboard and display I O interface device designed for use with Intel microprocessors The keyboard portion can provide a scanned interface to a 64 contact key matrix The keyboard portion will also interface to an array of sensors or a strobed interface keyboard such as the hall effect and ferrite variety Key depressions can be 2 key lockout or N key rollover Keyboard entries are debounced and strobed in an 8 character FIFO If more than 8 characters are entered overrun Status is set Key entries set the interrupt output line to the CPU The display portion provides a scanned display interface for LED incandescent and other popular display technologies Both numeric and alphanumeric segment displays may be used as well as simple indicators The 8279 have 16x8 display RAM which can be organized into dual 16x4 The RAM can be loaded or interrogated by the CPU Both right entry calculator and left entry
33. VW DX OEFC2 Read 8279 status 0000 201D EC KEY INB AL DX to chock if any 0000 201E 24 07 ANDB 07 character is 0000 2020 74 FB JZ available 0000 2022 BO 40 MOVB 40 0000 2024 FE OUTB DX AL 0000 2025 BA CO FF MOVW DX FIFO RAM 0000 2028 EC INB AL DX SIFT and 0000 2029 24 AL 1F CTRL keys 0000 2028 8 08 BL AL Point to key 0000 202D 03 F3 ADDW SI BX value 0000 202F BA C2 FF MOVW DX OFFC2 Address to HOR 8279 8279 5 STUDY CARD USER MANUAL 30 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 6 0 DEMONSTRATION PROGRAMS 8051 SERIES KITS 2032 2034 2035 2038 203A 203B 203 2040 2041 2044 2046 2047 2050 2054 2058 205 66 93 94 C2 95 04 CD 60 D6 76 5 5 7 77 97 FA 70 C7 17 MOVB 1 94 display 0 OUTB DX AL MOVW DX OFFCO MOVB OUTB DX AL MOVW DX OFFC2 Address to MOVB AL 95 display scanned OUTB DX AL value MOVW DX OFFCO AL SI OUTB DX AL JMP BCK ORG 2050 Scan key values DB 0F3 60 0B5 0F4 look up table DB 66 0D6 0D7 70 DB 0F7 76 77 0C7 DB 93 0E5 97 17 6A EXAMPLE PROGRAMES FOR ESA 31 51 TRAINER 1 PROGRAM TO DISPLAY ESA IN THE D
34. de is set to an 8 character display the on duty cycle is double what it would be for a 16 character display e g 5 1 ms scan time for 8 characters vs 10 3 ms for 16 characters with 100 kHz internal frequency G FIFO Status FIFO status is used in the Keyboard and Strobed input modes to indicate the number of characters in the FIFO and to indicate whether an error has occurred There are two types of errors possible overrun and under run Overrun occurs when the entry of another character into a full FIFO is attempted Under run occurs when the CPU tries to read an empty FIFO The FIFO status word also has a bit to indicate that the Display RAM was unavailable because a Clear Display or Clear All command had not completed its clearing operation a Sensor Matrix mode bit is set in the FIFO status word to indicate that at least one sensor closure indication is contained in the Sensor RAM In Special Error Mode the S E bit is showing the error flag and serves as an indication to whether a simultaneous multiple closure error has occurred FIFO FULL DU SEJO U F N IN N Y Number of character FIFO STATUS WORD In FIFO rror under run Display Unavailabl Error overrun Sensor closure Error flag fo Multiple Closures 14 SDD 8279 8279 5 STUDY CARD USER MANUAL 3 0 INSTALLATION AND CONFIGURATION The Connector details for connecting the Study Card to different Trainers are mentioned be
35. e next Read location HOR 8279 8279 5 STUDY CARD USER MANUAL 8 Display Write Inhibit Blanking A B A B co OPE BP Tye The IW bits can be used to mask nibble A and nibble B in applications requiring separate 4 bit display ports By setting the IW flag W 1 for one of the ports the port becomes marked so that entries to Display RAM from the CPU do not affect that port Thus if each nibble is input to a BCD decoder the CPU may write a digit to the Display RAM without affecting the other digit being displayed It is important to note that bit Bo corresponds to bit D on the CPU bus and that bit corresponds to bit If the user wishes to blank the display the BL flags are available for each nibble The last Clear command Issued determines the code to be used as a blank This code defaults to all zeros after a reset Note that both BL flags must be set to blank a display formatted with a single 8 bit port Clear Dfe ETS bits are available in this command to clear all rows of the Display RAM to a selectable blanking code as follows Cp Cp 0 X Zeros X Don t Care 1 O AB Hex 20 0010 0000 1 1 All Ones Enable clear display when 1 or by C4 1 During the time the Display RAM is being cleared 160 us it may not be written to The most significant bit of the FIFO status word is set during this time When the display RAM becomes available again it automatically resets If the Cy
36. hen there is data in the FIFO Sensor RAM The interrupt line goes low with each FIFO Sensor RAM read and returns high if there is still information in the RAM In a sensor mode the interrupt line goes high whenever a change in a sensor is detected Ground and power supply pins SLo SL Scan Lines Scan lines which are used to scan the key switch or sensor matrix and the display digits These lines can be either encoded 1 of 16 or decoded 1 of 4 RLo RL Return Line Return line inputs which are connected to the scan lines through the keys or sensor switches They have active internal pull ups to keep them high until a switch closure pulls one low They also serve as an 8 bit input In the Strobed Input mode SHIFT Shift The shift input status is strobed along with the key position on key closure in the Scanned keyboard modes It has an active Internal pull up to keep it high until a switch closure pulls it low CNTL STB 37 Control Strobed Input Mode For keyboard modes this line is used as a control input and stored like status on a key closure The line is also the strobe line that enters the data into the FIFO in the Strobed Input mode OUT OUT 27 26 25 24 31 30 29 28 Outputs These two ports are the outputs for the 16 x 4 display refresh registers The data from these outputs is synchronized to the scan lines SLo SL3 for multiplexed digit displays
37. idated closure To make the software easier the designer should functionally group the sensors by row since this is the format in which the CPU will read them since this is the format in which the CPU will read them The IRQ line goes high if any sensor value change is detected at the end of a sensor matrix scan The IRQ line is cleared by the first data read operation if the Auto Increment flag is set to zero or by the End interrupt command if the Auto increment flag is set to one Note Multiple changes in the matrix addressed by SLo 3 0 may cause multiple interrupts 50 0 in the Decoded Mode Reset may cause the 8279 to see multiple changes Data Format In the Scanned Keyboard mode the character entered into the FIFO corresponds to the position of the switch in the keyboard plus the status of the CNTL and SHIFT lines non inverted CNTL is the MSB of the character and SHIFT is the next most significant bit The next three bits are from the scan counter and indicate the row the key was found in The last three bits are from the column counter and indicate to which return line the key was connected MSB LSB CNTL SHIFT SCAN RETURN SCANNED KEYBOARD DATA FORMAT In Sensor Matrix mode the data on the return lines is entered directly in the row of the Sensor RAM that corresponds to the row in matrix being scanned Therefore each switch position maps directly to Sensor RAM position The SHIFT and CNTL inputs are ignored in this mode
38. low TRAINER CONNECTORS CONNECTORS ON CONNECTORS ON ON TRAINER STUDY CARD ADAPTER STUDY CARD J3 26 PIN 1 13 26 MPS 85 3 J4 26 PIN JA 26 PIN ESA 85 2 1 50 PIN 50 50 50 PIN J3 26 PIN J3 26 PIN ESA 86 88 2 3 J2 50 PIN J2 50 PIN J4 26 PIN J4 26 PIN J6 26 PIN J3 26 PIN ESA 86E J7 26 PIN J4 26 PIN J1 50 PIN J3 26 PIN J3 26 PIN ESA 31 51 J5 50 PIN 14 26 PIN JA 26 PIN P3 50 PIN P1 26 PIN J3 26 PIN ESASIE VER 3 JA 50 PIN P2 26 PIN 14 26 PIN 14 26 PIN J3 26 PIN ESA 51E VERA J6 26 PIN JA 26 PIN External Study Card Adapter is required to connect the Study Card with the Trainer Connect the Study Card by following the above mentioned connectors with FRCs respectively Switch Off Power to the Trainer while connecting the Study Card Press Reset after giving power to the Trainer HOR 8279 8279 5 STUDY CARD USER MANUAL 15 4 DEMONSTRATION PROGRAMS FOR 8085 SERIES KITS 4A DEMONSTRATION PROGRAMS FOR 85 3 TRAINER KIT The following program initializes 8279 in decode mode to display the message ESA PVT LTD on Seven Segment Display CMD_PORT EQU 81 EQU 80H ADDRESS OPCODE LOOP MNEMONIC COMMENTS ORG 8000H 8000 06 08 MVI B 08H Routine to clear all the 7 Segment 8002 3E 00 A 00H Display 8004 D3 81 OUT 81H 80
39. sion is treated independently from all others When a key is depressed the debounce circuit waits 2 keyboard scans and then checks to see if the key is still down If it is the key is entered into the FIFO If a simultaneous depression occurs the keys are recognized and entered according to the order the keyboard scan found them Scanned Keyboard Special Error Modes For N key rollover mode the user can program a special error mode This is done by the End Interrupt Error Mode Set command The debounce cycle and key validity check are as in normal N key mode If during a single debounce cycle two keys are found depressed this is considered a simultaneous multiple depression and sets an error flag This flag will prevent any further writing in to the FIFO and will set interrupt if not yet set The error flag could be read in this mode by reading the FIFO STATUS word See FIFO STATUS for further details The error flag is reset by sending the normal CLEAR command with 1 HOR 8279 8279 5 STUDY CARD USER MANUAL 10 Sensor Matrix Mode In Sensor Matrix mode the debounce logic is inhibited The status of the sensor switch is inputted directly to the Sensor RAM In this way the Sensor RAM keeps an image of the state of the switches in the sensor matrix Although debouncing is not provided this mode has the advantage that the CPU knows how long the sensor was closed and when it was realized A keyboard mode can only indicate a val
40. splay 0 802A D3 81 OUT 81H 802C 3E F3 A Address to display scanned 802E D3 80 OUT 80H value 8030 3E 95 MVI A 95H 8032 D3 81 OUT 81H 8034 7E MOV 8035 D3 80 OUT 80H 8037 C3 15 80 JMP BACK 8100 F3 60 B5 F4 66 DISTBL 012 3 8105 D6 D7 70 F7 4567 8109 76 77 C7 93 ES 89AB 810E 97 17 00 CDEF 8111 76 T C7 93 5 8116 97170 SDD 8279 8279 5 STUDY CARD USER MANUAL 19 4B DEMONSTRATION PROGRAMS ESA 85 2 TRAINER KIT 1 Program to Display ESA PVT LTD On Seven Segment Display using encode method CMD_PORT EQU 81H DATA_ PORT EQU 80H ADDRESS OPCODE LOOP MNEMONIC COMMENTS ORG 8000H 8000 06 08 MVI B 08H Routine to clear all the 7 Segment 8002 3E 00 MVI A 00H Display 8004 D3 81 OUT 81H 8006 3E 90 MVI A 90H 8008 D3 81 OUT 81H 800A 3E 00 CLEAR MVI A 00H 800C D3 80 OUT 80H 800E 05 DCR B 800F 78 MOV A B 8010 FE 00 CPI 00H 8012 C2 0A 80 JNZ CLEAR 8015 3E 01 MVI A 01H 8 8 bit character display 8017 D381 OUT CMD PORT Left entry Encoded scan keyboard 8019 3E 90 BEGIN A 90H 801B D3 81 OUT CMD PORT 801D 06 04 MVI B 04H 801F 21 0081 LXI H DISTBLI Look up table to display 8022 7E BACK MOV A M SESA 8023 D3 80 OUT 80H 8025 CD 73 80 CALL DELAY Provide some delay 8028 23 INX H 8029 05 DCR B 802A 78 MOV A B 802B FE 00 CPI 00 802D C2 22 80 JNZ BACK 8030 CD 73 80 CALL DELAY 8033 CD 73 80 CALL DELAY 8036 3E 90 90 80
41. ter decodes the least significant 2 bits and provides a decoded 1 of 4 scan Note then when the keyboard is in decoded scan so is the display This means that only the first 4 characters in the Display RAM are displayed In the encoded mode the scan lines are active high outputs In the decoded mode the scan lines are active low outputs Returns Buffers and Keyboard Debounce and Control The 8 return lines are buffered and latched by the Return Buffers In the keyboard mode these lines are scanned looking for key closures in that row If the debounce circuit detects a closed switch it waits about 10ms to check if the switch remains closed If it does the address of the switch in the matrix plus the status of SHIFT and CONTROL are transferred to the FIFO In the scanned Sensor Matrix modes the contents of the return lines are directly transferred to the corresponding row of the Sensor RAM FIFO each key scan time In Strobed input mode the contents of the return lines are transferred to the FIFO on the rising edge of the CNTL STB line pulse FIFO Sensor RAM and Status This block is a dual function 8 x 8 RAM In keyboard or Strobed input modes it is a FIFO Each new entry is written into successive RAM positions and each is then read in order of entry FIFO status keeps track of the number of characters in the FIFO and whether it is full or empty Too many reads or writes will be recognized as an error The status can be read by an RD with
42. typewriter display formats are possible Both read and write of the display RAM can be done with auto increment of the display RAM address IRQ RL07 DATA RD CNT STB CPU WR INTERFAC SLos SCAN CS OUT Ao HOR 8279 8279 5 STUDY CARD USER MANUAL 2 HARDWARE DESCRIPTION The 8279 is packaged a 40 pin DIP The following the functional description of each pin Pin Descriptions Symbol Pin No Name and Function DB DB 12 to 19 Bi directional data bus All data and commands between the CPU and the 8279 are transmitted on these lines CLK 3 Clock Clock from system used to generate internal timing RESET Reset A high signal on this pin resets the 8279 After being reset the 8279 is placed in the following mode 1 16 8 bit character display left entry 2 Encoded scan keyboard 2 key lockout Along with this the program clock prescaler is set to 31 CS 22 Chip Select A low on this pin enables the interface functions to receive or transmit Ao 21 Buffer Address A high on this line indicates the signals in or out are interpreted as a command or status A low indicates that they are data RD WR 10 11 Input Output Read and Write These signals Enable the data buffers to either send data to the external bus or receive it from the external bus IRQ Interrupt Request In a keyboard mode the interrupt line is high w
43. y 0000 2023 B9 04 00 MOVW CX 04 ESA 0000 2026 8A 04 AL ST 0000 2028 BA CO FF MOVW DX OFFCO 0000 202B EE OUTB DxX AL 0000 202C 46 INCW SI 0000 2020 E2 LOOP 0000 2026 E8 27 00 CALL DLY Provide some delay 0000 2032 BE 04 21 MOVW SI 2104 Routine to display 0000 2035 B9 04 00 MOVW CX 04 pvr 0000 2038 8A 04 BCL MOVB AL ST 0000 203A BA CO FF MOVW DX OFFCO 0000 203D EE OUTB DxX AL 0000 203E 46 INCW SI 0000 203F E2 F7 LOOP 0000 2041 E8 15 00 CALL DLY Provide some delay 0000 2044 BE 08 21 MOVW SI 2108 Routine to display 0000 2047 9 04 00 MOVW CX 04 Lt BED 0000 204A 8 04 BC2 MOVB AL ST 0000 204C BA CO FF MOVW DX OFFCO 0000 2048 OUTB DX AL 0000 2050 46 INCW SI SDD 8279 8279 5 STUDY CARD USER MANUAL 28 0000 2051 2 F7 LOOP 0000 2053 8 03 00 CALL DLY Provide some delay 0000 2056 E9 C7 FF JMP BCK Repeat continuously 0000 2059 51 DLY PUSH CX Delay routine 0000 205A B9 00 00 MOVW CX 0000 0000 205D E2 FE LOOP 205D 0000 205F E2 FE LOOP 205F 0000 2061 59 POP CX 0000 2062 C3 RET ORG 2100 Display loop up 0000 2100 04 97 DB 04 97 table 0000 2102 D6 77 DB 006 77 0000 2104 00 37 DB 00 37 0000 2106 87 DB 0 3 87 0000 2108 000 83 DB 00 83 0000 210A 87 5 DB

Download Pdf Manuals

image

Related Search

Related Contents

Samsung NX3000 (20-50 mm, Flash) User Manual  User Manual - Chassis Plans  Invacare 90-2 Mobility Aid User Manual    User`s Manual - SeaBotix® Inc.  Clarke 03003A Use and Care Manual  

Copyright © All rights reserved.
Failed to retrieve file