|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| Digital Line Level DACs, Digital Crossovers, Equalizers, etc. |
|
Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving |
|
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
diyAudio Member
Join Date: Mar 2011
|
Hey Folks,
I'm having trouble in Interfacing a CS8406 from my XMOS Controller using the Software Interface in SPI Mode. If i read the datasheed correct, there has to be a high->low transition after the device is let ouf of reset. Well I'm doing that... my init code looks like this: Code:
set_port32A(11); // OsziTrigger CS_DAC2
clear_port32A(6); // !Reset CS8416
clear_port32A(1); // !Reset CS8406
set_port32A(12); // ChipS CS8406
delay_ms(1);
set_port32A(1); // Reset CS8406
delay_ms(1);
clear_port32A(12); // !ChipS CS8406
set_port32A(10); // SCLK
delay_ms(1);
set_port32A(12); // ChipS CS8406
set_port32A(9); // MOSI
Code:
spivar=0x20;
clear_port32A(12); //CS low
spi_byte_transmit(spivar); //Transmit MSB First
spivar = 0x7F;
spi_byte_transmit(spivar);
set_port32A(12); //CS high
delay_us(50);
spivar=0x21;
clear_port32A(12);
spi_byte_transmit(spivar);
spi_byte_transmit(0xFF); //dummy transmit to check a reacton on oszi
set_port32A(12);
I checked the spi signals with my Agilent Scope and LA and it just looks like its described in the datasheet of the chip. Is there any known issue about these Chips? Or is my Code simply wrong? Thanks for your help, Greetings, Manuel |
|
|
|
#2 |
|
diyAudio Member
Join Date: Apr 2010
Location: Sydney
|
Did you tie pin H/S\ to GND to select software mode?
|
|
|
|
#3 |
|
diyAudio Member
Join Date: Mar 2011
|
Hello chaparK,
the H/S Pin is tied to GND. Here is the complete schematic of the CS8406: ![]() Uploaded with ImageShack.us |
|
|
|
#4 |
|
diyAudio Member
Join Date: Apr 2010
Location: Sydney
|
I can't see anything wrong in your schematic.
Just a thought: I saw in your code that you're using a CS8416 as well in the same project. Do you have a working SPI with that chip? |
|
|
|
#5 |
|
diyAudio Member
Join Date: Mar 2011
|
On the CS8416 there's another problem it seems like it's stuck in hardware mode. The Pullup on the SDOUT line is present but seems to have no effect.
When i release the chip from reset on my SPI lines there signals can't get down to 0V about 1V is present if there should be a low, so i guess it's in hardware mode. And there is no answer either. I could make some scope fotos of this but atm i'm running my usb streaming software on the xmos controller. Tomorrow there will be some time again for testing with the cs8406/16 chips. They make a lot of trouble |
|
|
|
#6 |
|
diyAudio Member
Join Date: Apr 2010
Location: Sydney
|
If you have floating levels on some pins, it's maybe a sign that your chips were not reset properly.
To make sure you have a nice reset: - first pull high the reset pin - then pull it down and wait a while. 1 ms as in your code is fine. - pull the reset pin up again to start the device I can not see from your code what's the initial state of the reset pin (the code starts with 'clear_port' but the pin was maybe already low). I finished not later than last week to test a prototype with a CS8416 - unfortunately in hardware mode - and it works really fine. However i had initially some resetting issue and noticed also some strange level on pin 14 which is NV/NERR in hardware mode. Hope this helps |
|
|
|
#7 |
|
diyAudio Member
Join Date: Mar 2011
|
Playing with the reset pin didn't solve the problem
![]() here are 2 scope pictures of my interfacing yellow trace: Reset green trace: CS D0: CLK D1: MOSI D2: MISO D4 Oszi Trigger signal ![]() ![]() It's funny the usb streaming part works fine, thought i would have problems there and now it's those cs chips that are making trouble... |
|
|
|
#8 |
|
diyAudio Member
Join Date: Mar 2011
|
Well now the CS8406 is working fine :-)
replacing R35 with a 0R Resistor solved the problem, don't understand why but i'm happy it works now... |
|
|
|
#9 |
|
diyAudio Member
Join Date: Apr 2010
Location: Sydney
|
That's good news mstro!
Indeed the datasheet specifies that that pin should be tied to VL or GND if the chip is in SPI mode. What was your idea behind the 47k resistor? Anyway, you just need to solve your last issue with the cousin 8416, and then i hope you'll give us a quick chat about the xmos stuff |
|
|
|
#10 |
|
diyAudio Member
Join Date: Mar 2011
|
unfortunately i'm going on holiday for 3 days so there is no time for testing with the cs8416 till monday/tuesday but i can give you a short introduction about the xmos part of this project.
The whole project is an xmos based usb audio streaming application for the moment with s/pdif transmitter/receiver. The streaming part is based on the xmos usb audio 2.0 reference design for 2 input and 2 output channels with up to 192kHz/24Bit. I'm running it in difference to the ref design with a 400Mhz XS1 Device. There are some customer wishes on the board, don't think i'm allowed to talk about them. The xmos platform gives great possibilities. It takes some time to learn this special xc language for programming them in an efficient way. But now i'm loving these processors
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Schemo for a SPI 230G AT psu | N-Channel | Power Supplies | 4 | 7th March 2008 01:07 PM |
| CS8416 and CS8406 | flippo | Group Buys | 5 | 5th January 2007 06:15 PM |
| CS8416+CS8406 U bit data problem | pkaszas | Digital Source | 0 | 17th April 2006 02:33 PM |
| Cs8406 | mcs | Digital Source | 0 | 11th November 2004 03:05 AM |
| cxa1244 SPI | padamiecki | Parts | 0 | 29th March 2004 04:58 AM |
| New To Site? | Need Help? |
| Page generated in 0.10765 seconds (82.00% PHP - 18.00% MySQL) with 10 queries |