PIC Audio


Closed Thread
Results 1 to 29 of 29

Thread: PIC Audio

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Talking

    It may be a little late to point this out but...

    STARWARS ISN'T REAL!...
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .

    It's only a movie.
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .

    Somebody catch him!

    .
    .
    .
    .
    .
    .
    .
    I love wierd people! :-)

    The helmet looks awsome!

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  2. #2
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Well, I've been looking at Audio amps... The LM383 would have been perfect but it's obsolete. There is a replacement for it though and I found a few others that I like. Almost finished with my armor so I'll start working on the PIC circuit as soon as I get finished with that... And yes, I know Star Wars isn't real

    BUT neither were microwaves and color TV not so long ago... he he

    Have a great evening!
    Dave

  3. #3
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Ok, done with my armor...now on to the audio... I've been playing with the PIC but most of the noise that I can get to come out of it are too "digital sounding"...when using the SOUND command. Reading on the site for the original board I found that the board has 5 different modes as well... One that adjusts the amount of distortion that your voice changes from "Normal" to "Distorted" 1-5 depending on where you set the level. You can also upload wav files to the thing using his software and a computer... Delays from when you finish talking to when the static burst comes out, turning the static sounds on and off...Geez!!

    My questions:

    1. How do you adjust the real time audio distortion if the PIC isn't sampling the audio or do you think it is?
    2. Do you think it is using the 1 bit audio, I.e. the Roman Black 1 bit wav file audio?
    3. Do you think it is using a pre-recorded wav file for the static or generating it using the PIC?

    I'm kinda lost here...None of the white noises that I get from the PIC sound anywhere near what I hear on his site..and there is a click before the rush of white noise... the simulated button release of the radio.

    I've found examples of MMC uses, ISD voice recorder uses and a couple other instances where PICs are being used with other devices to produce audio but I can't really settle on which would be best.

    -Dave

  4. #4
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default It may be possible

    Hi,

    Excuse me if I am quoting something already mentioned by somebody. I have quickly browsed the thread a may have skipped something. Its sunday and I am back after a long tour. So I am worried about the "Wife" bug to be active any moment!!

    If you sample the audio at 8Khz and continuosly throw the sample out through Hardware PWM you would actually be reducing the bandwidth of the input audio. Sort of a low-pass filter. Couple that with dirty (cheap) filtering and the free quantitizing noise. This may be the sound you are actually looking for.

    You can have a routine detecting when the ADC is receiving no/low signals. Treat them as end of audio and thus trigger your sound fx routine- handsfree.

    Needs some ASM stuff to utilize the conversion and/or acquisition time to update the hardware PWM.

    Just a thought.
    Regards

    Sougata

  5. #5
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sougata View Post
    Hi,

    Excuse me if I am quoting something already mentioned by somebody. I have quickly browsed the thread a may have skipped something. Its sunday and I am back after a long tour. So I am worried about the "Wife" bug to be active any moment!!

    If you sample the audio at 8Khz and continuosly throw the sample out through Hardware PWM you would actually be reducing the bandwidth of the input audio. Sort of a low-pass filter. Couple that with dirty (cheap) filtering and the free quantitizing noise. This may be the sound you are actually looking for.

    You can have a routine detecting when the ADC is receiving no/low signals. Treat them as end of audio and thus trigger your sound fx routine- handsfree.

    Needs some ASM stuff to utilize the conversion and/or acquisition time to update the hardware PWM.

    Just a thought.
    Great suggestions. I was thinking about using a digital pot to bias the amplifier...maybe go from a normal bias to overbias to get the distortion... Dunno if that will work as planned or if it's even a good idea but I am going to play around with it. I'm not quite up to speed on sampling the audio and using PWM to distort it but it sounds doable. Working on trying to find info on SPI now... Seems the manuals don't cover SPI (or I couldn't find anything in the manual about SPI)... I found some stuff in a few forum on the web. I thought it was a standard command but I can't find any of the includes or Defines listed anywhere in the book... Not even in the Proton Plus manual... Hmmmm

  6. #6
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by toofastdave
    Seems the manuals don't cover SPI (or I couldn't find anything in the manual about SPI)... I found some stuff in a few forum on the web. I thought it was a standard command but I can't find any of the includes or Defines listed anywhere in the book... Not even in the Proton Plus manual... Hmmmm
    See M25P32 PIC Audio **warning, other compiler**
    Includes hardware SPI routines.

    Norm

  7. #7
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default All you need is an ASM interrupt.

    Hi,

    If you use an 8 MHz crystal as your oscillator and let your timer0 run free it would interrupt @ 7.8Khz (Thanks to MisterE for the PIC multicalc utility). Enable timer0 interrupt. In the interrupt routine you don't need to reload timer0 as it already rolls over. This assures a solid timebase interrupting at fixed intervals. On the interrupt set the Go/Done bit of your ADC. Use the ADC in 8 bit mode. When the conversion is done. Simply dump the ADRESH value to the PWM duty register. All this happens in the interrupt routine. Let the AD module run continuosly so that sampling (acquisition) actually occurs when you are outside the interrupt. This should be quite simple to achieve. You get enough time outside the ISR to decide whether the ADC is sampling 0 or say 127 (when you are DC offsetting the Audio that gives you a 0 for the most negative peak, and 255 for most positive sort of pseudo signed ADC you loose resolution again, distort more).
    Regards

    Sougata

  8. #8
    Join Date
    Jun 2006
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Normnet View Post
    See M25P32 PIC Audio **warning, other compiler**
    Includes hardware SPI routines.

    Norm
    Norm,
    Great project. I think I read about it last week when I was searching for PIC Audio Projects. Thanks for the link and the additional info. Where did you originally get the info for the SPI harware routines if they aren't in the PBP or Proton Manual?? Does RealBasic cover it in their manual?

Similar Threads

  1. Replies: 33
    Last Post: - 8th September 2010, 11:28
  2. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  3. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  4. Audio Encoding and playback in a PIC
    By Rob in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 24th March 2005, 08:56
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23: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