content/hp34970a_protocol.rst

changeset 68
4fa6621fec0f
child 69
56bcb94f6ff5
equal deleted inserted replaced
66:70aad9a1272b 68:4fa6621fec0f
1 ==========================================================
2 HP 34970A Data Acquisition Unit - communication protocol
3 ==========================================================
4
5 :Author: David Douard
6 :Category: Electronics
7 :Tags: HP, 34970A, DMM, repair, test equipment
8 :series: HP 34970A repair
9 :JavaScripts: default.js, WaveDrom.js
10
11 In order to build a replacement display for the HP34970A data
12 acquisition unit, I needed to understand the communication protocol
13 between the CPU board and the front panel assembly.
14
15 General description
16 ===================
17
18 The unit is built with four boards:
19
20 - A1 is the main bard, with the PSU, the main controller and the floating logic,
21
22 - A2 is the front panel with the display and the keypad,
23
24 - A3 is the backplane on which I/O modules are plugged,
25
26 - A4 is the (optional) internal 6.5 digits DMM.
27
28 .. image:: {filename}/images/hp34970a/block_diagram.svg
29 :alt: System Block Diagram of the HP34970A.
30
31
32 The commnucation between the different system blocks is done with
33 asynchronous serial links. They use the rather uncommon bit rate of
34 187500 baud, with a classic 8N1 schema.
35
36
37 The CPU <-> Display Panel communication protocol
38 ================================================
39
40 The communication protocol between the main controller (CPU) board and
41 the display panel (DP) consists in "datagrams" sent using the general
42 pattern:
43
44 - when a device (CPU or DP) wants to take control of the communication
45 bus, it sends a ``Start of Transmission`` (SoT) signal (0x66),
46
47 - each sent char (but the end of transmission) must be acknowledged
48 (ack value may vary),
49
50 - at the end of a communication, the initiator send a "End of
51 Transmission" (EoT, 0x55). This sent value is not acknowledged.
52
53 - the keyboard can interrupt a CPU->DP communication in progress by
54 not acknowledge a received byte, but sending a SoT instead of the
55 expected ACK value,
56
57 - acknowledge values are:
58
59 - 0x99 as a response to the SoT,
60
61 - 0x00 otherise
62
63
64 The CPU->DP transmission protocol looks like:
65
66 .. wavedrom::
67
68 { signal: [
69 {name: "Rx", wave: "z3x4x4x=x=x|.=x3x", data: ["0x66", "CMD", "LEN", "D0", "D1", "Dn", "0x55"] },
70 {name: "Tx", wave: "zx5x5x5x5x5x|.5x.", data: ["0x99", "0x00","0x00", "0x00", "0x00", "0x00"] },
71 ]}
72
73 Two (or more) datagrams can be transmitted in a single "transmission",
74 ie. without sending the EoT byte, eg.:
75
76 .. wavedrom::
77
78 { signal: [
79 {name: "Rx", wave: "z3x4x4x|=x3x4x|3x",
80 data: ["0x66", "0x0C", "0x03", "D3", "0x66", "0x0A", "0x55"] },
81 {name: "Tx", wave: "zx5x5x5x|5x5x5x|x",
82 data: ["0x99", "0x00", "0x00", "0x00", "0x99", "0x00"] },
83 ]}
84
85
86 When the user press a key on the front panel, a slightly simpler "packet transmission" occurs:
87
88 .. wavedrom::
89
90 { signal: [
91 {name: "Rx", wave: "zz5x5xx", data: ["0x99", "0x00"]},
92 {name: "Tx", wave: "z3x4x3x", data: ["0x66", "KP", "0x55"]},
93 ]}
94
95
96 Sending data to the main display
97 ================================
98
99 The main display consist in 13 17-segments digits, in which the
100 character is displayed by a main 14-digits, and the punctuation with 3
101 segments (2 dots and a comma, allowing to represent the signs ".",
102 ",", ":" and ";"). Punctuation signs are also very close to the
103 preceding chracters.
104
105 .. image:: {filename}/images/hp34970a/digit.jpg
106 :alt: 17-segments digit of the main display.
107
108 The command used to send text to the main display is ``0x00``. The
109 character ``0x09`` (tabulation) has a special meaning: it marks the
110 beginning and the end of a part of the text to be displayed darker
111 than the usual. This is used to emphasis a portion of the displayed
112 text. Also, as the punctuation signs do not consume a digit, the
113 displayed text can be larger than 13 characters.
114
115
116 Sending data to the Channels display
117 ====================================
118
119 This area only allows to display 3 7-segments digits. The command is
120 ``0x0C``, the payload is thus 3 bytes long.
121
122 .. image:: {filename}/images/hp34970a/channel.jpg
123 :alt: The display area dedicated to current channel.
124 :align: center
125
126 Flags
127 =====
128
129 The display also has several flags. Display flags are selected by
130 sending the ``0x0A`` command. The payload is 4 bytes long. Each bit
131 of these 4 bytes represent a flag on the display.
132
133 Let's consider the following (we don't represent the acknowledgements here):
134
135 .. wavedrom::
136
137 { signal: [
138 {name: "Rx", wave: "z344====3x",
139 data: ["0x66", "0x0A", "0x04", "F1", "F2", "F3", "F4", "0x55"]}
140 ]}
141
142 Then the flags I've identified so far are:
143
144 .. wavedrom::
145
146 { signal: [
147 {name: "bit", wave: "z========z",
148 data: ["7", "6", "5", "4", "3", "2", "1", "0"]},
149
150 {name: "F1", wave: "z=3333333z",
151 data: ["", "HI", "Alarm", "LO", "Channels", "Ch. frame", "Mx+B", "<Bell>"]},
152 {name: "F2", wave: "z===33333z",
153 data: ["", "", "", "4W", "1", "3", "4", "2"]},
154 {name: "F3", wave: "z========z",
155 data: ["", "", "", "", "", "", "", ""]},
156 {name: "F4", wave: "z=3=33===z",
157 data: ["", "CONFIG", "", "MON", "VIEW", "", "", ""]},
158 ],
159 config: { hscale: 2 },
160 }
161
162
163
164
165
166 Keypad
167 ======
168
169 Note that the front panel sends a "key press event" and a "key
170 released event", depending on the value of the bit 7:
171
172 :0: key pressed
173 :1: key released
174
175 The bit 8 of the key event byte is set high for the knob.
176
177 .. wavedrom::
178
179 {signal: [
180
181 {name: "bit", wave: "z========z",
182 data: ["7", "6", "5", "4", "3", "2", "1", "0"]},
183 {name: "KP", wave: "z34=.....z",
184 data: ["Knob", "Key", "Key Code"]},
185 ],
186 config: { hscale: 1 },
187 }
188
189
190 The key codes are:
191
192 :0x00: View
193 :0x01: Mon
194 :0x02: Sto/Rcl
195 :0x03: Scan
196 :0x04: Alarm
197 :0x05: Mx+B
198 :0x06: Measure
199 :0x07: Interval
200 :0x08: Card Reset
201 :0x09: Close
202 :0x0A: Open
203 :0x0B: Read
204 :0x0C: Shift
205 :0x0D: Write
206 :0x0E: Left
207 :0x0F: Right
208
209 :0x10: Advanced
210 :0x11: Step
211
212 For the knob (including the "Knob" bit):
213 :0x80: Knob left
214 :0x81: Knob right

mercurial