Help, please! Electronic Piano

Discussion in 'Programmer's Corner' started by gabrielamortoza, May 22, 2013.

  1. gabrielamortoza

    Thread Starter New Member

    May 22, 2013
    2
    0
    Hey, guys! I need to make a program in which I need to emulate a piano with seven buttons and a buzzer. I'm using pic16F877A and I need to make it with a timer0, so I can't use "Sound_play". The ideia is to change the frequency of the buzzer according to each button pressed. Does anyone have any idea of how can I do it?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,431
    3,360
    The simplest method of generating a signal of known frequency is to use the timer to toggle an output pin.

    Change the timer period depending on which key is pressed.
     
  3. gabrielamortoza

    Thread Starter New Member

    May 22, 2013
    2
    0
    Yeah, I know, but it doesn't matter how I've tried, I couldn't manage to make it work.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,431
    3,360
    Too bad, I can't see what you have done from where I am sitting.
     
  5. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Agreed, The reason it "does not work" is because there is NO CODE.

    It's a common problem these days. ;)
     
Loading...