Post Reply 
HP41 TULIP4041 update
08-23-2024, 02:01 PM
Post: #1
HP41 TULIP4041 update
Many of you may have noticed that Raspberry Pi have recently introduced the RP2350 microcontroller as a next generation of the RP2040. The TULIP4041 was scheduled to use the RP2040. There may be some advantages to use the newer processor and I will first test the Development Board setup with the RP2350 to find out if switching over makes any sense.
This means that I am holding off the orders for the Development Board until I have verified operation with the RP2350. If you have ordered a Development Board you should have received this information.
If I do switch over to the new processor it will most likely delay the final module version as well.

In the meantime a presentation about TULIP4041 will be given by Sylvian at the HHC conference in September, with a real live demo. I am working on the presentation and documentation as well.

Regards, Meindert
Find all posts by this user
Quote this message in a reply
08-24-2024, 02:12 AM (This post was last modified: 08-24-2024 03:27 AM by Sylvain Cote.)
Post: #2
RE: HP41 TULIP4041 update
The board was delivered last week and the final assembly was completed early this week.

My complete test setup is:
  • host computer
    • Hardware
    • Software
      • Raspberry OS 64-bit → installed on microSD card with Raspberry Pi Imager
        OS: Debian GNU/Linux 12 (bookworm) | Kernel: Linux 6.6.31+rpt-rpi-v8 | Architecture: arm64
      • Special configuration:
        • default headless video set to 1280x1024
        • wired network static configuration for: IP, default gateway and DNS
        • default vnc server running
        • RealVNC client installed
    • Optional: Development & Debugging
      • Raspberry Pi Debug Probe
      • Raspberry Pi Pico development tools C/C++ SDK
        installation script
        Code:
        mkdir -p ~/temp
        cd ~/temp
        wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
        chmod +x pico_setup.sh
        ./pico_setup.sh
      • testing → follow instructions given in the Raspberry Pi Debug Probe documentation
        • install a Raspberry Pi Pico 1 (RP2040) on a breadboard
        • connect the Raspberry Pi Debug Probe to the Pico to the SWD connector
        • connect the Raspberry Pi Debug Probe to the Pico to the RP2040 GPIO RX/TX/GND pins
        • connect the Raspberry Pi Debug Probe to the USB port of the Raspberry Pi 4
        • compiled application files location
          • blink → ~/temp/pico/pico-examples/build_pico/blink
          • hello world serial → ~/temp/pico/pico-examples/build_pico/hello_world/serial
        • notes
          • OpenOCD, SWD, GPIO serial port and GDB works perfectly
          • I have tested several applications and did not find any issue
    • Virtual HP-IL
      • lifutils (utilities runs natively)
        installation steps
        Code:
        mkdir -p ~/temp
        cd ~/temp
        git clone https://github.com/bug400/lifutils.git
        cd lifutils
        mkdir rp4b
        cmake -DCMAKE_BUILD_TYPE=Release -S . -B rp4b
        cd rp4b
        make
        sudo make install
      • pyilper (application run natively, no virtual machine needed, well .... apart from cpython of course)
        installation steps
        Code:
        python3 -‑version                   // installed with the OS and I get version 3.11.2
        python3 -m venv ~/py311
        source ~/py311/bin/activate
        python -m pip install --upgrade pip
        pip install pyserial
        pip install pyilper
        testing:

        1. connect PIL-Box to RP4B → serial port added: /dev/ttyUSB0
        2. start pyilper → from command line
          Code:
          source ~/py311/bin/activate
          pyilper -‑clean -‑instance test
        3. configure pyilper to use /dev/ttyUSB0
        4. adds and configure virtual IL devices
        5. leave pyilper
        6. restart pyilper → from command line
          Code:
          source ~/py311/bin/activate
          pyilper --instance test
        7. test virtual devices with an HP-41/71B/75
  • Tulip4041
    • tomorrow

  • edit: typos & formatting

    Sylvain Côté
    Find all posts by this user
    Quote this message in a reply
    08-24-2024, 03:08 AM
    Post: #3
    RE: HP41 TULIP4041 update
    Very much looking forward to the presentation!

    Cheers, you two!

    Geoff
    Find all posts by this user
    Quote this message in a reply
    08-25-2024, 11:07 PM
    Post: #4
    RE: HP41 TULIP4041 update
    What's the point of telling us all this if you are not posting any code?

    Also, why tell us about the hosting environment? The Pico SDK runs on pretty much everything. Is it really relevant what kind of power supply your Pi4 uses or how much storage it has?
    Find all posts by this user
    Quote this message in a reply
    08-25-2024, 11:46 PM (This post was last modified: 08-26-2024 01:01 AM by Sylvain Cote.)
    Post: #5
    RE: HP41 TULIP4041 update
    (08-25-2024 11:07 PM)John Ioannidis Wrote:  What's the point of telling us all this if you are not posting any code?
    Meindert is making a new product and he is just telling the peoples that have reserved the prototype boards that it will take a little more time before he can shipped them.
    Also, he never said that he will publish his source code, nor that he have to.

    (08-25-2024 11:07 PM)John Ioannidis Wrote:  Also, why tell us about the hosting environment? The Pico SDK runs on pretty much everything. Is it really relevant what kind of power supply your Pi4 uses or how much storage it has?
    When I will report my test results, I want Meindert to know exactly what is my testing environment.
    The goal of using a Raspberry Pi 4B was to have a neutral machine that is not polluted by the software I use on my main machine and that is dedicated to this task only.
    The information is there to allow Meindert or anyone else to build of copy of my testing environment if he/they choose to do so.
    Finally, there were some other RP4 projects on this forum that were not able to run lifutils and/or pyilper natively, so I added the step on how to build/install them.

    I was planning to report my first test results, but my wife reminded me that I had to work on the house this weekend, so the next post will come later this week.

    Sylvain Côté
    Find all posts by this user
    Quote this message in a reply
    08-25-2024, 11:50 PM
    Post: #6
    RE: HP41 TULIP4041 update
    Ha, happy wife, happy life.

    Merci beaucoup! for the explanation Sylvain!

    Cheers[/b]
    Find all posts by this user
    Quote this message in a reply
    08-26-2024, 07:24 AM
    Post: #7
    RE: HP41 TULIP4041 update
    (08-25-2024 11:07 PM)John Ioannidis Wrote:  What's the point of telling us all this if you are not posting any code?
    No worries, there will be source code published of the version that will go out to the users of the Development Board. I do want to make certain that it is in a useable state. And my earlier offer still stands, if you are interested in the sources I will happily share it with you.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    08-26-2024, 09:26 PM
    Post: #8
    RE: HP41 TULIP4041 update
    (08-24-2024 02:12 AM)Sylvain Cote Wrote:  The board was delivered last week and the final assembly was completed early this week.

    My complete test setup is:
    [list]
    [*]host computer
    [list]
    [*]Hardware

    Thanks Sylvain!

    Your description of the test setup is very useful to me and helps greatly to anticipate the arrival of the board.

    Best

    Etienne
    Visit this user's website Find all posts by this user
    Quote this message in a reply
    08-27-2024, 07:33 PM
    Post: #9
    RE: HP41 TULIP4041 update
    Tulip4041 testing has finally started on my side ... Yeah!

    Startup was a little rocky at first but now everything seems to works.

    The Raspberry Pi Pico (RPP) USB virtual serial ports is seen as ttyACM instead of ttyUSB on the Raspberry PI 4B.
    I am able to connect on the multiple serial terminals with minicom but pyilper only uses ttyUSB devices and ignore the ttyACM ones.
    Fortunately it works if I manually change pyilper configuration file and set it to "/dev/ttyACM2".
    I just posted a request to Joachim to add the ttyACM devices to his PIL-Box serial interface configuration dialog.

    USB virtual serial ports roles are ...
    Code:
    /dev/ttyACM0 → CDC port 0: console, user interface
    /dev/ttyACM1 → CDC port 1: trace listing
    /dev/ttyACM2 → CDC port 2: HP-IL/ PILBox frames
    /dev/ttyACM3 → CDC port 3: HP-IL scope, PILBox frame monitor
    /dev/ttyACM4 → CDC port 4: printer bytes

    1) with minicom, I connect to the main console (/dev/ttyACM0) and control the Tulip4041 features through its commands.
    Code:
     * help
            Print list of commands
     * system
            TULIP4041 system status and control
            [no argument] shows system status
            status        shows system status
            pio           shows pio status
            cdc           shows status of CDC interfaces
            cdcident      identify all CDC interfaces
            REBOOT        restart the TULIP4041 system
            BOOTSEL       restarts the TULIP4041 into BOOTSEL mode for firmware update
            poweron       drive ISA for 20 usecs to switch HP41 on
            calcreset     drive PWO to reset HP41
     * clear
            Clears the console
     * blink
            blink [b], blink the LED b times, just for testing and fun
     * dir
            dir [subdir], shows uSD card directory
     * sdcard
            SD card functions
            [no argument] shows the SD card status and mounts the card
            status        shows the SD card status and mounts the card
            mount         mounts the SD card
            unmount       unmounts the SD card
            mounted       check if the drive is mounted
            connect       connect the SD card as USB drive to the host computer
            eject         disconnect the SD card as USB drive from the host computer
     * plug
            plug functions
            [no argument] shows the current plugged ROMs
            status        shows the current plugged ROMs
            hpil          plug the HP-IL module in Page 7
            ilprinter     plug the HP-IL Printer in Page 6 (unplug HP82143A printer)
            printer       plug the HP82143A printer in Page 6 (unplug HP-IL printer)
     * unplug
            plug functions
            [no argument] shows the current plugged ROMs
            status        shows the current plugged ROMs
            hpil          unplug the HP-IL module from Page 7, unplug the HP-IL Printer
            ilprinter     unplug the HP-IL Printer from Page 6
            printer       unplug the HP82143A printer from Page 6
     * printer
            printer functions for the HP82143
            [no argument] shows the HP82143A status
            status        shows the HP82143A status
            power         toggle power
            trace         enable trace mode
            norm          enable norm mode
            man           enable man mode
            paper         toggle Out Of Paper status
            print         push PRINT button
            adv           push ADV button
     * xmem
            Extended memory functions
            status        shows the Extended Memory status
            dump          creates a dump of Extended Memory
            pattern       programs a pattern for FRAM test
            ERASE         earse all Extended Memory
            [n]           n= 0, 1, 2 
                          plugs 0, 1 or 2 Extended Memory Modules
                          do not use in combination with physical Extended Memory modules
                          this software version does NOT have the Extended Function ROM built in
                          Extended Functions must be physically plugged or available in an HP41CX
     * tracer
            tracer functions
            [no argument] shows the tracer status
            status        shows the tracer status
            trace         toggle tracer enable/disable
            sysloop       toggle tracing of system loops (RSTKB, RST05, BLINK01 and debounce)
            sysrom        toggle system rom tracing (Page 0, 1, 2, 3, 5)
            ilrom         toggle tracing of Page 6+7
            hpil          toggle HP-IL tracing to ILSCOPE USB port
            pilbox        toggle PILBox serial tracing to ILSCOPE serial port
            ilregs        toggle tracing of HP-IL registers
            save          save tracer settings

    2) with minicom, I see trace listings (/dev/ttyACM1) activated by the main console
    Code:
       119940  E119  1  087  0.0000000DC4.0.00  ...  R000  C0  FI0123456789ABCD  JC 16             
       119941  E129  1  09C  0.0000000DC4.0.00  ...  R000  C0  FI0123456789ABCD  R= 5              
       119942  E12A  1  310  0.0000000DC4.0.00  ...  R000  C0  FI0123456789ABCD  LD@R C            
       119943  E12B  1  390  0.0000000DC4.0.00  ...  R000  C0  FI0123456789ABCD  LD@R E            
       119944  E12C  1  350  0.0000000CC4.0.00  ...  R000  C0  FI0123456789ABCD  LD@R D            
       119945  E12D  1  36E  0.0000000CE4.0.00  ...  R000  C0  FI0123456789ABCD  ?A#C ALL          
       119946  E12E  1  12F  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  JC 37             
       119947  E153  1  28C  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  ?FSET 7           
       119948  E154  1  1BF  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  JC 55             
       119949  E155  1  130  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  LDI               
       119950  E156  0  308  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  308               
       119951  E157  1  236  0.0000000CED.0.00  ...  R000  C0  FI0123456789ABCD  C=C+1 XS          
       119952  E158  1  106  0.0000000CED.3.08  ...  R000  C0  FI0123456789ABCD  A=C S&X           
       119953  E159  1  3B8  0.0000000CED.4.08  ...  R000  C0  FI0123456789ABCD  READ 14(d)        
       119954  E15A  1  3B0  0.000043C048.0.01  ...  R000  C0  FI0123456789ABCD  C=C AND A         
       119955  E15B  1  366  0.000043C048.0.01  ...  R000  C0  FI0123456789ABCD  ?A#C S&X          
       119956  E15C  1  033  0.0000000000.0.00  ...  R000  C0  FI0123456789ABCD  JNC +6            
       119957  E15D  1  3B8  0.0000000000.0.00  ...  R000  C0  FI0123456789ABCD  READ 14(d)        
       119958  E15E  1  358  0.000043C048.0.01  ...  R000  C0  FI0123456789ABCD  ST=C              
       119959  E15F  1  0B0  0.000043C048.0.01  ...  R000  C0  FI0123456789ABCD  C=N

    3) with pyilper connected to /dev/ttyACM2, I see all the HP-IL commands going in and out in the pyilper scope window.
    Code:
    DAB 10 (010) dab f0 (0f0) DAB F0 (0F0) eto    (540) LAD 01 (421) lad 01 (421)
    RFC    (500) rfc    (500) RFC    (500) rfc    (500) UNL    (43F) unl    (43f)
    RFC    (500) rfc    (500) RFC    (500) rfc    (500)

    4) with minicom, I see PILBox trace listings (/dev/ttyACM3) activated by the main console (same listing as the scope window but in different format)
    Code:
     PILBox > 0010 DAB   hi: 20 lo: 90
      PILBox < 00F0 DAB   hi: 22 lo: F0
     < 0F0 DAB
     > 0F0 DAB
      PILBox > 00F0 DAB   hi: 22 lo: F0
      PILBox < 0540 ETO   hi: 34 lo: C0
     < 540 ETO
     > 421 LAD
      PILBox > 0421 LAD   hi: 30 lo: A1
      PILBox < 0421 LAD   hi: 30 lo: A1
     < 421 LAD
     > 500 RFC
      PILBox > 0500 RFC   hi: 34 lo: 80
      PILBox < 0500 RFC   hi: 34 lo: 80
     < 500 RFC
     > 43F UNL
      PILBox > 043F UNL   hi: 30 lo: BF
      PILBox < 043F UNL   hi: 30 lo: BF
     < 43F UNL
     > 500 RFC
      PILBox > 0500 RFC   hi: 34 lo: 80
      PILBox < 0500 RFC   hi: 34 lo: 80
     < 500 RFC

    5) I have not tried /dev/ttyACM4 yet.

    6) CAT 2 → listing done on an HP-41, captured, transformed and sent by Tulip4041 (Raspberry Pi Pico RP2040) to pyilper 82162A printer emulator (Raspberry Pi 4B).
    Code:
    -TIME  2C   
    -CX TIME    
    -PRINTER 2E 
    -MASS ST 1H 
    -CTL FNS    
    -MYROM L1   
    -MYROM U1   
    -MYROM L2   
    -MYROM U2   
    MELBROM 1A  
    MEMORY LOST 
    UST KIDDING 
    -MAXX 4C    
    -ZENROM 3B  
    -PROGRAMMER 
    -EXT FCN 2D 
    -CX EXT FCN

    I have reported my first small harmless bug to Meindert this morning.

    So this is it for now.

    Sylvain

    Sylvain Côté
    Find all posts by this user
    Quote this message in a reply
    08-28-2024, 07:23 AM
    Post: #10
    RE: HP41 TULIP4041 update
    Good work Sylvian, thanks for sharing. Just a few remarks from me:
    - The trace listing shows FI as high all the time. You probably have jumper JP2 open. If you close this you can trace the FI line, and you see activity there when there is HP-IL traffic or interrupts from TIME
    - In the IL Scope you see double the amount of RFC frames. These are real frames, the handling of these frames in the PILBox emulation needs to be fixed.

    Next items for you to test: HP82143 printing and IR printing, Extended Memory and adding the HP-IL registers to the trace (command 'tracer ilregs'). Note that the registers are shown only when there is a change.

    The ILScope trace is a different format because it is mixed with PILBox serial traffic (can be switched off), and I can never remember if the IL frames in capitals are in or out, so I used the symbols > for out and < for in.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    08-28-2024, 12:44 PM
    Post: #11
    RE: HP41 TULIP4041 update
    (08-27-2024 07:33 PM)Sylvain Cote Wrote:  I am able to connect on the multiple serial terminals with minicom but pyilper only uses ttyUSB devices and ignore the ttyACM ones.
    Fortunately it works if I manually change pyilper configuration file and set it to "/dev/ttyACM2".
    I just posted a request to Joachim to add the ttyACM devices to his PIL-Box serial interface configuration dialog.

    The combo box entry for the PIL-Box serial device is editable. Therefore you can enter an arbitrary device name there instead of choosing a member of the list. I will be happy to add ttyACMxx devices to the combo box list in the next pyILPER version.

    Regards Joachim
    Find all posts by this user
    Quote this message in a reply
    08-28-2024, 12:54 PM
    Post: #12
    RE: HP41 TULIP4041 update
    (08-28-2024 12:44 PM)jsi Wrote:  The combo box entry for the PIL-Box serial device is editable. Therefore you can enter an arbitrary device name there instead of choosing a member of the list.
    Really!!! I was so sure that it was not that I did not even tried it, funny how mind works sometimes.

    (08-28-2024 12:44 PM)jsi Wrote:  I will be happy to add ttyACMxx devices to the combo box list in the next pyILPER version.
    Thanks!

    Sylvain

    Sylvain Côté
    Find all posts by this user
    Quote this message in a reply
    08-29-2024, 03:32 AM
    Post: #13
    RE: HP41 TULIP4041 update
    (08-26-2024 07:24 AM)MeindertKuipers Wrote:  
    (08-25-2024 11:07 PM)John Ioannidis Wrote:  What's the point of telling us all this if you are not posting any code?
    No worries, there will be source code published of the version that will go out to the users of the Development Board. I do want to make certain that it is in a useable state. And my earlier offer still stands, if you are interested in the sources I will happily share it with you.

    I read what I wrote again, and now it sounded embarrassingly rude Sad

    I apologize.

    Yes, please share the code. I'm 'jayeye' on GitHub.
    Find all posts by this user
    Quote this message in a reply
    08-29-2024, 12:03 PM
    Post: #14
    RE: HP41 TULIP4041 update
    Since the sources are in a more or less stable state (pending any feedback from Sylvain) I decided to make these public already at https://github.com/mjakuipers/TULIP-DevBoard. A binary for direct downloading in the Pico is in the build directory.

    The usual disclaimer applies, use at your own risk. Also keep in mind that many parts are in development and half finished. Feedback is appreciated of course.

    I still have not received my Pico 2 board, and I have some trouble getting the current sources to compile under the new SDK 2.0, and I am still using the SDK 1.51 for that.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    08-30-2024, 01:44 AM
    Post: #15
    RE: HP41 TULIP4041 update
    (08-29-2024 12:03 PM)MeindertKuipers Wrote:  Since the sources are in a more or less stable state (pending any feedback from Sylvain) I decided to make these public already at https://github.com/mjakuipers/TULIP-DevBoard. A binary for direct downloading in the Pico is in the build directory.

    The usual disclaimer applies, use at your own risk. Also keep in mind that many parts are in development and half finished. Feedback is appreciated of course.

    I still have not received my Pico 2 board, and I have some trouble getting the current sources to compile under the new SDK 2.0, and I am still using the SDK 1.51 for that.

    Forked! Thanks!

    The Pico2 is backordered on all the US sites I tried (Adafruit, Sparkfun, Vilros), so don't feel bad Smile
    Find all posts by this user
    Quote this message in a reply
    09-01-2024, 02:42 PM
    Post: #16
    RE: HP41 TULIP4041 update
    Testing update #2 ...

    I have tested all the functionalities in multiple scenarios and send the report to Meindert yesterday.
    I assume that it will take him a couple of days to go through the report and come back with answers and/or firmware fix if necessary.

    Summary ...

    Working:
    → almost everything: serial interfaces, control console, tracing consoles, sdcard access, virtual HP-IL, internal ROM mapping, X-Memory, etc.
    → impressive, given that the software version is: 00.01.01 BETA !!!

    Minor-Issues:
    → some inconsistencies in messages and/or behavior.

    Major-Issues:
    → IR-Printing and external ROM mapping.
    → That could be me, not understanding and/or not doing the things correctly and/or functionality missing in my beta firmware.

    Sylvain Côté
    Find all posts by this user
    Quote this message in a reply
    09-02-2024, 12:06 PM
    Post: #17
    RE: HP41 TULIP4041 update
    (09-01-2024 02:42 PM)Sylvain Cote Wrote:  Testing update #2 ...

    Minor-Issues:
    → some inconsistencies in messages and/or behavior.

    Major-Issues:
    → IR-Printing and external ROM mapping.
    → That could be me, not understanding and/or not doing the things correctly and/or functionality missing in my beta firmware.
    Thanks for being the guinea pig Sylvain! Thanks to your feedback some nasty bugs were already fixed.

    The inconsistencies are noted.
    - IR printing issues probably due to the fact that a real HP82240 printer was used, and the current firmware only supports the simulated HP82143 printer. The byte-stream over a USB serial port or IR (IR with a receiver connected to a HP82143 simulator)
    - ROM mapping is currently only possible with the ROMs embedded in the firmware for HP-IL, HP-IL Printer and the HP82143 printer ROM. Support for arbitrary ROMs to follow (pending support for specific hardware).

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    09-05-2024, 03:35 PM
    Post: #18
    RE: HP41 TULIP4041 update
    Just to keep you all up to date, I have received the Pico2 boards with the RP2350, and after some minor changes something is happening. USB ports work, but no interaction with the calculator and also the SD card does not seem to work.
    This means that there is some work to do to evaluate the RP2350.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    09-05-2024, 06:54 PM
    Post: #19
    RE: HP41 TULIP4041 update
    Good news, TULIP4041 seems to be working on the Pico2 board. Only a few minor changes needed. Only real issue so far is that the FI line is not driven, meaning that I cannot test HP-IL. And I have done only limited functional testing so far. Really interesting is the power consumption which is supposedly better than the RP2040, probably next week.
    Also important is that I do not seem to have any issues with the GPIO errata which is currently a hot item on the Pico forums.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    09-16-2024, 11:06 AM
    Post: #20
    RE: HP41 TULIP4041 update
    After receiving and testing the Pico2 boards I have concluded that some more testing is needed to verify if the new RP2350 CPU has enough advantages over the existing RP2040. The initial tests did prove that the Pico2 board behaves quite nice on the Development Board. For now the development of the TULIP4041 will continue with the RP2040 and the existing Pico1 board. Worst case the users need to switch to the Pico2 board later, which is not a big investment.
    Today I have ordered the PCB's for the Development Board for the existing pre-orders. When I receive these I will verify them by assembling and testing one unit, and when I am happy with the results I will announce this.

    The issues with the SD card I had with the Pico2 tests are resolved, it was due to an upgrade of the FatFS library, which dropped support for SDSC cards (<= 2 GByte), and I was testing with an older 2 GByte card. Only issue with the Pico2 is with one of the state machines, and this is still to be resolved. Most important wil be testing the power management of the Pico2.

    Regards, Meindert
    Find all posts by this user
    Quote this message in a reply
    Post Reply 




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