SwissMicros DM42 User Manual

DM42 User Manual
v3.10.1, October 2018
Copyright © 2016-2018 SwissMicros GmbH
Table of Contents
About this User Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê1
General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê1
CPU Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê1
IR Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê1
Internal FAT disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê1
Calculator Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê2
Virtual variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê2
F-Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê6
LCD Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê6
OFF Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê6
PIXEL and AGRAPH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê7
Alpha Input Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê7
Printing to File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê8
Program Decoder/Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê9
DM42 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê9
Main Setup menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê9
File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê10
Calculator State menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê11
Print to File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê11
Settings menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê12
System menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê14
Firmware Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê14
Changes since v3.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê15
Quick Update Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê16
DMCP and PGM Update Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê17
Program Loading/Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê17
DMCP Update Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê18
Bootloader mode activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê18
FW Update Using dm_tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê19
FW Update Using dfu-util. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê20
QSPI flashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê22
DMCP System Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê24
QSPI Load menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ê25
About this User Manual
This user manual refers to special features of DM42. Look at the following documentation for description of basic calculator functionality:
HP-42S Owner’s Manual
HP-42S Programming Examples and Techniques
Free42 Manual
General Information
CPU Speed
CPU speed is 24MHz when running on battery (due to limited battery current) and increases to 80MHz when the USB cable is connected.
IR Printing
Calculator contains IR output and can print on HP 82240B infrared printer.
Internal FAT disk
The calculator has 6MB of internal flash storage formatted as a FAT filesystem that is used for loading/saving programs and for backing up calculator state. It is accessible as USB disk when activated via the menu 'File > Activate USB Disk >'.
Internal flash has limited amount of write cycles. While the lifetime with ordinary usage could be dozens of years, an excessive number of writes will wear the flash memory much quicker.
Worst case scenario, you would have to replace the flash chip, which is worth less than $1. If needed, SwissMicros will replace the chip at no cost, but shipping costs must be covered by the customer.
The datasheet mentions a minimum of 100,000 write cycles, which sounds like a lot, but any change in the filesystem means overwriting at least part of the file allocation table, which is stored in a static location.
Calculator comes with pre-filled FAT disk contents. In case the contents of the FAT area is lost it could be always downloaded from the SwissMicros DM42 FAT files page. There is the contents of individual directories accessible separately or the whole contents of FAT disk can be downloaded as single zip file DM42.zip.
There are several directories with special names on the FAT disk:
1
HELP
Contains help file(s) for built-in DM42 help that can be activated from main system soft menu by pressing [ F1 ] key (leftmost in top row of keys).
OFFIMG
Bitmap files from this directory are displayed when the calculator is turned off. See OFF Images chapter for more details.
PROGRAMS
Raw files with programs are loaded/saved from/to this directory.
SCREENS
Screenshots of calculator LCD are saved into this directory. See LCD Screenshots for more details.
STATE
Calculator state files with extension .s42 are stored in this directory. See chapters Load State or
Save State how the load or save calculator state.
Calculator Extensions
Virtual variables
Managing some of the new features specific to the DM42 is something that spurred a lot of discussion. Initially we wanted to re-purpose some of the so-called "reserved" flags of the HP-42S but it soon became apparent that others had already done so in various patches for Free42 and we wanted to avoid trampling on anybody’s toes with our own patches for Free42.
The next idea was to extend the number of flags available beyond 100 but obviously only have them accessible via indirect addressing as there was no question of patching Free42 to accept 3 digits in the various flag instructions. But then, how do we make integer values (and one real value) available to programs without assigning a whole block of flags that are going to be awkward to read?
After that we thought of using extended register numbers. They would either have to be assigned ridiculously high index numbers in order to avoid conflict if someone decided to go for a register array SIZE of 2000, or they would have to be assigned negative index numbers. We couldn’t use negative indexes because the HP-42S and Free42 just take the absolute value of the index and use that to access the correct register and some programs might rely on that.
We settled on the concept of "Virtual Variables". These are variables that do not (and cannot, for that matter) exist in the DM42’s variable table. Because of this, they are not listed in the variable menu when you press RCL or STO but there is a way to make them easy-ish to access, just read on…
There are six such virtual variables:
"DevID"
2
Device ID (read-only) — RCL "DevID" returns the type of DM42 you’re using. There are currently two hardware models only identified by value 0 (zero) is returned by the DM42 units that we have. Other types of unit that may be produced in future will have different DevID values.
"GrMod"
Graphics Mode (read-write) — RCL "GrMod" retrieves the current graphics mode and STO "GrMod" sets the graphics mode to the number present in the X register. Graphics modes currently supported are:
• 0 = standard HP-42S resolution 131x16
• 1 = reserved for future use and maps to 0 on the DM42
• 2 = DM42 full resolution 200x120
• 3 = DM42 full resolution 400x240
"ResX" and "ResY"
X- and Y-resolution (read-only) — RCL "ResX" or RCL "ResY" recalls the current X-resolution or Y­resolution respectively into the X stack register. The values that you will get are 131, 200 or 400 for RCL "ResX" and 16, 120 or 240 for RCL "ResY" depending on the current graphics mode (0, 2 or 3).
"Vbat"
Battery voltage (read-only) — If you’re running off battery power then this will give you the voltage read at that precise moment in time. If you’re running on USB power then this will give you the last battery voltage that was recorded before connecting the USB cable. Note that the value retrieved here can and almost always will be different to the voltage displayed in the status bar. The latter is cached and almost always retrieved when the DM42 is idle. The voltage read from "Vbat" is the voltage read while you are using the keyboard and/or running a program. This can be useful for pausing lengthy processing if the battery voltage drops below a threshold and allowing it to recover before resuming.
"RefLCD"
The purpose of programs can vary significantly. There are programs like a stopwatch or games, where quick refreshing of the LCD is required. On the other end of the spectrum are pure computational programs, where no LCD output is required throughout program execution and where it is more beneficial to utilize all the CPU time for computation rather than wasting it on unnecessary LCD updates. The "RefLCD" virtual variable was introduced specifically to address those different requirements. It is possible to disable LCD refreshing altogether or to enable the periodic refresh of individual portions of the LCD.
RefLCD in more detail
It is possible to disable LCD refreshing altogether or to enable the periodic refresh of individual portions of the LCD. The value that you store in this variable is in fact a bitmask as per the table below. Items whose corresponding bit is cleared are not refreshed whereas those whose bit is set are refreshed with 200ms timeout after the LCD contents changes.
3
Bit ValueZone
0 1 Main area (stack/graphics)
1 2 Goose
2 4 Annunciators
In order to prevent any part of the LCD from refreshing and thus maximize performance, store the value 0 (zero) in "RefLCD". Storing 1 in the variable means that the main area will be updated with 200ms timeout (stack or the graphics display if that is what is active). 2 will allow the goose to fly and 4 will allow the annunciators (including the flag tiles) to be updated. To have more than one zone refreshed during program execution, store the sum of the bit value(s) in "RefLCD" as follows:
ValueBinaryZone(s)
0 000 None (no refreshing occurs)
1 001 Main area
2 010 Goose
3 011 Main area and goose
4 100 Annunciators
5 101 Annunciators and main area
6 110 Annunciators and goose
7 111 Annunciators, goose and main area (everything)
You can, however, still refresh zones on an ad hoc basis even when they don’t normally refresh by storing the negative value of the bitmask value in "RefLCD". For example, to update the annunciators programatically "now", store -4 to "RefLCD".
One exception to this is the message area in which VIEW and AVIEW show their results. This is never disabled and is repainted with 200ms delay(if needed) even if zero is stored in "RefLCD". If the redraw response isn’t fast enough (e.g. for a stopwatch application, see below) then you can have the message area refreshed by program by storing the value -8 in "RefLCD". This program shows an example of how to use it:
4
00 { 49-Byte Prgm } 01LBL "STOPW" 02 TIME 03 HR 04 STO 02 05 "RefLCD" 06 ASTO 03 07 CLX 08 STO IND 03 @ Disable refreshing 09 FIX 02 10LBL 00 11 TIME 12 HR 13 RCL- 02 14 3600 15 × 16 VIEW ST X 17 -8 18 STO IND 03 @ refresh the message area now 19 GTO 00
Accessing virtual variables
Attempting to STO a value in a read-only virtual variable has no effect, so it is not possible to create these variables in the variables table within Free42. Because of this it is a bit awkward to RCL and STO them directly. We recommend adding a reference to the virtual variables that you will need in your program in order to access the variables indirectly later on. Something like this:
"GrMod" ASTO 10 "ResX" ASTO 11 "ResY" ASTO 12
Where needed you can then simply address the virtual variables this way:
3 STO IND 10 "Pixels on " "screen: " RCL IND 11 RCLx IND 12 ARCL ST X AVIEW STOP
5
F-Buttons
The top row of keyboard consists of six unprinted buttons referenced as F-Buttons (F1-F6) or Soft­Menu Buttons. When no calculator menu is in action those buttons have following functions:
F1
Displays the Help. Note that the /HELP/index.htm file has to be present. The latest version can be downloaded from the DM42 help page.
F2
Toggle this system soft menu visibility.
F3
(not assigned)
F4
Increase buzzer volume
SHIFT-F4
Decrease buzzer volume
F5
Toggle stack alignment (Left, Right, Right Underlined)
SHIFT-F5
Toggle between sans and HP font
F6
Increase font size
SHIFT-F6
Decrease font size
LCD Screenshots
Hold [ SHIFT ] and press [ DISP ] to get a screenshot.
You will find a .bmp file named according to the current time and date in the /SCREENS folder of the FAT drive.
OFF Images
The LCD display used in DM42 calculator behaves in similar way as e-ink displays and contents of the LCD is visible for a long time after the calculator is turned OFF.
This feature is used to display images when the calculator is turned OFF.
Single hard-coded OFF image is present in calculator firmware and this image is displayed
6
Loading...
+ 20 hidden pages