vangalvin
Member
Still waiting for my audio adapter to arrive, Shipping down to this part of the planet is a little slow so it looks like its still about 3 weeks away.
In the interim I have hooked up a Calted SD card adapter and that seems to be working well and wired in the 23LC1024 however before using it I wanted to check to see if the 23LC1024 was actually working before setting up the delayEXT.
The CF is working a treat however I do not seem to be able to initialise the 23LC1024.
All I am getting is Unable to access SPI Flash chip.
Wiring is prety simple
23LC1024
Pin1 - 10K resistor from to 3.3v (CS)
Pin2 - Teensy pin 7 (MOSI)
Pin3 - 3.3V
Pin4 - gnd
Pin5 - Teensy pin 12 (MISO)
Pin6 - Teensy pin 14 (SCK)
Pin7 - 3.3v
Pin8 - 3.3v
The code.
In the interim I have hooked up a Calted SD card adapter and that seems to be working well and wired in the 23LC1024 however before using it I wanted to check to see if the 23LC1024 was actually working before setting up the delayEXT.
The CF is working a treat however I do not seem to be able to initialise the 23LC1024.
All I am getting is Unable to access SPI Flash chip.
Wiring is prety simple
23LC1024
Pin1 - 10K resistor from to 3.3v (CS)
Pin2 - Teensy pin 7 (MOSI)
Pin3 - 3.3V
Pin4 - gnd
Pin5 - Teensy pin 12 (MISO)
Pin6 - Teensy pin 14 (SCK)
Pin7 - 3.3v
Pin8 - 3.3v
The code.
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
#define SDCARD_CS_PIN 10 // CS on Caltex Card
#define SDCARD_MOSI_PIN 7 //MOSI on Caltex Card
#define SDCARD_MISO_PIN 12 //MISO on Caltex Card
#define SDCARD_SCK_PIN 14 //SCK on caltex card
#define SPIRAM_CS_PIN 6 //23LC1024 pin 1
#define SPIRAM_MOSI_PIN 7 //23LC1024 pin 5
#define SPIRAM_MISO_PIN 12 //23LC1024 pin 2
#define SPIRAM_SCK_PIN 14 //23LC1024 pin 6
void setup() {
Serial.begin(115200);
AudioMemory(20);
Sd2Card card;
boolean status;
// Configure SPI
SPI.setMOSI(SDCARD_MOSI_PIN);
SPI.setSCK(SDCARD_SCK_PIN);
SPI.setMISO(SDCARD_MISO_PIN);
// Now open the SD card normally
status = SD.begin(SDCARD_CS_PIN);
if (status) {
Serial.println(F("SD library is able to access the filesystem"));
} else {
Serial.println(F("SD library can not access the filesystem!"));
}
// First, detect the card
status = card.init(SPI_FULL_SPEED, SDCARD_CS_PIN);
if (status) {
Serial.println("SD card is connected :-)");
} else {
Serial.println("SD card is not connected or unusable :-(");
return;
}
if (!SerialFlash.begin(SPIRAM_CS_PIN)) {
while (1) {
Serial.println("Unable to access SPI Flash chip");
delay(1000);
}
}
}
void loop() {
}