FSRWfemto help!!! Anybody who knows how to work it, please share.
Ravenkallen
Posts: 1,057
Okay, so i have finally gotten around to playing a little more with sd cards. I modified the SD trainer program(It is powered by FSRWfemto)·so i could test out various functions(Reading single characters, writing single characters, using arrays...ect).... My only few problems so far are, ·1. Can the SD card read and write words/ Longs?, 2. If you are reading a whole file larger than 32 Kilobytes do you need any knowledge of clusters or stuff like that?, 3. How hard is it to boot the prop up from a SD card?..... Thanks again for all the previous help. The people on this forum are as friendly as they are knowledgeable and that is very unusual...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
Comments
Booting from an SD card is a little harder. Kye's routines have a boot method and FemtoBasic's fsrwFemto/sdspiFemto has a boot routine where you have to mount the card first, open the file you want, then call bootSDCard to boot the opened file. The file must be contiguous in the 1st 32K for this to work. The easiest way to insure this is to format the SD card with 32K clusters.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
http://forums.parallax.com/showthread.php?p=912403
My only few problems so far are, 1. Can the SD card read and write words/ Longs?, 2. If you are reading a whole file larger than 32 Kilobytes do you need any knowledge of clusters or stuff like that?, 3. How hard is it to boot the prop up from a SD card?.
1) Yes you can read and write single bytes to a card - open file, write a byte, close file. Or do it in bigger chunks. Kye's code has all the routines already written and they are easy to use.
2) No need for knowledge of clusters. Just send the bytes in and out and the OS handles it all behind the scenes.
3) From about page 5 of that thread I was posting code for the bootloader. Put KyeDOS in the eeprom, and it boots up with a vga screen and a list of all the .BIN files (which are all precompiled spin programs). Choose which one you want. Plus the help menu. You can add one line of code to run one of those programs if you want it to auto run. I also added xmodem file transfer so you can put new files on the sd card without having to unplug it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
It really boils down to what you are trying to achieve. My objective was to have a minimal EEPROM boot that only knew about the SD card and so could load it's files from there. No need to ever change the EEPROM, just change the SD files. The SD card would know the hardware location and drivers.
There is another recent thread which deals with updating the EEPROM driver from SD files. It uses a 64KB eeprom (many pcbs have the 64KB version, but not all). This is a more complex bootloader. It is based on the one done by mctrivia.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
I have not used fsrw, but I can answer for Kye's Sd card driver. There are three modes you can open in - Read, Write and Append. Write starts a new file. Append adds data to an existing file.
If you opened a new file for write, you could try erasing it first. If it exists - then it is definitely gone. If it does not exist, then it won't matter. Obviously you are not going to try erasing it if the file is being appended. The steps are;
Try erasing file
Open for write
Write bytes
Close file
or
Open for append
Write bytes
Close file
If you get a chance, download the zip at the bottom of the first post http://forums.parallax.com/showthread.php?p=912403 and unzip it and open up the file 'SD2.0_FATEngine' and quickly scroll down the list of PUB functions. Each is well commented (sometimes the comments are longer than the code) and very quickly you can get a feel for what it can do. eg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
@Kuroneko... I will try to post some test code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
Will read off just fine, but when you omit one or more lines of text and then proceed to write it again, it will only read off the new data.... Maybe somebody
can shed some light on this strange thing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet
line1
line2
line3
and then read it back and that works?
then you write it again with
line1
line3
and do you get back
line1
line2
line3
line1
line3
or do you get back
line1
line3
and what do you want to get back?
I am wondering if you want 'append' mode? This is where you can add text to an existing file. From frswFemto;
and you are current using 'write' mode which erases the previous file of the same name.
So presuming alpha.txt already exists, try changing that to;
and see if the text is now longer. Every time you call this the text should get longer and longer.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
that helps any. Mainly, i don't really care either way, i just want to know which one works. Thanks again for the assistance
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Picaxe = Romeo & Juliet