Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:18 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.2)

     Page 2 of 2    
Author Message
MOBI
Guru

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

  Geoff said  This is one of these things that has a diminishing rate of return. If only 20% of users use the CHAIN command and only 20% of them want to keep an interrupt open then that means just 4% of users would find all this complication and extra documentation useful.


It has been many years since I have had to use the Chain command due largely to the greater memory size of PCs. I can't help but wonder that if Chain is needed in a MM programme, perhaps the user should be looking at using a PC (lap top) rather than an albeit very capable, MCU or at least avoid using interrupts if they are going to cause problems?
David M.
 
ratall
Newbie

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

  MOBI said  
It has been many years since I have had to use the Chain command due largely to the greater memory size of PCs. I can't help but wonder that if Chain is needed in a MM programme, perhaps the user should be looking at using a PC (lap top) rather than an albeit very capable, MCU or at least avoid using interrupts if they are going to cause problems?


Ever build a ship in a bottle. Same idea its fun defying logic. I mean why would anybody in their right mind would put a Beginners Allpurpose Symbolic Instruction Code (**) on an MCU when they can use C. Or if you want an efficient interperted language how about FORTH simple stack based easier to implement on Harvard Architecture.

Yes If I wanted it easy I'd put the main code on a pc and use the Maximite as a smart interface controller. But whats the fun in that.


Geoff
Thanks for answering and explaining. Closing the interupts does in truth make sense and lets face it CHAINing really just saves writing variables to SD then reading and redrawing the screen etc. Otherwise I suspect it is best to treat it just like a normal load/run closing and opening as required. I must admit it is a good way of dealing with the setup and shutdown logic the stuff not in the main loop. Sorry waffling again.
Anyway thanks again.

R.






**(because its fun and yes I am old enough to know what BASIC really stands for. The first version I used as a wee-um was Dartmouth via a teletype)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 01:45am 04 Jan 2013
Copy link to clipboard 
Print this post

I was wondering what happens to an interrupt that happens while the CHAIN is in progress but I suppose they must be disabled.

Where are the PIC32s with more flash and more RAM? lol

John
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:10am 04 Jan 2013
Copy link to clipboard 
Print this post

  ratall said  Yes If I wanted it easy I'd put the main code on a pc and use the Maximite as a smart interface controller. But whats the fun in that.


Hey, I agree. I do it all the time. The devices I make are already "out there" in the world somewhere as a ready made unit, but I do my own any way because as you say, it is fun and when it is done, I can say "well, I beat you, you b...d" and I have learned a bit more in the process.

I have a couple of colour MMs on order and I'll probably build a couple of clone mini MMs and I'm really looking forward to experiencing first hand the issues that are being discussed here.
David M.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 10:35pm 11 Jan 2013
Copy link to clipboard 
Print this post

  Geoffg said  

Keeping a static block of code in place is even more complex and would be a nightmare to implement.

This is one of these things that has a diminishing rate of return. If only 20% of users use the CHAIN command and only 20% of them want to keep an interrupt open then that means just 4% of users would find all this complication and extra documentation useful.

Geoff


Hi Geoff,

Great program and it amazes me how you keep getting MMB better and better. I was very pleased to see the chain command as with my very modest (and I am sure not very efficient) program for the Caravan Battery Monitoring System, I ran out of memory and had to strip all comments to fit it in on a CGColourMax. No problem with Tassie Jim's MMEdit used to strip the comments but I thought the idea of the free software environment was to promote interaction and sharing and to that end, a well commented program makes it infinately easier for someone else to see what you are doing.

To that end, either more space with updated MCU's or the idea of a static area (which I really like in concept) would allow the MM to really morph into the basis of some powerfull projects. Yes, you could use a PC or tablet and just use the MM as a data collection back end but what fun is that?

Anyway, my sincere congratulations and admiration for a great little program/project - I love playing with mine.

Regards,
Doug.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 01:47am 12 Jan 2013
Copy link to clipboard 
Print this post

Do any of the PIC32s have any more "space" (RAM)? I can't think of any.

John
 
MicroBlocks

Guru

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

It would be nice to have more RAM in a PIC32 but then again just adding a small chip on the i2c bus will give a lot of extra memory, even with battery backup. It will keep the part price of the PIC32 low, and you can add to it what you want.
So if the need is great there are many solutions available.

Microblocks. Build with logic.
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 10:01am 12 Jan 2013
Copy link to clipboard 
Print this post

  TZAdvantage said   It would be nice to have more RAM in a PIC32 but then again just adding a small chip on the i2c bus will give a lot of extra memory, even with battery backup. It will keep the part price of the PIC32 low, and you can add to it what you want.
So if the need is great there are many solutions available.


The DuinoMite-eMEGA-Ethernet has been sitting there for about 12 months, at a price of around $50 A&T.

http://www.dontronics-shop.com/olimex-duinomite-emega-ethern et.html
and it has extra memory on board.

Unfortunately, there is no software available to take advantage of the many features provided.

Don...
https://www.dontronics.com
 
MOBI
Guru

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

  TZAdvantage said  just adding a small chip on the i2c bus will give a lot of extra memory, even with battery backup


I have used many I2C eeproms for data storage. I didn't know about battery backed up I2C RAM though. I must go looking.

I don't see how I2C memory can be used in MM system as RAM though.

I think it would be nice if we were to be able to access an external address and data bus like the old MPUs used to do, and then I could use the boxes of cmos (6116) and dynamic RAM boards I made years ago.
David M.
 
MOBI
Guru

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

I went looking for I2C RAM devices and the only one I could find was the PCF8570 256x8. A bit paltry in today's standards.
David M.
 
Bugs2
Newbie

Joined: 18/05/2012
Location: United Kingdom
Posts: 29
Posted: 12:11am 13 Jan 2013
Copy link to clipboard 
Print this post

Why not take a look at FRAM? Faster than EPROM and more flexible, with no need to worry about write input buffers. Also pin compatible with 8-pin I2C and SPI EPROM chips. Just drop it into existing sockets.
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:42am 13 Jan 2013
Copy link to clipboard 
Print this post

Yep. Sure is a great looking chip - I suppose it is technically an eeprom as it is non volatile. I could drop one in my RFID ear tag reader that I designed and store a few thousand tags instead of a few hundred.

It is amazing what we don't find, if we don't know that it is out there.

I suppose it could be used as MM "RAM" for data storage but a routine in Basic would have to be written to store and retrieve the data. Individual blocks of data could be stored as long as the start and end address of each block was known.


David M.
 
MicroBlocks

Guru

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

When using an SPI bus there is lots of choice.
Like this one:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=e n559069

Microblocks. Build with logic.
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:45pm 13 Jan 2013
Copy link to clipboard 
Print this post

  donmck said  
  TZAdvantage said   It would be nice to have more RAM in a PIC32 but then again just adding a small chip on the i2c bus will give a lot of extra memory, even with battery backup. It will keep the part price of the PIC32 low, and you can add to it what you want.
So if the need is great there are many solutions available.


The DuinoMite-eMEGA-Ethernet has been sitting there for about 12 months, at a price of around $50 A&T.

http://www.dontronics-shop.com/olimex-duinomite-emega-ethern et.html
and it has extra memory on board.

Unfortunately, there is no software available to take advantage of the many features provided.

Don...


Sorry Don, I suggested many times that dk-basic (BSD License) is the best solution right now instead of just sitting in a store, waiting for something to happen... Dontronics and Olimex could have found a freelancer to start the development if they had enough interest - Duinomite is a great platform for Basic language. Maybe you can convince Google to sponsor the development....

VasiEdited by vasi 2013-01-16
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Sir_M
Newbie

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

Hello all!

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
/CODE]



Best regards Jörgen
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 02:17pm 15 Jan 2013
Copy link to clipboard 
Print this post

vasi - I looked at dk-basic but it says it doesn't yet have arrays.

Needs more work....

JohnEdited by JohnS 2013-01-17
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:58am 16 Jan 2013
Copy link to clipboard 
Print this post

Hi John,

I know, this is why I said:
[quote]...could have found a freelancer to start the development...[/quote]
But is not like you start from zero. And yes, it needs VGA implementation, supposing that the programmer have access to that C programming book for PIC32 where the method (and the code) is described...

Vasi
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 08:00am 16 Jan 2013
Copy link to clipboard 
Print this post

And, I will dare to say, this time, with more emphasis to the microcontroller specifics...
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3802
Posted: 10:20am 16 Jan 2013
Copy link to clipboard 
Print this post

Would probably be more sense to start from the last MMBasic (DMBasic) that was open source (GPL).

I think the market is too small to justify hiring anyone.

John
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 05:16pm 17 Jan 2013
Copy link to clipboard 
Print this post

  JohnS said  
I think the market is too small to justify hiring anyone.[/quote]
It proved that didn't worked without hiring, to an extent that now the device is fading away
http://news.cnet.com/8301-10805_3-57561849-75/how-microsoft- became-a-control-freak-with-tablet-makers/?part=propeller&su bj=news

Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024