Low Cost PCB's Low Cost Components

Author Topic: HP 3478A: How to read/write cal SRAM  (Read 4739 times)

0 Members and 1 Guest are viewing this topic.

Offline MarkL

  • Supporter
  • ****
  • Posts: 1134
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #25 on: May 23, 2017, 12:30:25 PM »
...
The 8048 is quite weird: without CMP or SUB instruction, and also with those pages, mb0/mb1 selector, and bit 12 of program counter. I think I will not be able to find how it works. Is there any thread or progress about that? when I use strings on the ROM I cannot get any useful data. I will need to read the schematics more in detail.
What are you trying to do?

I think it's going to be difficult to simulate operation of the firmware.  It's very dependent on responses from the hardware.  So, you also have to simulate the hardware, which also means simulating the 8039 in the floating section.

If you're trying to discover the CRC/ECC algorithm, I think you're going to need a logic analyzer attached to a running meter as I described previously.

If you're looking for other hidden commands, the ones that aren't accounted for are: A G I J L O P Q U V Y.  The 3478A is a fairly simple machine, so I wouldn't expect anything else hidden of significance.

Some other discussion of 3478A firmware disassembly is here:

  http://www.eevblog.com/forum/testgear/3478a-cal-ram-readout-idea

And there's also this thread on the 3468A, which is very similar in design:

  http://www.eevblog.com/forum/testgear/hp-3468a-in-continual-resetinit/


Yeah, the 8048 is very limited.  The SUB instruction can be done with the following:

  CPL A
  ADD A, REG
  CPL A

(Courtesy of the MCS-48 Microcomputer User's Manual.)
 

Offline ramon

  • Newbie
  • Posts: 3
  • Country: tw
Re: HP 3478A: How to read/write cal SRAM
« Reply #26 on: May 24, 2017, 02:04:02 AM »
Thanks for those links, they have very useful information.

I am not looking for other gpib commands. I would like to identify the small set of functions that interface with the floating section. How it initiates requests (ohms, VDC, ...) and gets back the data. Also know all the fields of the calibration RAM, including the CRC/ECC algorithm too.

But as I don't have a logic analyzer it will be difficult.

I can try maybe to find out how the alphanumeric display works. I have seen that it is using Ports P20 to P23 (P23/PWO=1 Update display, P23/PWO=0 No update). That maybe will be the only way I have to find the correct strings into the ROM.
 

Offline dfrederickson

  • Contributor
  • Posts: 13
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #27 on: May 24, 2017, 03:34:00 AM »
The calibration procedure needs so many kinds of expensive calibration devices (in AC,DC,ohms, etc...) that it doesn't make any sense to have such easy-to-turn calibration switch in the front panel. How many devices should have been uncalibrated by mistake?.
Our 3478's have a calibration sticker over the front-panel switch, plus, undocumented commands need to be sent, so I'd say not very many.

Quote
Do they did that on purpose to increase earnings from maintenance services?
Most folks get their instruments calibrated by a third party, so probably not.

If you're trying to discover the CRC/ECC algorithm, I think you're going to need a logic analyzer attached to a running meter as I described previously.

I don't know the algorithm, but I do know the default values for the 3468:

0000000000000000
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000FFFF
000000000000000


So for a default gain of 1 (maybe saved as gain-1) and an offset of zero, the ECC checksum is 0xFFFF.

I suspect the 3478 checksum is similar.
 

Offline nfmax

  • Frequent Contributor
  • **
  • Posts: 537
  • Country: gb
Re: HP 3478A: How to read/write cal SRAM
« Reply #28 on: June 13, 2017, 12:23:34 AM »
Here is a short Python 3 program to download the calibration RAM and print it to stdout, using the tentatively identified formatting. It uses the PyVISA library and so should run on any platform that has a VISA implementation. I tested it on Windows 7, using the Keysight IO libraries with a 82357B USB/GPIB controller.

The VISA address of my DVM is hard-coded in the source, but it's easy enough to change.

It seems to work OK, but I am a novice Python programmer, and there are no guarantees!
 
The following users thanked this post: edavid

Offline WaveyDipole

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: HP 3478A: How to read/write cal SRAM
« Reply #29 on: June 14, 2017, 03:46:51 AM »
Thanks for this information :-+. Backing up thew CAL data was one of the first questions I asked when I got my  meter. It was calibrated but the battery still looked original and a replacement seemed sensible sooner rather than later. Unfortunately this answer didn't come soon enough so after a bit of research I did the replacement without a backup, which was quite nerve racking. I was a major relief when I completed the task and got the 'SELF TEST OK' message on power up! :phew:

I have since written a program to control the 3478A. It still needs a bit of work on it but I am thinking of  including the CAL backup/restore functionality into it. The only problem I have, is that I am using an Arduino based GPIB adapter. As far as I know, there is no NI driver for it, so I'm using direct COM port communication. I will upload the source somewhere when its ready though. It is written inn QT and although I'm currently working on Windows, I will also test it on Linux. In the meantime I will keep an eye on this thread for further developments.

 
The following users thanked this post: 3db

Offline dfrederickson

  • Contributor
  • Posts: 13
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #30 on: June 14, 2017, 06:02:42 AM »
As far as I know, there is no NI driver for it, so I'm using direct COM port communication.

Looks like an NI driver can be found here: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=368
 
The following users thanked this post: 3db

Offline WaveyDipole

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: HP 3478A: How to read/write cal SRAM
« Reply #31 on: June 14, 2017, 07:03:55 AM »
Thanks. At least it seems one does exist. Unfortunately my version of Labview/NI/IVI does not appear to be supported. It seems to be Labview 2012 SP1f3 version 12.0.1 and came supplied with the Rigol Oscilloscope. Would there not also have to be a driver for the GPIB adapter?

 

Offline dfrederickson

  • Contributor
  • Posts: 13
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #32 on: June 14, 2017, 07:57:45 AM »
Sorry.  Yes, the adapter will need a driver to interface to LabVIEW.  It might be easier to just buy an adapter off eBay, like I did.
 

Offline WaveyDipole

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: HP 3478A: How to read/write cal SRAM
« Reply #33 on: June 29, 2017, 01:23:49 AM »
I have uploaded my HP3478A control program code to GitHub. This is the first time I have ever done that!

https://github.com/WaveyCode/HPRDMM

At present it does not contain the code for reading the calibration data as I'm having lots of trouble acquiring it from the meter. I suspect this is down to the Arduino adapter, but I'm not sure. I've been experimenting with a python script and got something that resembles the output I should be getting but its not 256bytes long and contains the phrase 'CR or LF inserted' which is an error message embedded in the adapter code. Sorry, but I don't have an NI capable GPIB adapter to test with.
 

Offline iainwhite

  • Supporter
  • ****
  • Posts: 123
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #34 on: June 30, 2017, 02:08:55 AM »
I have been playing with Pigrew's windows C# program   (from  https://github.com/pigrew/HP3478Ctrl )

I forked my own version at  https://github.com/iainkwhite/HP3478Ctrl
and after tinkering a bit, managed to read my cal data.

Here is what I got (formatted to lines of 16 bytes)

Code: [Select]
@@@@[email protected]@
@@[email protected]@@@@
BBMMMAMCIIIIIEBM
@MLJEIIIIIIBMCMA
[email protected]@@@@@@@@@@[email protected]
@@FFCADAACNFIIIH
[email protected]
[email protected]@[email protected]
[email protected]@EDEMJN
[email protected]
[email protected]
@[email protected]@@BFBCLC
[email protected]@@@@BFCLEAEM
[email protected]@@@@@@@@@@[email protected]@
@[email protected]@@@@
@@@@@@[email protected]@@@@@@@


Edit: add screenshot


« Last Edit: June 30, 2017, 02:18:46 AM by iainwhite »
 

Offline pigrew

  • Regular Contributor
  • *
  • Posts: 216
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #35 on: June 30, 2017, 02:24:21 PM »
I have been playing with Pigrew's windows C# program   (from  https://github.com/pigrew/HP3478Ctrl )

I forked my own version at  https://github.com/iainkwhite/HP3478Ctrl
and after tinkering a bit, managed to read my cal data.

Thanks for the changes, I've merged most of the changes back into my branch, and posted a new binary:
https://github.com/pigrew/HP3478Ctrl/releases/tag/v0.20170630

-Nathan
 
The following users thanked this post: kado

Offline WaveyDipole

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: HP 3478A: How to read/write cal SRAM
« Reply #36 on: July 01, 2017, 05:10:20 AM »
Sorry.  Yes, the adapter will need a driver to interface to LabVIEW.  It might be easier to just buy an adapter off eBay, like I did.
I had considered that option, but everything I have seen on there so far costs more than the meter did!
Of course, if I had something compatible then I could try pigrew's program!
 

Offline scuba31

  • Newbie
  • Posts: 1
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #37 on: August 13, 2017, 04:23:47 PM »
All,

Thanks to everyone who contributed to (finally) solving this problem!
I had never considered the "hidden GPIB command" possibility.
I was approaching this from the perspective that electronics would need to be designed and built to interface with the 5101 IC inside the multimeter.
I was just starting to lay out a prototype in Kicad when I decided to see if this had been solved in the 8 months since I last checked - and to my surprise, it has.  ;D

I have 3 of these HP3478A multimeters that I replaced the batteries using a torch solder iron.
Using the Visual Basic program provided on this forum, here are the calibration constants that my 3 multimeters report out.


Meter #1

@@@@[email protected]@@
@@[email protected]@@@@@
CBAACLNIIIIIIGBC
[email protected]@@@@@[email protected]
[email protected]@@@@@@@@@@[email protected]
@@[email protected]@@@
[email protected]@@@@[email protected]
[email protected]@@@@[email protected]@@
[email protected]@@@@[email protected]
@@@@@[email protected]@@@
@@[email protected]@@@@@@@
@[email protected]@[email protected]@@[email protected]
[email protected]@@@[email protected]
[email protected]@@@@@@@@@@[email protected]@
@[email protected]@@@@
@@@@@@[email protected]@@@@@@@


Meter #2

[email protected]@@[email protected]@[email protected]@
@@[email protected]@@@@@
[email protected]@[email protected]@
[email protected]
[email protected]@@@@@@@@@@@OOI
IICEAADABELNIIIH
@[email protected]@[email protected]@
[email protected]@O
[email protected]
[email protected]
[email protected]
@[email protected]@@@[email protected]@
[email protected]@@@@@[email protected]@ON
[email protected]@@@@@@@@@@OOII
[email protected]@@@@@
@@@@@@[email protected]@@@@@@@


Meter #3

[email protected]@@[email protected]@@
@@[email protected]@@@@
BAEBEONAIIIIIEAD
[email protected]@
[email protected]@@@@@@@@@@OOI
[email protected]@[email protected]
@[email protected]@
[email protected]
[email protected]
[email protected]@KMIII
[email protected]@IIIIIH
@EMDCKAIIIIBBBDA
CALLIIIIIBBDBELK
[email protected]@@@@@@@@@@OOII
[email protected]@[email protected]@@@@
@@@@@@[email protected]@@@@@@@
 
The following users thanked this post: 3db

Offline Squiddaddy

  • Newbie
  • Posts: 1
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #38 on: September 07, 2017, 10:35:55 AM »
Thanks pigrew!! I just downloaded your program and successfully read the SRAM from my 3478 meter.
Has anyone tried to write their values back using your program yet?
I am getting ready to try to replace the battery in my meter, and in case I lose my config, I'd like to know if it works.
I guess I'm gun shy to try it yet. :) I don't like being the guinea pig. LOL

Here are my SRAM values, in case someone is trying to analyze data between all of our posts.
@@@@[email protected]@[email protected]@@@ACBBNENMFIIIII
[email protected]
[email protected]@@@@@@@@@@[email protected]@@[email protected]
[email protected]@[email protected]@@@@@@@[email protected]
[email protected]@@@@@@[email protected]@@@@@@[email protected]@[email protected]@@
@@@@[email protected]@@@@@[email protected]
[email protected]@@@@@@@@@@[email protected]@
@[email protected]@@@@@@@@@@@[email protected]@@@@@@@

Thanks again to everyone involved in coming up with this solution to our problem!!!!
 

Offline pigrew

  • Regular Contributor
  • *
  • Posts: 216
  • Country: us
Re: HP 3478A: How to read/write cal SRAM
« Reply #39 on: September 07, 2017, 10:51:25 AM »
Thanks pigrew!! I just downloaded your program and successfully read the SRAM from my 3478 meter.
Has anyone tried to write their values back using your program yet?
I am getting ready to try to replace the battery in my meter, and in case I lose my config, I'd like to know if it works.
I guess I'm gun shy to try it yet. :) I don't like being the guinea pig. LOL

Here are my SRAM values, in case someone is trying to analyze data between all of our posts.
@@@@[email protected]@[email protected]@@@ACBBNENMFIIIII
[email protected]
[email protected]@@@@@@@@@@[email protected]@@[email protected]
[email protected]@[email protected]@@@@@@@[email protected]
[email protected]@@@@@@[email protected]@@@@@@[email protected]@[email protected]@@
@@@@[email protected]@@@@@[email protected]
[email protected]@@@@@@@@@@[email protected]@
@[email protected]@@@@@@@@@@@[email protected]@@@@@@@

Thanks again to everyone involved in coming up with this solution to our problem!!!!
Well,

I tested it out a while ago, but I think I had to fix a few issues I the code after that. I'm sure the command works, but there is a chance there are still bugs in my code.

-Nathan
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf