2013-11-11

Testing SPI 0,0, 0,1, 0,2, and 0,3 slaveSelect port pin setup notes



testMax7219v0600(SPI_CHANNEL_0, SLAVE_SELECT_0); // SPI 0,0 LED
testMax7219v0601(SPI_CHANNEL_0, SLAVE_SELECT_1); // SPI 0,1 LED
testMax7219v0601(SPI_CHANNEL_0, SLAVE_SELECT_2); // SPI 0,2 LED
testMax7219v0601(SPI_CHANNEL_0, SLAVE_SELECT_3); // SPI 0,3 LED

void spiSetup060(uint8_t spiChannelNumber, uint8_t slaveSelectNumber)
{
...

// *** Setup Ssel0 ***
portPinArray *slaveSelectPortPinArrayPointer;
slaveSelectPortPinArrayPointer = SlaveSelectPortPinArrayPointerArrayArray[spiChannelNumber][slaveSelectNumber];
setupGpioPinOutputLow050(*slaveSelectPortPinArrayPointer);

printf("\n slaveSelectPortPinArray Port = %02d \n", 
               (*slaveSelectPortPinArrayPointer)[PORT_INDEX]);
printf("\n slaveSelectPortPinArray Pin  = %02d \n", 
               (*slaveSelectPortPinArrayPointer)[PIN_INDEX]);

}

*** Testing SPI 0,0, SPI 0,1, SPI 1,0 - 2013nov1101 ***


*** testMax7219V0600 - 2013nov11hk0911 ***

 slaveSelectPortPinArray Port = 00 

 slaveSelectPortPinArray Pin  = 02 
*** End of testMax7219V0600 ***

*** testMax7219V0601 - 2013nov11hk0911 ***

 slaveSelectPortPinArray Port = 00 

 slaveSelectPortPinArray Pin  = 07 
*** End of testMax7219V0601 ***

*** testMax7219V0601 - 2013nov11hk0911 ***

 slaveSelectPortPinArray Port = 00 

 slaveSelectPortPinArray Pin  = 11 
*** End of testMax7219V0601 ***

*** testMax7219V0601 - 2013nov11hk0911 ***

 slaveSelectPortPinArray Port = 02 

 slaveSelectPortPinArray Pin  = 05 
*** End of testMax7219V0601 **


// ***SPI port pin assignments 2013nov10 ***

portPinArray PortPinArraySsel   = {PORT0, PIN2};
portPinArray PortPinArraySsel0  = {PORT0, PIN2};
portPinArray PortPinArraySsel1  = {PORT0, PIN7};
portPinArray PortPinArraySsel2  = {PORT0, PIN11};
portPinArray PortPinArraySsel3  = {PORT2, PIN5};

portPinArray PortPinArraySsel00 = {PORT0, PIN2};  // MagicBlue p110
portPinArray PortPinArraySsel01 = {PORT0, PIN7};  // MagicBlue p123
portPinArray PortPinArraySsel02 = {PORT0, PIN11}; // MagicBlue p208 seems not working
portPinArray PortPinArraySsel03 = {PORT2, PIN5};

//portPinArray PortPinArraySsel02 = {PORT2, PIN5}; // MagicBlue p121
//portPinArray PortPinArraySsel02 = {PORT0, PIN3}; // MagicBlue p121

portPinArray PortPinArraySsel10 = {PORT0, PIN2};
portPinArray PortPinArraySsel11 = {PORT2, PIN0};
portPinArray PortPinArraySsel12 = {PORT2, PIN0};
portPinArray PortPinArraySsel13 = {PORT2, PIN0};

// portPinArray *SlaveSelectPortPinArrayPointerArray0[] = {&PortPinArraySsel00, &PortPinArraySsel01};
// portPinArray *SlaveSelectPortPinArrayPointerArray1[] = {&PortPinArraySsel00, &PortPinArraySsel01};

portPinArray *SlaveSelectPortPinArrayPointerArrayArray[2][4] =
          {&PortPinArraySsel00, &PortPinArraySsel01, &PortPinArraySsel02, &PortPinArraySsel03, \
           &PortPinArraySsel10, &PortPinArraySsel11, &PortPinArraySsel12, &PortPinArraySsel13};

.END



No comments:

Post a Comment