Pages: [1]   Go Down
Author Topic: Getting a wav file onto an EEPROM (or into flash memory)  (Read 760 times)
0 Members and 1 Guest are viewing this topic.
South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been doing a bit of research/work on the drum machine project idea I had a while back, and I'm trying to wrap my head around how best to process a wav file in order to dump it either into flash memory or, as is more likely, onto an old-style parallel E(E)PROM. I don't have a programmer yet for said ROMs but I can go shopping for one next payday - in the interim I want to test the files from the flash memory of one of the ATmega328's I have knocking around. A single sample is about 18.7kb, so one will fit smiley

The general idea for a rough-as-guts test bed is to simply shove all the data out in parallel on PORTD or something, through a DAC and see what I get (if anything) on the other end. I'd rather have some idea if it's going to work before going equipment shopping!

So far, I have:

Wave files processed in Audacity and exported as RAW(header-less), unsigned 8-bit, 32khz mono.
A HEX editor, specifically Frhed, which I have so far used for comparing the "normal" wav with the header-less one just for a look, and exporting the data as a hexdump text file.


What's the best way to get the compiler to take this data and shove it in flash memory as a great big array so I can read through it from my main program? I'm googling in another tab as I write this, but it's a bit hit-or-miss not knowing exactly the technical programming terms for some things.

Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8842
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can get it into a format with a character between 8-bit values (2 hex characters) you can change that character to ",0x" to make a list of hex constants.  A good text editor should allow you to do the whole hex dump in a few steps.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: