Post Reply 
HP-IL with HP 82163A Video Interface
11-08-2014, 03:52 AM
Post: #1
HP-IL with HP 82163A Video Interface
Hi,

I'm am a bit of a novice when it comes to this hardware but I tinker with it as a hobby.

I have an HP 82160A Interface Loop plugged into my HP41 and connected HP 82163A video interface. I have read in the manual about controlling the video interface with Data Byte messages in the form of excape sequences that are interpreted as instructions. There are no examples in the manual so I am struggling to understand the syntax/use of these codes. Any help would be appreciated.

Kind regards,
Gary
Find all posts by this user
Quote this message in a reply
11-08-2014, 09:33 AM
Post: #2
RE: HP-IL with HP 82163A Video Interface
If you have a 41CX, or the Extended Function module on a 41C or 41CV (but NOT in a 41CX, it's built in), you can use XTOA to append any character by character code to the ALPHA register, though you can't use NUL characters (code 0) at the beginning of a string. If you needed a string ESC "7@" to send (not including the quotation marks), you could use CLA 27 XTOA ALPHA append 7 ALPHA 64 XTOA to compose it in ALPHA, since 27 is the character code of escape, and 64 is the character code of "@". All of the character codes are listed in an appendix in the Extended Function ROM manual and in the 41CX manual.
Find all posts by this user
Quote this message in a reply
11-08-2014, 10:42 AM
Post: #3
RE: HP-IL with HP 82163A Video Interface
Thanks for your prompt reply. I tried your example and I can display the @ character on the screen as you described. I take it the 7 refers to displaying the character on the screen?
I now have a better understanding of the codes but I still don't understand the manual when it says "Escape Sequence 'EC A' Character Codes 27 65 Moves the cursor up one line..."
I am reading this from the 82163 manual.
Find all posts by this user
Quote this message in a reply
11-08-2014, 03:46 PM (This post was last modified: 11-08-2014 03:56 PM by Sylvain Cote.)
Post: #4
RE: HP-IL with HP 82163A Video Interface
(11-08-2014 10:42 AM)institches Wrote:  Thanks for your prompt reply. I tried your example and I can display the @ character on the screen as you described. I take it the 7 refers to displaying the character on the screen?
I now have a better understanding of the codes but I still don't understand the manual when it says "Escape Sequence 'EC A' Character Codes 27 65 Moves the cursor up one line..."
I am reading this from the 82163 manual.

Just in case, ESC or EC or Escape or character code 27 is all the same.

The following, is a small program extract that should get you started

Code:

01 LBL "VIS"    sub: Video Interface Selection
02 MANIO        set HP-IL in manual mode
03 1            device address in the loop, change this as needed
04 SELECT       select specified address
05 SF 17        activate hp-41 append mode
06 RTN          end sub
07 LBL 99       sub: build escape string with X code
08 27           the escape code
09 XTOA         generate the escape character
10 RDN          roll down stack
11 XTOA         generate the specified character
12 RTN          end sub
13 LBL "DTL"    sub: Display Text Line
14 CF 17        deactivate hp-41 append mode
15 OUTA         send the alpha string to the selected device and goto next line
16 SF 17        activate hp-41 append mode
17 RTN          end sub
18 LBL "DT"     sub: Display Text
19 OUTA         send the alpha string to the selected device
20 RTN          end sub
21 LBL "CUP"    sub: Cursor Up
22 CLA          clear alpha
23 65           cursor up code
24 XEQ 99       build escape string
25 OUTA         send the alpha string to the selected device
26 RTN          end sub
27 LBL "CDN"    sub: Cursor Down
28 CLA          clear alpha
29 66           cursor down code
30 XEQ 99       build escape string
31 OUTA         send the alpha string to the selected device
32 RTN          end sub
33 LBL "VCD"    sub: Video Clear Device
34 CLA          clear alpha
35 69           clear device code
36 XEQ 99       build escape string
37 OUTA         send the alpha string to the selected device
38 RTN          end sub
...             you add what you need at this point :-)

From the run mode ...

XEQ "VIS" will setup the interface and the calculator
XEQ "VCD" will clear the video device
XEQ "DTL" will display on video the alpha content and go to the beginning of the next line
XEQ "DT" will display on video the alpha content
XEQ "CUP" will move the cursor up by one line
XEQ "CDN" will move the cursor down by one line

Have fun!

Sylvain

edit: typo
Find all posts by this user
Quote this message in a reply
11-08-2014, 05:32 PM
Post: #5
RE: HP-IL with HP 82163A Video Interface
(11-08-2014 03:46 PM)Sylvain Cote Wrote:  The following, is a small program extract that should get you started
Code:

01 LBL "VIS"    sub: Video Interface Selection
...
38 RTN          end sub

An improvement proposal:

Generally (including this case) it's not needed to use the HP-IL manual mode (MANIO).
In MANIO you can easily send data to the wrong device when using mass storage or printer functions at the same time.
The SELECT command is for sure needed to address the OUTA to the video display, but in this case it's easier to use ACA and PRA to avoid managing manually SELECT and SF/CF 17.

Then, if you don't have a HP-41CX or an Extended Function module, you can replace the sequence
<< 27 XTOA >> with << 27 BLDSPEC ARCL X >> to generate the escape character.

The sub 99 becomes:
Code:

07 LBL 99       sub: build the escape char
08 27           the escape code
09 ENTER      (to make sure BLDSPEC will work as expected)
10 BLDSPEC      generate the escape character
11 ARCL X       and put it in ALPHA
12 RTN          end sub

To use it, modify the CUP, CDN, etc routines like this:
Code:

21 LBL "CUP"    sub: Cursor Up
22 CLA          clear alpha
23 XEQ 99       build escape char
24 "|-A"        append char "A"
25 ACA          send the alpha string to the video device (w/o end of line)
26 RTN          end sub
Visit this user's website Find all posts by this user
Quote this message in a reply
11-08-2014, 06:33 PM
Post: #6
RE: HP-IL with HP 82163A Video Interface
or use synthetic programming to embed any character directly in an alpha string. It executes much faster. I did synthetic programming the more tedious way (with the byte grabber) before I got the ZENROM which makes synthetic instructions and operations natural, as if they had never been synthetic.

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website Find all posts by this user
Quote this message in a reply
05-20-2015, 06:46 AM
Post: #7
RE: HP-IL with HP 82163A Video Interface
(11-08-2014 05:32 PM)J-F Garnier Wrote:  
(11-08-2014 03:46 PM)Sylvain Cote Wrote:  The following, is a small program extract that should get you started
Code:

01 LBL "VIS"    sub: Video Interface Selection
...
38 RTN          end sub

An improvement proposal:

Generally (including this case) it's not needed to use the HP-IL manual mode (MANIO).
In MANIO you can easily send data to the wrong device when using mass storage or printer functions at the same time.
The SELECT command is for sure needed to address the OUTA to the video display, but in this case it's easier to use ACA and PRA to avoid managing manually SELECT and SF/CF 17.

Then, if you don't have a HP-41CX or an Extended Function module, you can replace the sequence
<< 27 XTOA >> with << 27 BLDSPEC ARCL X >> to generate the escape character.

The sub 99 becomes:
Code:

07 LBL 99       sub: build the escape char
08 27           the escape code
09 ENTER      (to make sure BLDSPEC will work as expected)
10 BLDSPEC      generate the escape character
11 ARCL X       and put it in ALPHA
12 RTN          end sub

To use it, modify the CUP, CDN, etc routines like this:
Code:

21 LBL "CUP"    sub: Cursor Up
22 CLA          clear alpha
23 XEQ 99       build escape char
24 "|-A"        append char "A"
25 ACA          send the alpha string to the video device (w/o end of line)
26 RTN          end sub
Thanks JF.
I tried to use the video display in Emu41 and I have the following questions:
1/it seems that neither 32 nor 80 column are emulated, but 40.
Why ?
2/it seems that video inverse characters and cursor blinking is not emulated. why ? Is it what you mean by "partially emulated" for the escape sequences in Emu41 doc ?
3/what is the use of emulating the 82143a printer over emulating the video interface since you don't emulate the graphics ? To get a longer "paper" ? But I have not found how to control the paper length, nor how to scroll it...
4/why not emulating the 82162a printer ? Can you confirm that its new FMT instruction is dedicated to it and cannot be used with the video interface ?
5/you say in emu41 doc that the escape sequences "are not used with the hp-41, except with the paname rom". Can you confirm that you are not aware of significant applications that would make use of these features ?

Thanks in advance and regards
Find all posts by this user
Quote this message in a reply
12-28-2015, 09:17 PM
Post: #8
RE: HP-IL with HP 82163A Video Interface
Thank you all for your assistance. After revisiting this I'm able to do all I need at this stage.
Cheers
Gary
Find all posts by this user
Quote this message in a reply
11-12-2023, 10:45 AM
Post: #9
RE: HP-IL with HP 82163A Video Interface
Whilst waiting for some level controllers to arrive from China, to follow the work that folks are doing with the RPI Pico I wondered how we control the displays (OLED or VGA/HMI etc) is the 'easiest' thing to 'virtualise' the HP-IL Video Interface within the Pico and then use the Pico to drive a display, such as an OLED (or in extreme a VGA/HDMI).

Or do we use some microcode calls to create the functions to paint pixels on a screen?

All "above my paygrade" at the moment, but I thought this older thread might inspire some ideas around the ultiimate goal of giving the 41c a proper graphics capability. Perhaps the commands on the 48 or Prime is a possiblity for the graphing commands.

The obvious question is why not just use a Prime instead - well it's the same answer as why not an iphone. "Because" - because we like to push this 40 year plus device beyond anything it's original architects thought possible.

#blackjetrock
#ThomasF
#MeindertKuipers
Find all posts by this user
Quote this message in a reply
11-12-2023, 12:07 PM
Post: #10
RE: HP-IL with HP 82163A Video Interface
(11-12-2023 10:45 AM)murphy9 Wrote:  Whilst waiting for some level controllers to arrive from China, to follow the work that folks are doing with the RPI Pico I wondered how we control the displays (OLED or VGA/HMI etc) is the 'easiest' thing to 'virtualise' the HP-IL Video Interface within the Pico and then use the Pico to drive a display, such as an OLED (or in extreme a VGA/HDMI).

Or do we use some microcode calls to create the functions to paint pixels on a screen?

All "above my paygrade" at the moment, but I thought this older thread might inspire some ideas around the ultiimate goal of giving the 41c a proper graphics capability. Perhaps the commands on the 48 or Prime is a possiblity for the graphing commands.

The obvious question is why not just use a Prime instead - well it's the same answer as why not an iphone. "Because" - because we like to push this 40 year plus device beyond anything it's original architects thought possible.
Welcome in the HP41-Pico world!
The steps to implement an HP-IL driven video interface are not so small. First you need a good HP-IL implementation on the Pico, and then an implementation of an HP-IL peripheral. And these are not small steps, but I intend to create an HP-IL interface in the Pico first, and use the existing IL tools available on a host computer for data exchange.
Another target for this configuration would be someting similar to the device in this thread: https://www.hpmuseum.org/forum/thread-14041.html
Not sure if graphics is what you want for the HP41, but certainly not impossible. The quickest way is to simply create a new HP41 ROM and a graphics peripheral taht you can send commands to.

And certainly we can use other tools to create graphics, but that is not as much fun as building stuff for the HP41.

Regards, Meindert
Find all posts by this user
Quote this message in a reply
11-13-2023, 02:48 AM (This post was last modified: 11-13-2023 02:52 AM by murphy9.)
Post: #11
RE: HP-IL with HP 82163A Video Interface
Thanks Meindert - I've been following your great work for many years. With the original Pic controllers we had the opportunity to 'emulate' many existing elements of the 41c ecosystem. But with the advent of devices like the Pico we can push the boundaries further - add in the ability to design pcb's in a few hours and have them shipped for a few dollars - and you have no limits - other than someone having to do the work ;-)

