HP97 The journey begins
|
11-20-2021, 01:59 AM
(This post was last modified: 11-20-2021 02:06 AM by teenix.)
Post: #514
|
|||
|
|||
RE: HP97 The journey begins
Hi all,
I think I have finished the 97S interface and there were only 2 commands used. Just like the original interface, it is up to the user to determine how the data is to be represented. As far as the 97S is concerned, it only expects up to 10 BCD digits of data to act on. COMMAND SET 1: cmdReqStatus 2: cmdDigits ----------------- 1: cmdReqStatus This command can be sent from the interface to the 97S to interrogate the Status Flags Register. CMD Value: $F0 Returns: 1 Byte = Status Info Status Bit Definitions: 7 FlagChg 1 = 97 Flags changed state 6 Reserved 5 Reserved 4 Ready 1 = Ready 3 Flag 3 1 = Set 2 Flag 2 1 = Set 1 Flag 1 1 = Set 0 Flag 0 1 = Set The Ready Flag is cleared to 0 as per the states listed in the 97S manual. If the 97 Microcode changes its internal flags (Flag 3 for example) or the user changes the flags by pressing something like [f] [STF] [0], the Status Register will be automatically sent to the interface with bit [7] set = 1. This tells the interface that a flags change occurred and if the interface has output pins for the flag states, then they can mirror the change. ----------------- 2: cmdDigits This command should be sent from the interface to the 97S when ready to send digits. CMD Value: $F1 Returns: 1 Byte $F1 - Acknowledges command and the 97S is ready to receive up to 10 digits - Any other value, means the 97S will not accept new digits The 4 bit digit values are the same as listed in the 97S User Manual. 0 1 2 3 4 5 6 7 8 9 10 - DP 11 - EEX 12 - ENTER 13 - [A] 14 - Change Sign 15 - NOP The digit data stream needs to be terminated by a NOP if < 10 digits are to be sent, otherwise the 97S will standby expecting more data and will timeout after a second or so. Example: Read a weight gauge -> 34.27Kg Send digits Then run program [A] to process the data and reset Flag F3 Send [cmdDigits] $F1 if $F1 returned, send digits... 1 3 2 4 3 10 (DP) 4 2 5 7 6 13 (A) 7 15 (NOP) When the [A] program runs, as soon as Flag 3 is cleared, the Status Register will be sent to the interface with Bit7 = 1. The Ready flag will be clear because the program would have been running. The incoming digits are stored in a buffer and when ready they will be transferred to the PIK key buffer one at a time whenever that buffer is empty. It is done this way because the PIK key buffer only holds 7 keys and it could overflow and ignore some of the incoming digits. The digits can be entered in any order, but because the Run [A] digit will start a program running, all subsequent digits will be ignored because the Ready flag will have been cleared. Errors are shown on the 97 display for buffer overrun and receive data timeouts. cheers Tony |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 21 Guest(s)