Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:19 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 : New version of MMBasic (ver 4.3)

     Page 1 of 3    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 08:53pm 18 Jan 2013
Copy link to clipboard 
Print this post

A new version of MMBasic (ver 4.3) is available for download from http://geoffg.net/maximite.html#Downloads

This is a minor update that fixes a couple of bugs and adds some extra facilities including improved support for sprites. The Change Log and the MMBasic Language Manual (included in the update download) details the changes.

These new features have been used by Nickolas Marentes in his game Donut Dilemma for the Colour Maximite which will be released soon on Nick's website (http://www.members.optusnet.com.au/nickma/MaximiteProjects). The game is fun and colourful and definitely worth a try.

In addition the MMBasic library (http://geoffg.net/maximite.html#Downloads ) has been updated by Hugh Buckle. This is a library of user written programs for the Maximite and a useful resource for both beginners and advanced users.

Geoff
Geoff Graham - http://geoffg.net
 
TinkersALot
Regular Member

Joined: 20/11/2012
Location: United States
Posts: 72
Posted: 10:19pm 18 Jan 2013
Copy link to clipboard 
Print this post

Thank you, Geoff.
 
Sir_M
Newbie

Joined: 14/01/2013
Location: Sweden
Posts: 15
Posted: 10:58pm 18 Jan 2013
Copy link to clipboard 
Print this post

Hi all

Tested DuinoMite_MMBasic_V4.3 with CAN and had the same problem as I did with V4.2.
See quote from my earlier post.

  Quote  First post at this forum, but I´ve been following it a long time.

Guess this mostly concerns Geoff and John H, but couldn´t find a topic to report new firmware issues.

I downloaded and tested latest firmware (DuinoMite_MMBasic_V4.2 with CAN) for my Duinomite Megas. When testing the CAN commands by sending data between two Duinomites I ran in to this.
It seems to mix up data values after they have been sent out on the CAN bus.
Sending 8 data bytes containg (233 234 235 236 237 238 239 240) recieves corectly but this values (.67295e-45 234-2.28166e+27-5.94046e+29 237 238 239 240) shows as sent value. Values are not random, they in some way represent the sent value.
Phu, its hard to explain, check my code, maybe that helps to understand.

A funny thing is that this do not happend when I start up DM and directly run the program. But in any other case. Have tested to run another program and then start the CAN program again with same result etc.

' File: CAN_TX_1.BAS
' Desc.: Test sending message on CAN bus
' MM Basic: DuinoMite_MMBasic_V4.2 with CAN
' Date: Jan-15 2012
' Orig: John Harding
' Hack: Sir_M


Cls

Dim ok
Dim msg(8)


CAN config ok 'enter configuration mode
CAN setspeed 500000, ok 'set bus speed to 500000kbps
CAN addtxchnl 0,1,ok 'use channel 0, 16 bytes buffer
CAN enable ok 'enable CAN bus
Pause 100
Pin(0) = ok 'if CAN is enable then turn
'green LED on (Duinomite Mega)
CAN printconfig 'shows CAN configuration on screen
'Pause 100
Timer = 0

Do
ok=0 'just to be sure that "ok" is reset
If (Inkey$="q") Then Exit 'routine to quit execution
If Timer > 100 Then 'routine to send 10 message per second

If x > 247 Then x=0 'max msg value = 255 (247+8)
x=x+1 'produce data to send
msg(0)=x+0:msg(1)=x+1:msg(2)=x+2
msg(3)=x+3:msg(4)=x+4:msg(5)=x+5
msg(6)=x+6:msg(7)=x+7

CAN tx 0,&h1,0,8,msg(0),ok 'send on channel 0, message ID 1hex
'11 bit message type
'8 byte data length

Print msg(0);msg(1);msg(2);msg(3);
Print msg(4);msg(5);msg(6);msg(7) 'print message after it been sent
Print ok 'print message status
Timer = 0 'reset timer
EndIf
Loop


CAN enable ok 'check if CAN is shut down
Pin(0)=ok 'turn green LED off (Duinomite Mega)
End




Best regards Jörgen


// Jörgen
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 03:13am 19 Jan 2013
Copy link to clipboard 
Print this post

Sorry, I cannot help you there. You will have to chase up John H or someone more familiar with CAN.

Geoff
Geoff Graham - http://geoffg.net
 
Sir_M
Newbie

Joined: 14/01/2013
Location: Sweden
Posts: 15
Posted: 08:53am 19 Jan 2013
Copy link to clipboard 
Print this post

I dont see that the problems are related to CAN specific, more likely how MM-basic handles variables/memory in the CAN-part. I try to chase John on this one, been a couple of months since he visited this forum.

Btw, thanks for keeping MM-basic up to date for us with Duinomites also, great job!

// Jörgen
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 08:56am 19 Jan 2013
Copy link to clipboard 
Print this post

Thank you very much Geoff, OPTION BREAK is great solution, much better than CtrlC enable/ disable.
 
ratall
Newbie

Joined: 27/11/2012
Location: Australia
Posts: 12
Posted: 04:19am 23 Jan 2013
Copy link to clipboard 
Print this post

Hi Geoff
Great work as usual.

Just wondering given that line numbers are no longer required and the ever increasing demand on memory with all the new features, do you not think it may be time to remove the embedded renumber command.
I'm am sure an external basic ultility will do for the few people who still use line numbers.
I do not know how much it will save but I had a quick look at the c code and it does seem quite substantual.(but I am no c or pic expert)
Equally having a Full screen embedded editor is nice when debugging ** but is it the best use of memory.
I know it is getting away from the original idea of a 1980s style computer but I think its already evolving away from that.

Maybe I am alone it these thoughts. It would be interesting, I think to find out what people use and what they will never use.

Thanks again Geoff

R.




** (I personally write and edit my code for the maximite on an old laptop. and some carefully placed temporary print commands some times combined with few option commands is increasingly all I need for debugging )
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 05:52am 23 Jan 2013
Copy link to clipboard 
Print this post

I didn't even use renumber much in the mid 80s. It is useful, but I (personally) wouldn't mourn its loss.

Removing the editing ability of the full screen editor would be (in my opinion) a huge loss. With the full screen editor the Maximite is a great stand-alone computer.


Micromites and Maximites! - Beginning Maximite
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:24am 23 Jan 2013
Copy link to clipboard 
Print this post

  CircuitGizmos said  
Removing the editing ability of the full screen editor would be (in my opinion) a huge loss. With the full screen editor the Maximite is a great stand-alone computer.


^
|
|
|

What he said


I use the editor 99.9% of the time without it I might as well use
a basic complier.

the editor is one of the many Maximite features that make it GREAT

Jman
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 09:24am 23 Jan 2013
Copy link to clipboard 
Print this post

I would be OK with getting rid of the Renumber command. In fact I would be OK with just the ability to only run numbered programs. I would get rid of numbers but I think there are too many programs around with them. Keep the full screen editor although I rarely use it. I do my work on a PC with a programming editor that has syntax colouring. It also highlights your IFs and DO loops. Great for showing if you have an unfinished IF or DO.
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 10:10am 23 Jan 2013
Copy link to clipboard 
Print this post

All those features (screen editor, functions, subroutines.....etc) made MM Basic modern programming language and allowed to deploy the structured progamming as well. Please don't give them up for more memory. The latest 32bit chips have up to 256K of RAM and up to 2MB of flash.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 10:14am 23 Jan 2013
Copy link to clipboard 
Print this post

  ratall said   Hi Geoff

Equally having a Full screen embedded editor is nice when debugging ** but is it the best use of memory.
I know it is getting away from the original idea of a 1980s style computer but I think its already evolving away from that.

** (I personally write and edit my code for the maximite on an old laptop. and some carefully placed temporary print commands some times combined with few option commands is increasingly all I need for debugging )


Full screen editor getting away from the original 80's style computer??!

So what was the Commodore 64's full screen editor all about?? (1983). I think all the Commodore computers right back to the PETS had a full screen editor.

Don't get rid of the full screen editor!!

The greatest feature of traditional BASIC is the ability to switch from EDIT mode to EXECUTION mode instantly. Fantastic for debugging without the need to constantly slow things down by transferring it back to a real Maximite for testing.

I must have used it a million times while writing "Donut Dilemma".

And as for best use of memory... "Donut Dilemma" is 844 lines and that's with multi-statement lines and I still have 58% free after program execution. The full screen editor is no impact on memory for the sort of software being developed for the Maximite.

Nick
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 10:45am 23 Jan 2013
Copy link to clipboard 
Print this post

The editor is essential when you are writing prograns that do not use line numbers. But ratall's main point was that the renumber command could go, and I believe that he has a good point. Would anyone mourn its passing?Edited by Geoffg 2013-01-24
Geoff Graham - http://geoffg.net
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 11:11am 23 Jan 2013
Copy link to clipboard 
Print this post

i would not. :)

