Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:47 24 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 Maximite MMBasic Version - V2.7

     Page 2 of 3    
Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 11:53pm 25 Oct 2011
Copy link to clipboard 
Print this post

Yeah it is good. I might add a link to it from my Maximite page too if thats OK.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 12:49am 26 Oct 2011
Copy link to clipboard 
Print this post

couple of things i would like to note

::if you reflash the firm i noticed that u lose all programs that were stored in aA: drive not shure if any body has noticed this or if its just a mistake on my behalf....

::when using the files to list programes in A: the memory is displayed more like a dos mode ..thats to say how much memory is left in A: and does not display individiaul file memory as the sd card was reporting each file size...

so be shure to back up any files to your sd card before a firm flash

also i dont see any direct copy command for copying files fom A: to B: and visa versa

although it can be done by firsty by logging onto B: and loading the program you want to use ...then switch to A: and save it to A: then it will be stored in A: .....

::: regards sparkey...Edited by sparkey 2011-10-27
technicians do it with least resistance
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 01:18am 26 Oct 2011
Copy link to clipboard 
Print this post

  sparkey said  if you reflash the firm i noticed that u lose all programs that were stored in aA: drive not shure if any body has noticed this or if its just a mistake on my behalf....

This was a deliberate design decision, I needed a bullet proof way to clear all the internal flash in case it got corrupted.

It does mean that you need to copy files off A: before you upgrade. What we need now is a short BASIC program to copy files from drive to drive.

On another subject; the XModem protocol does not seem to work correctly with Hyperterminal. I don't know where the fault is (MMBasic or Hyperterminal) but until I can find a fix the alternative is to use Terra Term which does work.

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

Senior Member

Joined: 11/07/2011
Location: Australia
Posts: 164
Posted: 01:25am 26 Oct 2011
Copy link to clipboard 
Print this post

I'm glad the Quick Reference card is useful. As I stated to Tsvetan of Olimex before, go nuts and post it wherever you like. There have been so many people giving so much to this common interest of ours, that any small amount I can put back I am happy to do.

Cheers.
 
Keith W.
Senior Member

Joined: 09/10/2011
Location: Australia
Posts: 118
Posted: 02:02am 26 Oct 2011
Copy link to clipboard 
Print this post

Hi,

For those who do not have a November Silicon Chip yet.

I rushed off to my local Jaycar shop yesterday morning, they usually have copies early.They told me that they had arrived the day before. Ringwood Victoria.

Best of luck,

Keith W.
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 02:03am 26 Oct 2011
Copy link to clipboard 
Print this post

in retospect the reason the flashe drive may have been made so large i think thati recall somebody mentioning that they had seen a basic file size of aprox 50 k given this in mind the ram coud store up to five lage files just my opp ....regards sparkey...
technicians do it with least resistance
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 02:36am 26 Oct 2011
Copy link to clipboard 
Print this post

  donmck said  
The parts you need to order are:
mini Maximite PCB. Part number 07111111. $15.00 each
PIC32 chip programmed with software code 0711111A.hex. $15.00 each
Postage and packing within Australia is $10 per order.

My maths places that at $40 posted for a PCB and a programmed chip. Most forum members will know what you can get a PCB that size for these days, even in small quantities. They also know what they can buy a blank chip for.

I like most of what I see about the mini, and can see it being used by many.

But the price has me a little worried. Will push people in another direction, perhaps even DIY clones.

Cheers Don...


I can see $10 for the PCB in the mag, but can't find the PIC32, so I guess it is now down to $35 for the two items posted.

Cheers Don...
https://www.dontronics.com
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 03:14am 26 Oct 2011
Copy link to clipboard 
Print this post

is it possable to data log constatly to the flash drive ....
technicians do it with least resistance
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 04:33am 26 Oct 2011
Copy link to clipboard 
Print this post

  sparkey said   is it possable to data log constatly to the flash drive ....

Yes, the magazine article goes into the details.
Geoff Graham - http://geoffg.net
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 05:23am 26 Oct 2011
Copy link to clipboard 
Print this post

that was under the section "flash endurance" i see it now i did not read that properly
sorry feel like i must ask the ovbious with out the thing bitting my tounge....
so it can store data in the ram then write it to flash am i getting this correct...

thanks geoff regards sparkey...

also i would like to add that if u use the bread board kit from "hamfield" but dont use the origal bread board ...and put a double lenth bread board on it you will prolly find that this may be fine ...for the minimaxi as the protoboard has a 3point3 volt reg out put on it as well as 5volt reg just use some extra rubber feet to support the extra lenth required.....

on a nother point "drive A" may become a place that could possibly hold drivers for such things as printers ..another reason for the 256K size just a theroy.....Edited by sparkey 2011-10-27
technicians do it with least resistance
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 09:14am 26 Oct 2011
Copy link to clipboard 
Print this post

ok heres is how its done to save a file from "B:" to "A:"

log onto drive B where your files are

load your file into ram "eg" load "set.bas" enter

list the file so you know its loaded into ram ....type "cls"

next step...

syntax :::... save "a:set.bas" enter

change to drive A

type files ..you should now see the file "set. bas"

type "new"

type list ..hopefully there is no list to be seen ...

type load "set.bas"

type list... you should have the program listed on the screen in front of you

::: run ::: hopefully if all is well you can now run straight of the flash drive for that program...

:::::::::::::::::::::::::::::::::::::::

set.bas is an example filename

this seems to be the simplest way i can explain it correctly after you get the hang of this you can omit certain steps i just thought that if i sat here and did it this way it would benifit the newbies no punn i was one too....Edited by sparkey 2011-10-27
technicians do it with least resistance
 
mookster1
Regular Member

Joined: 10/06/2011
Location: New Zealand
Posts: 81
Posted: 11:07pm 26 Oct 2011
Copy link to clipboard 
Print this post

+1 on the reference card
Capacitance is futile - roll on 2012!
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 12:09am 27 Oct 2011
Copy link to clipboard 
Print this post

Sparkey,
Your copy method will certainly work. I ran into a problem last night when trying to copy a Font file over. The program here will copy them .fnt, .bas and any other text based file also.

Just run the program whenever you need to copy something. I called it COPY.BAS of course.

Regards,
Anthony.


5 ' file copy for Maximite Basic by AJKW
10 CLS
15 PRINT "Copy file from current B: directory to A:"
16 PRINT "Can only be text .fnt or .bas file type"
17 PRINT
20 INPUT "file name >";fn$
25 SETTICK 10000,1000 '10sec time out if something goes wrong
30 OPEN fn$ FOR input AS #1
40 outfn$ = "A:"+fn$
50 OPEN outfn$ FOR output AS #2
55 DO
60 LINE INPUT #1,inp$
70 PRINT #2,inp$
80 LOOP UNTIL EOF(1)
200 CLOSE #2
210 CLOSE #1
220 END
1000 SOUND 1000,1000
1010 END
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 12:59am 27 Oct 2011
Copy link to clipboard 
Print this post

cheers anthony i had mentioned earlier on in the peice that there should be a copy cmd that ties in with the firm i have not tried your copy program as have not had time...thanks also for the reply that my method will work as i have tried it and the trouble with a straight copy is that if you just try to copy a file over it does not see the code but will copy the file name as i wrote eailer then i thought i had it but the file was empty so i posted what i found to work ....sparkey///...///
technicians do it with least resistance
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 01:07am 27 Oct 2011
Copy link to clipboard 
Print this post

geoff i dont have any thing bad to say about the "mini" as i think after a couple of days since release ..its going to be a great advantage for those wantin to run it on a bread board as well great project for the young ones at school etc...well i never thought that you were going to bring out an "EV" as it is ...but its going to be great if altronics are going to offer this board as well ..with the chip already mounted ....regards sparkey ...
technicians do it with least resistance
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 10:53am 27 Oct 2011
Copy link to clipboard 
Print this post

Hi,
I have changed lines 60 and 70 in the following code and now I can transfer files such as jpgs and bmp's. Only one little problem...

On writing to Drive A the Maxitmite drops 4 bytes at about 4Kb's into a file. (between 4032 and 4132 I found during testing.)

I note also that there is a 4Kb overhead to a file saved on the A drive (i.e. a single byte file takes 4Kb from the available space)... a coincidence or not that these numbers are in the same ballpark??


Cheers,
Anthony.


5 ' file copy for Maximite Basic by AJKW
10 CLS
15 PRINT "Copy file from current B: directory to A:"
16 PRINT "Can only be text .fnt or .bas file type"
17 PRINT
20 INPUT "file name >";fn$
25 SETTICK 10000,1000 '10sec time out if something goes wrong
30 OPEN fn$ FOR input AS #1
40 outfn$ = "A:"+fn$
50 OPEN outfn$ FOR output AS #2
55 DO
60 inp$ = INPUT$(1, #1)
70 PRINT #2,inp$;
80 LOOP UNTIL EOF(1)
200 CLOSE #2
210 CLOSE #1
220 END
1000 SOUND 1000,1000
1010 END
 
Olimex
Senior Member

Joined: 02/10/2011
Location: Bulgaria
Posts: 226
Posted: 10:59am 27 Oct 2011
Copy link to clipboard 
Print this post

just be very careful with the flash write on the intern disk as PIC32 specs says in worst case only 1000 erase cycles are allowed, this means if you by mistake write 1000 files or log info which often open/write to file you can wear intern PIC32 flash in seconds.

my understanding is that Geoff add this intern disk to unleash single chip embedded applications like to have your BASIC code inside your PIC without need to use SD card and to not change often the inter DISK image

if you decide to use this DISK A as regular SD card you will wear the PIC32 flash pretty soon
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 12:37pm 27 Oct 2011
Copy link to clipboard 
Print this post

No Tsvetan, that is not right. This was my response to Don in another thread (he was quoting you):

  Geoffg said  
  donmck said  The PIC32 flash minimum erase cycles is about 1000.
This means pretty fast flash wearing if somebody tries to use the internal flash to log some info.

No, no, it is not a problem. Many flash cards that you buy in the shops have a similar endurance but they use intelligence to distribute writes over the entire memory. To quote from the magazine article:

When writing to the internal flash drive A: MMBasic will spread the erase/writes evenly over the free blocks of flash memory. The result is that if the drive was half full you could edit and re save a typical program file every day of every year (including Christmas day!) for 87 years and still not reach the endurance limit.

The article goes further into the details but the bottom line is that you do not have to worry on this score. The only issue is if you ran a program that deliberately created and deleted a file very fast (say once a second). In that case you would eventually wear out the memory - just like you would if you were writing to an SD card.

Geoff
Edited by Geoffg 2011-10-28
Geoff Graham - http://geoffg.net
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:31pm 27 Oct 2011
Copy link to clipboard 
Print this post

And this mean I will never wear out a PIC32 using StickOS?

What if I have entire zone of simulated disk on Flash, full? It will count down the cycles? Lets suppose I have some free space between last location of MMBasic firmware and the rezerved zone of Flash disk. It will never count down the cycles and I can use the entire zone of Flash disk?
What is the endurance of a single flash cell? Can I look at it as to an EEPROM cell?

VasiEdited by vasi 2011-10-28
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Olimex
Senior Member

Joined: 02/10/2011
Location: Bulgaria
Posts: 226
Posted: 02:32pm 27 Oct 2011
Copy link to clipboard 
Print this post

the Flash used for Solid Store Devices endurance vary from 100 000 to 1 000 000 write / erase cycles and they are Gigabytes in size, on top of this is OS with lot of cache, which carry so you really phisically write to the Flash rare and can't do something stupid, while Maximite is development board and peoples are free to do silly things while they write code

if I remember correctly the PIC32 flash sectors were x 4KB i.e. 256KB disk will have 64 sectors, with 1000 erase cycles this gives me opportunity to write 64 000 times to disk sector safely even if the write / erase cycles are perfectly distributed.

what if I have bug in my code and run cycle to write 4K of data 64 000 times, I bet such code will be executed pretty fast and I will wear all my memory at the 1000 times limit in matter of seconds.
 
     Page 2 of 3    
Print this page
© JAQ Software 2024