Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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?

Status
Not open for further replies.

Mandar Joshi

Member level 2
Joined
Mar 4, 2015
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
445
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?
 

Mandar Joshi

Member level 2
Joined
Mar 4, 2015
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
445
I have already seen this but couldn't get how to use that tool.
 

Vbase

Full Member level 6
Joined
Apr 7, 2015
Messages
367
Helped
74
Reputation
148
Reaction score
72
Trophy points
28
Activity points
1,997
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.
 

Mandar Joshi

Member level 2
Joined
Mar 4, 2015
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
445
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.
 

Mandar Joshi

Member level 2
Joined
Mar 4, 2015
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
445
Hobbyckts can you explain how to use that gvim7.4 for converting wav file to hex?
 

hobbyckts

Advanced Member level 1
Joined
Mar 12, 2015
Messages
481
Helped
88
Reputation
176
Reaction score
85
Trophy points
28
Activity points
2,457
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
 

Mandar Joshi

Member level 2
Joined
Mar 4, 2015
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
445
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:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top