Linein Not Working , am i set registers right?

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
navidrct
Senior User
Posts: 23
Joined: Mon 2017-07-03 23:48

Linein Not Working , am i set registers right?

Post by navidrct » Wed 2017-12-27 13:52

hi
this is my line in circuit
1.png
1.png (37.59 KiB) Viewed 1034 times

and this is my output of this circuit when i play music
photo_2017-12-27_15-16-50.jpg
photo_2017-12-27_15-16-50.jpg (139.7 KiB) Viewed 1034 times
and this is my setting of registers

Code: Select all

WriteSci(SCI_MODE,(SM_RESET)|(SM_SDINEW)|(SM_LINE_IN) |(SM_ADPCM)|(SM_STREAM));
but there is no output on vs1003B

what is wrong?
Is input OK?
Is Registers OK?
is input register ok?
what should i add or change?
thanks

User avatar
pasi
VLSI Staff
Posts: 1503
Joined: Thu 2010-07-15 16:04

Re: Linein Not Working , am i set registers right?

Post by pasi » Tue 2018-01-02 16:41

Do you mean there is no output from the analog outputs or no data is coming through HDAT1/HDAT0?

Does the LINE pin bias to 1.2V when you write to SCI_MODE?

Do not set SM_STREAM. You can try this:
0x4000 -> CLOCKF
0x000c -> AICTRL0
0x0000 -> AICTRL1
Start encoding mode.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

navidrct
Senior User
Posts: 23
Joined: Mon 2017-07-03 23:48

Re: Linein Not Working , am i set registers right?

Post by navidrct » Thu 2018-01-04 7:28

pasi wrote:
Tue 2018-01-02 16:41
Do you mean there is no output from the analog outputs or no data is coming through HDAT1/HDAT0?

Does the LINE pin bias to 1.2V when you write to SCI_MODE?

Do not set SM_STREAM. You can try this:
0x4000 -> CLOCKF
0x000c -> AICTRL0
0x0000 -> AICTRL1
Start encoding mode.
yes, there is no output from analog output.
how should I bias it with 1.2V?all circuitry that I have on line in the pin is the image above that i send in the 1st post

User avatar
pasi
VLSI Staff
Posts: 1503
Joined: Thu 2010-07-15 16:04

Re: Linein Not Working , am i set registers right?

Post by pasi » Thu 2018-01-04 12:33

When the ADC is enabled and the line input selected, the line input pin should bias itself to around the same voltage you see in RCAP.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

navidrct
Senior User
Posts: 23
Joined: Mon 2017-07-03 23:48

Re: Linein Not Working , am i set registers right?

Post by navidrct » Thu 2018-01-04 14:46

where is this RCAP?
this my signal on Line in Pin of VS1003B
IMG_20180104_161257.jpg
IMG_20180104_161257.jpg (2.64 MiB) Viewed 1001 times
you can see it biased with 825 mv

is it good enough?
where is this RCAP?

User avatar
pasi
VLSI Staff
Posts: 1503
Joined: Thu 2010-07-15 16:04

Re: Linein Not Working , am i set registers right?

Post by pasi » Fri 2018-01-05 13:01

What's your AVDD voltage?

RCAP is pin 44.

When you connect your circuit to LINE, how does it look like then?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

navidrct
Senior User
Posts: 23
Joined: Mon 2017-07-03 23:48

Re: Linein Not Working , am i set registers right?

Post by navidrct » Sat 2018-01-06 11:44

when i connect audio to it
photo_2018-01-06_13-04-46.jpg
photo_2018-01-06_13-04-46.jpg (119.93 KiB) Viewed 979 times
its offset is 810mv
offset on RCAP is 1.04V

navidrct
Senior User
Posts: 23
Joined: Mon 2017-07-03 23:48

Re: Linein Not Working , am i set registers right?

Post by navidrct » Sat 2018-01-06 13:15

now it works
when i turn volume up its ok
but when its volume is down it has allot of white noise in the output
what can i do about this white noise?

User avatar
pasi
VLSI Staff
Posts: 1503
Joined: Thu 2010-07-15 16:04

Re: Linein Not Working , am i set registers right?

Post by pasi » Mon 2018-01-08 11:19

You can use fixed gain instead of AGC.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

User avatar
Panu
VLSI Staff
Posts: 2572
Joined: Tue 2010-06-22 13:43

Re: Linein Not Working , am i set registers right?

Post by Panu » Mon 2018-01-08 11:35

what can i do about this white noise?
VS1003 typical SNR is 83 dB at 2.2 volts peak-to-peak input signal. To get good sound, you should have your analog input signal at 2.2 volts peak to peak at normal operating conditions. If your input signal is normally at a lower level, then you may need to amplify the signal using external op-amps.

Also take a look at PCB and ground design guidelines here: viewtopic.php?f=2&t=1101

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply