Some HP-97S Questions



#2

I have an 97S that I'm going to try and test this weekend. It is functional but I have not tested the interface. I'd like to try and check this out this weekend.

Unfortunately, I don't have the manual for the S version.

I'm confused about a few things and maybe someone has one and can help me.

1) What controls the LE? Is it simply the "condition" of interface not containing data, flag 3 set and program halted that sets LE?

2) If so, what does "not containing data" mean?

3) Which leads me to this question. What is the actual instruction that reads data in or writes data out?

4) I have the interface signal description but wonder what F0-F3 are. Are these simply the state of the Flags 0-3?

5) What controls the direction of the interface? If LE is true, does that mean the interface is RECEIVING and if it is false that it is SENDING?

6) Does anyone have a small complete example program showing how to write out a bit pattern?

7) Same thing for reading in a set of switch values?

Thanks,


#3

Mike,

In answer to your questions:

1. LE goes low when the calculator's input register (which is what received keyboard input!) is empty, flag 3 is cleared, and the program is halted.

2. "Not containing data" means there's no currently pending keyboard input. The interface simply fills the keyboard buffer with up to 10 keycodes (which are limited to the digits 0-9, the decimal point, EEX, ENTER, A, and CHS.)

3. No instruction is needed to read data. Data gets read the same way keyboard input is processed. In other words, the interface merely emulates keystrokes when the calculator is idle. One of the keystrokes can be a call to "A", causing your program to continue.

4. F0-F3 are the four flags.

5. The interface has no direction. It has input lines corresponding with up to 10 keystrokes that are then serialized (by the interface) and fed back to the calculator; and it has 4 output lines corresponding with the 4 flags. It has some control lines that, however, cannot be directly read, or manipulated, from a program.

6-7. I have actually built a CMOS clock that can be set, and read, by the HP-97S. See http://www.rskey.org/hp97s.htm. The hardware decodes the flags in order to decide what to do (i.e., increment the hour or minute counter), and it fills the keyboard buffer with the current time readout, followed by a call to subroutine "A". The design also demonstrates how a low-power device can be isolated power-wise from the HP-97S and how one can provide a certain degree of protection against transients when the HP-97S is powered up or down.


Viktor


#4

My further comments preceded by "Followup:"

Mike,

In answer to your questions:

1. LE goes low when the calculator's input register (which is what received keyboard input!) is empty, flag 3 is cleared, and the program is halted.

2. "Not containing data" means there's no currently pending keyboard input. The interface simply fills the keyboard buffer with up to 10 keycodes (which are limited to the digits 0-9, the decimal point, EEX, ENTER, A, and CHS.)

3. No instruction is needed to read data. Data gets read the same way keyboard input is processed. In other words, the
interface merely emulates keystrokes when the calculator is idle. One of the keystrokes can be a call to "A", causing your program to continue.

Followup: There are 10 BCD inpus on the interface. After the LE goes low (ready for input). Does BCD(A) become the first key input and BCD(B) become the 2nd key input and none of this seen until LOAD is active? Say I want to display 12.3 on the input would this be the sequence:

1) Place LE active as in 1 and 2 above.
2) Set BCD(A) to 1
3) Set BCD(B) to 2
4) Set BCD(D) to .
5) Set BCD(D) to 3
6) Set BCD(E) to Enter
7) Bring LOAD to active state

Alternatively, I might do (although inefficient):
1) Place LE active as in 1 and 2 above.
2) Set BCD(A) to 1
3) Set LOAD to active state
4) Set BCD(A) to 2
5) Set LOAD to active state
6) Set BCD(A) to .
7) Set LOAD to active state
8) Set BCD(A) to 3
9) Set BCD(B) to Enter
10) Set LOAD to active state

At which point would 12.3 show up on LED? I know I could just try this but this is too valuable to take a chance on screwing something up.

Related what would be the use for the EEX key?

Victor continues:

4. F0-F3 are the four flags.

