Programming Sounds

Thread Starter

Chris15

Joined Apr 15, 2009
252
Hellloooo

I have an ATtiny13A that i have programmed to play a small nokia tune when activated

My Question is to find out how the Hex fille was made to sound like a nokia tune, and am trying to make the tune different or just want to know how it is done, i knw the ATtiny13A Does not have alot of memory like 1k but i want to know how u can make a song or sound into a hex file ready for programming

Chris
 

thatoneguy

Joined Feb 19, 2009
6,359
Does your current project function ok?

Have you contacted the author of the .hex file to see if you can get the source code?

There are a few ways to do it, I'm used to PICs, but the concept is the same. Google should show some results for C routines for sound generation on microcontrollers.
 

Thread Starter

Chris15

Joined Apr 15, 2009
252
yes My current Project works Great! i am very pleased at how it works, i just thought i could keep the same circuit, but put a short christmas carole or something anything, i just wanted to learn how that part worked
 

jpanhalt

Joined Jan 18, 2008
11,087
Agree on getting the source code from the author. If that fails, you can also search on a disassembler to convert hex into assembly. You do not get comments that way, but you might be able to tell enough from it to write your own code. John
 

Thread Starter

Chris15

Joined Apr 15, 2009
252
What is a Source code?

So if i was him, and i wanted to make my tune, what would he have done, do i get an mp3 file, and put it in a program that makes it into a hex?

My understanding of Programming is as simple as, get a hex file, connect the Chip, press program, so i dont understand all the stuff people write in AVR Studio 4 board, the #include io.h, Void, and the random { and }, PORTB, DDRB those things i have seen people write but i dont know what that is what it means

Can a Hex file for one chip, for example my Nokia Tune for a ATtiny13A be used on ANY Atmel chip?, are all hex files the same

Chris
 

nerdegutta

Joined Dec 15, 2009
2,684
What is a Source code?

So if i was him, and i wanted to make my tune, what would he have done, do i get an mp3 file, and put it in a program that makes it into a hex?

My understanding of Programming is as simple as, get a hex file, connect the Chip, press program, so i dont understand all the stuff people write in AVR Studio 4 board, the #include io.h, Void, and the random { and }, PORTB, DDRB those things i have seen people write but i dont know what that is what it means

Can a Hex file for one chip, for example my Nokia Tune for a ATtiny13A be used on ANY Atmel chip?, are all hex files the same

Chris
When all #include io.h void, and the random { and } plus a bunch of more stuff is put in a system, that is called "source code", from the source code, a compiler and linker makes it into a hex-file.

PS. I've read about some people who program direct in hex. God bless them!
 

Thread Starter

Chris15

Joined Apr 15, 2009
252
Aight thanks Boys, im gna explore that more, another quastion bout AVRISP MKII

Mine has a 6 pin female socket, can i use that 6 pin socket for BIG AVR Chips, like the ATmega328P and other 14, 20, 40 pin IC's or do i need a different programmer?
 

hgmjr

Joined Jan 28, 2005
9,027
Aight thanks Boys, im gna explore that more, another quastion bout AVRISP MKII

Mine has a 6 pin female socket, can i use that 6 pin socket for BIG AVR Chips, like the ATmega328P and other 14, 20, 40 pin IC's or do i need a different programmer?
I have attached an image of a partial list of AVRs that can be programmed with the AVRISP MKII.

The AVRs on this list vary from the simpliest 8-pin up to the complex 64-pin versions. All AVR's share the same common CPU core so the code you write for one AVR can very easily be migrated to a more feature rich AVR device.

I recommended the AVRISP MKII to provide you with the maximum flexibility in programming as many AVR 8-bit microcontrollers as possible. I don't think you will soon outgrow this programmer.

hgmjr
 

Attachments

Top