Closed 6Resh6 closed 2 years ago
Do you have a link to the board you bought from Aliexpress?
Can you try to run the i2c_scanner sketch and post the output here? Also, are there external pullup resistors on the i2c lines on your board?
Here is the board
https://a.aliexpress.com/_vY3uRv
Yes there are pullups 6k on the board I'll run the scanner, thank you. Also many I've found the answer to the problem on one forum. I'll update if it'll solve it. Thank you for quick response!
This is scanner results: I2C device found at address 0x34 ! I2C device found at address 0x50 !
This what I've got from my test sketch:
Ok, so the board appears when scanning the bus... 0x34 is the DSP, and 0x50 is the EEPROM. Can you post your code, including the contents of the SigmaDSP_parameters.h file?
Main file:
SigmaDSP_parameters:
The DSP and EEPROM show up when scanning the i2c bus, so there's something with your sketch that prevents the DSP from working properly.
Can you try to comment on the following part in your sketch?
pinMode(WP, OUTPUT);
digitalWrite(WP, HIGH);
delay(1000);
digitalWrite(WP, LOW);
Also, does the EEPROM show up as present (code 0) in your sketch?
Last question, What are you using a sampling rate of 44.1 kHz? It is the internal registers and the external crystal that determines this.
For reference, here is the schematic for an ADAU1701-based design I've made that works perfectly.
The DSP self boots by loading its firmware from the EEPROM, and a microcontroller is adjusting the parameters in the DSP at runtime. (The TPA5050 is irrelevant, it's just there to add programmable audio delay).
Ok I'll change frequency and try again. Both the memory ping and DSP ping response with code 2, not present. The WP output added to control memory write protect pin, according to one forum about my specific DSP module if not to pull it to the ground you cannot write down the program to the memory....
Nothing changed with the 48kHz and also without all the WP output actions. Could the sigmaDSP program version make problems? I'm using 4.7 version. Or may be there is something wrong with EEPROM settings in sigmaDSP, or some parameters in sketch that are responsible for this memory?
This is schematics of a module similar to my AliExpress board (with some small differences) # Looks almost the same like your if I'm right... Only the problem that I have no options to change selfboot move to direct...
I'm very confident I found the issue, and it's 100% my fault.
The 0_Template example lacks a crucial line of code; Wire.begin()
!
The other examples include this line, but not the template for some reason.
Try adding Wire.begin();
before calling dsp.begin and ee.begin and see if you can get it to work now.
Great! It works! Thank you for your help!
Great, have fun!
I've tried to upload my sigmaDSP project to adau1401 AliExpress module in both selfboot and direct (from MCU) boot modes. The library returning that the device doesn't present (code 2). I've made tests on teensy 4.0, the standard wire library didn't work (was returning code 4), then I've tried special library from teensy official webpage, and it's returning something like connection time over with the same code 4. The I've switched to esp8266 using standard wire library and it's still nothing just code 2, device is not present...
Is there any ways to find out what's wrong?
Thank you