MISO pin conflict

Status
Not open for further replies.

opauly

Member
Hello,

I am working with wireless audio transmission between 2 Teensy 3.6 both using the Audioboard SGTL5000 for audio input in the Tx and output in the Rx. I am using this pinout:

MOSI pin 7
MISO pin 12
SCK pin 14
CE pin 28
CS pin 39

However, we are having many conflicts regarding MISO pin. The code is getting stuck when it is connected, and when we unwire it, the code seems to work. We have tried with all the alternate pins but still no solution. We are using these libraries:

#include <Audio.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Arduino.h>

Do you have any idea of what could be the solution?
 
Hello John. Thanks for the reply! I put 10K pull-up resistors on the CS line but it is still not working. I moved CS from pin 39 to pin 15. Still if I disconnect MISO pin, the code seems to work but if I reconnect it, the execution stops.
 
Doing the 2-resistor MISO test, the results we got were these:

When CS is LOW (active), MISO was 1.5V
When CS is HIGH (disconnected from nRF module), MISO was 1.65V

These results seem to be weird since MISO is never Vcc (3.3V) or GND (0V).
 
Just a sanity check... you used 10K resistors, right?

If somehow much lower resistance was used in this test, then 1.5V would make sense, if the MISO driver was trying to drive an output, but couldn't overcome such a strong drive from the resistors.
 
Yes, 2 10k resistors in a voltage divider. Do you know any basic SPI code we can test with the nRF20L01 so we can make sure it is a software issue and not a hardware one?
 
Just remove the Teensy completely and use a switch or wire to connect CS high or low.

If the chip drives MISO when CS is high, that's a hardware issue. It has nothing to do with Teensy or any software. You can do this test without the Teensy connected at all. You only need those 2 resistors and a way to control the CS signal.
 
Well, doing this test you suggested, it seems the nRF module is working fine.

CS: High -> MISO: 1.65v
CS: Low -> MISO: 0.1v
 
Start adding stuff and redo the test, until you discover which thing is preventing MISO from working as it should. Maybe first add Teensy, but have it run a do-nothing program so all its pins are floating.
 
I think the issue was that we were trying to declare a variable too big inside the update function, so the program was crashing. It seems to be working now. Thanks!
 
Status
Not open for further replies.
Back
Top