Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:51 13 Jul 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 : 470 Development - SD Card Support?

Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 11:55pm 08 Apr 2015
Copy link to clipboard 
Print this post

To both Peters and Geoff,

Thanks for all the work that has gone into this development. I have found the inbuilt editor in all versions invaluable where I want to make a quick and dirty (not a criticism Geoff) edit or just a little code segment to test something quickly.

To that end, it would be great to have the SD card available to save and load programs. Which gets me eventually to a request - would it be possible to port the Maximite file I/O code into the 470 given the additional memory available and make use of the second SPI port?

Had a look myself at the 4.x source and also at the Lucio Di Jasio book but unfortunately, it is beyond my capabilities. Any thoughts lads?

Thanks,
Doug.

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

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 12:09am 09 Apr 2015
Copy link to clipboard 
Print this post

YES..!

With SD card support, We can run with high baud rates, RCT, and create logfiles...
Hard USB would be awesome also..! Would be ok to loose some program space, as they would be stored on SD and could be chained together...
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 05:04am 09 Apr 2015
Copy link to clipboard 
Print this post

I have SD Card support under development but I was not planning to include load and save of programs (or chain, or libraries, etc).

My thinking was that the Micromite is primarily a controller not a general purpose computer (like the Maximite). So in the Micromite you would just run the one program (to control whatever it was that you wanted to control) and the SD Card would be used simply to record data and hold lookup tables, etc.

I guess that loading/saving programs would be convenient during development but I am not sure that it would be a huge benefit overall. The MX470 version will have over 100K of program space even with SD Card support, which is huge, so I don't think that chaining would be necessary for even the biggest programs.

Any comments...

Geoff
Geoff Graham - http://geoffg.net
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 05:15am 09 Apr 2015
Copy link to clipboard 
Print this post

I am in agreement as far as this is meant to be a controller of sorts. Having SD support for logging, tables, etc. would be so awesome. This is really turning into a powerful platform. I wish more people would "get it". Soooo much easier that arduino and now the power is there too. Thanks again Geoff and Peters and all involved with making this as great as it is.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 06:09am 09 Apr 2015
Copy link to clipboard 
Print this post

SD card for data would be great. I like that programs are stored in flash, it will leave all the ram available.
It might be nice to have the ability to transfer a program from an sd to flash (and flash to SD). This would allow very easy upgrade for when uMites are in the field. A user would then be able to download a program, insert it into the uMite and transfer it to flash.
During development it might be nice to be able to save a version to SD and try out some edits. This will allow to easily go back to a previous version.

Would it be feasible to upgrade the firmware this way? That might be another good use of an SD.
Microblocks. Build with logic.
 
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 06:23am 09 Apr 2015
Copy link to clipboard 
Print this post

I like to use Geoffs ascii terminal vt100. It would be nice to be able to save staight to sd card instead of having to hook it up to the pc.

Dave.
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 12:06pm 09 Apr 2015
Copy link to clipboard 
Print this post

Thanks Geoff for the info...!

No problem about the SD card stuff... I would be very happy to use the SD for log files and other files you can create with the Print and Input commands...! I just thought that (somehow) all that stuff came together... I realize now that to have features like chaining, takes a whole different approach to the main body of code base... Keep up the fine work Sir..! You guy's are magic...

 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 02:54pm 09 Apr 2015
Copy link to clipboard 
Print this post

Owwwwwwwww!!!!

SD cards on the horizon for the MicroMite.

This subject has been tossed around lots before, but this is an interesting development. When I saw panky's OP, I figured we were in for another one of those threads, till Geoff posted his comment.

For what it is worth and my 2 cents, I think that using the SD card just for logging and reading data back that was previously logged would be fine for most uses. For best compatibility and portablility, the logging would need to work on a filesystem such as FAT16 etc, so that just about any computer could read the saved data. OpenLog does this very well, and a similar approach I think would be a good way to do it.

HOWEVER, that is only MY little ole opinion, and can be ignored.

As Geoff himself says, the MM is a MCU, not a computer per-se'.

Purely out of interest, does adding SD support gobble up much of the 470's resources?Edited by Grogster 2015-04-11
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 03:51pm 09 Apr 2015
Copy link to clipboard 
Print this post

Openlog type of features can be done with a CGMMSTICK1 easily. Not only log serial stuff, but do its own A/D, or pin monitoring. Temp monitor with 1-wire. All sorts of improvements over the current openlog. Just a simple matter of software... :)
Micromites and Maximites! - Beginning Maximite
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 04:13pm 09 Apr 2015
Copy link to clipboard 
Print this post

  CircuitGizmos said  ...Just a simple matter of software... :)


True.
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 04:19pm 09 Apr 2015
Copy link to clipboard 
Print this post

Might be interesting to see what can be coded up by anyone on TBS.

In other words: I don't have time at the moment.

But I'm sure MMBasic on a CGMMSTICK1 has all of the capability needed to emulate openlog AND have new features.
Micromites and Maximites! - Beginning Maximite
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 04:57pm 09 Apr 2015
Copy link to clipboard 
Print this post

Geoff,

As I understand it, raw sd card read and write is not overly complex (please excuse my lack of knowledge) for the purpose of saving data to the card. The problem then is how to get the data off the card by a PC.

In order to easily get the data back, having the data in FAT format is the best way. But in order to put the data onto the sd card in FAT format, a full implimentation of FAT file I/O needs to be done. Thus, file create, read, write etc. is already in place so SAVE/LOAD is not too far a leap forward?

This would also open up the possibility of program and/or MMB upgrade from card?

I know my views may be simplistic due to lack of programming expertise but is it worth considering?

Cheers,
Doug.



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

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 05:53pm 09 Apr 2015
Copy link to clipboard 
Print this post

  panky said  so SAVE/LOAD is not too far a leap forward?

You are right, it is not much extra and, as TZ (as well as you) pointed out, it would be great for in-the-field upgrading of the BASIC program. So I will put them in.

The SD Card support will include FAT16/FAT32 and normal BASIC file I/O (ie, OPEN "file" FOR OUTPUT AS #x, PRINT #x, ..., etc as well as random access) with multiple files open at the same time. So it will be the full deal.

What I was trying to avoid was implementing a mini OS with commands like chain, make/remove directory, file copy, format, etc.

Note that this is for the MX470 version. Later I will try to squeeze the same SD Card support into the MX170 version but there is a good chance that it will not fit.

Geoff
Geoff Graham - http://geoffg.net
 
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 10:15pm 09 Apr 2015
Copy link to clipboard 
Print this post

YEEESSS! That's brilliant news. Thanks Geoff.

Dave.
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 11:31pm 09 Apr 2015
Copy link to clipboard 
Print this post

Yes please Geoff!! Saves me looking a FRAM and then getting the data off.

- Rob.
For crying out loud, all I wanted to do was flash this blasted LED.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 12:08am 10 Apr 2015
Copy link to clipboard 
Print this post

Just out of interest, how much space in both flash and RAM, does a FAT filesystem like that suck out of the 470?

Great news, this SD info. ESPECIALLY for data-logging etc.
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 12:59am 10 Apr 2015
Copy link to clipboard 
Print this post

Hard to say as it is integrated into MMBasic along with a lot of other things so it is difficult to count the bytes before and after in the hex file. But I guess that it is about 30K of flash and 3K of RAM.

With 512K of flash the MX470 has plenty of space for this and more.

Geoff
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 01:34am 10 Apr 2015
Copy link to clipboard 
Print this post

Lovely, thanks for that info.
I just wanted a general idea.
Smoke makes things work. When the smoke gets out, it stops!
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 01:57am 10 Apr 2015
Copy link to clipboard 
Print this post

Great news Geoff - again, I am awe of your continuing committment, thanks.

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: 4038
Posted: 02:31am 10 Apr 2015
Copy link to clipboard 
Print this post

Just in case anyone doesn't know, you can get gcc (the MPLAB etc compilers are gcc in a little disguise) to create a MAP file and in there are the sizes of code, data, etc.

(Granted most of the time who cares? LOL)

John
For completeness, it's the linker (aka loader) ld that creates the MAPEdited by JohnS 2015-04-11
 
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