5. The interface has no direction. It has input lines corresponding with up to 10 keystrokes that are then serialized (by the interface) and fed back to the calculator; and it has 4 output lines corresponding with the 4 flags. It has some control lines that, however, cannot be directly read, or manipulated, from a program.

Followup: So, no data can be output on the BCD lines. Is that correct?

These, then, are the only output capability? Essentially, this could be a single BCD output. If this was to be used as a BCD output, how could it be signaled to the external device that the BCD digit is ready to be read?

Victor continues:

6-7. I have actually built a CMOS clock that can be set, and read, by the HP-97S. See http://www.rskey.org/hp97s.htm.
The hardware decodes the flags in order to decide what to do (i.e., increment the hour or minute counter), and it fills the keyboard buffer with the current time readout, followed by a call to subroutine "A". The design also demonstrates how a low-power device can be isolated power-wise from the HP-97S and how one can provide a certain degree of protection against transients when the HP-97S is powered up or down.

Viktor

Followup: Thanks for the help. You clock design gives me a lot of information about how to use the interface. Thanks.


#5

> Does BCD(A) become the first key input

Yes.

> none of this seen until LOAD is active?

Au contraire. All of this is seen (remember, the calculator is idle, no program is running at this time!) until one of the emulated keystrokes happens to be the "A" key which (re)starts the program at label "A". The LOAD signal won't start anything, it is merely there to indicate to the interface that it can read data; if it goes inactive, the interface will stop reading data but the machine wouldn't actually start running a program again. (That said, there may be other methods using the PAUSE key, but I have not investigated those.)

> 6) Set BCD(E) to Enter

Not really. ENTER lets you use the interface to enter data into more than one register at a time.

> 7) Bring LOAD to active state

No, set BCD(E) to "A".

> At which point would 12.3 show up on LED?

As the BCD nibbles are read from the interface, they appear on the display just as they would when you type them. The interface doesn't really do any magic that you yourself couldn't do from the keyboard using the 0-9, A, EEX, ENTER, and CHS keys!

> this is too valuable to take a chance on screwing something up

You can't really screw up anything here as long as you're not supplying signal levels outside of TTL specs to the interface.

> Related what would be the use for the EEX key?

To enter data in scientific notation of course.

> no data can be output on the BCD lines. Is that correct?

Yes.

> These, then, are the only output capability?

Correct.

> Essentially, this could be a single BCD output

Yes, although you have to keep in mind that F3 is also used to activate the interface for input so there is a potential for conflict.

> how could it be signaled to the external device that the BCD digit is ready to be read?

I do so by putting out a code combination using two flags; using a third flag to indicate that the data is valid; and toggling the fourth flag to cause the external device to perform whatever action it is supposed to perform.


Viktor


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime questions: I/O and Meta programming Andy Gryc 2 875 10-31-2013, 11:22 PM
Last Post: Andy Gryc
  HP-41 questions x34 4 999 09-28-2013, 05:15 PM
Last Post: x34
  HP Prime two questions about function app dg1969 0 486 09-27-2013, 11:14 AM
Last Post: dg1969
  HP Prime Questions Clayton Workman 23 3,280 09-25-2013, 11:19 AM
Last Post: Clayton Workman
  Questions about building a RAM card for hp 48 Waon Shinyoe (China) 0 641 07-09-2013, 09:53 PM
Last Post: Waon Shinyoe (China)
  HP-71b questions jerome ibanes 6 1,337 07-01-2013, 05:03 PM
Last Post: Namir
  HP 41 Mcode related Questions Michael Fehlhammer 4 1,104 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  Is this from an HP-97s? Marcus von Cube, Germany 12 1,736 02-12-2013, 08:03 PM
Last Post: Tom Lianza
  An unusual HP 71B - questions Doug (NYC) 8 1,574 01-16-2013, 08:14 AM
Last Post: Doug (NYC)
  Optimization questions - HP-15C Marcel Samek 49 6,026 11-08-2012, 07:45 AM
Last Post: Luiz C. Vieira (Brazil)

Forum Jump: