Author Topic: reverse ingeeniring hp 34xxx display panel serial protocol  (Read 5090 times)

0 Members and 1 Guest are viewing this topic.

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
reverse ingeeniring hp 34xxx display panel serial protocol
« on: June 24, 2016, 10:53:01 pm »
Hi,

having a mostly dead display on my hp 34970a data acquisition unit (which I talk about here https://www.eevblog.com/forum/repair/agilent-34970a-battery-replacement-and-repair/msg953988/#msg953988 and on my blog https://whatever.sdfa3.org/hp-34970a-data-acquisition-unit.html), I've decided (unless I find some simpler solution) to replace the original VFD display by some OLED display controlled by a microcontroller.

My first idea was to read the data from the port 1 of the 80C51 on the display panel board. This port is used to control  the VFD drivers, which are simple 32 bits shift registers. But  the microcontroller seems to have suffered and some of the ouputs of this port 1 look dead (P1.0 aka SEGEN_N and P1.3 aka SEGDATA). I could have lived without SEGGEN_N, but SEGDATA is a bit more problematic.

So now I'm considering to make my arduino probe the serial communication between the display panel and the main board. For now, I want to try to keep the original 80C51 since it still handle the keyboard properly, and most importantly the communication with the main board.

So I wonder if anyone already have done the required reverse engineering on this bus.  It does not look very complicated, but hey. 

In the service manual it's briefly described as a 187500 b/s serial communication with 1 stop bit. It's also described as a 9 data bits but from my tests it looks like a normal 8 bits payload (plus 1 start bit and 1 stop bit).

So if anyone already has done this job on a similar unit (I guess all HP test gears from this generation use the same protocol), I'm very interested.

Otherwise, I'll publish my experiments (on my blog and here).


David
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #1 on: June 24, 2016, 11:07:49 pm »
Just a quick note on a few elements of the protocol I've gathered so far:

- a communication starts with a 0x66 and is acknowledged by a 0x99
- a communication ends with a (unacknowledged) 0x55
- every sent character is aknowledged by a 0x00
- after the "start of communication" handcheck, a command byte is sent
- the command 0x00 is used by the main board to send text to display. It's followed by the number of chars to display, then the characters
- the command 0x0C is used to send characters in the channel digits area (the process to write text on the main display (number of chars then the character).

David

 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1358
  • Country: dk
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #2 on: June 25, 2016, 08:32:45 am »
Interesting

Someone did it for a 6632B , told about it , but kept it Closed Source  :'(
https://www.eevblog.com/forum/buysellwanted/hp-6632b-power-supply-replacement-oled-screen-(done)/

Thanx for not doing that.

/Bingo
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #3 on: June 25, 2016, 10:12:54 am »
Interesting

Someone did it for a 6632B , told about it , but kept it Closed Source  :'(
https://www.eevblog.com/forum/buysellwanted/hp-6632b-power-supply-replacement-oled-screen-(done)/

Thanx for not doing that.

/Bingo

Not a chance, I'm a FOSS nut, I only use FOSS software, I only write FOSS software, be it for my personal or professional use  :-)

I've used sigrok to probe and decode the serial packets, and I'm trying to write a backend for hp34970a for it (but my C is very rusty so I'm dawn slow on this side project).   

About this VFD replacement project, I was thinking that, if I'm going all the way through, some guys might be interested if I make a small PCB. If there are some interest here, I might bother to design and order such a board. If I'm the only one interested, I'll probably be content with a breadboard prototype.

But I need to show a working minimal viable product, as we say in our jargon :-)

I think with the portion of the protocol I've already decoded, I have enough meat to make such a proto with an arduino (not sure whether its UART supports 187500bauds, need to check that).


David
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 6115
  • Country: de
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #4 on: June 25, 2016, 12:28:35 pm »
For the odd 187500 Baud rate the arduino might need a suitable crystal (e.g. a multiple of 3 MHz) otherwise the UART inside an AVR is fast enough. At the higher rates the divider is just limited to a few values, so that one might need a suitable clock.
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #5 on: June 25, 2016, 11:43:27 pm »
First victory tonight:


I have a working prototype of an arduino sniffing the serial bus between the CPU and the DP, and displaying the data on a small TFT module.




I still need to understand how the indicators are handled, but I'm pretty happy so far. For now, my proto uses the SoftwareSerial lib (I wanted my hw serial connection for debugging purpose), but I'll try using the USART next time. I did not have to change the chrystal. However, with the SoftwareSerial, I have a few glitches.

We'll see how it behaves with the hw USART of the mega328.

David



 
The following users thanked this post: MudMan

Offline ManateeMafia

  • Frequent Contributor
  • **
  • Posts: 718
  • Country: us
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #6 on: June 26, 2016, 12:36:58 am »
Great job ! :-+

 

Offline mrjoda

  • Contributor
  • Posts: 48
  • Country: sk
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #7 on: June 26, 2016, 07:59:19 am »
excellent work.  Dont give up, it could help lot of people.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 7853
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #8 on: June 26, 2016, 08:16:43 am »
Great start, David! :clap: Excited to see this come together. Thanks for diving in and for sharing.

I wonder how similar it'll be between your 34970A and devices such as the 34401A, 34410A, 33120A, E363xA, E364xA, etc. Although the 34401A has replacement displays available from China, other devices aren't as fortunate.
I TEA.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11968
  • Country: gb
    • Mike's Electric Stuff
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #9 on: June 26, 2016, 09:08:18 am »
For the odd 187500 Baud rate the arduino might need a suitable crystal (e.g. a multiple of 3 MHz) otherwise the UART inside an AVR is fast enough. At the higher rates the divider is just limited to a few values, so that one might need a suitable clock.
187500x16=3MHz, so 6 or 12MHz would be ideal, the latter probably  more common value
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: bitseeker

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #10 on: June 29, 2016, 09:36:03 pm »
Not a surprise then that the 87C51 runs at 12Mhz .

With my Arduino Uno running at 16MHz, I can make it work (either with the SoftwareSerial or the hardware serial), but there are always glitches and decoding errors.

I've tried to tune "by hand" the timings using a modified version of the SoftwareSerial library, but it's not  easy since at this communication speed, every "debug" statement added (eg. pulse a pin) changes substentially the timings.

I've ordered a NUCLEO F031K6 to see if I get better results (since it runs at 48MHz, ie. 256x187500, the baud rate).

I've updated a bit my blog post on the reverse engineering of the protocol since I have identified a few indicator flags, like VIEW, MON, 4W.

David
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11968
  • Country: gb
    • Mike's Electric Stuff
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #11 on: June 29, 2016, 10:34:57 pm »
Not a surprise then that the 87C51 runs at 12Mhz .

With my Arduino Uno running at 16MHz, I can make it work (either with the SoftwareSerial or the hardware serial), but there are always glitches and decoding errors.

Or just change the crystal on the Arduino
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #12 on: June 30, 2016, 04:31:09 pm »
Or just change the crystal on the Arduino

Sure, but:

- I want to play with Nucleo boards (which I don't know yet),
- I need a small form factor board so I have change to fit it in the the front -panel assembly
  (I only have a pair of Uno R3), so I had to buy a new "tiny" board what so ever for my prototype,
- I was a bit worried that changing the crystal might have side effect when using the arduino soft stack.

David
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 6115
  • Country: de
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #13 on: June 30, 2016, 04:45:23 pm »
Changing the clock will change all the timings, unless you let the software know the actual clock. The other hardware / software should have no problem with a lower clock, though there is a slight chance to get rounding errors with some timings.
Soft UART can be more flexible with the baud rate, but 187500 baud is already quite fast for a software UART, so it can get tricky if much other things have to be done and it is often also more sensitive to noise on the lines.

The nucleo board might be a good option if your program get rather long. The ARM's often have fractional  dividers for the UART, so they usually don't need an special clock matching the baud rate. So no real need for a multiple of 3 MHz. The multiples of 12 MHz are preferred for USB.
 

Offline douardda

  • Regular Contributor
  • *
  • Posts: 75
  • Country: fr
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #14 on: September 18, 2016, 10:21:49 pm »
Hi,

I've made some progress recently (after a long pause). I'm now using a Nucleo F446RE board, and I've bought a 3.2" blue OLED display.



Here is a blog entry on my latest work:

    https://whatever.sdfa3.org/hp-34970a-data-acquisition-unit-part-4.html

I have also written a dedicated page on the communication protocol between the CPU and the DP:

   https://whatever.sdfa3.org/hp-34970a-data-acquisition-unit-communication-protocol.html

I'm beginning to have something. The display is not responsive enough for now  (as I explain in my blog, I send the whole display content each time something changes), and I still have bugs and flag values I have not identified yet, but, it begins to looks quite fine IMHO, and I don't miss bytes from the serial line any more: I've reimplemented the serial "sniffing" code using asynchronous (interrupt based) code, and I now listen both the Rx and the Tx wires, otherwise I cannot be sure of what I read on the serial Rx line. Also, thanks to the RTOS that comes with the mbed platform, I've put the routine that send the "framebuffer" content to the OLED module in a dedicated thread.   


I hope to be able to publish my code soon.



David

 
« Last Edit: September 18, 2016, 10:24:08 pm by douardda »
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 7853
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: reverse ingeeniring hp 34xxx display panel serial protocol
« Reply #15 on: September 18, 2016, 11:00:08 pm »
Excellent progress, David. Glad to see your project is proving to be a viable solution.
I TEA.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf