An audio example for dsPIC30f6014

Status
Not open for further replies.

BIxi

Newbie level 4
Newbie level 4
Joined
Jan 28, 2005
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
48
Hi guys!!!
I am working with the development board of the dsPIC30f6014.
I have the information about the registers, but I don´t know how can I know the meaning of this instructions:

while (!DCISTATbits.TMPTY); /* wait until TXBUF0 and TXBUF1 have been
moved to their shadow registers for
transmission */
TXBUF0 = 0x7FFF;
TXBUF1 = 0x2300;


Someone told me that
TXBUF0 = 0x7FFF; means that; it tells to the codec to be ready because the information is going to receive is not an audio information...
The information is going to receive is an initialization information...

(How can the programer know that giving TXBUF0 0x7FFF value means this information???)


TXBUF1 = 0x2300; How can I know what is the meaning of this numbers for the codec???


Someone can help me.........
 


What development board are you using? What is the CODEC are you using? :)

If you are using dsPICDEM board, Si3000 datasheet (CODEC onboard) is included in the CD. You will find "meaning of this numbers" there ;)
 

What development board are you using? What is the CODEC are you using?
I am using dsPICDEM board.
And the codec is si3000.
But in the datasheet I have it doesn´t say the meaning of this registers...

si3000.pdf this is the datasheet I am using.

Can someone tell me where can I find a more complet datasheet?

regards
 

There is no "more complet datasheet", you just need to look between the lines :)

So... from the actual datasheet:


You must realize that when you send audio data with bit0=1, it tells si3000 that the next word you send is the secondary frame data. In your example:

TXBUF0 = 0x7FFF;
TXBUF1 = 0x2300;

0x7FFF has bit0=1, means 0x2300 is a "control word"


Pay attention to this page from datasheet:


As always... see datasheet for more details about registers.


HTH,
Admir.
 

thank you admir
but

what´s the meaning of 0x2300 is a "control word" ?

why this control word and not other?
 

You are new to datasheets, eh?

If you wish to write to CODEC, then you need to write 16 bits this way (see attached picture from datasheet):

D0..7: data to write
D8..D12: address of the CODEC register to write
D13: read/-write bit (=0 for write operation)
D14..D15: reserved (=0)

So, for example if I want to write value 0x18 to register 1, I send:
(in binary) 0000 0001 0001 1000 or in HEX: 0x0118.

OK, now, what is 0x0118 and how do I know what it does? After consulting datasheet you will find that it sets bits SPD, LPD, and reset bits HPD, MPD, CPD. Description for SPD tells me that it will power line driver, and speaker driver in CODEC.

what´s the meaning of 0x2300

It reads register 3.


Bottom line: you have to construct the "control word" from bits described in datasheet.


Regards,
Admir.
 

Status
Not open for further replies.

Similar threads