Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:01 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 5 of 5    
Author Message
DaveC5
Newbie

Joined: 24/09/2025
Location: United Kingdom
Posts: 32
Posted: 10:14am 18 Feb 2026
Copy link to clipboard 
Print this post

Just tried the new LCD commands with the LCD interface in the Pi-PicoBuddy board. Works a treat out of the box and saves a load of extra programming. Sets up with:
I2CLCD INIT &H3E

Lovely stuff Peter!

  matherp said  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
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 431
Posted: 08:24am 19 Feb 2026
Copy link to clipboard 
Print this post

What am I doing wrong when getting an error with

FRAMEBUFFER SYNC
Error : invalid syntax

my options are

WebMite MMBasic RP2350A Edition V6.02.00
OPTION SYSTEM SPI GP2,GP3,GP4
OPTION SYSTEM I2C GP0,GP1
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION HEARTBEAT OFF
OPTION CPUSPEED (KHz) 252000
OPTION DISPLAY 40, 145
OPTION LCDPANEL ILI9341, RLANDSCAPE,GP5,GP6,GP7,GP8,INVERT
OPTION TOUCH FT6336 GP10,GP9,,50
GUI CALIBRATE 1, 318, 22, -10156, 10650
OPTION SDCARD GP11

I have created framebuffers f and l before with
FRAMEBUFFER CREATE and
FRAMEBUFFER LAYER
and framebuffer merge works and the LCD display is correct.
Is framebuffer sync syntactically bound to some display types only?
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

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

Sync is only available on PicoMite, not WebMite
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 431
Posted: 09:17am 19 Feb 2026
Copy link to clipboard 
Print this post

Thanks Peter!

This info should eventually go into the manual. At least for me there is no obvious reason for not having this statement on a WebMite.

OTOH, FRAMEBUFFER MERGE col, B is also a valid syntax on WebMite. This would also not work as defined on the WebMite, as it just ignores the "B" in operation. Could this also be done with FRAMEBUFFER SYNC by just ignoring the whole statement? It would, IMHO, make it easier to have universal code. As it may have side effects, better documentation could be necessary of course. But as it is clearly stated that B option uses the second CPU, it also should be clear that this CPU is not freely available on a WebMite.
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

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

The WebMite does not support second processor operations which makes SYNC irrelevant. All processing is done in-line, hence merge ignoring B. The WebMite network code is VERY temperamental hence keeping things simple.
 
     Page 5 of 5    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026