Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Vinytics
DISPLAY CLEAR COMMAND ............................................................ 46 DISPLAY/CURSOR HOME................................................................. 46 ENTRY MODE SET ............................................................................ 46 DISPLAY ON/OFF .............................................................................. 47 DISPLAY/CURSOR SHIFT ................................................................. 47 FUNCTION SET .................................................................................. 47 C.G. RAM ADDRESS SET ................................................................. 47 D.D. RAM ADDRESS SET ................................................................. 47 READ BUSY FLAG/ADDRESS COUNTER......................................... 48 SEND DATA INTO C.G. RAM/D.D. RAM ............................................ 48 READ DATA OUT OF C.G. RAM/D.D. RAM ....................................... 48 SUB-PROGRAM ...................................................................................... 49 OPERATION DESCRIPTION OF SUB-PROGRAM ............................. 49 Practical Examples of Subprogram: .................................................... 55 DESCRIPTION OF USING PROGRAM OPERATION .............................. 59 SERIAL INTERFACE ............................................................................... 63 MASM MACRO-ASSEMBLER USES WITH VMC-8609 (Optional) ............... 64 Serial Port Porgramming Examples .................................................... 65 SAMPLE PROGRAMS ............................................................................ 66 8259 Interrupt Controller ....................................................................... 79 BEEP .................................................................................................... 80 PROCEDURE OF HYPER TERMINAL ..................................................... 81
Vinytics
Vinytics
Vinytics
PERIPHERALS PVT. LTD. WB-10, Shakarpur, Delhi-110 092. Phone : 91-11-2462826 Fax : 91-11-2215127 E-mail : vinytics@vsnl.com Website : www.vinytics.com
INTRODUCTION ......................................................................................... 1 OPERATING COMMANDS ......................................................................... 3 COMMAND DESCRIPTION ........................................................................ 4 A - Assemble........................................................................................ 4 D - Display or modify the RAM's Hexadecimal ...................................... 9 F - Fill data into the RAM.................................................................... 11 G - Proceed to the address for execution ............................................ 12 I - Interrupt .......................................................................................... 13 Modify/Display Register................................................................ 15 M - Moving Data ........................................................................... 16 P - Print .............................................................................................. 16 T - Trace Program (an N-step designed command) ............................. 19 U - Unassemble .................................................................................. 22 ADDRESS DIVISION ................................................................................ 28 MEMORY SECTION ........................................................................... 28 I/O ADDRESS .................................................................................... 29 RAM MEMORY .................................................................................. 30 SYSTEM DATA OF RAM ................................................................... 30 BIT ............................................................................................. .......30 CONTENTS OF ROM ......................................................................... 31 PRACTICAL USE OF SUBPROGRAM (ROM'S CONTENT) ................ 31 CODES TABLE ......................................................................................... 33 Character Code : (F000:FF60-FF83) ................................................... 33 Symbols Code : (F000:FF90-FFBF) .................................................... 33 Functional key : (F000:FFBC-FF9B) ................................................... 34 Checking section of interrupt vector position ....................................... 34 DISPLAY .................................................................................................. 35 BUSY FLAG (B.F.) ............................................................................. 37 ADDRESS COUNTER (A.C.) .............................................................. 37 DISPLAY DATA RAM (D.D. RAM) ...................................................... 38 CHARACTER GENERATOR ROM (C.G. ROM) .................................. 38 CHARACTER GENERATOR RAM (C.G.RAM) .................................... 38 TIMING GENERATOR ........................................................................ 38 FUNCTIONS OF RESET ........................................................................... 42 USING THE INTERNAL RESET CIRCUIT TO START .......................... 42 INITIALIZATION BY INSTRUCTIONS ................................................... 45 INSTRUCTION DESCRIPTION ............................................................ 46
i
Vinytics
Vinytics
COMMAND DESCRIPTION
A - ASSEMBLE
This command is used to convert the input Assemble Language to the Machine Language in the memory. Once under this command, first set the address which is similar to the command D followed by an Enter or an Arrow Down key to go to a new step. However, only a maximum of 35 words are allowed for input. The following are some useful keys used to move the cursor around: (Backspace)......Move one space to the left.
SYSTEM INTRODUCTION
GENERAL DESCRIPTION
VMC-8609 is a single board MICROPROCESSOR TRAINING/DEVELOPMENT KIT configured around the INTELs 16 bit Microprocessor 8086. This kit can be used to train engineers, to control any industrial process and to develop software for 8086 systems. The kit has been designed to operate in the Max. or Min. mode. Coprocessor 8087 and I/O Processor 8089 can be added (VMC-8609). The 8086 CPU can also be replaced by 8088 CPU. The Kit communicates with the outside world through a IBM PC compatible keyboard and LCD display. VMC-8609 is packed up with powerful monitor in 32K Bytes of factory programmed EPROMS and 32K Bytes of RAM for user. These memory can be expandable upto 256K Bytes each. The system has 72 programmable I/ O lines. The serial I/O Communication is made possible through 8251. For control applications, three 16 bit Timer/Counters are available through 8253. For real time applications, the 8 level of interrupt are provided through 8259. VMC-8609 provides onboard battery back up for RAM. This saves the users program in case of power failure. The onboard resident system monitor software is very powerful. It provides various software commands like BLOCK MOVE, INSERT, DELETE, FILL etc. Which are helpful in debugging/developing software. An onboard Assembler/Disassembler is also provided on VMC-8609AD. This kit also supports MASM. VMC-8609 also has onboard buzzer for self testing of hardware and software. This kit is provided with a Centronix Printer port to take out the prints of the program written in the RAM of kit. A Real Time Clock is also provided onbard for real time apllications (Optional).
... Delete the character at the cursor in Assemble mode. ... Erase the content in Assemble mode.
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I .M . P . T . U .
Simply Press the key A. After the command, an A will appear on the screen:
VMC - 8 6 0 9 . . 7 F F F A
Assemble language can be input at this time. Only contains the Effective address but the Segment base in included A 400. Input includes the segment base and the Effective address A 0000:400. Totally depends on the built in Segment base and Effective address A.
Vinytics
Vinytics
COMMAND DESCRIPTION
The operation of this device is similarly with the operation of IBM PCs DEBUG system. For convenience, the operation instructions will be displayed when the device is being Switched on or RESET. This device also has memory ability to preserve data for future use. There is a memory indicator on the display once the data being kept after Reset. The system program starts from 0000:0000 after reset, in order to check the length of the RAM, there is a byte to be inverted and returned to the original for every 4K in length, the verifying procedure will be repeated until none of the byte can be inverted. During this period, avoid using the RESET to prevent the data from unable to return to the original setting. The RAM address is to be displayed by 4 positions and up to FFFFH, however, 5 positions will be used if it exceeds FFFFH.
Note : KEY 1 (Reset Switch) is to be presses to initialize for ASCII Keyboard, then it will accept following operating commands.
OPERATING COMMANDS:
After power ON the system, it will display as follows:
VMC - 8 6 0 9 E N T E R RE T U R N K E Y . . .
After pressing Enter, the operating commands will be displayed:
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I .M . P . T . U .
ASSEMBLE DUMP FILL GO INTERRUPT UNASSEMBLE TRACE PRINT MOVE
Vinytics
Vinytics
If one of the above is used, 0400 will appear on the screen and ready for input data. A and U are the same commands, an ARROW UP sign can be used to check the earlier procedure. F6 is used to delete the input and proceed to U-Unassemble. F7 is used to proceed to another command.
0400
OVM B L , C 0
As user press the Enter key, then above instruction will not be converted into machine language. And the cursor will point left side of the instruction as follows:
Example
Clear second line, display DX value, and DX values are altered by key-in to be displayed at LCD. 0:0400 0:0402 0:0407 0:040A 0:040F 0:0411 0:0413 MOV CALL MOV BL,C0 F000:F078 BX,00C2 CALL F000:F068 CMP AL,0D 040A
0400
OVM B L , C 0
Cursor position.
And user want to write whole instruction again, then by using the SHIFT + F6 keys, the content at the location 400 will be erased as follows:
JNZ HLT
0400
Now enter the instruction again.
Before entering the above program connect the system to the power supply properly. Then the following menu will be displayed on LCD screen, if not, switch off the power supply and re-check.
0400
MOV B L , C 0
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
The following steps are to be taken: 1) Press the key
A
Press Enter key, then this input assemble language will be converted into machine language in the memory and jump to the next memory location.
0402
Now write the next instruction as follows:
VMC - 8 6 0 9 . . 7 F F F A
2) Now the user enter the segment address and effective address simultaneously as follows:
0400
C AL L F 0 0 0 : F 0 7 8
Vinytics
Vinytics
0400
From now onwards user can enter the program in assembly language. First pick the first instruction.
Press Enter key, then this input assemble language will be converted into machine language in the memory and jump to the next memory location. 2) Or user has entered the wrong instruction as follows:
0400
MV B L , C 0
0400
MOV B L , C 0
While entering this instruction, the following mistakes may happen: 1) If user has entered the wrong instruction as follows:
As user press the Enter key, then above instruction will not be converted into machine language. And the cursor will point left side of the instruction as follows:
0400
MV B L , C 0
Cursor position.
0400
MOVC B L , C 0
As user press the Enter key, then above instruction will not be converted into machine language. And the cursor will point left side of the instruction as follows:
Now by using the Backspace key, user can move the cursor right side and indicate at the below of V.
0400
MV B L , C 0
Cursor position.
0400
MOVC B L , C 0
By using Cursor position.
F5
Now by using the Backspace key, user can move the cursor left side and indicate at the below of C.
0400
M_ V BL , C 0
Cursor position.
0400
MOVC
BL , C 0
Cursor position
0400
MOV B L , C 0
SHIFT + F5
keys. Press Enter key, then this input assemble language will be converted into machine language in the memory and jump to the next memory location.
0400
MOV B L , C 0
Vinytics
Vinytics
The ending position has to be bigger than or equal to the starting position, otherwise the smaller user will become the ending position and the bigger user is the starting position.
In this way, user can enter the whole program, by pressing Enter key.
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
Once the GO command has been executed, it will completely leave the system and proceed to the users design.
Flowchart of G-Command
Now by using GO command, the machine language statements can be executed and the value of DX will be displayed in the second line of the LCD. NOTE : When A and U are being used, the operation used: 0000:1E00 0000:1FFF as the buffer.
START
CS, DS, ES REGISTERS HAVE THE STARTING ADDRESS IN THE SEGMENT BASE
PROCEED TO A NEW ADDRESS FOR EXECUTION BEGINS AT 0000:0309 (USER CAN SET A SEGMENT IN THE PROGRAM
END
Syntax is as follows:
D D 0400 (If no input, press Enter key or ARROW UP/DOWN key would allow the built-in address to be used) (Uses built-in Segment base but specify the Effective address)
12
Vinytics
Vinytics 3) Press
Enter
D 0:0400 (Specify both the Segment base and Effective address) If press the Enter or the ARROW DOWN key after specifying the address, the memory will display the data. Press ARROW UP key will allowed the address to subtract 8 and store in the memory as a whole number. otherwise, an ARROW DOWN key indicates an addition of 8 in the address and this changes in the memory (as a machine language).
0000 : 0400 B3 C0 9A 7 8 F 0 0 0 F 0 BB
Usekey for further view.
Syntax is as followed:
Segment Base Effective Address Content of data total of 8 bytes
0000 : 0408 C2 68 F0 00
00 F0
9A 3C
0000 : 0400 B3 C0 9A 7 8 F 0 0 0 F 0 BB
If address is not a whole number 8, the following will show:
0000 : 0410 F4 FF
0D 7 5 F 7 FF FF FF
0000 : 0400 B3 C0 9A 7 8 F 0 0 0 F 0 BB
The above datas shown at the location 400 are the arbitrary data.
Example
If the user want to see the codes of the above program, the following steps are to be taken: 1) Press
F7
Syntax
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
Once F is entered, the command can be proceeded.
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I .M . P . T . U .
2) Press D key, and enter the effective address. The following will be displayed:
VMC - 8 6 0 9 D 0400
. . 7 FFF
10
Vinytics
Vinytics
M - Moving Data
The command MOVE is used to move data in the memory from a specified address to another address by input the starting address, the ending address and the desire address. A RETURN key is then used to execute the changes.
I - Interrupt
Three INTERRUPTs (Effective address) can be set in for the program execution, the CPU will continuously make a single-step subprogram for checking IP values. When the IP register has the same value as the INTERRUPTs address, it will enter the INTERRUPTs subprogram. Enter command I will interrupt the program.
Syntax:
The M key allows the data to be moved to another address:
Syntax:
VMC - 8 6 0 9 . . 7 F F F >A . D . F .G . I .M . P . T .U .
Ending Address (Effective Address Starting address (Effective Address) Segment Base Source
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
The I key allows interruption to be shown on the screen.
VMC - 8 6 0 9 . . 7 F F F I NT P : 0 0 0 0 . 0 0 0 0 . 0 0 0 0 8088
Third Interrupt Position (Effective Address) Second Interrupt Position (Effective Address) First Interrupt Position (Effective Address)
The ending address must be greater than or equal to the starting address. The sum of the starting address in plus the corrected ending address in the target can not exceed FFFF. Otherwise, it will cause an input error and have to redo the whole procedure.
Notes : 1) 2) 3) During interrupt setting, the address alternation register has commands like POP ES, MOV DS, AS, etc. to execute with the next command. The program will be delayed for due to the fact that CPU has to send each command individually into the subprogram. During the interruption, the command GO would allow the program to execute until the next INTERRUPT.
P - Print
This command allows the printer to print the output Connect the printer with input/output system of 8255 (the connection is described at the back), before turning on the printer.
16
13
Vinytics
Vinytics
Example
To break point at 0402, 0407 and 0411 in the example given on Page-3, the following steps are to be taken: 1) Press the key F7 and the LCD display is as shown here:
This indicate the second break-point is at 0407. To proceed further, press G , Enter, and then F7 .
I NT 0411 >A . D . F . G . I . M . P . R . T . U
This indicate the third break-point is at 0411. One can use any commands including Examine Register by pressing the key R .
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
2) Now press the key I and the LCD display is as shown here:
Modify/Display Register
Command R display the content in the register. This command allows the user to examine the content of the register in the CPU. Each time during display, 4 registers will be shown. The following are some of the display and criteria of the register: FIRST GROUP SECOND GROUP THIRD GROUP FOURTH GROUP
VMC - 8 6 0 9 . . 7 F F F I NTP : 0 0 0 0 . 0 0 0 0 . 0 0 0 0
Modify using , key as follows:
R R R R
VMC - 8 6 0 9 . . 7 F F F I NTP : 0 4 0 2 . 0 4 0 7 . 0 4 1 1
3) Press the key F7 and then G . The display will be as follows:
AX 0 1 0 0 CX 0 0 1 4 SP 0 3 9 0 S I F114 IP 0402 CS 0 0 0 0 CS 0 0 0 0 SS 0 0 0 0
BX 0 5 C 0 DX F 1 0 2 BP 0 3 7 4 DI 0400 FL DS F1 0 2 0000
DS 0 0 0 0 ES 0 0 0 0
I NT 0402 >A . D . F . G . I .M . P .R . T . U
This indicate the first break-point is at 0402. To proceed further, press G , Enter, and then F7 .
The first group register (AX, BX, CX, DX) will be shown first when enter the command R. The key will jump to the second group; the fourth group can return to the first group by using the SHIFT + key. When the content in the register is displayed, the cursor will not appear, the user therefore cannot change the content in the register. However, the key F6 will cause the cursor the appear and the modifications of the registers can be made at this time. The cursor can only move in one particular register at one time by using the and SHIFT + keys. However, it can be used to move forward or backward to another register. The F6 key is again used to make the cursor disappear.
15
I NT 0407 >A . D . F . G . I .M . P .R . T . U
14
Vinytics
Vinytics
Only 0-9 numerical keys are allowed to use to operate for this command but not any other keys.
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I . M . P . T . U .
By pressing P key will allow the following to show on the screen:
Example
Enter the following program using A 0000:0400 and press Enter key.
PR E S S S / F FOR S P E ED
Here S/F indicates SLOW or FAST. Now according to the printer, press S or F key, then following will be shown on the screen.
P R I N T ER >B . D . U .
ON
!
Unassemble Dump Buffer
If the printer is not connected at this time, press key P so the LCD would show PRINTER ERROR! on the second line. D ........ command will allow the printer to print the machine code. U ........ command will allow the printer to print the assembly program. B ........ command sends data of RAM directly to the printer without going through any modification.
ADD A L , B L I NT 3
Example:
The address, 90, is used for printer code.
Command B will send 90 directly to the printer. Command D will convert 90 into ASCII (39, 30) code before sending to the printer. Command U will unassemble 90 to NOP, then to ASCII code (4E, 4F, 50) before sending to the printer. The starting address and the ending address need to be entered first before using commands B, D, U. Followed by an Enter or ARROW UP key in order to print the output.
17
Now if user want to see the process of the above program, then the procedure is as follows: 1) After entering the above program, press F7 key, then the menu will be displayed as follows:
20
Vinytics
Vinytics
Example
U F000:F750 E7FF Enter If input only the starting address, the UNASSEMBLE command is as followed. U 400 Enter only the UNASSEMBLE command.
Each time entering the command P, the CPU will send out 1B 40 as the starting command. If the user doesnt change the model setting, the user can use the usual model to print. The command P will allow the 8255 to program as model 1 as the output. The CPU will send the printed data into 8255s A-port, then the printer itself. The connection between 8255 and the printer is: 8255
PA0 PA1 PA2 DATA PA3 BUS PA4 PA5 PA6 PA7 PC4 PC5
Command B can be used to print data or program the printer, if the ASCII code is written into the printer and if the printer would allow the setting instruction to alter the work model. However, the setting instruction model can be assigned to the same address while the output in another address. The setting instruction should first be sent to the printer before the data is send to the printer. The designed setting command of different printers can be obtained from their handbook. The following is an example of Printer ESPON-800. When power on, the command D in the system will allow the model setting of the printer to be saved as 0:0400 0:0400 1B 40 1B 57 01 Set for twice enlargement Starting command Followed by storing the ASCII code of the printed data in 0:0600 starting address: 0:0600 41 42 43 44 45
PRINTER
DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 P E BUSY ACKNLG STROBE GND
A B C D E Once the printer is connected, press the key P then B, followed by the input of the starting address: >B 0:400 0404 Enter
The PC4 to PC6 of 8255 are connected to a 510 ohms resistor to prevent them from short circuit with the printer before the command P is used to output the program. Each time 8255 leaves the command P, the system will return to its original stage.
Use command B again to input the data address, then input the necessary data as followed: >B 0:600 603 Enter
Syntax :
T 00 - STEP Decimal TRACE setting
18 19
Vinytics
Vinytics
to be modified. Press Enter key and write the correct instruction and again press Enter key. Press key F7 another time would bring the instruction back to the Unassemble. The ARROW DOWN key is used to proceed to the next command after the U. The ARROW UP key can be used to examine the program but not more than 127 instructions in forward direction. When the program reaches the end, the U command can be used to decode the program again or forward. During input program, instruction can be inserted by entering the desired address, then press key F5. At this time, INS.....END ADDR: 0000" will appear on the second line of the screen to allow the user to enter the ending address. Press the F5 key again to return to the A command. The CPU will move the address content from the present address until the ending address, to a new instruction for each instruction entry. If leave the command A model, it will automatically clear the function. Refer to the cursor operational keys in the DUMP command for the UNASSEMBLE command.
0 4 0E >A . D . F . G . I .M . P . T . U .
3) Now the user can view the program after the one instruction, two instruction, and so on by defining the number which is to be entered through keyboard.
Example:
01 The instruction pointer stops after every single instruction.
040E T 00-STEP
After completion, press F7 for a menu display.
0 4 0E T 0 1 - S TEP
4) Press the key G, the menu will appear.
Example
The example entered earlier can be seen as follows:
0 4 0E >A . D . F . G . I . M. P . R . T . U .
5) Press Enter key. 6) Press F7 key, the single stepping will start and the following menu will be displayed: 1st instrcution is executed. Press G key and next F7 key for further view, the following results will be displayed:
VMC - 8 6 0 9 . . 7 F F F >A . D . F . G . I .M . P . T . U .
1) Press U key, and enter the starting address of the program.
VMC - 8 6 0 9 0400
. . 7 FFF
0 4 0E G 0000 : 0400
I NT 0402 >A . D . F . G . I . M. P . R . T . U
24
21
Vinytics
Vinytics
Press G key and next F7 key for further view, the following results will be displayed:
VMC - 8 6 0 9 400
or
. . 7 FFF
0 : 400
Starting address
The content of the Unassemble 0400 will start if only the starting address is entered. The built-in segment base is used here if it is not entered. The content of the Unassemble 0000:0400 will start if only the starting address is entered with segment address as 0000:0400. Press U key would enter the Unassemble design: Segment Base Effective Address Machine Code
I NT 0 4 0B >A . D . F . G . I . M. P . R . T . U
Here user can observe the process of program execution, because data 30 is greater than 20 so that carry will not generate and the program execution will jump to the desired label. Now again press G key and next F7 key
I NT 0 4 0D >A . D . F . G . I . M. P . R . T . U
Anywhere during trace command, one can examine/modify the registers using R command (refer Register Command Description). NOTE : Refer to the INTERRUPT command for precaution.
30
Assembly Language Display the address first, then display the machine code (if the machine code is too long, they will be continued on the second line). The second line displays the assemble program and the process is completely done if the cursor appears in the last address of second line. However, in case the cursor doesnt show, that means there is another line. Press the Enter key would display all the commands, then press ARROW UP/DOWN key would display the next line back to the original stage. If the user needs to modify the instruction, press key F7 will move to the command Assemble (A). And write the address of the instruction which is
U - UNASSEMBLE
The UNASSEMBLE command decodes the value of a group memory location mnemonics, and display on the displayed. Once enter this command, input the proper design address. The following is the correct way to input address:
VMC - 8 6 0 9 . . 7 F F F >A . D . F .G . I .M . P . T .U .
22
23
Vinytics
Vinytics
If the single-step is changed during the Interrupt subprogram, the user must follow step by step of single-step hardware to execute the Interrupt subprogram in order to go back the original stage (separate example to demonstrate this feature is given in the next page). The commands used for the Interrupt subprogram: F000 : F7C6 F000 : F7C7 F000 : F7C8 F000 : F7C9 NOTES : 1) 2) The setting of interrupt subprogram cannot change SP and SS register value but the user can change the value within the program. If TRACE counter value does not subtract 1 when it meet the command WAIT, instead changes the command WAIT in the interrupt system to other command then subtract 1. Command WAIT will leave the Interrupt system and stop at the exit of the command. WAIT POP DS POP BP IRET 3) Press Note: Use
0 0 0 0 : 0 4 0 0 B050 MOV AL , B L
key to move upward, and key to move downward.
ADDRESS DIVISION
MEMORY SECTION
ADDRESS 0000:0000 0000:FFFF
7303
c) Press Enter key and write the instruction again. d) Press Enter key so that the modifications has been taken place.
F000:0000 F000:FFFF
ROM 27256 EXTENSION SECTION THAT HAS (ODD & EVEN EPROM)
NOTE : When commands A and U are executed, the system program uses 0000:1E00-1FFF as the buffer, therefore during the execution of A and U, this segment cannot be used.
28
25
Vinytics
Vinytics (c) THIRD GROUP (d) FOURTH GROUP IP CS CS SS 0000 0000 0000 0000
The first group register (AX, BX, CX, DX) will be shown first when enter the command R. The key will jump to the second group; the fourth group can return to the first group by using the SHIFT + key. When the content in the register is displayed, the cursor will not appear, the user therefore cannot change the content in the register. However, the key F6 will cause the cursor the appear and the modifications of the registers can be made at this time. The cursor can only move in one particular register at one time by using the and SHIFT + keys. However, it can be used to move forward or backward to another register. The F6 key is again used to make the cursor disappear. The GO or G key would allow the program to execute. The instruction INT3 (CC) is used to set the position of Interrupt in the 8088. When the setting of system program enter the subprogram, it will subtract 1 for IP. Then entering the TRACE subprogram and followed by the Interrupt display. Press G key will go back to INT3 and enter the Interrupt display again. Therefore, instruction INT3 (CC) must change to NOP (90) or other instruction to enable the program to execute. Each time the TRACE enters INT3, the instruction will execute 1 step. Continue entering into INT3 will repeat the calculation. For convenience in changing the interrupt software into the single-step hardware, there is a WAIT command next to the Interrupt subprogram for the user to save the address 0000:039B into 9B. This will allow the subprogram to stop at this command WAIT once it leaves the Interrupt display (Note that the address bus of LED display will stop at the address FF7CA), and will allow the user to cut the switch of single-step hardware in the single-step location. The F7 is used to leave the command WAIT in order to execute the signal-step hardware.
I NT 0 4 0 2 >A . D . F . G . I . M . P . R . T . U
Interrupt display subprogram will compare with the program input, and there is another display register command R. Other than the commands D and R, the operation and input program of the other commands are the same. Under any command, if press G or SHIFT + F7 would clear the display, then proceed downward for execution. The following are the description of commands D and R: To prevent making any the input error, the user cannot directly change the address content once in the command D. The cursor will not show at this time, therefore the user can only examine address content. If the address content needs to be corrected, F6 key would allow the cursor to appear. Any correction can be made at this time as it is in the program input. Press F6 another time would cause the cursor to disappear. Command R display the content in the register. This command allows the user to examine the content of the register in the CPU. Each time during display, 4 registers will be shown. The following are some of the display and criteria of the register: (a) FIRST GROUP (b) SECOND GROUP AX CX SP SI 0000 0000 0000 0000
26
BX DX BP DI
27
Vinytics
Vinytics
I/O ADDRESS
The addresses of the various chips in I/O mapped in VMC-8609/8609AD are as follows: Device Name 8255-I (PPI) Port A Port B Port C CWR Port A Port B Port C CWR Port A Port B Port C CWR Counter 0 Counter 1 Counter 2 Counter 3 Input/Output Data Word
Command/ Status Word
F000:F05F F000:F060
; Convert the input functional keys into ASCII code and store in AL. Otherwise, set to CFlags as 1. ; Call for the above 4 sub-program and change input key into ASCII to store in AL. ; Save the input 4 digits in DX, display position from BL to BH instruction. ; Store input 4 digits in DX as SEGMENT BASE AND ANOTHER 4 digits as the Effective address in DI (DX:DI). ; Convert the ASCII code in AL to hexadecimal ; Convert the hexadecimal in AL to ASCII code and store in between AH and AL ; Delete one line ; Clear the screen ; Cursor blinking movement ; Insert the lower 4 bits into the DX with BH instruction ; Write the hexadecimal in AL into cursor address
Connector CN3
8255-II (PPI)
CN4
F000:F06F F000:F070 F000:F073 F000:F074 F000:F077 F000:F078 F000:F07B F000:F07C F000:F07F F000:F080 F000:F083 F000:F084 F000:F088 F000:F08B F000:F08C F000:F08F F000:F094 F000:F097
RETF CALL FE15 RETF CALL FE30 RETF CALL FF2B RETF CALL FCD5 REFT CALL FD20 RETF CALL FDCO CALL FFOA RETF CALL FF20 RETF CALL F39A RETF
8255-III (PPI)
CN5
8253 (Programmable Timer/Counter) Keyboard Latch 8259 (PIC) 8251 (USART) Real Time Clock (Optional)
CN6
CN6
; Write the hexadecimal in AX into cursor address ; Write the hexadecimal in AX into BL designated address
CN7
32
29
Vinytics
Vinytics 0000:03A0 -
RAM MEMORY
ADDRESS 0000:0000 PURPOSES INTERRUPT VECTOR SECTION (INTI, INT2, INT3 HAVE ARRANGED THE INTERRUPT SECTION AND STACK SEGMENT STACK SEGMENT 0000:0390 0000:039B 0000:93E0 0000:0400 to 0000:7FFF BUFFER SYSTEM DATA BUFFER (Only if needed) USERS RAM AREA
0000:03A5 0000:03AE 0000:03AF 0000:039E 0000:03B0 0000:03D8 Data stored in the register monitor during interruption Flags, use the command A Preserved battery to test bit
CONTENTS OF ROM
ADDRESS F000:F000 F000:F003 TEXT JMP BCBA JMP BB00 DESCRIPTION RECORDER PROGRAM RS-232 PROGRAM
;Write ALs instruction into LCD ; Write ALs data into LCD ; Read LCD and store data in AL ; Input keys and store value in AL ; Convert input numerical values into ASCII code and store in AL. If it is not a number than it will be set to C-Flags as 1. ; Convert the input alphabetical values into ASCII code. If it is not an alphabet then it will be set to C-Flags as 1. ; Convert the input symbols into ASCII code 31
BIT
0 1 2 3 4 5 6 7 : : : : : : : : Enter NMI as 1, otherwise as 0 After the G key, will be set to as 0, SHIFT + F7 During subprogram, is set to as 1 Set to 1 after entering INTERRUPT Use in interrupt system Use in interrupt System Set 0 to INTERRUPT, and set 1 to TRACE Set TRACE or INTERRUPT as TF flags, timer 1
30
F000:F058
CALL FEAO
F000:F05B F000:F05C
Vinytics
Vinytics
F000:F098 F000:F09B F000:F09C F000:F09F F000:F0A0 F000:F0A3 F000:F0A4 CALL FD4A RETF CALL FD7A RETF CALL FE55 RETF CALL EFDA
F000:F0A7
RETF
CODES TABLE
The key-in code in transferred to ASCII and the ability to transfer the address, FF means empty codes that have not been defined.
42 43 44 45 46 47 48 49 4A 4B 4C B C D E F G H I J K L
4D 4E 4F 50 51 52 53 54 55 56 57 M N O P Q R S T U V W
58 59 5A FF FF FF FF FF FF FF FF X Y Z
FF 3C 3E 3F < > ?
:FFA0
ASCII Symbols
FF 3D 5F FF FF 2F 2D 7F 26 2A 2B 28 = ^
33
&
Vinytics
DISPLAY
This display contains 2 lines and each line consists of 20 words (20x2). This is a cursor LCD display modular. The CPU receives each 8 bits letter which is locked into the internal display data of RAM (data display of RAM 80 bytes (D.D.RAM) allows 80 characters to be stored), and transfer to 5x7 dot of array word and appear on the displayed. This lcd modular contains the word generator ROM that will supply 160 different 5x7 dot of array word and also a 64 bytes word generator RAM. Users can define 8 types 5x7 dot of array word. The position of word display goes into the LCD Modular through the data bus in CPU. Next through the instruction register and finally write the words into the data register to display on a specific location. The LCD Modular will automatically increase or decrease the words in order to move to different addresses. The user can therefore continue sending in word code. The cursor as to moved around or moved in the right of left direction.
FF FF 3B 3A 22 FF FF 5B 5D 7B 7D FF ; : " [ ] { }
21 23 24 25 ! # $ %
0D D0
FF FI D1
94 DEL D2
20 SP
0D
FF
D4 INS
D3
EDIT LIST
Specification of display:
Display data RAM Character generator ROM Character generator RAM Kinds of instructions : : : : 80x8 BLT (80 words) 160 of 5x7 dot of array word 8 different users programmed 5x7 dot of array Clear the display, send cursor home (HOME), ON/OFF display. Cursor ON/ OFF, character blinking cursor move to another position, display change position.
NOTE :1) CTRL ON conditions have not been defined. 2) SP and area use under the key SHIFT ON and OFF.
When the internal power is on, the circuit is reset. Internal circuit vibrator.
35
Vinytics
The LCD modular has 2 8-bits register-one instruction register (IR) and one data register (DR).
@ P \ p p
The instruction register stores the instruction code and address information, which contains display data RAM and address of character generator RAM. However, the content of IR is only for read-in but not read-out. The data register can only temporary store data, the input data first goes through LCD and is stored in the data register. It will then automatically be transferred to display data RAM or character generator RAM. When the CPU read the data from the displayed RAM or from the character generator RAM, it will also temporary store the data in the data register. When the address information is input into the instruction register, the relative data will be moved from display register RAM or character generator RAM to the data register. Then the data can be read from data register by using the output instruction of CPU. One way to select the two registers is to select the register signal (RS) like follow: RS 0 0 1 1 R/W 0 1 0 1 FUNCTION Data Bus > instruction Register Read out busy flags (BUSY FLAG DB7) and address counter (DB0-DB6) Input into data register and execute the inner instruction : (D.R.RAM> D.R. OR C.G.RAM D.R.) Get the data out form register, and execute the inner instruction: (D.D.RAM> D.R. OR C.G.RAM> D.R.)
! " # $
1 2 3 4
A B C D E F
q r s t u v w x y z { |
R b S T U V c d e f
1 j x n x y
% 5 & 6 ( ) * + , _ . / 7 8 9 : ; <
G W g H I J K L X h Y Z [ ] ^ _ i j k l
= M > ? N O
m } n o
NOTE : 1.The CG RAM generates character patterns in accordance with the users program. 2.Shaded areas indicate 5x10 dot character patterns.
40
37
Vinytics
the character generator RAM, the address counter will automatically add or subtract 1. When the content of address counter is in RS = 0 and R/W = 1, the output data line is DB0 DB6.
Data display RAM and display position of LCD is as followed: Character Position : 1 (decimal) First Line (hexadecimal) Second Line (hexadecimal) 2 3 4 5 6 7 8 9 10 11 ...... 19 20
: 00 01 02 03 04 05 06 07 08 09 0A ...... 16 17 : 40 41 42 43 44 45 46 47 48 49 4A ...... 56 57
TIMING GENERATOR
Sending signals into the inner register during generating process.
NOTE
: 1. The CG RAM generates character patterns in accordance with the users program. 2. Shaded areas indicate 5x10 dot character patterns.
38
39
Vinytics
Code
R S R / W D B7 D B 6 D B 5 D B 4 D B3 D B2 D B1 D B 0 0 0 0 0 0 0 0 0 0 1
(DD RAM), CG RAM ADDRESS, AND CHARACTER PATTERN (CG RAM) Character Pattern for 5x7 Foat Character Code (DD RAM Data) 7 6 5 4 3 2 1 0
highorder bit loworder bit
1.64mS 1.64mS 40 S 40 S
CG RAM Address 5 4 3 2 1 0
highorder bit loworder bit 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
I/D
Display ON/OFF Display Cursor Shift Function Set CG RAM Address Set
0 0 0 0 * 0 0 0
0 0
0 0
0 0
0 0
0 1
1 DL
SC RL N 0
* *
* *
40 S 40 S 40 S 0S
0 0 0 0 * 0 0 1
ACG
DD RAM 0 Address Set Busy Flag/ 0 Address Counter Read CG RAM/ 1 DD RAM Data Write CG RAM/ DD RAM Data Read
ADD
BF
AD
40 S 40 S 40 S
0 1
Read da ta from CG RAM or DD RAM. DD RAM CG RAM ACG ADD AC : Display data RAM : Character Generator RAM : Character Generator RAM Address : Display Data RAM Address : Address Counter
I/D=1 : Increment, I/D=0 : Decrement. S=1 : Display Shift ON S/C=1 : Shift Display, S/C=0 : Move Cursor R/L=1 : Shift Right. R/L=1 : Shift Left DL=1 : 8 Bit. DL=0 : 4 Bit N=1 : Dual Line. N=0 : Single Line. BF=1 : Internal Operation. BF=0 : Ready for instruction.
0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 0 0
0 0 0 0 * 1 1 1
1 1 1 1 1 1 1 0 0 1 1 0 1 0 1
* * *
NOTE : 1. Symbol * signifies a dont care bit 2. Correct input value for N is predetermined for each model
44
Vinytics NOTES:
Vinytics 4. Entry mode set I/D = 1----------- Increase mode S = 0----------- Display OFF
1. Character code bits 0-2 correspond to CG RAM address bits 3-5. Each of the 8 unique bit strings designated one of the 8 character patterns. 2. CG RAM address bits 0-2 designates the row position of each character pattern. The 8the row is the cursor position. CG RAM data in the 8the row is ORed with the display cursor. Any 1 bits in the 8the row will result in the displayed dot regardless of the cursor status (ON/OFF). Accordingly, if the cursor is to be used, CG RAM data for the 8the row should be set to 0. 3. CG RAM data bits 0-4 correspond to the column position of each character pattern bit 4 corresponding to the leftmost column of the character pattern CG RAM data bus are not used for displaying character patterns, but may be used as a general. 4. As shown in tables 2 and 3, character patterns in the CG RAM are accessed by character codes with bits 4-7 equal to 0. For example, the character code 00 (HEX) or 80 (HEX), since bit 3 of the character code is a dont care bit (i.e. can take either value 0 or 1). 5. CG RAM data 1 produces a dark dot, and data 0 produces a light dot in the corresponding position on the display panel.
NOTE : If the time for the power to increases from 0.2V to 4.5V is greater than 0.1ms but less than 10ms, the current cut-off will drop to 0.2V before it rises again. If it takes more than 1ms, the LCD modular will automatically RESET. Otherwise, it has to depend on an external software instruction to RESET (As describe below). Diagram of module RESET power.
4.5V
FUNCTIONS OF RESET
USING THE INTERNAL RESET CIRCUIT TO START
LCD Modular internal has an automatic power supply to be used to RESET when the power rises. During RESET, the busy flag is set. When the voltage is raised to 4.5V in about 10ms, it is in the busy stage. The following instructions are then used to set the beginning stage of LCD. 1. Clear display 2. Function set DL = 1----------- 8-bit data length interface N = 0----------- (single line display) F = 0----------- The source of 5x7 dot of array character 3. Display ON/OFF control D = 1----------- Display OFF C = 0----------- Cursor OFF B = 0----------- Character flashing function OFF
42
0.2V 0.2V Trcc 0.1ms <Trcc <10ms. Toff > 1ms. 0.2V
43
Vinytics
Vinytics
binary code ADD from 00H until 27H as the first line of from 40H until 67H as the second line.
Initialization by Instructions
If the power conditions for the normal operation of the internal reset circuit are not satisfied. LCD unit must be initialized by executing a sense of the instructions. The procedure fro this initialization process is as follows.
Power ON
RS R/W 0 0
Busy flag cannot be checked before execution of this instruction. Function Set (8-Bit Interface)
RS R/W 0 0
Busy flag cannot be checked before execution of this instruction. Function Set (8-Bit Interface)
RS R/W 0 0
Busy flag cannot be checked before execution of this instruction. Function Set (8-Bit Interface) Busy flag can be checked after these instructions are completed. If the busy flag is not going to be checked then a wait time longer than the total execution time of these instructions is required. (See Table 5)
RS R/W 0 0 0 0 0 0 0 0
End of Initialization
45
Vinytics
Vinytics
INSTRUCTION DESCRIPTION
When the LCD is controlled by the CPU, only the instruction register (IR) and the data register (DR) can be read directly by the CPU. The commands from outside the modular can decide the internal operation of LCD. These commands include the register selection (RS) signals, read/write (R/ W) signals, and data buffering signals (DB0-DB6). Table 5 lists all the useful commands in the LCD modular and the execution time, these commands are divided into the following group: Commands of set LCD module Commands of internal set address RAM Commands of data transfer in or out from the internal RAM Other commands When the LCD modular is executing a command it will reject other commands. Except the busy flag/read address counter, the internal counting period of busy flag is set to as 1. If the CPU wants to send in other commands it will have to check the busy flag first, until it is cleared to 0 before it send in. The explanation is as followed:
When data enters the character generator RAM, the display will not move.
DISPLAY/CURSOR SHIFT
S/C R/L 0 0 0 0 1 0 1 1 Cursor move to the left (AC <AC-1) Cursor move to the right (AC <AC+1) All the characters and cursor move to the left All the characters and cursor move to the right
Note : When the display moves, the address counter will not move.
FUNCTION SET
DL DL=1 DL=0 N : Select data length for the interface circuit. - Using the 8 bits data length. - Using the 4 bits data length. : Select the display format (one or two lines)
DISPLAY/CURSOR HOME
The address counter will be cleared to 0, content of D.D. RAM will not be influenced; but if the cursor or the character blinking function is in the set condition, it will be moved to the most left side position.
47
VMC-8609 Users Manual DX : The first displayed number after the entry BL : The display location of word at the most left side. BH : Which location from BL the character starts.
Vinytics
SUB-PROGRAM
The 8086/8088 so-called subprogram has both the same segment calling and the different segment calling. The different segment calling is used towards the different. The different segment calling is used towards the different segment of subprogram. The subprogram of this system program has to be all in the same segment in order to call the same subprogram (the same segment and different segment subprogram are different from RET command). For user convenience, the system program will start from F000:F040 as the catalog section of the subprogram. In the subprogram catalog segment, if the same segment subprogram RET is changed to different segment subprogram RET is changed to different segment subprogram RETF. The user can therefore choose the different segment calling from any segment to call one of the subprogram in the catalog segment. Another method of using system subprogram is to use the M command to move all the programs in the system into the users segment. This allows direct access to the calling commands in the segment. Since there are other subprogram that can be called from the subprogram, all the programs have to be moved together in order to protect each other address (when every subprogram is being used in the catalog, it should start moving from F000:EA00-FF4F), it is therefore a waste of space. The user can add new program into the empty space of catalog section.
Output Parameter : AL : The code used for storing functional key. DX : Store the displayed numbers. F000:F06C CALL FAA0 The appointed location of BL and BH, the code of input section and effective address are stored consequently in DX and DI (i.e. DX:DI). The displayed location of most left side character is instructed by BL, BH instructs the position from the first character onwards. If BH is smaller than 9 but not equal to 4, BL add to BH will be the exact location of display location. The keys , are used to operate the cursor while input numbers. It will also allow the cursor to move between segment and effective address. Other than these three functional keys, the rest will transfer to code number and jump out of subprogram. Input parameter : BL : Instruct the most left side word to display location. The rules is the same as (1). BH : Instruct the position starting from BL, first entry into the subprogram is set to 0, program execution will follow the operation whether to add or subtract. Output Parameter : Al stores the key-in code of functional keys. F000:F070 CALL FE15 Transfer the numbers in AL from ASCII code to hexadecimal to be stored in lower 4 bits of AL , clear to C-Flag at the same time to 0. But set the CFlag of non-numerical ASCII code to 1, without changing the code of AL. Input Parameter : ASCII code of numbers that are stored in AL.
Output Parameter : The ASCII code of the numbers in AL will be transferred to hexadecimal to be stored in the lower 4 bit, clear the C-flag to 0 otherwise set C-Flags to 1 with-out changing the AL code.
52
49
Write all the data from AL into the cursor position of the LCD (the position of the address counter). Input Parameter : Written data is stored in AL Output Parameter : None F000:F04C CALL FF00 Read out data from cursor position of LCD (the instructed position of address counter) into AL. Input Parameter : None Output Parameter : AL stores the read in data. F000:F050 CALL FE7A Read out the key-in (execute only when the key is pressed). Input Parameter : None Output Parameter : The key-in value is stored in AL. F000:F054 CALL FE8A
Change the signs key-in into ASCII code, the undefined signs key will be transferred to FF to be stored in AL, and clear the C-Flag to 0; otherwise set the flags to 1 without changing the AL values. Input Parameter : The key-in value is stored in AL. Output Parameter : If it is a sign, transfer to ASCII code to be stored in AL and clear the C-Flag, otherwise, set the C-Flags to 1 without changing AL values. F000:F060 CALL FDE5 Change the functional keys into the key-in values (Enter and SP keys as the ASCII code, whereas others are set by the system program), those undefined one will be stored as FF in AL and clear the C-Flag to 0. Input Parameter : The key-in codes are stored in AL. Output Parameter : If it is functional key, transfer to key-in code to be stored in AL and clear the C-Flags, otherwise set the C-flags to 1 without changing AL values. F000:F064 CALL FB35 A combination of (6) (7) (8) (9) function. Input Parameter : The key-in values are stored in AL.
Change the numerical key-in value into ASCII code, clear the C-Flag to 0 for numerical key otherwise set 1 for non-numerical key with out changing AL value. Input Parameter : The key-in value is stored in AL Output Parameter : If it is a numerical key, transfer into the relative ASCII values, store in AL and clear all flags. All non-numerical keys are set in C-Flag, and AL value changes. F000:F058 CALL FEAO Change the alphabetical key-in value into ASCII code, clear the C-Flags to 0 for alphabetical keys otherwise set 1 for non-alphabetical keys without changing the AL value. Input Parameter : The key-in value is stored in AL Output Parameter : If is an alphabetical key, transfer to ASCII code to be stored in AL and clear the C-Flags. Otherwise, the AL value will not change.
Output Parameter : The AL not only transfer the code but also clear the CFlags to 0. Otherwise set the C-Flag to 1 without changing AL values. F000:F068 CALL EA35
Input a 4 digits number at the BX appointed location and store in DX in order to be displayed in LCD modular. BL will appoint the first position. BH will appoint BL where to start, BH has to be smaller than 4 & follows the address counter in the LCD modular. When BL=X0XX XXXX, it is the first line; when BL = X1XX XXXX, it is the second line. The exact location is the sum of BL and BH. When input, key and key will operate the cursor location. If the key-in function is changed to key code, it will leave the subprogram after it is stored in AL. The BH is set to 0 for first time entry, the rest will be according to the keyin to determine the code.
51
50
Vinytics 0:0409 0:040E 0:0413 CALL CALL CALL F000:F044 F000:F050 F000:F058
VMC-8609 Users Manual ;Call for write-in instruction subprogram ;Call for the read key-in ;Call the alphabetical key code and transfer into the subprogram ;Ignore the alphabetical key-in, return to original key-in; otherwise execute the next instruction. ;Key-in code enter into LCD modular
After changing the hexadecimal in AL to ASCII code, the higher level is stored in AH and the lower level is stored in AL. Input Parameter : AL stores the exchanged hexadecimal.
0:0418
JB
040E
Output Parameter : AH stores the higher level ASCII, AL stores the lower level ASCII. F000:F078 CALL FF2B Clear the first line display of the BL, display of D.D. RAM will be stored into the blank code 20, then the cursor will move back to the starting point. BL = X0XX XXXX means clearing the first line. BL = X1XX XXXX means clearing the second line. Input parameter : BL indicates the number of cleared lines. Output Parameter : BL stores 80 (first line) or CO (second line). F000:F07C CALL FCD5
F000:F048 040E
Program input starts executing from 400, the first word blinking can be seen at this time, they can be input again in order to be displayed on LCD. 21st to 41st word will exceed the first line display boundary, therefore they are stored in LCD modular but will not be shown. The 41st word will be the first letter on the second line. Similarly, 61st to 80th word will not be shown.
Clear display (blank code 20 is stored in the display) Input Parameter : None
Example-2
Clear second line, display DX value, and DX values are altered by key-in to be display at LCD. 0:0400 0:0402 MOV MOV AL,01 BL,C0 ;Clear display commands to be stored in AL ;Write the set LCD address counter commands into BL. CO=1100 0000 represent the position of second line ;Clear second line ;Input parameter of subprogram is stored in BX. ;B0-B5 set the word at the most left side to display position, B6=1 represents the second line, B7 can be any number. After entering subprogram, it is automatically set to 1 (B=Bit).
The cursor blink, waiting for the key to jump out. Input Parameter : None Output Parameter : AL stores the key-in code. F000:F084 CALL FDC0
0:0404 0:0409
CALL MOV
F000:F078 BX,00C2
Insert the AL lower 4 bit hexadecimal into the DX, the location is determined by BH. BH must be smaller than r, BH = 0 represents it is inserted into the most left-sided position of DX. Input Parameter : The AL lower 4 bit means an insert into hexadecimal. DX - means inserted numbers. BH - indicates inserted location. Output Parameter : Dx is the code after insertion.
56
53
VMC-8609 Users Manual : BL instructs the first word that is ready to read out from the most left side.
Write the AL code into cursor location (inside the address of the address counter). Input Parameter : AL stores the code that is ready for input.
Output Parameter : None F000:F08C CALL FF20 Write the AX code into the cursor location. Input Parameter : AX stores the code that is ready for input.
Output Parameter : The number read will be transfer to hexadecimal to be stored in AX, and clear the C-Flag to 0. Otherwise, the AL code will return and the C-Flag will be set to 1. F000:F0A0 CALL FE55 Make a beep sound. Input Parameter : None Output Parameter : None F000:F0A4 CALL FEDA
Write the AX code into the BL indicated location of LCD, BL indicates the first line or second line as in (11). Input Parameter : BL indicates the most left-sided location of the word. AX stores the codes that are ready for input. Output parameter : None F000:F098 CALL FD4A The LCD which instructed by BL read out 2-bit and change it to hexadecimal to be stored in AL, also clear the C-Flag as 0. If it is a non-numerical character, the C-Flag will be set to 1 and return once AL is back. the instruction of BL location is the same as (11). Input Parameter : BL indicates the read-in of the first word on the left. Output Parameter : If read a number, then will transfer to hexadecimal to be stored in AL. The C-flag has to be cleared to 0, otherwise it is taken back to AL, moreover the C-Flag is set to 1 in order to return. F000:F09C CALL FD7A The LCD which instructed by BL read out 4-bit, changes to hexadecimal to be stored in AX, and Clear the C-Flag to 0. If it is non-numerical code, the C-Flag is set to 1 and is also taken back into AX before it returns. Bl instructed the number on the most left, the rule ins the same as in (11).
Delay subprogram that can be designed, the delay is counted by the counter # 2 of 8253. It will check the key at the end, in order to jump out the subprogram after it read. Input Parameter : Before input, counter # 2 of 8253 has to be programmed. The subprogram will check counter # 2 and Jump out once react the end.
Output Parameter : ALAL code 00 represents no key-in, otherwise AL code will be the key-in code. If AH is influenced, it will change (indefinite value).
54
55
Vinytics
Vinytics
VMC-8609 Users Manual ;BH as 00 instructs the cursor and the first word location, first time entering subprogram is set to 0, the rest will automatically add or subtract. ;Input 4 bits. ;whether it is Enter key ;Non-Enter key will jump back to input subprogram, otherwise it will execute the next command.
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
PINS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
SIGNALS +5V DC +5V DC GND GND D3 D7 D2 D6 D1 D5 D0 D4 A7 A15 A6 A14 A5 A13 A4 A12 A3 A11 A2 A10 A1
60
PINS 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
SIGNALS A9 A0 A8 WR RD M/IO M/IO NC NC ALE ALE S1 S0 HLDA HOLD INTA INTR READY NMI RESET OUT RESET IN CLK OUT (PCLK) I/O CS RAM CS RAM CS
Program will clear the second line first, but display 4 bits (DX value) on the second line and wait for input. After the key-in numbers, the display value can be altered and stored in DX. Press Enter key would stop the program.
Example-3
Display 4 bits (AX value) on BL instructed location. 0:0400 MOV BL,80 ;Input parameter of subprogram is stored in BL. B6=0 represents 1st line ;Clear the first line. ;Input parameter of subprogram is stored in BL. Among 84=1000 0100, B0 to B5 display the first word on the most left side. B6 as 0 represents the 1st line display, B7 can be any value that automatically set to 1 once enter the subprogram. It is the D.D. RAM address command. ;Display AX.
0:0402 0:0407
CALL MOV
F000:F078 AX,8088
0:040A 0:040F
CALL HLT
F000:F094
Program will first clear the first line, then store 8088 into AX to display the first line.
57
Vinytics
Vinytics
Example-4
Check table to display one line of letter. 0:0400 0:0402 0:0407 MOV CALL MOV BL,CO F000:F078 AL,C2 ;Clear the second line ;Parameter of subprogram is stored in AL. B)-B5 is written into LCD address counter, instructed the word on the most left side. B6 as 1 represents the second line. B7 as 1 represents the set D.D.RAM address instruction. ;Commands in AL are written into LCD ;Segment value set for table checking ;Starting address of table checking is stored into SI ;Store table checking length in CX ;Clear directional flag ;Read in data from table checking section until AL. ;Input AL data into LCD modular. ;CX not equal to 0 would continue execution loop.
0:0409 0:040E 0:040F 0:0410 0:0413 0:0416 0:0417 0:0418 0:041D 0:041F
CALL PUSH POP MOV MOV CLD LODSB CALL LOOP HLT
F000:F048 0416
0:0600 41 42 43 44 45 46 47 48 49 50 Program execution at address 0:0400 is stored into the ASCII code of display data, like followed (can be set oneself): Program starts from 0:600 to be stored as ASCII data code and display on LCD modular i.e. A B C D E F G H I J.
58
59
Vinytics
Vinytics
8255 Connector CN3, CN4 & CN5 (26 Pin Connector) Detail 2 4 6 8 10 12 14 16 18 20 22 24 26
1 3 5 7 9 11 13 15 17 19 21 23 25
PIN SIGNAL PIN SIGNAL
1 2 3 4 5 6 7 8 9 10 11 12 13
PC4 PC5 PC2 PC3 PC0 PC1 PB6 PB7 PB4 PB5 PB2 PB3 PB0
61
14 15 16 17 18 19 20 21 22 23 24 25 26
PB1 PA6 PA7 PA4 PA5 PA2 PA3 PA0 PA1 PC6 PC7 GND GND
64
Vinytics
Vinytics
1 3 5 7 9 11 13 15 17 19 21 23 25
PIN SIGNAL PIN SIGNAL
1 2 3 4 5 6 7 8 9 10 11 12 13
CAS0 CAS1 CAS2 INTR IR0 IR1 IR2 IR3 IR4 IR5 IR6 IR7 CLK0
14 15 16 17 18 19 20 21 22 23 24 25 26
GATE0 OUT0 CLK1 GATE1 OUT1 CLK2 GATE2 OUT2 NC NC NC GND GND
To communicate VMC-8609 with the Computer, the IBM PC has to run any communication software like TANGO, XTALK, or any other software. The CN5 connector is to be connected to the COM Port 1 or 2 of the PC with the cable having cross connections as follows: 9 PIN MALE CONNECTOR 9 PIN FEMALE CONNECTOR
1 ..................................................... 1 2 ..................................................... 3 3 ..................................................... 2 4 ..................................................... 6 5 ..................................................... 5 Clock Setting 3MHz (Default) 1 2 3 6 ..................................................... 4 7 ..................................................... 8 8 ..................................................... 7 9 ..................................................... 9 To make our explanation easier, we will use XTALK software for communicating from Computer to VMC-8609 or user can use Hyper Terminal utility of WIN 95/98/XP software.
JP0
Clock Setting 1MHz
62
63
Vinytics PROGRAM - 2
Vinytics
To find the maximum no. in a given string (16 Bytes long) and store it in location 0510. ADDRESS 0400 0403 OP CODE BE 00 05 B9 10 00 MNEMONIC COMMENTS
The origin difined in the above line is the first origin defined in your ASM file. From this location onwards your file will be loaded while one is downloading this file to the VT-86/88. It is important to note this address from the ASM file. In the above example, we have entered 200 which is noted from DEMO.ASM file. After execution of the above file DEMO.ASC will be created which can be transmitted or downloaded to VMC-8609 kit.
B4 00 3A 24 73 02 8A 24
040E 040F
46 E0 F7
0411 0513
88 24 F4
MOV SI, 0500 Load SI reg. with starting address of string. MOV CX, 0010 Initialize Counter Reg. (with the length of string i.e. no. of bytes). MOV AH, 00 Initialize the 8 bit Acc. CMP AH,[SI] The 1st data byte of the string with 00. JAE 040E If both bytes match (above is equal) then branch to (l). MOV AH,[SI] Else, move the contents of (0500) into 8 bit ACC, i.e., a real no. in AH. INC SI Point at the next address of string. LOOPNE 0408 Decrement the counter value, if not zero, continue processing (searching to the Max. No. continued.) MOV[SI],AH Max. No. in 0510 address. HLT Halt. AFTER EXECUTION
For Example
0500 0501 0502 0503 0504 0505 0506 0507 : : : : : : : : 01 02 03 04 05 06 15 07 0508 0509 050A 050B 050C 050D 050E 050F : : : : : : : : 12 08 09 0A 0B 0E 0C 0D
68
0510
15
65
Vinytics
SAMPLE PROGRAMS
Vinytics
VMC-8609 Users Manual result of add. is to be started storing). Also its the starting address of MSBs of array.
INTRODUCTION
The monitor software of VMC-8609 resides in 32K Byte of EPROM. The system software has certain useful routines, which can be utilised by the user for developing his programs. The address of these routines are given in the appendix at the end of the manual.
040A
8B 04
MOV AX,[SI]
PROGRAMMING EXAMPLE
The following sample programs are given here to make the user familiarise with the operation of VMC-8609. 1) Addition of two binary number of 8 byte length. 2) Find the largest number in a given string. 3) Sort a string of bytes in descending order. 4) ASCII multiplication. 5) Divide a string of unpacked ASCII digits. 6) Calculate the no. of bytes in a string of data. 7) Convert the string of data to its compliment form. 040F 0411 0411 0412 PROGRAM-1 TO ADD two Binary numbers each 8 Bytes long: 0415 ADDRESS 0400 0401 OP CODE F8 B9 04 00 MNEMONIC CLC MOV CX,0004 COMMENTS Clear Carry Flag. Load Counter register with no. of times addition to be performed (i.e. Initialize the counter register). Load source Index Reg. with starting address of Ist Binary no. (LSBs array). Load Destination Index Reg. with Dest. Address (where the F4 HLT 0413 46 47 47 49 75 F5 INC SI INC DI INC DI DEC CX JNE 020A 040F 46 INC SI 040C 11 05 ADC [DI],AX
Load Data bytes (which are in location 0500 and 0501 in 16 bit ACC. i.e. (0500) - AH (0301) - AL Add the contents (MS Bytes) of 0508, 0509 with the contents (LS Bytes) of 0500 + 0501 and store the result in location 0508 onwards. Point at 0502 LOCN (Next relevant source LOCN). Point at next relevant LOCN, i.e. 0504. Decrement the counter. If not zero (i.e. CX =0000) then continue addition. Else, Halt.
0404
BE 00 05
MOV SI,0500
0407
BF 08 05
: : : : : : : :
0B 0D 0F 12 14 16 18 1A
66
Vinytics
Vinytics PROGRAM - 3
For Example
AFTER EXECUTION (Unpacked BCD Digits) 0500 0501 0502 0503 0504 0505 0506 0507 : : : : : : : : 31 32 33 34 35 36 31 32 0508 0509 050A 050B 050C 050D 050E 050F : : : : : : : : 04 08 02 07 01 06 06 08
To sort a string of a no. of bytes in descending order: ADDRESS 0400 0403 OP CODE BE 00 05 8B 1C MNEMONIC MOV SI,0500 MOV BX, [SI] COMMENTS Initialize SI Reg. with Mem LOCN 0500. BX has the no. of bytes (to be used for sorting) LOCNS 0500 & 0501. Decrement the no. of bytes by one. Also CX has the no. of bytes in LOCNS 0500 and 0501. Decrement the no. of bytes by one.
4B 8B 0C 49 BE 02 05
PROGRAM - 5 To Divide a String of Unpacked ASCII Digits: ADDRESS 0400 0402 0405 0408 OP CODE B2 36 BE 00 05 BF 08 05 B9 08 00 MNEMONIC MOV DL, 36 COMMENTS DL having the divisor, a single 8 bit ASCII Digit. 040C 040E 040F 0411 8A 04 46 3A 04 73 06 0409
MOV SI, 0502 Initialize SI reg. with the starting address of string (having data bytes). MOV AL, [SI] INC SI Move the first data byte of string into AL. Point at the next bytes of the string.
MOV SL, 05 00 Load SI with the starting address of ASCII string. MOV DI, 0508 Load DI with the starting address of the result LOCNS. MOV CX, 0008 Initialize the counter Reg. with the no. of bytes in the string. AND DL, 0F XOR AH,AH LODSB MS nibble of DL contents is zeroed. Initialize the 8 bit ACC (=00) Load AL with the contents of address accessed by SI reg. and increment SI reg. i.e. point at the next address LOCN.
COMP AL,[SI] Compare the two bytes of string. JAE 0419 If two bytes are equal or 1st byte is above that the second Byte Branch to (1). Second byte is less than first byte and swap (interchange) the two bytes. Point at the next LOCN of the string. Loop if CX is not zero (i.e.
80 E2 0F 32 E4 AC
0413 0415
86 04 4E
88 04 46 E2 F1
72
Vinytics
Vinytics 0406 0408 040B 040E 0411 0413 0414 0417 0419 041B B2 34 B9 08 00 C6 05 00 80 E2 0F 8A 04 46 80 E0 0F F6 E2 D4 0A 02 05 MOV DL, 34 MOV CX,0008 MOV [DI],00 ANDL, 0F MOV AL, [SI] INC SI AND AL, 0F MUI DL AAM ADD AL,[DI]
VMC-8609 Users Manual Load DL with the Multiplier ASCII Digit. Load counter reg. with the no. of bytes in the string. MS nibble of Multiplier is zeroed. First ASCII no. of string in AL. Point at the next LOCN in string (of ASCII Nos.) MS nibble at Multiplier no gap and is also zeroed. Perform the fn. AX = AL* DL Perform the fn. AH=AL/0A, AL=remainder. The contents of AL (remainder obtained by performing the above operation) Added with 00 which are in 1st Dest. LOCN. The contents of AL are unpacked Decimal no. and are stored in 1st Dest. LOCN (=0508). Point at the next Dest. LOCN. Contents of AH (Quotient got in AAM operation) are moved in next best. LOCN (0509). Decrement the Counter reg. If not zero, continue multiply and storing unpacked BCD digits, ELSE. HALT.
041B
4B
DEC BX
041C
BE 00 05
MOV SI,0500
At this juncture, first sorting will be over i.e. first no. is logically compared with the rest of the nos. For the correct sorting, all the nos. must be compared with each other logically, i.e. above processing should be carried out no. of bytes times. Halt.
041F 0421
75 E5 F4
For Example
AFTER EXECUTION 0500 0501 0502 0503 0504 0505 0506 : : : : : : : 05 00 20 25 28 15 07 0502 0503 0504 0505 0506 : : : : : 28 25 20 15 07
041D
37
AAA
PROGRAM - 4
88 05 47 88 25
ASCII MULTIPLICATION
To multiply an ASCII string of eight numbers by a single ASCII digit. The result is a string of unpacked BCD digits. ADDRESS 0400 0403 OP CODE BE 00 05 BF 08 05 MNEMONIC COMMENTS
0423 0424
49 75 EB
MOV SI, 0500 Load SI reg. with starting address of string. MOV DI, 0508 Load DI reg. with the starting address of result LOCNS.
70
0426
F4
HLT
71
Vinytics
Vinytics 0411 0414 0416 0418 80 E0 0F D5 0A F6 F2 AA AND AL,0F AAD DIV DL STOSB
VMC-8609 Users Manual MS nibble of AL contents is also zeroed. Perform the fn. AL=(AH * OA) + AL), AH = 00. Perform the fn. AD/DL AL = Quotient and AH = reminder. The contents of AL are stored in the Address pointed to by the DI reg. and next address LOCN in DI reg. is pointed (i.e. current address LOCN of DI reg. is incremented by one).
0419
E0 F5
LOOP NZ 0410 Continue dividing the unpacked ASCII digits if the contents of C are not zeroed; else. HLT Halt.
041B
F4
(a) The program receives the character from PC and display it on LCD.
0400 0402 0404 0406 0408 040A 040C 040E 0410 B0 B7 E6 06 B0 13 E6 B0 E6 B0 E6 B0 04 00 04 4E 52 05 MOV OUT MOV OUT MOV OUT MOV OUT MOV AL,B7 06,AL AL,13 04,AL AL,00 04,AL AL,4E 52,AL AL,05 ;control word format of 8253 ;count is given to set the baud rate at 4800
For Example
AFTER EXECUTION 0500 0501 0502 0503 0504 0505 0506 0507 : : : : : : : : 31 32 33 34 35 36 31 32 0508 0509 050A 050B 050C 050D 050E 050F : : : : : : : : 00 02 00 05 07 06 00 02
;mode instruction format ;in asynchronous mode ;command instruction format make transit enable and receive enable high
E6 9A B3 9A B9 E4 24
52 OUT 52,AL 7C F0 00 F0 LM: CALL F000:F07C ;clear the display 80 MOV BL,80 ;delete the first line 78 F0 00 F0 CALL F000:F078 14 00 MOV CX,14 52 L1: IN AL,52 ;check for Rx RDY signal 02 AND AL,02 76
PROGRAM - 6 To calculate the no. of bytes in a string starting from 0502 up to an identifier (data byte) placed in AL reg. The actual count will be in LOCN 0500 & 0501.
73
VMC-8609 Users Manual COMMENTS Load SI reg. with the starting Address where the result is to be stored. Load DI reg. with the starting address of string. Store the identifier in ASL. Data byte accessed by DI reg.compared with identifier without altering either of the contents, this comparing continuous with the incrementing of DI contents (Address LOCN) till the two bytes match. With each scanning the contents of CX go on decrement by one.
Vinytics ADDRESS 0400 0403 0406 0409 OP CODE BE 00 05 BF 00 06 B9 10 00 AC MNEMONIC MOV SI, 0500
VMC-8609 Users Manual COMMENTS Load SI reg., with the starting address of data string. MOV DI, 0600 Load DI with the starting address of result LOCNS. MOV CX, 0010 Load CX with the no. of bytes in the string. LODSB Load AL with Data byte accessed by SI reg. and increment the address LOCN in SI reg. NEG AL The contents of AL are 2s complemented. STOSB Store AL contents in LOCN pointed to by DI ref. & increment the current Location in DI reg. Loop NZ 0409 If CX = 0000, continue 2s complementing the data in string else; HLT Halt.
B9 FF FF BF 02 05 B0 05 F2 AE
MOV CX, FFFF Initialize the counter register. MOV DI, 0502 MOV AL, 05 REPNZ
040A 040C
F6 D8 AA
040D
E0 FA
040D
F7 D1
NOT CX
2S complemented CX & Move CX 89 0C MOV [SI], CX 040F contents in 0500. MOV [SI], CX HLT store the number of bytes in memory location Terminate the program.
040F
F4
For Example
AFTER EXECUTION 0500 0501 0502 0503 0504 0505 0506 0507 0508 0509 050A 050B 050C 050D 050E 050F : : : : : : : : : : : : : : : : 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 0600 0601 0602 0603 0604 0605 0606 0607 0608 0609 060A 060B 060C 060D 060E 060F : : : : : : : : : : : : : : : : FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0
75
040F 0411
89 0C F4
For Example
Let (509) = 05 Then after executing the program (0501) = 00 PROGRAM - 7 A Data string of no. of bytes (to be specified in CX reg.) is located from the starting address 0500. This data string is to be converted to its equivalent 2' S complement Form and the result is to be stored from 0600 on wards. Let (0500) = 05 CX = 0008 & (0500) = 08
74
Vinytics
043F 0440 0445 0447 0448 AC 9A 48 F0 00 F0 E2 F7 FB E9 FD FF L0DSB CALL F000:F048 LOOP STI JMP 43E
Vinytics
0427 0429 74 FA E4 50 JE IN 0423 AL,50
;character is received from CRT terminal & displayed into LCD modulator in first line
0448
Interrupt sub-routine at 0000:2000 2000 2005 2007 200C 9A B3 9A B0 7C F0 00 F0 80 78 F0 00 F0 86 CALL MOV CALL MOV F000:F07C BL,80 F000:F078 AL,86 ;clear the display ;delete the first line ;write all the commands in AL into LCD modulator
9A 48 F0 00 F0 E2 F1 B3 C0 9A 78 F0 00 F0 B9 14 00 E4 52 2402 74FA E4 50
9A 44 F0 00 F0 0E 1F BE 21 06 B9 0D 00
F000:F048 0423 BL,C0 ;delete second line F000:F078 CX,0014 AL,52 ;check for Rx RDY signal AL,02 043C AL,50 ;received the character in second line CALL F000:F048 LOOP 043C JMP 0414
201B FC L3: CLD 201C AC L0DSB 201D 9A 48 F0 00 F0 CALL F000:F048 2022 2024 0600 0621 E2 F7 CF 57 46 49 45 41 4F 52 52 49 52 30 52 54 20 20 55 LOOP IRET 49 4E 47 20 49 4E 54 FF 49 4E 54 50 54 201B
Execute using G 000:0400 and press any key on the PC keyboard, same will be displayed on the LCD display of the VMC-8609. (b) The following example will transmits characters to PC and simultaneously display on LCD.
0400 0402 0404 0406 0408 040A 040C B0 B7 E6 06 B0 13 E6 B0 E6 B0 04 00 04 4E MOV OUT MOV OUT MOV OUT MOV OUT MOV OUT L3: CALL MOV MOV AL,B7 06,AL AL,13 04,AL AL,00 04,AL AL,4E 52,AL AL,05 52,AL F000:F07C CX,0014 BL,80 77 ;control word format for 8253 ;count is given to set the baud rate at 4800
BEEP
The beep sound can be generated by frequency generated by 8253 Timer-0 whose gte is controlled by PC2 and output is enabled by PC3 of 8255. The routine at F000:F0A0 will generate a beep sound for 2 seconds.
0000:0400 9A A0 F0 00 F0 0000:0405 CC CALL INT 3 F000:F0A0 ;call beep sound routine ;break address
;mode instruction format in asynchronous mode ;make transmit enable and receive enable high ;clear the display ;delete the first line
80
Vinytics
041E 9A 78 F0 00 F0 0423 51 0424 9A 50 F0 00 F0 CALL F000:F078 L2: PUSH CX CALL F000:F050
Vinytics
Note : Keep all DIP Switch position at ON Position (SW5) for following program.
;call for the read key in CALL F000:F058 ;call the alphabetical key code and transfer into subprogram ;key in code enter into LCD modulator.
0429 042E 0433 0434 0436 0438 043A 043B 043D 043E 0440 0443 0445 044A 044B 0450
9A 58 F0 00 F0 9A 48 F0 00 F0 50 E4 52 24 01 74 FA 58 E6 50 59 E2 B9 B3 9A 51 9A 9A
CALL CALL PUSH L1: IN AND JE POP OUT POP LOOP MOV MOV CALL L5: PUSH CALL CALL
F000:F048 F000:F048 AX AL,52 AL,01 0434 AX 50,AL CX 0423 CX,0014 BL,80 F000:F078 CX F000:F050 F000:F058
0403 0405 0408 040C 040F 0413 0415 0417 0419 041B 0413 041F 0421 0423 0428
E3 14 00 80 78 F0 00 F0 50 F0 00 F0 58 F0 00 F0
;ICW1 Command ;ICW2 Command ;ICW4 Command ;unmask IRQ0 ;clear display ;input parameter of subprogram is stored in BL, clear 1st line ;write all the commands in AL into LCD modulator
0455 045A 045B 045D 045F 0461 0462 0464 0465 0467
9A 48 F0 00 F0 50 E4 52 24 01 74 FA 58 E6 50 59 E2 E3 E9 AA FF
;call for the read key in ;call the alphabetical key code & transfer into subprogram ;key in code enter into LCD modulator ;check for TxRDY signal
042A 042F
9A 78 F0 00 F0 B080
CALL MOV
F000:F078 AL,80
9A 44 F0 00 F0 0E 1F B3 00 06
F000:F044 CS DS SI,600
Execute using G command from 0000:0400 and press any key of the VMC-8609 keyboard, the same will be displayed on the LCD and on the screen of PC.
043B B9 0F 00 043E FC
;starting addr of table is stored into SI CX,000F ;store table checking length in CX ;clear direction flag
78
79
Vinytics
Vinytics
PROCEDURE OF INTERFACING BETWEEN KIT & PC USING HYPER TERMINAL FACILITY OF WIN 95/98/ME/2000/XP.
1. SWITCH ON PC AS WELL AS KIT AND CONNECT RS-232 CABLE BETWEEN KIT AND PC COM PORT 01 OR 02 2. ENABLE HYPER TERMINAL FROM WINDOW APPLICATION (START/PROGRAMS/ACCESSORIES/COMMUNICATIONS/HYPER TERMINAL) 3. CLICK ON HYPERTRM ICON AND GIVE ANY NAME (FOR SETTING PARAMETERS) AND CLICK OK. 4. CHOOSE DIRECT TO COM1 OR COM2 AND CLICK OK. 5. SET PARAMETER AS FOLLOWS : FOR 8086 KIT BITS PER SECOND 4800 DATA BITS 8 PARITY ODD STOP BITS 2 FLOW CONTROL NONE 6. GO ON MENU BAR SELECT FILEPROPERTIESSETTINGASCII SETUP ASCII SENDING: LINE DELAY 20 CHARACTER DELAY 20
ASCII RECEVING:
ENABLE
Example
We are storing the program/data of VMC-8609 from 0000:0400 (Starting address) to 0000:04FF (End address) as an example to demonstrate the UPLOADING & DOWNLOADING features.
81
Vinytics
Vinytics
DOWNLOADING PROCEDURE FORM PC TO KIT FOR 8086 KIT a) On VMC-8609, execute from F000:F003 using G command as follows:
VMC - 8 6 0 9 . . 7 F F F G F0 00 : F003
Press Enter key and the following will come on the display:
RS - 2 3 2 4 8 0 0 . BPS OU T F 0 0 0 : 0 4 0 0 0 4 0 0
1st location indicates the starting address (F000:0400) and the 2nd location indicates the end address (0400) of the memory area to be transmitted on to the Serial Port. Change this to 0000:0400 to 04FF as follows:
RS - 2 3 2 4 8 0 0 . BP S OU T 0 0 0 0 : 0 4 0 0 0 4 F F
1. ON MENU BAR SELECT TRANSFERCAPATURE TEXT 2. CLICK ON IT AND GIVE ANY NAME WITH TXT EXTENSION (PATH: FILES\ACCESSORIES\HYPER TERMINAL\XXX.TXT) AND CLICK ON START. 3. AFTER THAT PRESS ENTER KEY OF VMC-8609AD KIT KEYBOARD DATA FIELD WILL APPEAR ON HYPER TERMINAL SCREEN. 4. GO IN MENU BAR SELECT TRANSFERCAPATURE TEXT STOPFILESAVE. 5. BY DOING THIS YOU CAN SAVE ANY DATA IN GIVEN PATH AS ABOVE.
82
83
Vinytics
Vinytics
ADC-0809 A/D Card is an 8-bit analog to digital converter with 8 channel multiplexer and microprocessor compatible control logic. The heart of the card is ADC-0809 monolithic C-MOS device. Its conversion time is 100 u-sec. It eliminates the need for external zero and full scale adjustment. The card selects one of the eight unipolar inputs by using the address decoder. ADC-0809 uses successive approximation as conversion techniques. Input is latched to the deodar on the low to high transition of the address latch enable signal. The conversion starts on the falling edge of the start of conversion signal. During the process End of Conversion signal goes low otherwise it remains high. Digital output can be read from ADC making output enable signal high. All eight inputs of 0-5 Volts ADC-0809 along with external clock, external EOC, external SOC signals are brought to connector. All control signals and digital output signals of ADC-0809 are brought to 10 pin terminal. One 8255 PPI along with 8086 uP can be used to get analog to digital conversion data. A clock input of a specified frequency is required for the operation of ADC0809. A Counter 74LS93 has been used for this purpose. Start of Conversion pulse and End of Conversion pulse can be given either by software or by external signal. AD-DA section have the facility to select the channel either through software or manually with the help of jumper setting provided on card.
NC NC
1 2 1 3 1 +5V
1/8255-DPICONN.
19/AI CONN.
3/8255-DPICONN.
20
19
23
24
21
18
15
PA2 CH2
25
ADC 0809
16 ENBL 10 EOC 11 SOC 12 PB2 22 PB1 5 PB0 4 13 3 2 CLOCK 1
28
U2
CH3 CH1 27 13 26 CH0
GND
CH7
CH5
17/IA CONN.
13
12
1K2
GND
+5V VRef. A CS
10
CH6
CH4
Vcc
14
17
PA0 LSB
PA5
PA4
PA6
PA3
PA1
74LS04 U3
X-TAL
4MHz
Example :
This is a program written for 8086 CPU system having 8255-III (CN5) at address:
11
74LS93
14 12 11 1 9 U3 8 x 1 x 2 x 3 x 4
1K2
10
U1
74LS04 8
10 12 14 16
87
84
Vinytics
Vinytics
041D 041E 0421 0422 0424 0426 0428 042B 042C 042F 0430 0435 0437 0439 043E 0441 0442 0444 EE BA 14 00 EC 24 10 74 F8 B0 04 BA 14 00 EE BA 10 00 EC 9A 7C F0 00 F0 B4 00 B3 80 9A 94 F0 00 F0 B9 55 55 49 75 FD E9 BF FF OUT MOV IN AND JZ MOV MOV OUT MOV IN CALL MOV MOV CALL MOV DEC JNZ JMP
PROCEDURE
1. Connect 26 pin FRC Cable from CN5 (8255-III) Connector to CN9 (ADDA Section). 2. Enter the programme from 0:400 memory address of the kit. 3. Execute the programme from 0:400 memory address of the kit. 4. Give the analog input at CH-0 GND (should be common). 5. Observe the data displayed on display of kit.
Example :
The program written is for 8086 series of Microprocessor Training Kits at Connector of 8255-III and is to be executed from 0000:0400 Address. The selected channel at address 0407 input is to be fed at Pin Analog Input CONN. and GND. The conversion table is as follows: 00.00V 01.25V 02.50V 05.00V PROGRAM Address Opcodes
0400 0403 0405 0406 0408 040B 040C 040F 0411 0412 0414 0417 0418 041B BA 16 B0 98 EE B0 00 BA 12 EE BA 14 B0 00 EE B0 03 BA 14 EE BA 14 B0 00 00
00 3F 7F FF
;read again
Mnemonics
MOV MOV OUT MOV MOV OUT MOV MOV OUT MOV MOV OUT MOV MOV
85
Comments
;initilize 8255
00 00
00 00
DX,0016 AL,98 DX,AL AL,00 DX,0012 DX,AL DX,0014 AL,00 DX,AL AL,03 DX,0014 DX,AL DX,0014 Al,00
;select channel 0
86
Vinytics
Vinytics
EXERCISE
1. Write a program to generate a stair case generator with ten steps. The pulse duration should be programmable. 2. Write a program to generate the following wave forms. a b Triangular waveforms. Square wave of 1KHz with peak voltage of 2.4V.
3. Write a program to generate sinewave using look up table. The resolution may be chosen at (a) 6, (b) 8. The frequency of wave from should be programmable.
91
88
Vinytics
Vinytics
DA OUTP 6
14
10 11 12 4
+12 +12V
DAC - 0800
15 13
0.1 F
-12V
3
0.1 F
16
2 1
GND
14 16
Program
400 402 404 406 408 40A B0 80 E6 16 B0 00 E6 12 FE C0 EB FA MOV AL,80 OUT 16, AL MOV AL, 00 OUT 12,AL INC AL JMP START ;control word ;first data out ;increment data ;out next data
0.1 F
+12V
-12V
1.2K
89
90
Vinytics
Vinytics
U30
U24 8255-I
U25 8255-II
U26 8255-III
CN2
X-TAL1
50
49 BATTERY BACKUP
CN1 BUS CONNECTOR
11.0592 MHz
JP0
3 2 1
X-TAL2
11.0592 MHz
MEMORY AREA
1 2 3 JP4
RESET
U15
U14
R A M
3 2 1 JP2 3 2 1
R A M
U3 ADDRESS LTH AC
JP3
U2 ADDRESS LTH AC
U17
U16
KEYBOARD IBMPC
U1
U18
U19
20 X 2 LCD
8086 CPU
DISPLAY
IBMPC KEYBOARD
X-TAL3
R A M
R A M
12.000 MHz