ponyprog2000 for comcast
Sophi said:
Are you saying that a sound file wav format is binary?
When a programmer looks at a "bin" file it's expecting to take that long stream of bytes and placed them contiguos in the target according to:
1. The start address of PC buffer and the length of it
2. The start address of target chip
When the programmer looks at a "hex" file it's expecting to write in "chuncks" to target.
If the format of the "hex" file is correct then start parsing every line that starts with the colon and ends with the carry and new line markers.
As you already noticed, the programmer looks at starting address of the contiguos stream of bytes and the lenght of it.
The programmer could write randomly starting at different target chip adddress and different lengths.
That's one of the advantages of a hex file.
Now, from the chip point of view, it's strong related with the application that uses the stored bytes.
But it's always a stream of bytes.
When I said that the wav file it's a binary file, I thought from a programmer point of view.
No matter if you're able to clearly read some bytes with a text editor, the programmer takes the input wav file as binary and programm as mentioned above.
It's up to the application reading the target chip to decipher what's hidden behind those bytes.
Thus it's time for your PIC to deliver to DAC according to some "rules".
If the sound it's pure noise it's not the hex programmer guilty but your application.
The programmer has done his job and placed that stream of bytes in the EEPROM memory chip.
If you look carefully to the mentioned link
**broken link removed** you can see that the EEPROM contents is read by the Link-Comm DVR-1 that can play directly.
It's up to the Link-Comm DVR-1 to extract the "channel samples" and play them accordingly.
Look at the following description of the wav file :
Next using the COOLEDIT program, convert your wav file to 8khz samplingg rate, 8 bit mono for the DVR-1 to play the file properly.
Use the hex2bin utility to convert from hex to bin and look at the contents of the bin file with winhex program.
Try to look if the file follows the wave file specification with all that chuncks present (RIFF, WAVE....)
I don't know if your PIC and DAC, when playing file from EEPROM behaves exactly as the Link-Comm DVR-1 (to be honest I don't know what device is)