| Moteur de recherche de fiches techniques de composants électroniques |
|
AN970 Fiches technique(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN970 Fiches technique(HTML) 6 Page - STMicroelectronics |
|
6 / 10 page ![]() 6/10 SPI COMMUNICATION BETWEEN ST7 AND EEPROM 4 ST7 / EEPROM SPI PROTOCOL The use of the main functions are briefly described below. For a complete description of the protocol, please refer to the M95040 SPI EEPROM data sheet. Write_enable: The memory contains a write enable latch. This latch must be set prior to any WRITE or WRSR operation. Byte_write: This function will write up to 16 bytes of data in the EEPROM. After the WRITE in- struction, the memory address must be specified before sending data. Byte_read: This function reads the memory. After the READ instruction, the memory address is specified. To be able to send the data, the EEPROM must receive the clock from the master: the ST7. This is made by sending a dummy byte. This operation will generate the 8 clock bits needed. The dummy value will not be seen by the EEPROM. Write_SR: Give the proper value to the Status Register prior to any communication. Read_SR: This process is similar to the byte read process. It will be used to check if there is a write in progress (WIP bit of the status register). 5 SPI COMMUNICATION BETWEEN AN ST7 AND AN EEPROM The software included with this application note is only the SPI driver. The complete software can be found in the software library in the ST internet website. It is of course only an example. It is up to the user to adapt it to his specific application. 5.1 GENERAL DESCRIPTION The software is a polling SPI communication between the ST72264 and EEPROM. The first part of the software performs to the initialization of the ST72264 (core and SPI periph- eral) and of the EEPROM (value of status register for no protection). Then it executes the write cycles. The «write_loop» writes in the EEPROM (16 bytes at a time for optimization), the values 0 to 111 from the address 0 up to 111. The third part executes the read cycles. The «read_loop» reads the content of the EEPROM at a time from address 0 up to 111. Finally, the software ends in an infinite loop. |
|
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants 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 |