Microblocks. Build with logic.
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 12:11pm 23 Jan 2013
Copy link to clipboard 
Print this post

Only someone using the Maximite to learn/teach "traditional" BASIC with line numbers.

It may be usefull for them but otherwise not needed.

Nick
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9307
Posted: 12:11pm 23 Jan 2013
Copy link to clipboard 
Print this post

I'll chime in with my 2c here, and say that the line numbers can go.

When I started programming of any kind whatsoever about 17 years ago, it was on the often-mentioned Atari 800XL. It DID use line numbers - in fact, I think pretty much all "Home computer" units from the day did. I am pretty sure that the Commodore 64 used line numbers, and the ZX81 did also.

As a slight digression from the topic when I mentioned the ZX81, did anyone manage to get that thing to do anything useful with it's 1K of RAM? A famous quote from Red Dwarf is when Holly(the ships' computer) says: "I was in love once. A Sinclair ZX81. But no, Holly, they said, she's not for you. She's slow, she's stupid, and she wouldn't load. At least not for me."

Back on topic...

With pretty much all BASIC-ish programming these days, it is structured loops and labeled routines, so line numbers really arn't needed anymore. While it was a nice thing to have in the original MM, it's probably something that can be dropped now, as NOT using line numbers encourages more standard code development, and teaches those who are learning, about why it is a good idea to do it this way.

When I moved to my first embedded controllers(PICAXE), I was unenthusiastic about the lack of line numbers in the writing of code. Now with the benefit of hindsight, I could not do it WITH line numbers now...

On the editor, when this was added to the MM firmware, it was a HUGE jump in the flexibility of the MM and ease of writing code - a great feature, and this most definetly needs to remain, as I am sure most here would agree.

Back on the Atari, you could LIST the program, then just arrow up and change the coder there and then, then just press RETURN on that line number, and the code was changed in memory - no need to call up an editor of any kind. I'm NOT suggesting it be done that way in MM, this is just how the Atari did it. It is not a hardship to type 'edit' on the MM command line...
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 12:17pm 23 Jan 2013
Copy link to clipboard 
Print this post

No need for the RENUMBER command here.

If anyone has an old program with numbers, they can always use MM Edit to convert it.

Even though I do most of my program development on the PC, I would definitely miss the inbuilt editor and I consider it one of the main advantages of MM Basic and the Maximite.

Jim
VK7JH
MMedit   MMBasic Help
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:25pm 23 Jan 2013
Copy link to clipboard 
Print this post

  grogster said  It is not a hardship to type 'edit' on the MM command line...


You only need to type "edit" once in a power on session and then use the arrow keys (up) to repeat the last command line - even easier.

Line numbers can definitely disappear into the mist of time as far as I am concerned. Not that I like the GOTO statement, but GOTO a line number never was terribly informative.

I don't remember the ZX81 having much in the way of i/o. The keyboard and the display were multiplexed (PERplexed??), the keys all doubled as basic commands as well - a right nightmare.
David M.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9307
Posted: 12:32pm 23 Jan 2013
Copy link to clipboard 
Print this post

The ZX81 did have an expansion port, but weather anyone actually used it for anything escapes me. I also had a 16KB add-on cartridge(about the size of a pack of cards), but the machine would never start-up with it connected. Might have been a crook expansion pack, or a crook ZX81. I could NEVER get any program to save on tape using the acoustic saving method it used.

Ahhhhh memories......
Smoke makes things work. When the smoke gets out, it stops!
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 12:56pm 23 Jan 2013
Copy link to clipboard 
Print this post

My 11c worth (10c plus 10% GST)
I have never used RENUMBER on any of the several dozen BASIC programmed computers I have used over the last 35+ years. Get rid of it.

I have never (& not likely too) used anything other than the inbuilt editor facilities of MMBasic to develop software for the Maximite/Duinomite computers.

The Full-screen editor should stay. After all, for process control and remote usage the great advantage of the Maximites is having the ability to use a KB/Monitor to tweak and check the onboard CODE/DATA.

Edited by djuqa 2013-01-24
VK4MU MicroController Units

 
     Page 1 of 3    
Print this page
© JAQ Software 2024