SD card improved
Klap
Posts: 65
Now that I finally have the SD Card Adapter working I have re-created parts of files from Radical Eye Software
http://forums.parallax.com/forums/default.aspx?f=25&m=162235
into a set of SD card programs which should be much easier to understand and use. If you have never used an SD card program before or didn't quite understand it, then this is the program for you.
I will be creating some applications that will use these files in the future (inspired from PASMStore). I will be creating a program that will store LED blinker data, Ping))) sensor data, and finally storing data from a Wii Nunchuck.
http://forums.parallax.com/forums/default.aspx?f=25&m=162235
into a set of SD card programs which should be much easier to understand and use. If you have never used an SD card program before or didn't quite understand it, then this is the program for you.
I will be creating some applications that will use these files in the future (inspired from PASMStore). I will be creating a program that will store LED blinker data, Ping))) sensor data, and finally storing data from a Wii Nunchuck.
Comments
The updated page for page 5 of the Cookbook is here...
www.warrantyvoid.us/tiki-index.php?page=Interfacing+SD+media
Also, you might find the "SD Trainer" might be of interest to you.
www.warrantyvoid.us/tiki-index.php?page=Objects
Glad to see you are enjoying it now. The SD is one of the best addons for Propeller.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I already downloaded the FemtoBasic file and all the stuff that comes with it. I just don't understand it or even how to use it. I was thinking it might be covered in the Hydra Book but that book is not in PDF format and I can't afford to buy it. Perhaps one day when I get really good at programming or can afford to buy it I will be able to use it. Until that time comes it is just too far over my head. I just started programming in Propeller three weeks ago so I try to stick with the simple stuff.
Solution: In SD_Trainer.spin the TestMountSD statement does not work. Here is a suggested fix.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 4/1/2009 10:51:58 AM GMT
I decided to skip the LED datalogging and go strait to the Ping))) sensor. Even if you don't own a ping sensor though just as long as you own a sensor that outputs numbers this code should give you the template you need. I pride myself in making this code easy to use and to understand. Even if you have never used the ping sensor this should only take about 15 minutes at the most to get completely up and running.
I am very excited to start using the SD card for actual applications. Next is the Wii Controller.
I am rewriting all of the files I obtained from
http://forums.parallax.com/forums/default.aspx?f=25&m=162235
for three main reasons.
(1) The basepin terminology is confusing: You have to figure out which pin is the base pin then you have to figure out which way the pin numbers are increasing: for example you may have the right base pin but if you flip the SD Card Adapter around then the pins will not line up to the code. In addition to that if a person was to make their own connect to the SD card then they may not have the pins line up the exact same way. Lining up the clk pin to the clk pin, the do pin to the do pin, etc. I think would be much easier to understand.
(2) I am using the Serial Terminal so I had to at least edit the top file.
(3) The naming system for the files I thought was very confusing. I am an ME so it took me a while to understand everything that was going on and how to use the programs. I always try to dumb my code down so that I will remember what I am doing when I come back to this several years from now.
This program takes values from the Wii Nunchuck and stores them onto an SD card. I am using this application at CSU, Sacramento for my Sr. Project. My group is strapping a Wii/propeller onto a helicopter to get accelerations between -2g and 2g's which we will then use to calculate the forces on the frame where we are adding a helicopter pod.
Features of this program include:
The sample frequency and total time for sampling can be input as constant parameters.
The object StringToASCII.spin is included which transfers any and all characters to ASCII.
This object can also be run completely independently which makes the time to test and debug
this file literally seconds. All the user has to do is hit run and the debugging is done!
Lastly WiiToSdCard.spin contains ample amounts of notes so if a user ever wants to alter this code
that can be done in a snap!
The next thing I have to do is to take the Piezo Film Vibra Tab Mass
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/flex/List/0/SortField/4/ProductID/89/Default.aspx
and use it to measure the natural frequencies induced in the aircraft. Has anyone used this sensor before? Or will I be creating my own code from scratch this time?
Hope you all enjoy this code!
Once done with this program though the file SD_Card_Introduction.zip (see first post) will be useful for its faster speed. Enjoy.
I have spent the last few days chasing a bug that looks like the SD card is not being shut down properly on a sd.close call (fsrwFemto.spin & sdspiFemto.spin) - DI and/orDO is interfering with the bus.
sdspiFemto.spin does not have any author's names. Is it yours OBC??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
http://elm-chan.org/docs/mmc/mmc_e.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
I have also added the fix to the TestMountSD routine in SD_Trainer.spin,·added a routine to display the directory, and a slight modification to the code layout.
OBC or Klap: Would you like to update the obex??
For anyone wanting to try it on the TriBladeProp Blade #2 the D0/CLK/DI/CS pins are 9/28/8/14·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 4/3/2009 11:32:21 AM GMT