The Museum of HP Calculators

HP Articles Forum

[Return to the Index ]
[ Previous | Next ]

41CL - port configuration

Posted by Christoph Klug on 22 Mar 2012, 5:14 p.m.


Logical and Physical Addresses

The logical address space consists of the ROM and RAM addresses, well known from normal 41C context.That is the 64k x 10 bit program memory = 41C ROM and the optional RAM-Box pages on pages 8 to F. Furthermore the 1k x 56 bit (7 byte) register memory = 41C RAM = Main-Memory and X-Memory. The 41C logical addresses are described in several documents, for example the CCD-Module user manual. The logical addresses of 41CL operate identically to how they work in the 41C.

In the 41CL the logical address space is mapped into a much larger physical memory space of the 41CL board which consists of internal Flash and RAM. This physical address memory space is 16M x 16 bits and is divided in half, with the lower half assigned to Flash and the upper half assigned to RAM. On Version 2 41CL boards the Flash is 1M x 16 and the RAM is 256K x 16. On Version 3 41CL boards the Flash is 2M x 16 and the RAM is 512K x 16.

In general 41CL addresses are shown in hexadecimal format which is indicated by the leading 0x. Depending on individual YFNZ commands, physical addresses are entered into the "Alpha" register as a three digit number or as a six digit number. Logical addresses are entered into the "Alpha" register as a four digit number or a one digit number – both with added bank number. Currently bank switching of RAM pages is not supported by YFNZ commands.

Using the 41CL RAM pages is similar to operating 41C RAM-Box systems from W&W, Eramco or HEPAX. Reprogramming 41CL Flash memory contents is only recommended for advanced 41CL users – please follow carefully the special hints in the 41CL manual.

Basic 41CL Software Initialisation (compatible with using HP-IL Interface Loop) -------------------------------------------------------------------------------

The HP41CL port configuration is done with help of the MMU = Memory Management Unit, which is programmed by the YFNZ

- Clear MMU entries = XEQ MMUCLR - Install YFNZ (XROM #15) to page A = "YFNZ" XEQ PLUG2L - Enable MMU = XEQ MMUEN

page-1 / page-2 ------------------------------ 8 / YFNZ A 9 / B ------------------------------ c / E D / F ------------------------------ page-3 / page-4

Now YFNZ is now available on page A and page 6+7 are free for using HP-IL module

Loading CCD Module -------------------

- Install CCD Module version-B (XROM #9 + #11) to - page 8 +9 = "CCDR" XEQ PLUG1

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / B ------------------------------ c / E D / F ------------------------------ page-3 / page-4

Loading EXT-I/0 Module ----------------------

- Install EXT-I/0 Module version-B (XROM #23) to - page B = "EXIO" XEQ PLUG2U

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c / E D / F ------------------------------ page-3 / page-4

Loading EXT-IL-PLUS Module --------------------------

YFNZ-2B and earlier did not include the EXT-IL+ ROM image stored in 41CL Flash, so a physical address must be used with the PLUG command. Only the three most significant physical address digits are needed. For example, if the EXT-IL+ image is loaded starting at address 0x0C8000 the following is used:

- Install EXT-IL+ Module (XROM #27) to page C = "0C8-RAM" XEQ PLUG3L

YFNZ-3A and later includes the EXT-IL+ ROM image, so the following is used:

- Install EXT-IL+ Module (XROM #27) to page C = "EILP" XEQ PLUG3L

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c EXT-IL+ / E D / F ------------------------------ page-3 / page-4

Installing 4K RAM Pages -----------------------

4K RAM pages are available in the 41CL at physical address:

0x806000 / 0x807000 / 0x808000 / 0x809000 / 0x80A000 / 0x80B000 0x80C000 / … … … / 0x83C000 / 0x83D000 / 0x83E000 / 0x83F000

41CL hardware version 2 includes 58 available 4K RAM pages (0x806000 - 0x83F000).

41CL hardware version 3 includes 122 available 4K RAM pages (0x806000 - 0x87F000).

Before installing RAM clear the 4K block with YMCLR command as in the example below.

The YMCLR command allows the memory to be initialized with any hexadecimal value, but clearing (all zeros) the 4K block before inserting it in a Port avoids 41CL conflicts where the software might interpret the RAM contents as a module image:

"806000-0000" XEQ YMCLR

Next install the 4K page to page D = "806-RAM" XEQ PLUG3U

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c EXT-IL+ / E D 806-RAM / F ------------------------------ page-3 / page-4

If a 4K RAM page is installed to a port, clearing –if needed- is possible using a logical address with the command, for example = "D000-1-0000" XEQ YMCLR

To install 4K RAM to pages E and F repeat the last example with addresses 0x807000 and 0x808000.

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c EXT-IL+ / 807-RAM E D 806-RAM / 808-RAM F ------------------------------ page-3 / page-4

Loading 4K RAM Pages with HP-IL from EM41 to 41CL -------------------------------------------------

Connect the 41CL with IL-Module and PIL-BOX or HP-IL/PC Interface Card to a PC for communication with EMU41. Transfer of program, data and ASCII files is possible between the 41CL and EMU41, as described in IL2000 Interface System Manual PART IX in Section III. In the same manual PART X describes handling and uploading plug in module ROM image files. ROM images, including your own individual programmed ROM solutions, can be stored on the EMU41 virtual mass storage drive. Creating and testing personal programmed ROM images inside Emu41 by using virtual RAM-BOX is more convenient than with real 41C or 41CL.

When using PIL-Box start the ILper software tool. When using HP-IL/PC Interface Card start EMU41 for HP-IL communication with the 41CL. Switch on the 41CL, set AUTOIO mode and execute SF15. With CAT 7 you list the contents of virtual mass storage drive. Enter page number 13…. 15 in the X-Register and ROM image file name in "Alpha" and execute the GETROM command (which is part of the EXT-IL-Plus Module) to install the ROM images to page D, E and F.

Bank switching 4K RAM pages ---------------------------

It is possible to create a USER code program to perform bank switching, for any number of banks. Note that it is not necessary to use the UPLUG commands to remove an existing module or RAM from a Port. The PLUG3U / PLUG4L / PLUG4U commands automatically program the MMU to point at different RAM locations or a different ROM image.

For example, bank switching 4k RAM pages between address 0x806000 / 0x807000 / 0x808000 and address 0x809000 / 0x80A000 / 0x80B000:

01 LBL BANK1 09 LBL BANK2 02 "806-RAM" 10 "809-RAM" 03 PLUG3U 11 PLUG3U 04 "807-RAM" 12 "80A-RAM" 05 PLUG4L 13 PLUG4L 06 "808-RAM" 14 "80B-RAM" 07 PLUG4U 15 PLUG4U 08 RTN 16 END

Before using 4K RAM blocks first time, remember to clear them before installation to avoid conflicts with unknown RAM contents

Copying 4K RAM pages --------------------

This chapter describes copying the contents of a real plug in module which is placed on port 4 of 41CL to a 4K RAM page. Before installing the plug in module make pages E and F free by executing UPLUG4L and UPLUG4U (or just UPLUG4):

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c EXT-IL+ / E D 806-RAM / F ------------------------------ page-3 / page-4

Next switch off the 41CL, insert the plug in module to port 4 and switch the 41CL on again. In general avoid XROM number conflicts with your 41CL port configuration. Remember that 4K and 8K plug in modules exist, with one page or two pages. Handling of bank switched plug- in modules is more complex and not described here.

page-1 / page-2 ------------------------------ 8 CCD-1B / YFNZ A 9 CCD-2B / EXT-I/O B ------------------------------ c EXT-IL+ / Module-lower E D 806-RAM / Module-upper F ------------------------------ page-3 / page-4

For copying the ROM images to EMU41 mass storage drive enter page number 14 or 15 in X-Register and ROM image file name in "Alpha" and execute SAVEROM command (which is part of the EXT-IL-Plus Module).

In the next example we copy the contents of the lower page of the plug in module from page E to 4k RAM on page D. We do this by operating with logical addresses entered to "Alpha" register, where -1 indicates the bank number:


Next we copy both pages of the plug in module from page E and page F to 4k RAM blocks 0x809000 and 0x80A000 by using logical- and physical addresses:

"E-1>809" XEQ YMCPY "F-1>80A" XEQ YMCPY

Of course YMCPY it is able to copy 4k blocks from one logical address to another logical address or from a physical address to another physical address. The YMCPY command also allows directly writing to a plug in module like a NoVRAM Module or a RAM-Box which is plugged to 41CL….

Using 41CL with I/O-Board and IL2000 Interface System -----------------------------------------------------

For hardware interface applications with I/O-Board or IL2000 Interface system the new 41CL would be a really powerfully and fast HP-IL controller when using the implemented TURBO modes:

I evaluate some speed tests with IL2000 Interface System and advanced audio measurement application. This includes HP-IL bidirectional data transfer between 41CL and HP82166A IL-Converter, calculations of control data and measurement values, and measurement data storage with CCD matrix files stored in X-Memory and plotting results with HP7470A IL-Plotter…

By using TURBO10 and TURBO20 I achieve a speed up in the range of 5 to 10, which is a great improvement for hardware interfacing applications with HP-41 and HP82166A IL-Converter and HP7470A IL-Plotter. The TURBO50 mode is not recommended from my side, because from this results no additional speed up improvement for this specific application.

The needed software modifications of the existing control routines, published in I/O-Board and IL 2000 Interface system manual for the 41CL are simple: With 41CL I execute data transfer between Alpha register and HP82166A IL-Converter in original HP-41 speed = TURBOX, because this transfer needs only milliseconds, compared to the program code execution which is continued during quite a view seconds. Therefore no hardware timing modification is required for I/O-Board or IL2000 Interface System.

56 LBL $IN1 77 CLX 57 LBL 20 78 RTN 58 TURBOX 79 LBL $OUT1 59 TRIGGER 80 LBL 22 60 X<>X 81 TURBOX 61 X<>X 82 TRIGGER 62 TRIGGER 83 2 63 2 84 OUTAN 64 INAN 85 TURBO20 65 TURBO20 86 CLX 66 CLX 87 RTN 67 RTN 88 LBL $OUT2 68 LBL $IN2 89 LBL 23 69 LBL 21 90 TURBOX 70 TURBOX 91 TRIGGER 71 TRIGGER 92 TRIGGER 72 TRIGGER 93 2 73 TRIGGER 94 OUTAN 74 2 95 TURBO20 75 INAN 96 CLX 76 TURBO20 97 RTN

------------------------------------------------------------------------- Christoph Klug March 2012


[ Return to the Message Index ]

Go back to the main exhibit hall