content/hp34970a_3.rst

Sun, 26 Jun 2016 01:32:13 +0200

author
David Douard <david.douard@logilab.fr>
date
Sun, 26 Jun 2016 01:32:13 +0200
changeset 63
64a7d3e2b2a8
child 64
dcb6f3fcbd1e
permissions
-rw-r--r--

[hp34970a] poc of an arduino display

63
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
1 ==========================================
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
2 HP 34970A Data Acquisition Unit - part 3
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
3 ==========================================
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
4
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
5 :Author: David Douard
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
6 :Category: Electronics
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
7 :Tags: HP, 34970A, DMM, repair, test equipment
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
8 :series: HP 34970A repair
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
9 :series_index: 3
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
10
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
11
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
12 As explained in `the previous post in this series <{filename}/hp34970a_2.rst>`_, I've started to sniff the serial
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
13 protocol between the main board and the display panel so I can replace
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
14 the failed VFD by an OLED or TFT display managed by an arduino or
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
15 similar.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
16
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
17 Protocol
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
18 ========
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
19
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
20 The serial communication takes place at a rather unusual speed: 187.5
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
21 kbits/s, otherwise, a standard 8N1 scheme.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
22
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
23 The protocol consist in a transmission frame with a start of
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
24 transmission handcheck, some commands with arguments, and an end of
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
25 transmission packet.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
26
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
27 Each transmitted character is acknowledged by the receiver, either by
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
28 a ``<0x99>`` (for the initial handcheck) or by a ``<0x00>`` for the
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
29 other ones..
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
30
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
31 I've only probed the CPU->DP communications. I don't really care the
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
32 other way fr now since I plan to keep the original 80C51 so it manages
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
33 this protocol and handle the keyboard.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
34
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
35 In the direction CPU->DP, we can find:
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
36
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
37 - ``<0x66>``: start of transmission, must be acknowledged by a
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
38 ``<0x99>`` by the receiver; this start of transmission is then followed by a "command":
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
39
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
40 - ``<CMD> <NCHAR> <CHAR1> ... <CHARN>``: the command byte is followed
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
41 by the numer of characters sent as argument, then the characters
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
42 themselves.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
43
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
44 - ``<0x55>``: end of transmission.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
45
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
46
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
47 I've only identified 2 commands for now, but these are the most
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
48 important ones:
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
49
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
50 - ``0x00``: send the chars to the main display
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
51 - ``0x0C``: send the chars to the secondary channel display
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
52
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
53
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
54 Quick prototype
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
55 ===============
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
56
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
57 With this very incomplete reverse ingeeniring of the communication, I
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
58 have enough meat to try a quick prototype.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
59
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
60 I've used an Arduino Uno and a cheap 3.2" TFT color display. As I
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
61 wanted to have my serial protocol to debug the code for the beginning,
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
62 I've used the SoftwareSerial_ library for this prototype.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
63
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
64 The result is this beautiful clean setup:
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
65
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
66 .. image:: {filename}/images/hp34970a/poc_display.jpg
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
67 :alt: A very quick proof of concept of an arduino based display replacement for the HP34970A.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
68
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
69
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
70 As you can see, it works: I have the main content od the VFD display
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
71 on my TFT module!
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
72
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
73 .. image:: {filename}/images/hp34970a/poc_display_mux_off.jpg
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
74 :alt: The FTF display showing the main area and the current channel area.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
75
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
76 .. image:: {filename}/images/hp34970a/poc_display_vdc.jpg
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
77 :alt: The same with the channel 209 configured as VDC, 6.5digits.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
78
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
79
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
80 The job is far from finished however: I still have to figure out how
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
81 the "annotation" flags are encoded and display them, and most
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
82 importantly, I have it make it work with the hardwre USART of the
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
83 mega328. This seems to mbe necessary because I have glitches
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
84 sometimes. But I'm very happy it worked almost at my first try. I was
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
85 quite surprised since the baudrate is above the maximum officially
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
86 supported one (115200).
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
87
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
88 I'll release the code of the prototype any time soon.
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
89
64a7d3e2b2a8 [hp34970a] poc of an arduino display
David Douard <david.douard@logilab.fr>
parents:
diff changeset
90 .. _SoftwareSerial: https://www.arduino.cc/en/Reference/SoftwareSerial

mercurial