This ideas over time on this formum are an assembly of brilliant minds, and I suspect that ideas previously too complex to consider a decade or two ago now verge on realization.

In working through the old HPCC and MoHPC forums, I've been considering what advancements Pico-like chips could enable, especially in the context of the debate between what we 'should' do versus what we 'could' do.

Broadly speaking, there are two paths I've observed: 'augmentation and extension' and 'replacement.'

'Augmentation and extension' involves preserving the original core logic boards, endowing them with new capabilities like enhanced RAM/ROM and I/O options (sensors, video, wireless networks, etc.), while maintaining the original ethos of the 41c's plug-and-play nature and features like HP-IL, albeit maybe in a 'virtual form' utilizing the more modern approach modern Bluetooth and WiFi. In philosophical terms this approach reflects Plato's philosophy of valuing the original, ideal design, adapting it to new contexts while preserving its essence.

'Replacement' involves endowing the device with 'superpowers' by substituting the Logic Board with modern technologies like FPGA, ARM, PIC, etc., provided by our community's experts. This transformation also involves enhancing the device's I/O capabilities, speed, and battery life. This more mirrors the Cartesian approach of renewal, advocating for a complete overhaul to achieve a new, more capable essence.

Both paths are awesome, and I'm tempted to fully 'twin' all my collection so I could have a foot in each camp (as well as my iPhone versions see enclosed).


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
11-13-2023, 11:50 AM (This post was last modified: 11-14-2023 06:56 PM by floppy.)
Post: #12
RE: HP-IL with HP 82163A Video Interface
(11-12-2023 10:45 AM)murphy9 Wrote:  Whilst waiting for some level controllers to arrive from China, to follow the work that folks are doing with the RPI Pico I wondered how we control the displays (OLED or VGA/HMI etc) is the 'easiest' thing to 'virtualise' the HP-IL Video Interface within the Pico and then use the Pico to drive a display, such as an OLED (or in extreme a VGA/HDMI).

Or do we use some microcode calls to create the functions to paint pixels on a screen?

All "above my paygrade" at the moment, but I thought this older thread might inspire some ideas around the ultiimate goal of giving the 41c a proper graphics capability. Perhaps the commands on the 48 or Prime is a possiblity for the graphing commands.

The obvious question is why not just use a Prime instead - well it's the same answer as why not an iphone. "Because" - because we like to push this 40 year plus device beyond anything it's original architects thought possible.

#blackjetrock
#ThomasF
#MeindertKuipers

Can de achieved straight
a) Use a PI2 and install according https://www.hpmuseum.org/forum/thread-19053.html
b) Connect an HDMI to the PI2 (in the thread above the whole system is installed in the PI2 but as long no HDMI is connected, you will not see it)
.. Done
- you will see the ILVIDEO80 screen of https://hp.giesselink.com/hpil.htm
- the system is a PILBOX + PI2..or3/4 + Screen via HDMI (or not if only access to the virtual drive is the target)
- nothing to screw, solder,.. just a calibration of a quite standard system PI2/3/3 (look at eBay or others) + PILBOX ( JF Garnier ) + HP71B or HP41

Update: since I have interest to review/check the whole installation procedure again, if you want to have a virtual and/or a Video80 at the HDMI of a PI,
- send me a PI2..3..4 (in an housing; thats easier)
- A SD card for boot 16G
- an USB for Virtual drive storage
I can make the install (or 2..) and send back the stuff.

HP71 4TH/ASM & Multimod, HP41CV/X & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X, HP75D
Find all posts by this user
Quote this message in a reply
12-15-2023, 05:45 AM
Post: #13
RE: HP-IL with HP 82163A Video Interface
That's an interesting approach, but my thought was that we're close to replacing the whole HP-IL and PIL box (and the RPI) by placing this all in the pico and connecting directly to the 41c through the module port.

