Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:50 14 Mar 2026 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : PicoMite Firmware Release Version 6.02.00

     Page 4 of 5    
Author Message
Briano
Newbie

Joined: 20/01/2026
Location: Canada
Posts: 10
Posted: 03:16am 08 Feb 2026
Copy link to clipboard 
Print this post

  DigitalDreams said  
  matherp said  What LCD, what version?


Best I can do right now is from the option list...

Picomite MMBasic RP2350A V6.02.00
Option lcdpanel console ,, FF00
Option display 26, 40
Option lcdpanel st7796sp, portrait,gp14,gp15, gp13,,invert

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: Australia
Posts: 3069
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
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 03:29pm 09 Feb 2026
Copy link to clipboard 
Print this post

Where can i find something about the I2CLCD command?
Is it for HD44780 Displays?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11060
Posted: 03:35pm 09 Feb 2026
Copy link to clipboard 
Print this post

It has somehow gone missing from the manual
  Quote  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).

Syntax:
I2CLCD INIT address
I2CLCD CLOSE
I2CLCD CLEAR
I2CLCD BACKLIGHT state
I2CLCD CURSOR state [, BLINK]
I2CLCD CREATECHAR code, d0, d1, d2, d3, d4, d5, d6, d7
I2CLCD CMD byte [, byte ...]
I2CLCD DATA byte [, byte ...]
I2CLCD line, position, string$
I2CLCD line, Cn, string$

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
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 03:47pm 09 Feb 2026
Copy link to clipboard 
Print this post

  matherp said  It has somehow gone missing from the manual


Wow... Thanks very much!
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 384
Posted: 09:32pm 09 Feb 2026
Copy link to clipboard 
Print this post

  matherp said  I2CLCD CURSOR state [, BLINK]
I2CLCD CREATECHAR code, d0, d1, d2, d3, d4, d5, d6, d7


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.

i.e:
LCD CURSOR state [, BLINK]
LCD CREATECHAR code, d0, d1, d2, d3, d4, d5, d6, d7
-Carl
 
JanVolk
Guru

Joined: 28/01/2023
Location: Netherlands
Posts: 325
Posted: 09:42pm 11 Feb 2026
Copy link to clipboard 
Print this post

Is this correct?
MM.INFO$() makes no distinction between MM.INFO() and MM.INFO$().
I noticed this while creating a help.txt file.

Do this in EDIT and then F1:SAVE.
Print MM.INFO$()
Print MM.INFO$(AUTORUN)
Print MM.INFO$(CALLTABLE)
Print MM.INFO$(CPUSPEED)
Print MM.INFO$(CURRENT)
Print MM.INFO$(DISK SIZE)
Print MM.INFO$(DRIVE) Geeft A: of B: terug.
Print MM.INFO$(FLASH)
Print MM.INFO$(FREE SPACE)
Print MM.INFO$(IP ADDRESS)
Print MM.INFO$(LCDPANEL)
Print MM.INFO$(LINE)
Print MM.INFO$(MODBUFF ADDRESS)
Print MM.INFO$(MODIFIED file$)
Print MM.INFO$(OPTION FLASH SIZE)
Print MM.INFO$(OPTION option)
Print MM.INFO$(PATH)
Print MM.INFO$(PINNO GPnn)
Print MM.INFO$(PIN pinno)
Print MM.INFO$(PLATFORM)
Print MM.INFO$(SOUND)
Print MM.INFO$(SYSTEM I2C)
Print MM.INFO$(TOUCH)

> list
Print MM.INFO()
Print MM.INFO(AUTORUN)
Print MM.INFO(CALLTABLE)
Print MM.INFO(CPUSPEED)
Print MM.INFO(CURRENT)
Print MM.INFO(DISK SIZE)
Print MM.INFO(DRIVE) Geeft A: of B: terug.
Print MM.INFO(FLASH)
Print MM.INFO(FREE SPACE)
Print MM.INFO(IP ADDRESS)
Print MM.INFO(LCDPANEL)
Print MM.INFO(LINE)
Print MM.INFO(MODBUFF ADDRESS)
Print MM.INFO(MODIFIED file$)
Print MM.INFO(OPTION FLASH SIZE)
Print MM.INFO(OPTION option)
Print MM.INFO(PATH)
Print MM.INFO(PINNO GPnn)
Print MM.INFO(PIN pinno)
Print MM.INFO(PLATFORM)
Print MM.INFO(SOUND)
Print MM.INFO(SYSTEM I2C)
Print MM.INFO(TOUCH)

> 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: Australia
Posts: 3069
Posted: 09:59pm 11 Feb 2026
Copy link to clipboard 
Print this post

  manual said  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: Netherlands
Posts: 325
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: Netherlands
Posts: 325
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: Germany
Posts: 187
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).

Regards, bfwolf
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 08:00am 14 Feb 2026
Copy link to clipboard 
Print this post

I want to use my own exit with ctrl-c, but the way i did it with earlier firmwares, does not work anymore:


'point STRG-C to another key
Option Break 4
Print "Break 4"

'if STRG-C is pressed, call own exit routine my_exit()
On Key 3, my_exit()
Print "On key"

Do
 a=a+1
 Print a
Loop

Sub my_exit()
 Print "End"
 End
End Sub


gives me:


> run
Break 4
>


nothing else.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11060
Posted: 08:12am 14 Feb 2026
Copy link to clipboard 
Print this post

Get rid of the brackets and it works

  Quote  On Key 3, my_exit
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 09:15am 14 Feb 2026
Copy link to clipboard 
Print this post

  matherp said  Get rid of the brackets and it works

  Quote  On Key 3, my_exit


same result without brackets.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11060
Posted: 09:20am 14 Feb 2026
Copy link to clipboard 
Print this post

You don't say what firmware you are running abnd what options. It works for me after I made the change
Edited 2026-02-14 19:21 by matherp
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 09:45am 14 Feb 2026
Copy link to clipboard 
Print this post

  matherp said  You don't say what firmware you are running abnd what options. It works for me after I made the change


oh, sorry. My fault.


> option list
WebMite MMBasic RP2040 Edition V6.02.00
OPTION SYSTEM I2C GP4,GP5
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION DISPLAY 50, 230
OPTION WIFI BGW-Thomas, *********, PICOE6616408433
OPTION UDP SERVER PORT 77
OPTION TELNET CONSOLE ON
>
 
wolfme
Regular Member

Joined: 26/10/2021
Location: Germany
Posts: 41
Posted: 09:54am 14 Feb 2026
Copy link to clipboard 
Print this post

Ok, after resetting options and set then again, it works.
Strange...

Thanks!
Edited 2026-02-14 19:55 by wolfme
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 570
Posted: 12:59pm 14 Feb 2026
Copy link to clipboard 
Print this post

  bfwolf said  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...


Regards, bfwolf


How funny! Just before I read your post, I was converting a program that uses enums and I, too came up with the solution you propose. In my case, however, I have a further complication in that the enum is used as a member of another structure.

I couldn't see any clean way of converting the code because of that.

The original program is in Zeno and is quite easy to understand even if you've never seen Zeno before:
const N : int := 7
const Infinity : int := 2147483647
var G : array[N,N] of int

type mark : enum[ temporary, permanent ]

type vertex : record

               prev : int
               lnth : int
               labl : mark

             end record

var P : array[N] of vertex

later on in the code Zeno can do this:
if P[i].labl = mark.temporary then

and I don't see how to get the same functionality. I ended up making labl an integer and temporary and permanent CONSTs of 0 and 1.
Edited 2026-02-14 23:02 by toml_12953
 
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 187
Posted: 01:52pm 14 Feb 2026
Copy link to clipboard 
Print this post

  toml_12953 said  
and I don't see how to get the same functionality. I ended up making labl an integer and temporary and permanent CONSTs of 0 and 1.


You may use my "way of enum", make 'labl' an integer and assign values of the "pseudo enum" and compare to them.

What would be possible with "real enums," and what Pascal also does, is to check assignments and forbid invalid values.

C is also "less lenient" with assignments of enum constants to int variables and at most issues a warning.
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 570
Posted: 02:39pm 14 Feb 2026
Copy link to clipboard 
Print this post

  bfwolf said  
  toml_12953 said  
and I don't see how to get the same functionality. I ended up making labl an integer and temporary and permanent CONSTs of 0 and 1.


You may use my "way of enum", make 'labl' an integer and assign values of the "pseudo enum" and compare to them.

What would be possible with "real enums," and what Pascal also does, is to check assignments and forbid invalid values.

C is also "less lenient" with assignments of enum constants to int variables and at most issues a warning.


Yeah. I didn't see it before but now I can do this with minor changes to the original:
CONST N% = 7
CONST Infinity% = 2147483647
DIM G(N,N) AS integer

TYPE markT
 temporary AS integer
 permanent AS integer
END TYPE

DIM mark AS markT = (0, 1)

and later on in the code:
P(1).prev = 1
P(1).lnth = 0                  ' starting node is labeled with 0
P(1).labl = mark.permanent     ' starting node is permanently labeled
 
     Page 4 of 5    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026