Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:30 30 May 2025 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 : MMBASIC manual v6....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9531
Posted: 07:03am 27 May 2025
Copy link to clipboard 
Print this post

Confusing syntax and example for using a classic 16x2 or 16x4 LCD module, page 52:





You will see exactly where I went wrong, but the example does NOT include the "DEVICE" keyword, so my attempt was rejected.  
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9531
Posted: 07:09am 27 May 2025
Copy link to clipboard 
Print this post

....and the following page on how you write to the LCD module, is also generating unknown command errors.





Perhaps I am the only one on Earth now, trying to use these old legacy LCD modules.    


EDIT:  DEVICE LCD command fixes this issue, as you might expect, but I think the manual needs a tweak here.  
Edited 2025-05-27 17:18 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4941
Posted: 07:17am 27 May 2025
Copy link to clipboard 
Print this post

No, you are not the only one.

But I failed to send a user manual correction to Geoff.

The new 6.00.02rc24 supports both (just tested)
- DEVICE LCD INIT a,b,c,d,e,f (legacy 5.08.00)
- LCD INIT a,b,c,d,e,f (legacy micromite)

Volhout
Edited 2025-05-27 17:18 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9531
Posted: 07:29am 27 May 2025
Copy link to clipboard 
Print this post

Good to know.  

Perhaps that should be in the manual - the legacy vs newer versions....
Or is this just creating even MORE confusion?

I have my LCD working fine now, so long as I prefix a DEVICE keyword before the command as stated in the manual.  
Smoke makes things work. When the smoke gets out, it stops!
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4941
Posted: 08:00am 27 May 2025
Copy link to clipboard 
Print this post

The DEVICE was a temporary solution.

MMBasic used a tokenizing scheme that allowed for 128 commands and 128 functions.
During the development of PicoMite so much functionality was added that 128 was not enough. The DEVICE command/function was added to group a set of peripherals.
DEVICE HUMID
DEVICE LCD
DEVICE WS2812
etc...
To free up slots for other commands.

Then (between 5.08 and 5.09) the functions changed from 8 bit to 16 bit.
And between 5.09 and 6.00 the commands changed from 8 bit to 16 bit.
So in 6.00.02 we have no limit on 128 anymore and the DEVICE was obsolete. But for compatibility for programs developed between 5.08 and 6.00 (I assume) DEVICE is still maintained as alternative.

Apparently the user manual was in a between state...

That should sum it up.

Volhout

P.S. for a while DEVICE was called BITBANG
Edited 2025-05-27 18:03 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9531
Posted: 07:21am 28 May 2025
Copy link to clipboard 
Print this post

  Volhout said  Then (between 5.08 and 5.09) the functions changed from 8 bit to 16 bit.
And between 5.09 and 6.00 the commands changed from 8 bit to 16 bit.
So in 6.00.02 we have no limit on 128 anymore and the DEVICE was obsolete. But for compatibility for programs developed between 5.08 and 6.00 (I assume) DEVICE is still maintained as alternative.


Interesting!  
I was not aware of that.
I thought the limit was still 128 on commands or functions.
I remember it being talked about before, but it was said that it would require a MAJOR rewrite of MMBASIC to support more.  I am/was unaware of any MAJOR re-write of the entire MMBASIC code-base, only various ports being done, mainly by Peter.

You learn something new every day.  

Being now 16-bit commands and functions, does that mean the theoretical limit is now 65,535 commands and functions?        
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 07:31am 28 May 2025
Copy link to clipboard 
Print this post

Functions are still limited. Only commands now use a 2-byte token with 2^14 possible variants
 
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 2025