0
Offline
Newbie
Karma: 0
Posts: 44
Arduino rocks
|
 |
« Reply #105 on: April 07, 2009, 01:30:16 pm » |
Hi everybody..
I would like to change the pin select SS 10 (because 10,11,12,13 is yet busy );
for example define Slave Select 8
..do you know how to make this...?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #106 on: April 07, 2009, 10:28:04 pm » |
Posted by: breenmachine A few people have noticed that your writes to the card "dissappear" after restarting the Arduino. The block size is set up to be 512 bytes, and in the code on the first page, a 512 byte buffer is kept, once it is full, it is written out to the card.
This can be trivially disabled so that all writes are written to the card immediately (no buffering). Just open up "sd_raw_config.h" and look for the line: #define SD_RAW_WRITE_BUFFERING 1 change it to #define SD_RAW_WRITE_BUFFERING 0
and you should be all set...dunno if someone else already posted this but I saw the question asked and couldn't find the answer myself so I decided to take a look at the code.
If this is true you just saved me a lot of trouble ;D Can this be done with the read function as well? I think a 512 byte buffer gets filled there too.
|
|
|
|
« Last Edit: April 07, 2009, 10:33:41 pm by smelios »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #107 on: April 08, 2009, 03:53:19 pm » |
I tried changing
#define SD_RAW_WRITE_BUFFERING 1 to #define SD_RAW_WRITE_BUFFERING 0
with no luck, does that header file need to be recompiled or can i just change it and save?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #108 on: April 08, 2009, 03:58:01 pm » |
recompile recompile, restart the arduino IDE
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #109 on: April 08, 2009, 04:50:57 pm » |
Sorry im a noob when it comes to this stuff. I opened sd_raw_config.h in microsoft visual c++ 2005 and the option to recomplie isn't available. What should I do?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #110 on: April 08, 2009, 05:14:06 pm » |
Err... I meant to restart the Arduino executable... that you use to write code and upload to the board with.
|
|
|
|
|
Logged
|
|
|
|
|
USA
Offline
Jr. Member
Karma: 0
Posts: 78
ClockTHREE Rocks!
|
 |
« Reply #111 on: April 11, 2009, 07:13:54 pm » |
You rock! I just got this working out of the box. Nice job and thanks! Justin 
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 2
Arduino rocks
|
 |
« Reply #112 on: August 07, 2009, 05:53:05 pm » |
im wondering if would be possible to bootload the arduino from the SD card. The arduino recieves its sketch through the tx and rx pins right so theoretically if you had a 2 cores one to read the sketch and transmit it to the arduino and the arduino itself it could be used as a bootloader.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #113 on: August 07, 2009, 07:56:54 pm » |
What would be the benefit of this? The sketch residing on SD card instead of internal flash memory?
|
|
|
|
|
Logged
|
|
|
|
|
Denver
Offline
God Member
Karma: 19
Posts: 776
Inactive - PM
|
 |
« Reply #114 on: August 07, 2009, 08:45:44 pm » |
I could think of one advantage. If you had a commercial product the users could upload "new versions" themselves. Dribbleware! 
|
|
|
|
|
Logged
|
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom." ~ Clifford Stoll
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #115 on: August 08, 2009, 08:03:58 am » |
Right, good point. A user upgrade would consist in copying the hex file on the SD card, easier than asking the user to go through the Arduino IDE.
|
|
|
|
|
Logged
|
|
|
|
|
From:0x000000
Offline
Full Member
Karma: 0
Posts: 213
sudo make me a (bread+ham+lettuce+cheese+bread)
|
 |
« Reply #116 on: September 19, 2009, 10:58:41 pm » |
Ummm... I tried the example code after installing the library, and i get: from D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:13:
D:\Program Files\arduino-0017\hardware\libraries\SDcard\/sd_raw_config.h:86:6: error: #error "no sd/mmc pin mapping available!"
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp: In function 'uint8_t sd_raw_init()':
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:167: error: 'configure_pin_mosi' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:168: error: 'configure_pin_sck' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:169: error: 'configure_pin_ss' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:170: error: 'configure_pin_miso' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:172: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:198: error: 'select_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp: In function 'uint8_t sd_raw_read(uint32_t, uint8_t*, uint16_t)':
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:418: error: 'select_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:423: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:455: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp: In function 'uint8_t sd_raw_write(uint32_t, const uint8_t*, uint16_t)':
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:663: error: 'select_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:668: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:689: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp: In function 'uint8_t sd_raw_get_info(sd_raw_info*)':
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:809: error: 'select_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:814: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:863: error: 'unselect_card' was not declared in this scope
D:\Program Files\arduino-0017\hardware\libraries\SDcard\sd_raw.cpp:908: error: 'unselect_card' was not declared in this scope
Its a Shame it didn't work...Can someone tell me what i did wrong? Also, I have a question, What would happen if you disconnect the card and connect it into a card reader? Would it show up as a TXT file or a file without extension or will you have to use a "disk editor" to manually see the bytes and sectors of the stick?
|
|
|
|
|
Logged
|
|
|
|
|
From:0x000000
Offline
Full Member
Karma: 0
Posts: 213
sudo make me a (bread+ham+lettuce+cheese+bread)
|
 |
« Reply #117 on: September 19, 2009, 11:37:15 pm » |
And i have another question, How do i connect my SD card? Do i need to buy one of the shields out there?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 9
Arduino rocks
|
 |
« Reply #118 on: September 26, 2009, 01:07:56 am » |
Hi ! I'm new in the forum. First : thanks for this tutorial It looks like very easy to follow. I just have 2 questions : I have a handful of 470 and 180 Ohms resistors, is that possible to replace the 1.8kO by a 180O and the 3.3kO by a 510O. In theory it's OK : Vout = Vin x R2/(R2+R1) Vout = 5 x 470/(470 + 180) Vout = 3.62V
My 2nd question : Is the Arduino has a 3.3V output to connect the 4th pin of the SD card ?
Bye. Montspy.
|
|
|
|
« Last Edit: September 26, 2009, 02:54:39 am by Montspy »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 24
Arduino rocks
|
 |
« Reply #119 on: September 30, 2009, 03:40:40 pm » |
I have followed the instructions 1:1, compiled the demo sketch, but can never manage to get over "MMC/SD initialization failed". Is there a problem with Arduino Duemilanove ATMega328?
The SD Card is fat16 formatted...
In desparate need for an answer, fritz
|
|
|
|
|
Logged
|
|
|
|
|
|