Can I make midi music with a PIC16F873a


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Smile Many Thanks!

    Hi Everyone,

    Thanks for the tons of input you gave on my question. I tried several of them and I'm still not to happy, but al things has to start from scrats.

    I'm going to play with the FREQOUT command to see what happens. after that I give up for a little while.

    Other question:
    normaly the speaker is on one pin and the other on VDD (or VSS depending...)
    But if I put the speaker on two pins, and invert those two pins at the same time( so 1 = + the other -), would that improve the sound quality? It's a kind of pushpulling the speakercone.... Just a wild gues.

    Mathy

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mathy Knaapen View Post
    Other question:
    normaly the speaker is on one pin and the other on VDD (or VSS depending...)
    But if I put the speaker on two pins, and invert those two pins at the same time( so 1 = + the other -), would that improve the sound quality? It's a kind of pushpulling the speakercone.... Just a wild gues.
    Mathy
    It'll only be louder. A bit of info...
    A square wave is comprised of a sine wave at frequency 'X' plus all odd harmonics on either side of the primary frequency. So, a square wave is fundamentally a whole lot of frequencies all rolled up into one.
    Also, how do you get decent distortion from an electric guitar? You 'clip' the sine waves coming out of it, that is, flatten out the tops of the sine wave. What does the top of a square wave look like? Yep, flat, just like that clipped sine wave.
    So, if you listen to a pure sine wave vs. a pure square wave, the square wave will sound more R2D2-ish, and the sine wave more pleasing.

    By push-pulling a speaker vs. just pulling it...same result...crap.
    Yes, you could filter the output thru a filter network and make those square waves a bit more rounded off and resemble a sine wave. It won't be pretty, but it'll work, and it'll seem a bit louder (and more annoying).

    You still want to do what you said back in post #3? And that's it?

Similar Threads

  1. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  2. Midi, Interrupts and Pic better than SX28?
    By Lajko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th September 2008, 00:26
  3. Replies: 3
    Last Post: - 10th April 2008, 10:02
  4. How come they make electronics hard as poss
    By George in forum Off Topic
    Replies: 9
    Last Post: - 13th July 2007, 23:54
  5. Play Music (MP3, WAV,...) for greeting card
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th January 2007, 15:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts