Hello Issuer,
Is your "receiver" the master or slave device?
Regards,
Mac
for (i = 0; i5; i++){PTM |= 0x40;while(!(SPI0SR & 0x80));switch(i){case 0:port_enable = SPI0DR;port_enable = SPI0DR;break;case 1:display_port = SPI0DR;display_port = SPI0DR;break;case 2:sample_rate = SPI0DR;sample_rate = SPI0DR;break;case 3:module_number = SPI0DR;module_number = SPI0DR;break;case 4:last_flg = SPI0DR;last_flg = SPI0DR;break;default:temp = SPI0DR;temp = SPI0DR;}for (l=0; l200000; l++){PTM &= 0xBF;}}
Message Edited by Alban on 05-09-2006 10:56 AM
Hello Issuer,
For the slave device, the /SS input will need to be driven from the master, or alternatively might be tied permanently active low.
However, if the latter case is used, the setting CPHA = 1 is required (it will not work for CPHA = 0). The settings for both CPHA and CPOL must be identical for master and slave.
Your Port M output would seem unnecessary for the slave end. At the master end, if the /SS pin is configured as /SS input, this should be tied to Vdd. However, if configured as a /SS output, it could be connected to /SS input at the slave.
Regards,
Mac
Message Edited by rhinoceroshead on 05-07-200611:04 PM
Hi issuer,
The first thing I would do is send a smaller array.
If the receivers array is still FULL of the first byte, then you have probably got something like what rhino is describing. At least this should start you down the path to locating the problem.
There has been many threads on this topic recently. Probably a good idea to search them out (8 and 16 bit forums)
Regards Peg