HP97 The journey begins
|
11-18-2021, 02:15 AM
(This post was last modified: 11-18-2021 02:22 AM by teenix.)
Post: #510
|
|||
|
|||
RE: HP97 The journey begins
Hi all,
More progress... I have the basic 97S interface working. The connection is via an electrically isolated RS232 port at the top rear of the circuit board. This can be directly connected to any 5V device that can accept a serial port, examples are: PIC or other processor, Arduino, Raspberry Pi, even PC via FTDI USB or similar. The user would be expected to know how to program these devices so that they can process whatever it needs to and convert that into a simple data stream to the 97. The serial protocol is very simple, so far only 3 commands, and operates at 19200 baud [8N1]. I programmed a small PIC to read the voltage on one of its pins when a button was pressed. The pin was connected to a trimpot that can adjust the voltage between 0 and 5 volts. I put some simple code together that converts the voltage to BCD values with a units digit and three digits after the decimal point. When the button was pressed the PIC read its A2D converter and produced a 10 bit result of $294. The simple code converts this to a BCD value which is 3229. The 97S has digit values for a decimal point [10] and Continue at A [13] so those were added. Therefore for a BCD voltage of 3229 with a fixed decimal point, the data created is [3][10][2][2][9][13]. If the 97S module is enabled on the 97 by the user, and it can accept new data, it is sent (in this case) as 3 packed bytes -> 3A 22 9D. The 97 will receive this data then convert it to keycodes and add them to the [PIK] key buffer. The 97 had a simple program created - [LBL A] [FIX 3] [PRINT X] [RTN] The result of all this is that when a button press occurred, 3.229 was displayed and printed. At some future time, the printer may also be used to append a message so that, it might print "3.229 VOLTS" or "WEIGHT: 3.229 KG". cheers Tony |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)