| Electronic Components Datasheet Search |
|
LS7366R Datasheet(PDF) 17 Page - LSI Computer Systems |
|
|
|||||||||||||||||||||||||||||
LS7366R Datasheet(HTML) 17 Page - LSI Computer Systems |
|
17 / 17 page ![]() { }; spi_data = SPDR; // Reset SPIF /*additional bytes can be sent here for multibyte write, e.g., write_DTR*/ Slave_Select_High; // Switch SS/ high for end of command } void singleByteRead(unsigned char op_code) //single byte read command { unsigned char spi_data; Slave_Select_High; // deselect the the LS7366 Slave_Select_Low; // Switch SS/ low for new command SPDR = op_code; // send op_code for read to LS7366 while (!(SPSR & (1<<SPIF))) // Wait for end of transmission { }; spi_data = SPDR; // Reset SPIF SPDR = 0xFF; // Start dummy transmission to read data from LS7366 while (!(SPSR & (1<<SPIF))) // Wait for end of the transmission { }; spi_data = SPDR; // Reset SPIF /*additional bytes can be received here for multibyte read, e.g., read_OTR*/ Slave_Select_High; // Switch SS/ high for end of command return spi_data; } //following example instantiates all macros defined above int main(void) { init_spi_master; load_rst_reg(CLR_CNTR); singleByteWrite(WRITE_MDR0, QUADRX4|FREE_RUN|INDX_LOADC|SYNCH_INDX|FILTER_2); singleByteWrite(WRITE_MDR1, IDX_FLAG|CMP_FLAG|BYTE_2|EN_CNTR); singleByteRead(READ_MDR0); singleByteRead(READ_MDR1); return 0; } 7366R-080511-17 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |