Increasing sample rate/capacity
achilles03
Posts: 247
I've run into a small problem with a project.· I have an 8bit ADC sampling an IR sensor, and I'd like to have 30 seconds of data with 150 samples/sec minimum.· Unfortunately, that's more than twice the eeprom size, and I can't go to other program slots because I'm currently limited to the BS2 industrial version.· Writing each sample to an external eeprom takes time, and I·can't make the 150 samples/sec with that.
One thing I was considering was to connect the ADC dataout pin directly to the eeprom DI pin.· Then "shiftout" the eeprom with a write enable command, followed by the write address, and then bringing the chipset low on the ADC and "shiftout" the ADC reading on a null BS2 pin (and the data would go to the eeprom, which is waiting for the data).· The clockpin on the eeprom and ADC would be the same BS2 pin.· Would this work?
Are there any other ways to speed up writing to an eeprom without recording it on the BS2?
Thanks in advace!
Dave
One thing I was considering was to connect the ADC dataout pin directly to the eeprom DI pin.· Then "shiftout" the eeprom with a write enable command, followed by the write address, and then bringing the chipset low on the ADC and "shiftout" the ADC reading on a null BS2 pin (and the data would go to the eeprom, which is waiting for the data).· The clockpin on the eeprom and ADC would be the same BS2 pin.· Would this work?
Are there any other ways to speed up writing to an eeprom without recording it on the BS2?
Thanks in advace!
Dave
Comments
Flash memory like the AT45DBxx series from Atmel is meant for data streaming as you might have in a voice recorder. It has a couple of RAM buffers that mirror the data pages, so while the chip is busy writing data into one flash page, you can be streaming data into the other RAM buffer. To acheive the high speed continuous writes, you ping-pong between the two RAM buffers.
I don't think you could do the clever direct streaming from the ADC into memory though, as the data would still have to go through the Stamp and the Stamp would have to manage the paging. But at least you wouldn't have to wait for the write to individual eeprom bytes. It might be possible to acheive your 150 bytes per second goal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thanks for the help!
Dave
www.emesystems.com/BS2flash.htm
and here is an Atmel app note to dig into:
www.emesystems.com/pdfs/parts/AT45DB041_apps.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com