Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:19 25 Nov 2024 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 : LCD character display with 4 lines x 16 characters

Author Message
OomNiel
Newbie

Joined: 06/11/2024
Location: South Africa
Posts: 3
Posted: 08:47am 07 Nov 2024
Copy link to clipboard 
Print this post

Good day all,

While playing with PicoMite (and WebMite) i was trying to use my 4x16 LCD display and found that characters printed on the 3rd and 4rth lines were offset by 4 characters.

Looking at the C source for MMBasic on PicoMyte I found out that the function named : void cmd_lcd(unsigned char *lcd) mainly caters for 20 character displays, hence the 4 character offset.

This is set up in code line: const char linestart[4] = {0, 64, 20, 84};
Changing this line to: const char linestart[4] = {0, 64, 16, 80}; fixed the problem.

It would be very nice if the interpreter could be amended so that it will cater for both 16 and 20 characters/line displays (perhaps by adding another argument to the "DEVICE LCD INIT d4, d5, d6,d7, rs, en" function call?

Thank you so much for this forum and all the efforts to implement the basic language on RPI Pico boards.

I suspect that many of the current members of this forum where born BC (before computers), as I was , and also were introduced to micro controllers and programming by playing with a Sinclair Spectrum or TRS80 computer doing basic and assembler coding.

Those days are long gone but, for me al least, the basic language still holds a special place in my heart. Yes C/C++ is way faster and more efficient ( I hate micro-python by the way ) and I use it for most projects, but basic is still of interest to me and I will support efforts to keep it alive.

Have a nice day all.
Niel.
 
Print this page


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

© JAQ Software 2024