Hi David,
Do you mean you want to connect several KLs via their SPI port? if so, it would be easy to implement. For example, you may connect 10 KLs like the following:
The previous KL's MISO connected with the next KL's MOSI, all the 10 KLs are configured as SPI slave, and their CLKs and CSs are connected with the external master's clk and cs signals. Please note the second KL will wait one data before it fetch the first valid data because the first data are from the previous KLs' shift register, and so on.
Hope that helps,
B.R
Kan
HI, I am very new to Freescale Kinetic microcontrollers. I am working on FRDM-k20d50m development board and trying to develop an application to interface two slaves on this development board. My requirement is to send data to 1st slave and then receive data from the same slave and then to deploy same operation on 2nd slave. If I am using one slave at a time and disconnect the other one then it works fine but if I connect two slaves the at same time I am not receiving any data from slave. The basic code to initiate SPI communication between two slaves is as below:
/* Below block of code reads data from first slave*/
SM1_SelectConfiguration(SPI, ChipSelect, AttributeSet); (WHAT WOULD BE THE SYNTAX IF I WANT TO SELECT CHIP-1; AS OF NOW I AM USING VARIABLE CHIP SELECT_1 =1, TO SELECT CHIP-1)
SM1_SendBlock(SPI, out_data, sizeof (out_data));
SM1_ReceiveBlock(SPI, &in_data, sizeof (in_data));
/* Below block of code reads data from second slave*/
SM1_SelectConfiguration(SPI, ChipSelect_1, AttributeSet_1);
SM1_SendBlock(SPI, out_data, sizeof (out_data));
SM1_ReceiveBlock(SPI, &in_data_1, sizeof (in_data_1));
Please help me to make the communication possible with two slaves at the same time.
I have attached my settings screen shots. PFA.
Hi, David
Sorry, so what is your question on your application?
Best Regards
Paul