Free samples και τελωνείο

Κομπλέ. Άρα το DSD1794A δεν σου κάνει!!!!!!

Τώρα το κοίταζα page 19 του datasheet http://www.ti.com/lit/ds/sles116a/sles116a.pdf

The DSD1794A has 7 bits for its own slave address. The
first five bits (MSBs) of the slave address are factory preset
to 10011. The next two bits of the address byte are the device select bits which can be user-defined by the ADR1
and ADR0 terminals. A maximum of four DSD1794As can be connected on the same bus at one time. Each
DSD1794A responds when it receives its own slave address.
 
Αναφέρει ότι μπορουν να δωθούν 4 διαφορετικές ταυτότητες , πάλι μπορεί να λέω μλκιες , παράλληλα τι ζόρι τραβάει το i2c δώσει κοινή εντολή σε 2 registers ?

δεν γινεται ?
 
Αναφέρει ότι μπορουν να δωθούν 4 διαφορετικές ταυτότητες , πάλι μπορεί να λέω μλκιες , παράλληλα τι ζόρι τραβάει το i2c δώσει κοινή εντολή σε 2 registers ?

δεν γινεται ?

Χμμμ… μάλλον σας έχω χάσει στο τι συζητάτε, αλλά ας πιάσω το i2c σε πολλαπλά chip.
Σε πολλαπλά chip, στέλνουμε την εντολή (read / write register) σε κάθε ένα chip/address ξεχωριστά, αφού πρώτα κάνουμε join το bus. Ενώ και τα read/writes γίνονται ατομικά.
Αποσπάσματα κώδικα από hifirduino
#include <Wire.h>


Wire.begin()

void startDac1(){ // Set registers not requiring display info
bitSet(reg10,0); // Set bit zero for reg 10: Mute DACs
writeSabreReg(0x0A,reg10); // Mute DACs. Earliest we can mute the DACs to avoid full vol
setSabreVolume(currAttnu); // Reg 0 to Reg 7 Set volume registers with startup volume level
writeSabreReg(0x0D,0x00); // DAC in-phase
writeSabreReg(0x13,0x00); // DACB anti-phase
writeSabreReg(0x25,0x00); // Use built in filter for stage 1 and stage 2
writeSabreReg(0x0E,reg14); // Reg 14: BuffII input map, trueDiff, normal IIR and Fast rolloff
// Reg 14: except BuffII input map setting, the others will be
// redefined.
/*
The code below may provide some mitigation to the white noise during silence
#ifdef USE80MHZ
writeSabreReg(0x10,0x08); // Reg 16: Turn automute loopback -only to mitigate 352.8KHz noise
writeSabreReg(0x09,0x10); // Reg 9: Set automute time 4x less than default (value is in denom.)
#endif USE80MHZ
*/

#ifdef DUALMONO // DAC registers default to stereo. Set to MONO L/R for dual MONO
bitSet(reg17L,0); // Set for MONO left channel. Right ch variable is already set for MONO
writeSabreLeftReg(0x11,reg17L);
writeSabreRightReg(0x11,reg17R);
#endif DUALMONO

#ifdef TPAPHASE
/* The outputs on each side of each MONO board will be in opposite phase. In order to do this
the phase of the odd dacs are out of phase with the even dacs. Further, buffalo is configured
such that (In dual mono mode) the channel on the DAC which is opposite of the selected channel
carries the same analog signal but in anti-phase (odd dacs are the left channel;
even dacs are the right channel)
See http://hifiduino.wordpress.com/sabre32/ for further explaination
*/
writeSabreLeftReg(0x0D,0x22); // MONO LEFT DACx: odd dacs=in-phase; even dacs=anti-phase
// writeSabreLeftReg(0x13,0x00); // MONO LEFT DACBx: all dacs anti-phase with respect to DACx
writeSabreRightReg(0x0D,0x11); // MONO RIGHT DACx: odd dacs=anti-phase; even dacs=in-phase
// writeSabreRightReg(0x13,0x00); // MONO RIGHT DACBx: all dacs anti-phase with respect to DACx
#endif TPAPHASE
}

….

void writeSabreReg(byte regAddr, byte regVal)
{
Wire.beginTransmission(0x48); //Hard coded to the the Sabre/Buffalo device address
Wire.write(regAddr); // Specifying the address of register
Wire.write(regVal); // Writing the value into the register
Wire.endTransmission();

#ifdef DUALMONO
Wire.beginTransmission(0x49); //Hard coded to the the other Sabre/Buffalo device address
Wire.write(regAddr); // Specifying the address of register
Wire.write(regVal); // Writing the value into the register
Wire.endTransmission();
#endif DUALMONO
}



// Because of register 17 sets MONO/8-channel, different values are written into different chips
void writeSabreLeftReg(byte regAddr, byte regVal)
{
Wire.beginTransmission(0x48); // Hard coded to the the Sabre/Buffalo device address for stereo
// or mono left. For stereo same as writeSabreReg()
Wire.write(regAddr); // Specifying the address of register
Wire.write(regVal); // Writing the value into the register
Wire.endTransmission();
}

#ifdef DUALMONO
void writeSabreRightReg(byte regAddr, byte regVal)
{
Wire.beginTransmission(0x49); //Hard coded to the the Sabre/Buffalo device address
Wire.write(regAddr); // Specifying the address of register
Wire.write(regVal); // Writing the value into the register
Wire.endTransmission();
}
#endif DUALMONO
 
Στο στείλε πιστεύω ότι γίνετε αν δεν ακολουθήσεις το spec, αλλά από ότι κατάλαβα είτε Read είτε Write εντολή το chip στέλνει πίσω το περιεχόμενο της register οπότε εκεί σίγουρα θα γίνεται χαμός και μπέρδεμα.
Με το SPI το αποφεύγεις αν δεν συνδέσεις καθόλου το MISO pin αν δεν σε ενδιαφέρει να διαβάζεις τις registers. Αν θες να διαβάζεις τα registers απλά προσθέτεις ένα Pin ανά chip για το Slave Select Pin.

Το μόνο θετικό του I2C είναι ότι το Amanero φαίνεται να το υποστηρίζει απευθείας οπότε γλιτώνεις τον επιπλέον μcontroller.


Μήπως να κάνουμε καμιά ομαδική τα DSD1792A από Mouser? Αν ψήσω τον VaSiLiS-T μένουν ακόμα 20 chipακια για να συμπληρωθούμε :ADFADF1: !!!!! 13 +ΦΠΑ το ένα βγαίνουν.