HP1652B Inverse Assembler
It is much easier to interpret the collected data if the information is in mnemonics and not in hex or binary.
But the way to a good result is very stony, let me explain. First you need a electric connection from POD 1 to the GPIB connector, see page HP1652GPIBProbe.
HP1652B Inverse Assembler for the GPIB Bus Adapter
The steps to the mnemonics are the following:
- Get the manual from Agilent.com: Inverse_Assembler_10391-90903.pdf
- Get the software package from Agilent.com: 10391B_Inverse_Assembler_Development_Package_v2.0.zip
- Develop the Inverse Assembler Language (IAL) program and assemble it.
- Setup a MSDOS or Win98 computer with real COM1 serial port, or use DOSBOX.
- Prepare a serial cable DB9S (socket) to DB25P (pin)
- Download the .R file to the HP1652B floppy disk (DS/DD, LIF format, 1024 byte sectors!), via RS232 port.
- Setup a configuration for Analyzer 1 with J-clock negative edge, POD 1 ADDR label, DATA label D15-D8 polarity "-", STA label D7-D0, and save it to floppy disk.
- Load in HP1652B the linked IAL file.
- Capture a GPIB bus activity, after pressing Stop you should see the mnemonics.
I have managed already all the steps. Now lets see in detail how it works.
Develop file IHPIB1.S
The development was not trivial and is not fully tested yet.
In order to assemble it, you need either a DOS machine, or the DOSBOX http://www.dosbox.com for a variety of operating systems. I am using the DOSBOX under MAC OS X, German keyboard. By editing the configuration file you can select the local keyboard layout (gr = German Republic), the serial port, and an auto mount command. The program IALDOWN.EXE also works in the DOSBOX. For commands over RS232 in the DOSBOX I can recommend the program MSDOS Kermit (Ver. 3.14). The assembled file IHPIB1.R is here, also the listing file IHPIB1.TXT. and source file IHPIB1.S
I will describe in short the necessary adoptions/steps.
Edit Configuration File /Users/*name*/Library/Preferences/DOSBox 0.74 Preferences [dos] keyboardlayout=gr [serial] serial1=directserial realport:cu.serial1 startbps:9600 parity:n bytesize:8 stopbits:1 [autoexec] mount c /Volumes/DAT/HDA8/INSTALL/Develop/HP1652B/DOSBOX Translate the .S source file to "IHPIB1.R" and generate a listing file IHPIB1.TXT $ asm -o IHPIB1.S > IHPIB1.TXT Copy file IHPIB1.R to a DOS computer, or use DOSBOX
Prepare a serial RS232 cable
For Mac OS X there is a good freeware terminal program available, see CoolTerm.
Also it is explained in the manual that you just need a 3 wire cable, in reality the download program IALDOWN.EXE wants to see the RS232 signal CTS (Clear To Send) in order to operate. Unfortunately it did not work every time as expected.
Because on a PC for the COM1 port a DB9P plug is most spread, I will describe this variant.
The serial COM port (RS232 level) is just a 10 pin header on the main board. You need then an adapter cable 10 pin header, flat cable to a DB9 male plug, and a slot panel.
As an example for my cable I used the schematic from HP 13242G cable. My PC has a mainboard Gigabyte GA-H270M-DS3H. From the main board manual: Mainboard 15) COM 10 pin header, with a flat cable to a DB9 male plug. --- connection --- PC COMn DB9P - HP1652B DB25S (RS232 Level) --- cable --- DB9S DB25P plug type (P=Pin, S=Socket) RxD 2 -------- 2 TxD TxD 3 -------- 3 RxD (about -11 V in standby) GND 5 -------- 7 GND DTR 4 ------+- 5 CTS | +- 6 DSR DSR 6 -+------ 20 DTR | CTS 8 -+ Default connection parameters: 9600 baud, 8 data bits, 1 stop bit, no parity, handshake: X-On/X-Off
Check the cable by entering in a Terminal Emulation program the string:
$ *IDN?^J (strg + J) Answer: HEWLETT PACKARD 1652B,0,REV 02.06
HP1652B Configuration for GPIB Analysis
The Setup labeled GPIB POD1 looks like the following, see also picture on the right:
Button Display, System, Analyzer 1, Name: MACHINE 1, Type: State
- The J Clock captures on the negative edge
Clock Period > 60 ns
- POD 1 on Analyzer 1 (also named Machine 1)
ADDR= no values, but it is neccessary for the Inverse Assembler to function!
- DATA = Polarity "-" , D15 - D08
- STAT = Polarity "+", D07 - D00
MACHINE 1 - State Listing, set DATA format to Invasm
- ADDR DATA STAT
- Hex Invasm Hex
Download the .R file to the HP1652B Floppy Disk
Because the Inverse Assembler produces a relocatable output file only, it must be adopted to the target Logic Analyzer. In the case of the HP1652B this is done via a RS232 download to the Logic Analyzer , there processed and then written to the floppy disk. On younger Logic Analyzers from HP the program FORMAT.EXE is used to do that off-line in the Analyzer itself.
The download command IALDOWN.EXE can be run either in DOSBOX, or in the Command Line Tool of Win98 on a standard PC. Unfortunately it did not work every time as expected. If it does not work, try the *IDN?^J command. If that works, just try again until it works.
Important: After power up the HP1652 always set the Controller connect to RS232, otherwise it will not work.
The command to download the file is as follows as an example:
Set HP6152B in I/O - I/O Port Configuration - Controller connected to: RS-232-C The parameters for IALDOWN.EXE are questioned, or written in the command line. Best is to edit a batch file IHPIB.BAT: IALDOWN.EXE IHPIB1 IHPIB1.R "GPIB InvAsm POD 1" 1 A You start the procedure with: IHPIB.BAT Answer: Logic Analyzer Filename = IHPIB1 Logic Analyzer File Description = GPIB InvAsm POD 1 Relocatable File on the PC = IHPIB1.R COM Port = 0 Option = A Downloading 2151 bytes over COM1 In the screen "Disk Operation" you can read: Filename Type Blocks Description CHPIB1 165x_config 124 CONFIG GPIB POD 1 IHPIB1 inverse_assem 9 InvAsm GPIB POD 1 Disk Space(blocks) - Total: 3059 Free: 2926 Largest: 2890
A screenshot with the Inverse Assembler
This screen shot was converted from a print command data capture via a terminal emulator. That works, but should be improved in the handling, see the graphic on the right.
The action on the GPIB bus was to send a Beep command to the HP1631D Logic analyzer.
You can see under the label Mnemonic the GPIB commands like LAG_04, switch GPIB device with address #4 to Listen mode.
"BP" is the command Beep.
Then *UNL* means Unlisten command, and so on.
The hardware command lines like Attention are shown on a separate column like ATN.
Mnemonic GTL means Go To Local mode, no longer Remote mode.
It is also possible to enable the Time Count in the Trigger menu. Unfortunately it will not fit on the screen, if the Inverse Assembler is selected.
By switching back the format to HEX for the DATA label you will see the Time Data in the rightmost column, see the picture on the right.
The Time Count can be selected for either relative or absolute time from the trigger point.
Screen Hardcopy program in Python
I have adopted the HP1631D Python (V.2.7) utility program to the HP1652B. Unfortunately the HP1652B does not have all the features of the older HP1631D:
- No Real Time Clock, no way to insert a string via command to the screen.
- No Beep command.
Command port and printer port are different, so it looks like if you command a Print Screen command on RS232 the output will go to GPIB, and vice versa.
So up to now I have implemented only (default Printer Type: HP ThinkJet):
- -i - Identity command
- -p - Print Screen - manual triggered via I/O menu and capture via RS232
The program hp1652_ser.py is attached for download.
Because the HP1652B does not have a Real Time Clock, the date and time for documentation must be overlayed in the graphic file. For this task the free software package ImageMagick can be used, in this case the module convert.
At the same time the graphic format can be converted from PBM to GIF, see the command line job under MAC OS X or Linux (Win32 needs another syntax):
convert -font helvetica -pointsize 12 -fill white -draw "rectangle 390,0 575,30" -fill black -draw "text 400, 12 '`date`'" test1.pbm test2.gif
The result can be seen in the second graphic ahead, in the upper right corner. In 2014 the convert .PNG output shows a bad quality. Therefore now the picture format .GIF is used.
Print All - State Listing
For the Print All - State Listing a Terminal Program for the serial port is needed. For Mac OS X the free program CoolTerm is good suited. If the mainboard does no longer has a serial port, use a USB-Serial converter. The handling is:
Open Coolterm with Mac OS port "serial1" or what you get from the USB-Serial converter.
Press button IO - Select RS232 Port for the printer
Press button Display - State Listing
Press button IO - Print All
Copy and paste the CoolTerm data into a text file
LIF Floppy Disks, Reading and Writing on a PC
Fortunately there is a Win32 command line tool for reading and writing LIF Floppy Disks: http://www.hp9845.net/9845/projects/hpdir/
Just when you want to use the 1024 bytes per sector format of the HP1652B it gets complicated.
With the analyze option of program fdio you can get the format description. In order to use it, you have to copy file fdc.ini.sample to fdc.ini. Then you add a new line at the end of the file:
17 = "HP1652B 3.5 DS/DD1024", 0x10, 1, 790, 79, 2, 5, 790, 1,1024, 2, 0x16, 0x2c, 0xdf, 1, 0, 0, 0x40 Analysis summary: ----------------- Rotational speed: 299 RPM Form factor: 3.5" Track density: 135 tpi (high density) Capacity: 808960 bytes (790k) Data rate: 250 kbit/s Modulation: MFM Sector size: 1024 bytes First sector ID: 1 Sectors total: 790 Sectors per track: 5 Cylinders: 79 Heads: 2 Interleave: 1:1 Minimum R/W GAP3: 0 bytes (22 recommended) Format GAP3: 44 bytes (44 recommended) Head skew: 0 Cylinder skew: 0
In order to use program fdio or hpdir with those floppy disks you have to use then option -preset 17.
List of pages in this category:
-- RudolfReuter 2011-07-11 13:40:27