Fabio Kuntze
Member
I noticed that on slim (> = 75x) joystick always dead on port 2, with or without Micro SD, only with the adapter connected.
This is because ACK pin always LOW
DATA send PS2 to MC, ACK = LOW.
DATA send MC to PS2, ACK = HIGH.
It seems to me that the Memory card works with SPI protocol similar to Joystick, I'm still not sure if we can fix it via software or hardware.
I recently wrote a code to emulate DS2 with the microcontroller stm32f103, we could use it as a reference.
uint8_t SPI_SlaveReceive(uint8_t outData, uint8_t doACK)
{
uint8_t inData = 0;//clear the status bit if it is pending
TxBuffer[0] = outData;
digitalWrite(ackPin, HIGH);
SPI.transferSlave(RxBuffer, TxBuffer, sizeof(TxBuffer));
if (doACK)
{
delayMicroseconds(20);
digitalWrite(ackPin, LOW); //ack gets pulled back high at the beginning of next call
}
This is because ACK pin always LOW
DATA send PS2 to MC, ACK = LOW.
DATA send MC to PS2, ACK = HIGH.
It seems to me that the Memory card works with SPI protocol similar to Joystick, I'm still not sure if we can fix it via software or hardware.
I recently wrote a code to emulate DS2 with the microcontroller stm32f103, we could use it as a reference.
uint8_t SPI_SlaveReceive(uint8_t outData, uint8_t doACK)
{
uint8_t inData = 0;//clear the status bit if it is pending
TxBuffer[0] = outData;
digitalWrite(ackPin, HIGH);
SPI.transferSlave(RxBuffer, TxBuffer, sizeof(TxBuffer));
if (doACK)
{
delayMicroseconds(20);
digitalWrite(ackPin, LOW); //ack gets pulled back high at the beginning of next call
}