I now have the level shifters and a Pico with Wifi - this is all sitting on a explorer board - which nealty includes a colour OLED display (hence my video interest). The 2040 W adds BT and Wifi so the possibilities are insane. Next stage is wiring up and coding. For me this will be a (very) steep learning curve as I'm quite rusty and with Holiday season and my new job (working with HP Inc here in Australia) I think it'll be an interesting 2024 !


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
12-15-2023, 10:00 AM
Post: #14
RE: HP-IL with HP 82163A Video Interface
(12-15-2023 05:45 AM)murphy9 Wrote:  I now have the level shifters and a Pico with Wifi - this is all sitting on a explorer board - which nealty includes a colour OLED display (hence my video interest). The 2040 W adds BT and Wifi so the possibilities are insane. Next stage is wiring up and coding. For me this will be a (very) steep learning curve as I'm quite rusty and with Holiday season and my new job (working with HP Inc here in Australia) I think it'll be an interesting 2024 !
Have fun with this. Just be aware that the FET level shifters may not work the way you expect with the HP41. Input to your Pico setup is probably OK, but I doubt if this will correctly drive the bus for the required ISA, DATA and FI outputs.
And very brave to go the Wifi way. I did consider this, but in my opinion power consumption will be way too high for a standalone battery powered HP41, so external power may be needed all the time in this case.

Regards, Meindert
Find all posts by this user
Quote this message in a reply
12-15-2023, 10:38 AM
Post: #15
RE: HP-IL with HP 82163A Video Interface
(12-15-2023 05:45 AM)murphy9 Wrote:  I now have the level shifters and a Pico with Wifi - this is all sitting on a explorer board - which nealty includes a colour OLED display (hence my video interest). The 2040 W adds BT and Wifi so the possibilities are insane. Next stage is wiring up and coding. For me this will be a (very) steep learning curve as I'm quite rusty and with Holiday season and my new job (working with HP Inc here in Australia) I think it'll be an interesting 2024 !
Nice.
By keeping the HP-IL you could connect the HP71B. For playing an accelerated snake.. https://www.hpmuseum.org/forum/thread-20979.html

HP71 4TH/ASM & Multimod, HP41CV/X & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X, HP75D
Find all posts by this user
Quote this message in a reply
12-15-2023, 02:33 PM (This post was last modified: 12-15-2023 02:34 PM by MeindertKuipers.)
Post: #16
RE: HP-IL with HP 82163A Video Interface
(12-15-2023 10:00 AM)MeindertKuipers Wrote:  Just be aware that the FET level shifters may not work the way you expect with the HP41. Input to your Pico setup is probably OK, but I doubt if this will correctly drive the bus for the required ISA, DATA and FI outputs.

I did a quick test as I planned to use the same FET based level shifter. It works fine for active low signals which are an output from the HP41 (for the HP41 this is only the FI line which I am using it for). The FET level shifter have pullup resistors, most of the HP41 signals are active high, so need to be low most of the time. The pullups will interfere with this. You could use a resistor network for input the the RP2040 as a poor mans level shifter.
Best is to use a CMOS 4050 for downsifting, and a CMOS 40109 for upshifting.

Regards, Meindert
Find all posts by this user
Quote this message in a reply
12-16-2023, 01:59 AM
Post: #17
RE: HP-IL with HP 82163A Video Interface
(12-15-2023 02:33 PM)MeindertKuipers Wrote:  
(12-15-2023 10:00 AM)MeindertKuipers Wrote:  Just be aware that the FET level shifters may not work the way you expect with the HP41. Input to your Pico setup is probably OK, but I doubt if this will correctly drive the bus for the required ISA, DATA and FI outputs.

I did a quick test as I planned to use the same FET based level shifter. It works fine for active low signals which are an output from the HP41 (for the HP41 this is only the FI line which I am using it for). The FET level shifter have pullup resistors, most of the HP41 signals are active high, so need to be low most of the time. The pullups will interfere with this. You could use a resistor network for input the the RP2040 as a poor mans level shifter.
Best is to use a CMOS 4050 for downsifting, and a CMOS 40109 for upshifting.

Thanks - interesting I'll do some more homework before I connect to the 41c itself.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)