|
931
|
Using Arduino / Storage / Re: 3v3 pro mini interfacing to SD bug
|
on: July 18, 2011, 02:53:12 pm
|
|
How is the SD card connected to the 3v3 pro mini?
When it does work I suspect you will drop data points. Often write takes much longer than 2 ms.
Does that matter?
Also the 3v3 pro mini is 8 MHz so writing the SD will take even longer.
|
|
|
|
|
938
|
Using Arduino / Networking, Protocols, and Devices / Re: Some success with writeCID
|
on: July 15, 2011, 07:51:30 am
|
CMD26 is reserved. If your card allows CMD26, it may not work properly. CMD26 should not be supported in SPI mode. From the SD association: CMD26 PROGRAM_CID
Programming of the card identification register. This command shall be issued only once. The card contains hardware to prevent this operation after the first programming. Normally this command is reserved for the manufacturer.
|
|
|
|
|
939
|
Using Arduino / Networking, Protocols, and Devices / Re: SPI & ADCs: bit-banging vs SPI.h
|
on: July 15, 2011, 07:21:45 am
|
|
I was talking about recording audio on the Arduino using a simple ADC. I have recorded mono at 44.1 ksps on the Arduino.
You can't use the hardware SPI bus that the SD is on for the ADCs. SD cards do not allow interruption of a 512 byte block transfer. CS must be kept low for the whole transfer.
With higher powered processors like ARM with a 4-bit SDIO bus and a fast I2S bus, recording stereo is easy. There are wonderful cheap codecs you can use with higher power processors
|
|
|
|
|
940
|
Using Arduino / Networking, Protocols, and Devices / Re: SPI & ADCs: bit-banging vs SPI.h
|
on: July 14, 2011, 03:01:18 pm
|
|
I don't think 16-bit stereo audio at 44.1 ksps is possible. But I have been thinking about it for a while.
I can write a 512 byte block to SD in about 900 microseconds using a special multi-block write command. So about 1/3 of the CPU is needed for SD write at 176.4 KB/sec.
I am going to do an experiment reading out two ADC in parallel using bit-bang. I will connect a single pin to clock on both ADCs but have separate pins for data out. For ADCs that need input I would use a common data in pin.
My guess is that it will take too long.
|
|
|
|
|
941
|
Using Arduino / Networking, Protocols, and Devices / Re: SPI & ADCs: bit-banging vs SPI.h
|
on: July 14, 2011, 12:17:41 pm
|
|
I just did a bit-bang library for a number of Microchip SAR ADCs. For the MCP3201 I can get a reading in 9 microseconds. This requires two bytes and is the maximum spec speed for this ADC. I use a few nops to get a nice clock.
I did bit-bang SPI for SD cards as an option in the SdFat library, the base for Arduino SD.h. I get about the equivalent of 2.5 MHz SPI clock.
My estimate is bit-bang SPI is about 1/3 as fast as full speed hardware SPI.
I like bit-bang for ADCs in ISRs. That leaves hardware SPI free for non-interrupt use.
|
|
|
|
|
942
|
Using Arduino / Networking, Protocols, and Devices / Re: Adding I2C as a Slave Kills my program?
|
on: July 14, 2011, 12:01:38 pm
|
|
Coding Badly,
Thanks for finding this.
Jeremyvnc sent me a bug report on this for SdFat. I did a quick test of the I2C stuff and it was OK. I felt a bit guilty that I didn't spend more time looking at his code.
I just don't have the time any more to find user bugs. I get so much mail about SdFat since it was used as the base for SD.h.
Over 90% of the time this type of bug is a corrupt stack that kills SdFat.
|
|
|
|
|
944
|
Using Arduino / Networking, Protocols, and Devices / Which GPS module?
|
on: July 14, 2011, 10:08:12 am
|
I have am developing a new GPS library and need advice on which GPS modules to support. I used an EM-406A on an Adafruit GPS shield for the first version http://code.google.com/p/beta-lib/downloads/list. I am considering a Lassen IQ module next. The IQ is old but it is often used for high altitude logging since it works above 60,000 feet at lower speeds. The GPS shield supports a connector for the IQ but it doesn't bring out Port 1, the TSIP/TAIP bi-directional port. This means I can't configure the module when it is mounted on the GPS shield. I already parse the default NMEA messages from the Lassen IQ. Any advice or suggestions for other modules. The module doesn't need to be mounted on the GPS shield.
|
|
|
|
|