I am a little new to programming spi and need help with a tiny 416. I am trying to talk to a slave 25r3911b from STMicroelectronics. I am using the below function to send a task to the slave. Basically read the operation control register.
It is giving the expected output on the MOSI of 0x42. The problem is the chip select is going high on the SS.
Code:
void Read25r3911b (uint8_t commandaddress)
{ uint8_t data;
uint8_t TEMP;
TEMP=commandaddress;
PORTC_set_pin_level(3,low);
SPI_0_write_block(&TEMP,1);
PORTC_set_pin_level(3,high);
// SPI_0_read_block(&TEMP,1);
}
Attachments
Last edited by a moderator: