umount and date/time for fsrw SD card driver ??
Rayman
Posts: 14,793
I've discovered the need for a "umount" (un-mount) command for Rockiki's SD card driver so that the pins go high-impedance without killing the cog (what I'm doing now...).· Anybody done this already?
Also, it would be nice to add date/time stamps to the files...· Does this exist already?
Also, it would be nice to add date/time stamps to the files...· Does this exist already?
Comments
PS: I vote we make the DS1307 the standard time source...
What pins shall we call standard? IIRC, couldn't we just stack it on the EEPROM pins? (30,31)
I'd love to add time/date to PropDOS!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
Thirded (is that even a word???)
Since the DS1307 is an I2c device, it can be on the same pins as the EEPROM. I'm soldering together a RTC based on the DS1307 on one of my new ProtoCards, I'll post a picture when I'm done. Since the ProtoCard has direct access to the I2c bus, it's a simple project, and very useful. With an onboard battery backup, the ProtoCard mounted DS1307 will keep on ticking. This type of thing is a perfect example of why I made the ProtoCard in the first place.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio
PropNIC - Add ethernet ability to your Propeller!
SD card Adapter
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio
PropNIC - Add ethernet ability to your Propeller!
SD card Adapter
I've been eyeballing that ram too.. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
I remember you mentioned looking into passing data to a program when launching from PropDOS, that might be the place to store the passed data?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio
PropNIC - Add ethernet ability to your Propeller!
SD card Adapter
I'm lost as to how the date is obtained from the above statement. If someone could explain
the breakdown I'd appreciate it. IIUC, it looks like December 16,1980-2007 *confused!
On the upside, it looks like applying the date will be a snap.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
Here's a routine for building a date/time from pieces
I got the bit positions wrong for minutes and hours. The above is corrected.
Post Edited (Mike Green) : 12/2/2007 1:48:30 AM GMT
You are solid gold! Thank you! I assume that the time stamp is compatible with the existing routines?
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
(Sorry about the really ugly clip.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
please confirm.
(What do they call it when you start quoting yourself? [noparse]:)[/noparse] [noparse]:)[/noparse]
Looking at the SpinStudio Protoboard specs tonight I noticed that Brian has already
taken care of all the pull-ups. Kudo's for being two steps ahead of us!
Looks like I have just enough room on the board to replicate the SpinStudio socket,
and place the DS1307 with the battery mounted sideways on the rear of the board.
(I'll post pics soon, if I can find that required crystal in my junkbox.)
OBC
Edit[noparse][[/noparse]
@Mike, thanks for the wiki reference! Good reading. Although I'm now a little
worried about all of the world's handheld fat-based devices crashing on Jan 1, 2108. <smirk>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
Post Edited (Oldbitcollector) : 12/2/2007 5:23:47 AM GMT
I am using this code to set the time on a created file on a SDcard.
PUB DateForSDcard
· year:=BCD2Dec(year)
· month:=BCD2Dec(month)
· day:=BCD2Dec(day)
· Hours:=BCD2Dec(Hours)
· minutes:=BCD2Dec(minutes)
· seconds:=BCD2Dec( seconds)
· sdfat.pSetTimeDate(year, month, day, Hours,minutes, seconds)
·PUB BCD2Dec (value) : Decimalt
· datum:=(value <<4)
· datum2:=(value >>4)*10
· datum1:=(datum >>4)
· Decimalt:=(datum2+datum1)
· return· Decimalt
I use the DS1302 .
Might be of some help
Goran
I plan to add a 6 pin header to plug my SD Card adapter into so the clock and SD card can occupy 1 "Socket"
I tested it with the object created by Beau Schwabe shown here http://forums.parallax.com/showthread.php?p=604475
His example synthesizes 32.768 khz to avoid using a crystal. I stripped that code out, as I am using a crystal. Also changed SCL and SDA to P28+P29.
I can provide details on the circuit if needed, but right now it's after 3am, time to get some sleep!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio
PropNIC - Add ethernet ability to your Propeller!
SD card Adapter