Programming Sounds

Discussion in 'Embedded Systems and Microcontrollers' started by Chris15, Dec 17, 2010.

  1. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    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
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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.
     
  3. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    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
     
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,684
    900
    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
     
  5. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    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
     
  6. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    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!
     
  7. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,782
    941
  8. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,684
    900
  9. Chris15

    Thread Starter Active Member

    Apr 15, 2009
    252
    0
    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?
     
  10. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,782
    941
    Google "ATmega programming pins"
     
  11. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    .......................................................
     
    Last edited: Jan 16, 2011
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
Loading...