Show Posts
Pages: 1 ... 63 64 [65] 66 67 ... 100
961  Using Arduino / Storage / Re: What is the max microSD size for the eithernet shield? on: June 04, 2012, 04:14:42 pm
Yes they could be reformatted and I have an SDXC that I am playing with on Arduino.

The problem is that Microsoft can prevent reformatted SDXC cards from being used in their OSes and probably in Macs and many other devices that must license their exFat format. 

The SD association states that reformatted cards shall not be accepted by SD association members in products they produce.

I am looking at the Linux exFat driver but it is so incomplete.  Much of the exFat file system is still a mystery and the code has many gaps in file system declarations.

I expect there will be a good reverse engineered description of exFat and good open source code soon.
962  Using Arduino / Storage / Re: 1 GB microSD on MAC on: June 04, 2012, 04:00:05 pm
Don't try any other micros SD cards.  They may be damaged by the high voltage signals.
As Sparkfun says about their shield:
Quote
All new microSD shields have a voltage converter chip on-board that converts the Arduino 5V signals to 3.3V signals in accordance with SD specifications. No more 'blown up' SD cards!

The best approach is to use a level shifter like these adapters/shields

http://www.adafruit.com/products/254

http://www.gravitech.us/micaad.html

http://www.sparkfun.com/products/9802

You could try resistor level shifters but these don't work well with many cards.  If you try this, slow down the SPI clock.
963  Using Arduino / Storage / Re: What is the max microSD size for the eithernet shield? on: June 04, 2012, 01:32:47 pm
The max size is 32GB. 

This is the limit for all types of SD cards on Arduino.  Arduino only supports SD (2GB and less), and SDHC (more than 2GB and up to 32 GB).

Cards larger than 32GB are SDXC and are not supported by arduino libraries.

SDXC cards are pre-formatted with Microsoft's proprietary and patented exFAT file system. Microsoft does not publish the specifications of exFAT and its use requires a non-free license.  Therefore I have not attempted to support SDXC cards in SdFat.  SdFat is the base library for the Arduino SD.h library.
964  Using Arduino / Storage / Re: 1 GB microSD on MAC on: June 04, 2012, 11:55:53 am
This breakout has no level shifters or 3.3V regulator. 

Did you connect VCC to 3.3V on the Mega? 

What are you doing to translate the Mega 5V SPI SCK and MOSI signals to 3.3V for the SD card?
965  Using Arduino / Storage / Re: PGM_P p = PSTR () problem for included SD library or sdfatlib on: June 04, 2012, 08:05:56 am
There is a problem with older versions of PSTR and avr-gcc-4.6.1.

See this http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=871000.

pgmspace.h is in this folder arduino-0022/hardware/tools/avr/avr/include/avr.

Change the definition of PSTR from this:
Code:
# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];}))
to this:
Code:
# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
966  Using Arduino / Storage / Re: Logging data at >50Hz on: June 03, 2012, 07:54:31 am
See this topic http://arduino.cc/forum/index.php/topic,107429.msg807043.html#msg807043.
967  Using Arduino / Storage / Re: 1 GB microSD on MAC on: June 01, 2012, 06:33:28 pm
Error 13 means a write command failed. This is a basic hardware failure.  What SD adapter are you using?

This error often happens when resistor level shifters are used or long wires connect the adapter to the Arduino.
968  Using Arduino / Storage / Re: 1 GB microSD on MAC on: May 31, 2012, 04:59:15 pm
In addition to the GPT/MBR problem, Mac, Linux, and Windows utilities do not align file structures on the correct boundaries to optimize access to the SD card's flash chips.

Most operating systems are learning about solid state drives (SSD) but OS utilities don't understand SD cards yet.

SD card manufactures produce cards that perform best when formatted according to the SD formatting standard.
969  Using Arduino / Storage / Re: 1 GB microSD on MAC on: May 31, 2012, 04:34:20 pm
Sadly the Mac is a poor choice for formatting SD cards.  Macs do not conform to the SD standard format.

It is likely you have formatted the card with a GUID Partition Table (GPT).  The SD standard specifies SD cards must be formatted with a MBR partition table.  Most cameras and phones accept this non-standard GPT format but Arduino has so little memory so GPT is not accepted.

Once a card is formatted GPT Windows often preserves this format.

The best way to reformat your card is to use SD Formatter from the SD association https://www.sdcard.org/downloads/formatter_3/.

You can also use the SdFormatter example sketch from the SdFat library to format you card on the Arduino http://code.google.com/p/sdfatlib/

Card less than 4 GB should be formatted FAT16 for best performance and cards 4 GB and larger must be formatted FAT32.  Also the SD standard requires this formatting.
970  Development / Suggestions for the Arduino Project / Re: Arduino v1.0.1 IDE compiles larger code on: May 31, 2012, 10:53:28 am
Interesting, what libraries are you using.

I have several programs that are just a bit smaller on 1.0.1 than on 1.0.

My SdFat example to compare the size of the SD.h library with SdFat is 11054 bytes on 1.0 and 10996 bytes on 1.0.1.  Not much difference but in the right direction.

Programs with the Wire library seem to be bigger by at least 100 bytes on 1.0.1 than on 1.0.

971  Using Arduino / Storage / Re: 2 SD cards in parallel on: May 29, 2012, 05:25:28 pm
Correct. You can have files open on both cards and SdFat will handle it.  See the TwoCards example in the SdFat/examples folder.

SdFat is designed to access any number of cards but each card has a 512 byte buffer.  On a Mega or 1284 you could have a lot of cards with files open on all cards.
972  Using Arduino / Storage / Re: 2 SD cards in parallel on: May 29, 2012, 05:08:44 pm
The SD card is always the slave but it controls timing through the protocol between it and the master.  That's why you need to understand the spec.

For example when you send a command to the card it delays by holding MISO high until it is ready to send status.  The master waits till it get something other than 0XFF.

The protocol is filled with stuff like this that allows the card to control the timing for all operations.  That's why you can't enable two card at the same time and run them in parallel.

SD fat supports multiple cards but only by accessing one card at a time.
973  Development / Other Software Development / ChibiOS/RT 2.4.1 RTOS update on: May 29, 2012, 08:18:04 am
I have updated the ChibiOS/RT library to version 2.4.1.

This library is a simple way to use the ChibiOS/RT RTOS on 328 and Mega Arduinos.

The download is ChibiOS20120529.zip at http://code.google.com/p/beta-lib/downloads/list.

ChibiOS 2.4.1 is a maintenance release fixing all known bugs. More details are available in the release note at the ChibiOS website.

I have made minor changes to examples and included a new version of the SdFat library.
974  Using Arduino / Storage / Re: 2 SD cards in parallel on: May 28, 2012, 08:11:26 pm
No this adapter does not write the SD cards in parallel.  It make two SD cards appear like a twice as large memory stick.

Read the SD spec - it is impossible to access two SD cards in parallel on one SPI bus.  Cards are not synchronous devices.  They go ready at random times and return status at random times.
975  Development / Other Software Development / Re: ChibiOS/RT 2.4.0 RTOS update on: May 28, 2012, 11:22:23 am
The Arduino delay function will block all lower priority threads or all threads if used in an interrupt routine.

Arduino delay is just a loop that does not release the CPU:
Code:
void delay(unsigned long ms)
{
uint16_t start = (uint16_t)micros();

while (ms > 0) {
if (((uint16_t)micros() - start) >= 1000) {
ms--;
start += 1000;
}
}
}

You should use ChibiOS thread functions like:
Quote
void    chThdSleep (systime_t time)
    Suspends the invoking thread for the specified time.

void    chThdSleepUntil (systime_t time)
    Suspends the invoking thread until the system time arrives to the specified value.

You can use scheduler functions to put a thread to sleep or wake a thread.

You can often use synchronization functions in place of delay.

Documentation is here http://chibios.sourceforge.net/docs/kernel_avr_gcc_rm/group__base.html.

Pages: 1 ... 63 64 [65] 66 67 ... 100