I'm new at hardware programming: I work with the pic18F4550 with the C compiler from microchip version 8.63. My question is: has someone example code to write a .wav file (binary data) to the flash memory of the pic18F4550?
Asked
Active
Viewed 807 times
2
-
At runtime over some interface, or at build time? – Judge Maygarden May 26 '11 at 20:52
-
at build time I think. What's the difference? – projecten1 May 26 '11 at 20:55
-
OK, that's what I thought. See my answer below. – Judge Maygarden May 26 '11 at 20:55
1 Answers
1
Use a bin2c program to convert the WAV file to a C source file with the data contained in a const char
array. Then compile and link this file with your source code. Your linker should place const
variables in flash memory on the PIC.

Judge Maygarden
- 26,961
- 9
- 82
- 99
-
OK, can I put this array, as a global variable in my own C program on my pic18F4550? – projecten1 May 26 '11 at 21:42