Post Reply 
41CL How-to's (using embedded serial port) [2017-12-09]
12-09-2017, 02:24 PM (This post was last modified: 01-15-2021 05:47 AM by Sylvain Cote.)
Post: #1
41CL How-to's (using embedded serial port) [2017-12-09]
41CL How-to's (using embedded serial port)

Table of Content
  • MMU configuration for this how-to's
  • Copy plug-in ROM to RAM page
  • Copy ROM image from Flash/RAM page to computer file
Last update: 2017-12-09

MMU configuration for this how-to's

This article uses two modules: 41CL Extreme Functions (YFNX) and 41CL Update Functions (YUPS).

execute the following functions:
Code:
MMUDIS              // disable 41CL memory management unit
TURBO50             // to speed up things
MMUCLR              // clear 41CL memory management unit configuration
"YFNX"              // 41CL Extreme Functions ROM image ID
PLUGH               // plug it to logical page 7 (Interface Loop port) leaving all physical ports available
"YUPS"              // 41CL Update Functions ROM image ID
PLUGP               // plug it to logical page 6 (Printer port) leaving all physical ports available
MMUEN               // enable 41CL memory management unit
CAT then 2          // show ROMs mapped
displayed on calculator
Code:
"UPDAT XX"          // 41CL Update ROM with revision in XX
"-YFNX XX"          // 41CL Extreme ROM with revision in XX

Copy plug-in ROM to 41CL RAM page

This example will copy the time module in port 5 to physical RAM page 0x820.

execute the following functions:
Code:
"5-1>820"           // ROM module location: 4K word from logical page 5 bank 1 >to> RAM physical address 0x820000
YMCPY               // do the copying
displayed on calculator
Code:
"COPYING"

Note: you must replace the address-bank from the above example ("5-1") by your specific information based on your module location and type.

Copy ROM image from Flash/RAM page to computer file

This example saves the physical RAM page at address 0x820 in a computer file.

Connect your 41CL to your computer

Physically connect your 41CL to your computer using the serial cable.

execute the following functions:
Code:
MMUEN               // just in case, sometimes connecting/disconnecting the serial cable to/from 41CL has the effect of disabling the MMU
SERINI              // initialize the serial port
BAUD then 48        // set communication speed to 4800 bauds

Start computer program to receive upcoming ROM image.

To do this step, you have to start a command line and need to be in the folder were the clupdate program is located.

Replace the FILENAME.ROM tag in the following step, by your specific filename.
Replace the SERIAL_PORT tag in the following step, by its specific serial port:
  • Windows: find your serial port name with DeviceManager and use that name instead of the SERIAL_PORT tag. (ex.: COM4)
  • Linux..: find your serial port name in /dev folder and use that name instead of the SERIAL_PORT tag. (ex.: /dev/ttyUSB0)
  • macOS..: find your serial port name in /dev folder and use that name instead of the SERIAL_PORT tag. (ex.: /dev/tty.usbserial)
type the following command on your computer:
Code:
java -jar clupdate-1.1.0.jar --download FILENAME.ROM SERIAL_PORT 4800 [RETURN]
displayed on computer:
Code:
HH:MM:SS --upload   [fileName: FILENAME.ROM] [portName: SERIAL_PORT] [baudRate: 4800]
HH:MM:SS Serial     SERIAL_PORT opened.
HH:MM:SS Receiving

Warning: you now have 60 seconds to do the next steps before getting a timeout.

Export RAM/Flash page to serial port

execute the following functions:
Code:
"820000-0FFF"       // physical address 0x820000 of length 0x0FFF in RAM
YEXP                // export page
displayed on calculator:
Code:
"SENDING"
displayed on computer:
Code:
HH:MM:SS Receiving  710 2186 2186 2186 924 = 8192 bytes received
HH:MM:SS File       FILENAME.ROM saving ... done [YCRC=0x9931943C]
HH:MM:SS Serial     SERIAL_PORT closed.

Note: this RAM page currently contains the time module copied in the previous steps.

Validate integrity of the saved file

execute the following functions:
Code:
"820"               // calculating CRC of the copied module
YCRC
displayed on calculator:
Code:
"9931943C"          // value should match the above value

Note: this RAM page currently contains the time module copied in the previous steps.

41CL How-to's (using embedded serial port)


Have Fun! 8-)

Sylvain
Find all posts by this user
Quote this message in a reply
Post Reply 




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