• AVR Freaks

Hot!PIC 24 and VS1053 Codec

Author
Rafia
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2019/09/06 10:11:48
  • Location: 0
  • Status: offline
2019/09/19 09:02:25 (permalink)
0

PIC 24 and VS1053 Codec

Hi, 
VS1053B has 8 GPIO pins at 33,34,8,9,36,25,11 and 12. All these pins are marked in VS1053 codec. In my micromedia board there are 52 pins connected. My question is how can I find those Codec GPIO pins to assign as I/O pins ?
 
Microcontroller  PIC24EP512GU810
 

Attached Image(s)

#1

6 Replies Related Threads

    hexreader
    Super Member
    • Total Posts : 1036
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/09/19 09:10:49 (permalink)
    0
    Since all 8 VS1053B GPIO pins are shorted together, I would suggest that they are of no use to you.
     
    Forget all about it.

    Experienced Hobbyist
    #2
    Rafia
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2019/09/06 10:11:48
    • Location: 0
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/09/19 09:15:49 (permalink)
    0
    Then, how can I use  any GPIO pin there ? 
    I need two GPIO pin as output of two different frequency of a tone. 
    #3
    hexreader
    Super Member
    • Total Posts : 1036
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/09/19 09:29:17 (permalink)
    0
    Top right of the picture show, 3rd and 4th pins down are marked L and R.
     
    Maybe these will do what you want?
     
    ... or maybe PIC24 PWM outputs RF2, RF4, RF5, RF8 would do the job, if square wave outputs are acceptable.
     
    All depends on what your requirements are ...
    post edited by hexreader - 2019/09/19 09:36:40

    Experienced Hobbyist
    #4
    Rafia
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2019/09/06 10:11:48
    • Location: 0
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/09/19 09:39:43 (permalink)
    0
    Yes, on top there are Left and right. 
    I am doing "Oddball Paradigm" with sound effect. I have to generate a tone with 2 pitch and have to assign to GPIO pins to detect the event timing while I measure my Brain signal with OpenBCI board. See on the attache dpicture. First one is EEG signal and 2 and 3 are two pitch tone. My professor told to use PIC24 to produce that. But I am confused with all  .... 
     
    Rafia

    Attached Image(s)

    #5
    hexreader
    Super Member
    • Total Posts : 1036
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/09/19 09:47:23 (permalink)
    0
    Way beyond my level of expertise.
     
    Would not know where to start.
     
    Good luck

    Experienced Hobbyist
    #6
    Rafia
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2019/09/06 10:11:48
    • Location: 0
    • Status: offline
    Re: PIC 24 and VS1053 Codec 2019/10/14 13:32:06 (permalink)
    0
     
     
    Hi, 
    I am running this program to assign port RA1 to show pulses/Rectangular wave with respect to the tone generating by Codec VS1053. But not generating the appropriate wave. 
    This "testMP3Sine(0x45);" tone is generationg and I want to see the tone by periodic. 
    PORTAbits.RA1 = 1;
    MP3_DCS_Disable();
    PORTAbits.RA1 = 0;
     What is my fault ? 
     
    ---------------------------------------------
    void testMP3Sine( BYTE n)
    {

    TRISAbits.TRISA1 = 0;
    // Send a Sine Test Header to Data port
    MP3_DCS_Enable(); // enable data interface

    writeMP3( 0x53); // special Sine Test Sequence
    writeMP3( 0xef);
    writeMP3( 0x6e);
    writeMP3( n); // n, Fsin = Fsamp[n>>5] * (n & 0x1f) / 128
    writeMP3( 0x00); // where Fsamp[x] = {44100,48000,32000,22050,
    writeMP3( 0x00); // 24000,16000,11025,12000}
    writeMP3( 0x00); // for example n = 0x44 -> 1KHz
    writeMP3( 0x00);
    [<font]PORTAbits.RA1 = 1;
    [<font]MP3_DCS_Disable();
    [<font]PORTAbits.RA1 = 0;
    DelayMs( 50); // continue sinusoid for 500ms

    // Stop the sine test
    MP3_DCS_Enable(); // enable data bus

    writeMP3( 0x45); // special Sine Test termination sequence
    writeMP3( 0x78);
    writeMP3( 0x69);
    writeMP3( 0x74);
    writeMP3( 0x00);
    writeMP3( 0x00);
    writeMP3( 0x00);
    writeMP3( 0x00);

    MP3_DCS_Disable();

    DelayMs( 50);


    } // SineTest

    void main(void)
    {
    uMBInit();

    while(1)
    {
    MP3Init(MP3_MODE_TEST);
    [<font]testMP3Sine(0x45);
    //DelayMs( 200);
    }
    }
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5