Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] How to convert .wav files hex files?

Not open for further replies.

Mandar Joshi

Member level 2
Mar 4, 2015
Reaction score
Trophy points
Activity points
I want to convert .wav files into hex files in order write it on flash and play them using PWM on my AVR STK600 board. Does anyone have idea about this?

I have already seen this but couldn't get how to use that tool.

Convert your .wav file to 8 bits mono. This will give you one byte per sample.
Open your .wav file in HEX EDITOR, byte 44 to the last byte in the file are the data. Bytes 0 to 43 are the file header. Copy the data bytes to your AVR flash.
Transfer with your code the data to the PWM at the rate of the PCM of the .wav file.

What are you saying is method to remove header from wav file and get RAW data but what I want to do is to convert wav file into hex file so that I can write eeprom with eeprom programmer with hex file. No doubt I have remove header in that case also by your method.

Hobbyckts can you explain how to use that gvim7.4 for converting wav file to hex?

I think it is by inserting the file which is required for you and save it as a c file and you should know converting c into hex. This could work for you

I manged to convert .wav file into hex file now I want to combine hex files and I have doubts regarding this:

1. While combining two hex files of same starting address the address of second hex file must be changed in order to avoid overlap, but what should be the value of starting address for second file is it okay if give it as number of data bytes in first hex files +1?

2. While combining hex files if size exceeds 64K then what should be starting address of next file and what should I use as extended segment address 02 0r 04?

It will be helpful to me if someone clears my doubts. :sad:

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to