Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Works fine on my PicoCalc with RP2350A. Did you download the firmware from the clockwork forum site? https://forum.clockworkpi.com/t/picomite-firmware-version-6-02-00a-for-use-on-clockworkpi-picocalc/21345
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2999
Posted: 05:00am 08 Feb 2026
Copy link to clipboard
Print this post
An observation about the N5110 LCD driver. It does not like an idiot driving the console. Forgetting to set a pin before using it as a pulse pin results in the RP2040 stopping and becoming unresponsive to Ctrl-C. Heartbeat led continues to flash. A simple command-line demo.
> option list PicoMite MMBasic RP2040 V6.02.00 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION SYSTEM I2C GP10,GP11 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 378000 OPTION DISPLAY 55, 152 OPTION LCDPANEL N5110, LANDSCAPE,GP13,GP14,GP15, 195 OPTION RTC AUTO ENABLE > > > do : text 9,6,time$ : text 2,25,date$ : pulse GP17,1 : loop Error : Pin 22/GP17 is not an output Error : Display not configured Error : Display not configured Error : Display not configured '<- continues for 2 dozen lines
I guess it isn't a bug as it works properly if you do things correctly. Edited 2026-02-08 16:36 by phil99
Where can i find something about the I2CLCD command? Is it for HD44780 Displays?
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10946
Posted: 03:35pm 09 Feb 2026
Copy link to clipboard
Print this post
It has somehow gone missing from the manual
I2CLCD Command Purpose: Controls HD44780-compatible character LCD displays via a PCF8574 I2C I/O expander module. These adapter modules are commonly found as daughter boards on 16x2 and 20x4 character LCDs, providing I2C control using only two wires (plus power).
Description: Subcommand Description INIT address Initialize the LCD at the specified I2C address. The address is typically &H27 or &H3F for most modules. PCF8574 uses &H20-&H27, PCF8574A uses &H38-&H3F. Requires OPTION SYSTEM I2C to be configured first. A degree symbol (°) is automatically created at character code 0.
CLOSE Close the LCD and turn off the backlight.
CLEAR Clear the display and return cursor to home position.
BACKLIGHT state Turn the backlight on (1) or off (0).
CURSOR state [, BLINK] Control cursor visibility. State can be ON/OFF or 1/0. Optional BLINK parameter (or 1) enables cursor blinking.
CREATECHAR code, d0-d7 Define a custom character at code (0-7). The 8 data bytes (d0-d7) define the 5x8 pixel pattern, with each byte representing one row (values 0-31, only lower 5 bits used).
CMD byte [, byte ...] Send raw command byte(s) directly to the LCD controller.
DATA byte [, byte ...] Send raw data byte(s) directly to the LCD controller.
line, position, string$ Display text on line (1-4) starting at position (1-40).
line, Cn, string$ Display centered text on line (1-4). Cn specifies display width: C8, C16, C20, or C40.
Hardware Configuration: The PCF8574 I/O expander must be wired to the LCD using the standard configuration:
P0 = RS (Register Select) P1 = RW (Read/Write) P2 = EN (Enable) P3 = Backlight control P4 = D4 P5 = D5 P6 = D6 P7 = D7 This is the default wiring used by virtually all LCD I2C backpack modules.
Prerequisites: The SYSTEM I2C interface must be configured before using this command: OPTION SYSTEM I2C sda_pin, scl_pin
Could these commands be made to work with the "parallel" connected LCD displays as well? Seems much simpler than using the CMD/DATA to get the job done.
> option list PicoMite MMBasic RP2040 V6.02.00 OPTION SYSTEM I2C GP20,GP21 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION PICO OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 51, 100 OPTION SDCARD GP19, GP10, GP11, GP12 OPTION F1 FLASH RUN 1 OPTION PLATFORM PicoMite RP2040-SD:32G
Kind regards,
Jan.
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2999
Posted: 09:59pm 11 Feb 2026
Copy link to clipboard
Print this post
MM.INFO() MM.INFO$() These two versions can be used interchangeably but good programming practice would require that you use the one corresponding to the returned datatype.
So it would appear they both use the same token. Using "the one corresponding to the returned datatype" is just to help others reading the code and makes no difference to MMBasic.
JanVolk Guru Joined: 28/01/2023 Location: NetherlandsPosts: 316
Posted: 10:37pm 11 Feb 2026
Copy link to clipboard
Print this post
Thanks phil99,
As I mentioned earlier, I was updating the help.txt to V6.02.00. Several other commands are also being updated automatically, as I've read in the manual. I've fixed this in the help.txt by adding a " ' " in front of them. MM.CODE and STEPPER aren't in the manual, but I've mentioned them before. And for a limited number of commands and functions, a short Dutch explanation is provided. The file is now 60KB and is mainly for the command and function names and sequences. English isn't my first language, and Google Translate is my friend. So perhaps I reacted a bit too quickly?
Kind regards,
Jan.
JanVolk Guru Joined: 28/01/2023 Location: NetherlandsPosts: 316
Posted: 05:54pm 12 Feb 2026
Copy link to clipboard
Print this post
Geoffg,
Thanks for adding I2CLCD to the manual V6.02.00 Rev. 5.
Jan.
bfwolf Senior Member Joined: 03/01/2025 Location: GermanyPosts: 156
Posted: 08:14pm 12 Feb 2026
Copy link to clipboard
Print this post
I recently had another idea and had to "experiment"...
list Option Explicit
Type ColorEnumT red As Integer green As Integer blue As Integer End Type
Dim ColorEnum As ColorEnumT = (1, 2, 3)
Print ColorEnum.blue, ColorEnum.red
End > run 3 1 >
So I "misused" structs as enums...
Advantages: - "Quite usable," except for the definition. - Saves memory in the variable table compared to const and variables, since only one variable is used.
Disadvantages: - Not exactly elegant when defining the enum. - Only 16 different enum "constants" can be created per enum, since a struct (currently) can have a maximum of 16 members.
@Peter: Perhaps this will inspire you to "one day in the distant future" implement proper enums in MMBasic?
Syntax in VB.NET:
Enum enumerationname [ As datatype ] memberlist End Enum
datatype = { Byte, Integer, Long, SByte, Short, UInteger, ULong, UShort } ' ...so all integer types, could also be omitted or a "dummy"...
memberlist = member [ = integer-value ] [ memberlist ]
For the above example
Enum ColorEnum red = 1 green blue End Enum Print ColorEnum.blue, ColorEnum.red
I'm quite sure there would be a lot of code shared with the structs. The offsets in the internal tables could hold the enum values (=constant integer-values).