Author Topic: HP 3478A ROM modification - relative mode  (Read 5758 times)

0 Members and 1 Guest are viewing this topic.

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
HP 3478A ROM modification - relative mode
« on: December 18, 2018, 05:04:02 am »
I've been working on this for a while... I've always wanted a "relative mode" or "Zero" function for the Ohms mode, to cancel out probe resistance.

Pretty straightforward:
- analyzed the ROM disassembly
- implemented a basic emulator in MAME (merged, should be in next release !)
- write some test patches, https://github.com/fenugrec/hp3478a_rompatch
- bang my head against the wall a.k.a. doing BCD math in 80's vintage MCS-48 assembler

And finally... it (mostly) works !

I messed up something in the annunciator toggling, I'll have to run it under MAME again to see what's up with that. Actually I didn't emulate the annunciators at all  so it was a bit of a shot in the dark...
 
The following users thanked this post: SeanB, MadTux, coromonadalix, l3VGV, Photoman, kj7e, kirill_ka, Wollvieh, alm, wolfy007, precaud, GregDunn

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5854
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #1 on: December 18, 2018, 08:09:32 pm »
Seriously  ???  WOW WOW WOW  :-+
 
The following users thanked this post: siggi

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #2 on: December 19, 2018, 04:08:18 pm »
Now that is my kind of hack. I really like this.  :-+

I did something similar to a TTi TSX1820 power supply. I read out the code in its PIC microcontroller (no code protect bit was set!), disassembled and reverse engineered it, and added a few features. It can now calculate and display Watts, Watt-hours, and Amp-hours, and it periodically sends this and the volt/amp readings to an optically isolated serial port for PC logging. The Amp-hours display is very handy when using the supply to charge batteries. One of these days I'll post a thread about that hack...
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: HP 3478A ROM modification - relative mode
« Reply #3 on: December 19, 2018, 05:55:14 pm »
TTi has also implemented a similar hack. It is called TSX1820P. :-)
 

Offline kirill_ka

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: HP 3478A ROM modification - relative mode
« Reply #4 on: December 20, 2018, 03:32:42 pm »
I've been working on this for a while... I've always wanted a "relative mode" or "Zero" function for the Ohms mode, to cancel out probe resistance.
You might want to take a look at my project:
https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/
I've also implemented  "Zero" function by other means.
It would be much nicer if I had access to full keyboard via GPIB. Do you think it would be easy to modify ROM in that way?
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #5 on: December 20, 2018, 04:34:26 pm »
I've been working on this for a while... I've always wanted a "relative mode" or "Zero" function for the Ohms mode, to cancel out probe resistance.
You might want to take a look at my project:
https://www.eevblog.com/forum/projects/project-extending-hp3478a-functionality/
I've also implemented  "Zero" function by other means.
It would be much nicer if I had access to full keyboard via GPIB. Do you think it would be easy to modify ROM in that way?
I remember that project, that was another very cool mod. Thanks for releasing the code into the wild.
 

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #6 on: December 21, 2018, 02:07:27 am »
You might want to take a look at my project:
I completely missed it ! Interesting approach, but I'm beginning to think both our projects would've been simpler just by completely replacing the main CPU with anything that runs faster than 400Khz (5.9Mhz/15)...

Quote
It would be much nicer if I had access to full keyboard via GPIB. Do you think it would be easy to modify ROM in that way?
Very doable.
See the keypad handlers at
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2190

The GPIB RX code is a bit more complex and I really didn't investigate a lot. When a character is received it's looked up in a table (GPIB_alphatbl[a]  @ 1306)
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2438
then some stuff happens ( I forget) and then there's a jump table here (GPIBjmp_1407)
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2654

The only ones I remember checking are 'X' and 'W' for read/writing to CAL RAM :
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2817
so the other stuff you may be interested in would definitely be around there.
 
The following users thanked this post: kirill_ka

Offline kirill_ka

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ru
Re: HP 3478A ROM modification - relative mode
« Reply #7 on: December 21, 2018, 09:04:25 am »
You might want to take a look at my project:
I completely missed it ! Interesting approach, but I'm beginning to think both our projects would've been simpler just by completely replacing the main CPU with anything that runs faster than 400Khz (5.9Mhz/15)...
I think you underestimate the cost of developing a complete firmware like that. I won't do it for free, lets put it in this way :)

Quote
It would be much nicer if I had access to full keyboard via GPIB. Do you think it would be easy to modify ROM in that way?
Very doable.
See the keypad handlers at
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2190

The GPIB RX code is a bit more complex and I really didn't investigate a lot. When a character is received it's looked up in a table (GPIB_alphatbl[a]  @ 1306)
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2438
then some stuff happens ( I forget) and then there's a jump table here (GPIBjmp_1407)
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2654

The only ones I remember checking are 'X' and 'W' for read/writing to CAL RAM :
https://github.com/fenugrec/hp3478a_utils/blob/master/ROM_disasm/dc118.d48#L2817
so the other stuff you may be interested in would definitely be around there.

Thank you. I'll look into this.
 

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #8 on: December 23, 2018, 12:20:28 am »
I think you underestimate the cost of developing a complete firmware like that. I won't do it for free, lets put it in this way :)
It's just an idea, but I didn't mean re-writing the entire firmware from scratch. A lot of the code is not very critical and could be simply translated/recompiled : the MCS48 instruction set is very simple, and with each opcode taking 15 (!) clock cycles to execute, it wouldn't take a lot of modern processing power to emulate that. The only time-sensitive code I've seen is the bit-banged async serial comms with the analog CPU. The only other difficulty I see is managing the chip-select lines for DIP switch / GPIB / LCD multiplexing. But again, even a cheap ARM mcu clocked at 48MHz has around 100x the throughput of the 8039...

But yeah, I wouldn't do it either - not at this stage.
 

Offline Ringmodulator

  • Regular Contributor
  • *
  • Posts: 123
  • Country: de
Re: HP 3478A ROM modification - relative mode
« Reply #9 on: September 16, 2019, 07:21:20 am »
Hi,

I would appreciate, if someone could post the patched rom file for the relative mode.

Thanks
Chris
 

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #10 on: September 16, 2019, 01:08:12 pm »
I would appreciate, if someone could post the patched rom file for the relative mode.

Hi,
I didn't upload it yet, mainly because it wasn't ready for release, and I wanted to get that annunciator working. Also hoping that an assembly enthusiast / BCD veteran will show up and look at the original math code to tell me if I'm understanding it correcly.
 

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #11 on: November 04, 2020, 02:29:21 pm »
and I wanted to get that annunciator working.

1 year later, after using used relative-mode a lot recently and not having the the MATH annunciator to show was very error prone when changing mode / range.

Finally understood the disassembly a bit better and was able to make MATH appear ! And with the help of MAME devs, I added the annun segments the emulated LCD too :
1102964-0

It's almost "good enough" , now I want to exit relative-mode as soon as any key is pressed. As I said, it's way too error prone otherwise. Once that works I should be able to post a patched ROM ready to burn.
 
The following users thanked this post: lowimpedance, uski, Kean, MadTux, TERRA Operative, YetAnotherTechie

Offline uski

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
Re: HP 3478A ROM modification - relative mode
« Reply #12 on: November 06, 2020, 12:10:42 am »
Pretty awesome to see a multimeter emulated in MAME...
We have a homebrew scene on multimeters now. Who expected that years ago ?

Can't wait to see what else you will add :)
 

Offline fenugrecTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: ca
Re: HP 3478A ROM modification - relative mode
« Reply #13 on: November 29, 2020, 07:06:12 pm »
I think this project is now "done".

- MATH shows !
- meter will not activate relative mode unless in Manual range (otherwise the saved offset doesn't make any sense if the range changes)
- meter will exit relative mode when any key is pressed

source code & patched ROM ready to test (currently running it on my meter)
https://github.com/fenugrec/hp3478a_rompatch

demo :
 
The following users thanked this post: uski, Kean, coromonadalix, l3VGV, wolfy007, precaud, DavidKo


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf