Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:46 27 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 fails on unflagged error

Author Message
Fredd
Newbie

Joined: 26/09/2023
Location: South Africa
Posts: 4
Posted: 10:55am 06 Oct 2023
Copy link to clipboard 
Print this post

Here is a bit of information learnt the hard way.
If you have a command to write a line of text on an LCD as
BITBANG LCD (2, 1, "some text")
instead of
BITBANG LCD 2, 1, "some text"
nothing will be displayed and all other correct lcd display commands will fail
until the program is restarted.
This will not be flagged as an error.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 01:43pm 06 Oct 2023
Copy link to clipboard 
Print this post

I think it confuses the MMBasic parser.

Probably sees the whole of the part in parens as one expression with a weird construction and value.

Or even that there's a function call LCD(...) and equally confuses it.

Every error could be detected but the code would balloon in size (*) and would it fit any more?

(*) and/or need a big re-write

It's tough to make things foolproof (as the saying goes but I'll stop here).

John
 
Fredd
Newbie

Joined: 26/09/2023
Location: South Africa
Posts: 4
Posted: 09:45am 08 Oct 2023
Copy link to clipboard 
Print this post

Thanks JohnS I suspected something like that when I found the problem. No criticism intended, just passing on some information that shouldnt be needed if you write the code properly. I made that mistake after having used a different Basic that required the brackets for the the last 15 years .

Fredd
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 01:29pm 08 Oct 2023
Copy link to clipboard 
Print this post

  Fredd said  having used a different Basic that required the brackets for the the last 15 years .

Fredd

Ohhh... BASICs do tend to vary more than various other languages. Especially when crammed into limited memory on a uC (PIC32 originally for MMBasic).

Good luck!

John
 
Print this page


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

© JAQ Software 2024