Analysis of VFS5 Main Program

The analysis of the flow chart of the main program is as follows:

2080H-2092H:
After power-on reset, N80C196KB16 starts at 2080H.
First, write zero to the output lines O1-O8 (ULN2803A, 28) of the servo module VFS5.

2093H-2096H:
Set the stack to 8000H-82FFH.

2097H-20B0H:
Check whether the parameter LOAD (RAM:F762H) is 1, and if 1, the user program that is solidified in ROM is loaded to the external RAM, of which the starting address is 8300H (the external RAM address space is 32K, that is, 8000H-FFFFH). The so-called loading is actually a copying of the user program stored in ROM to RAM, which copies the content of 4D6AH-5D09H in a total of 4000 bytes in ROM. In this VFS5 module, the actual location of the user program is 4D6AH-5B41H, with a total of 3544 bytes. Then check the number of characters of the program (not more than 20000) and fix it, the number of program instructions is stored in D130H, the address of the offset of the end byte FFH to 8300H is stored in D132H, the program’s character ASCII value sum (discarding those higher than two bytes) are stored into D676H (PGMCKSUM) and D128H-D126H’s two lower bytes. D129.7 is used as the flag bit. “1” indicates that the program is wrong, and “0” normal.
If LOAD is 0, the process is dropped. In fact, the contents of external RAM (DS1230Y-120) will not be lost after power-off.
Then the program jumps to 0100H.

0100H-0125H:
Add all the bytes of 0100H-7FFFH (except 1FFCH-1FFDH) in the ROM to see if the sum is equal to the content of 1FFCH-1FFDH (8626H). If not, it goes into a dead loop, and the CPU LED flickers to indicate firmware errors; if equal, it lights up the CPU LED and then executes the program down.

0126H-0134H:
Check whether the setting of revolver resolution RDRES (manufacturer set, stored in the external data memory D6B9H unit) matches the hardware. If so, give information 199 (DRIVE POWERED UP). Otherwise light the FAULT LED, and put the No.27 message (R/D JUMPERS) into the buffer.

0135H-0177H:
Initialize parameters, reset outputs, etc., such as setting the servo motor as induction motor.

0178H-017AH:
Check the variable BAUD to see if it is among the values of 300, 600, 19200. If it is, be ready to receive. If not, try to autobaud and flash CPU LED. The attempt maintains until success. The setting of ABAUD switches between checking and direct autobauding. FAULT LED turned OFF within this subroutine.

017BH-0194H:
(to be continued…)

5 comments on “Analysis of VFS5 Main Program

  1. Definitely consider that that you said. Your favourite justification seemed to be at the net the easiest factor to bear in mind of. I say to you, I definitely get annoyed while other people think about issues that they plainly do not know about. You controlled to hit the nail upon the highest and also outlined out the entire thing with no need side effect , other people can take a signal. Will likely be back to get more. Thank you

  2. Fantastic goods from you, man. I’ve understand your stuff previous to and you’re just too wonderful.
    I really like what you have acquired here, certainly like what you are stating and the way in which you say it.
    You make it enjoyable and you still take care of to keep it smart.
    I can not wait to read far more from you. This is actually a wonderful website.

Leave a Reply to minecraft Cancel reply

Your email address will not be published. Required fields are marked *