How to talk to the HP48 through the rs232



Post: #5

How can I use my 48 for some some simple functions:

I would like to do a "request to send" from a rs232 to the 48. The 48 must give in return a number (cumulative or random) back to the PC.

Thanks in advance,
Menno


Post: #6

Hi, Menno;

I'm not sure this is going to help you, but there are two IO commands that allow the user to directly access the HP48 RS232-compatible IO port: SRECV and XMIT. Neither of these use Kermit protocol.

SRECV takes a number 'n' in Level 1 and waits for 'n' characters to be 'read' from the serial port. SRECV waits for the time specified by STIME as 'time out' reference (default: 10 secs)

XMIT takes a string in level 1 and serialy transmits it.

There are some additional remarks about SRECV in the Adv. Users Guide (or the Programmer's Reference Manual, if HP48S/SX) concerning BUFLEN (buffer lenght), also there's a reference to SBRK (serial break) as a related command.

If you need more, let us know.

Cheers.

Luiz (Brazil)

Edited: 21 Apr 2005, 8:21 p.m.


Post: #7

Thanks I am going to try something.

Regards
Menno

Post: #8

It works;

<<1 SRECV DROP DROP RAND ->STR XMIT DROP programm >>

To get a random number to the PC on request.
The drop's are needed to keep the stack empty and a loop to let the programm run continuously. The 48 gives a "1" for when the SRECV and XMIT-actions were succesfull.

thanks

Regards
Menno


Forum Jump: