CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

P18 and VS1002D mp3 decoder

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
electrogen



Joined: 24 Feb 2009
Posts: 15
Location: Addis

View user's profile Send private message

P18 and VS1002D mp3 decoder
PostPosted: Wed Mar 18, 2009 1:21 am     Reply with quote

While I'm trying to make a hard reset to the VS1002d,
it never raise its DREQ line so that I may feed it with mp3 data and all the program stuck there. Here is my code
Code:

/* PIC18F458 running at 20MHz
    xreset ->pic pin C1  o/p--->VS reset
    xdreq<--pic pin A4   i/p----<VS DREQ
    xcs    -->pic pin E2   o/p--->VS xCS
    xdcs  -->pic pin A5   o/p--->VS xDCS


void resetvs_hard(void)
 {
  output_high(xcs);output_high(xdcs);
  delay_ms(500);
  do
   {
    output_low(xreset);                  //hard reset
    delay_cycles(250);
    output_high(xreset);
    delay_cycles(650);
    delay_cycles(600);
    vs_command(0x02,0x00,0x00,0x04);     //sets new mode (native SCI mode) and reset bit
     delay_ms(100);
   }while(!input(xdreq));                //stuck here(xdreq is always down)
   delay_ms(1);
   vs_command(0x02,0x00,0x08,0x00);      //go into new mode (native SCI mode)
   delay_ms(1);
   vs_command(0x02,0x03,0x30,0xD4);      //clock =25MHz
   delay_ms(1);
   vs_command(0x02,0x0B,volume,volume);  //set volume
   delay_ms(1);
 }

and also draws much current (800mA) when it performs this function. What possibly be wrong with it?

FYI: the MP3 is one feature in my system; everything else is working fine
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group