| Electronic Components Datasheet Search |
|
AN1445 Datasheet(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1445 Datasheet(HTML) 4 Page - STMicroelectronics |
|
4 / 7 page ![]() 4/7 USING THE ST7 SPI TO EMULATE A 16-BIT SLAVE 3 MAXIMUM BAUD RATE The baud rate is limited by the speed of the ST7 SPI hardware, which runs at 2 MHz maximum (for a master @ fCPU = 8 MHz). We can calculate if this baud rate allows enough time for the software to read the data register before the end of the reception of the second byte. The time needed to release the data register is 4 microseconds at 2 MBaud. The time needed by the software consists of: s The interrupt context switching: worst case: 2,75us Firstly, the current instruction must finish: worst case: multiply instruction: 12 cycles = 1,5us @ 8 MHz internal. Secondly the hardware needs 10 cycles = 1,25µs @ 8 MHz in- ternal frequency to save the context before jumping to the interrupt routine. s A read access to the status register: 0,625µs btjf _SPISR,#7,L501 takes 5 cycles = 0,625µs s A read access to the data register: 0,375µs ld a,_SPIDR takes 3 cycles = 0,375µs Figure 5. Data Reception Timing Analysis The time needed by the software is 30 cycles = 3,75us < 4us. bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8 bit 9 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 - SPIF set - Read register = shift register interrupt switching context read SR read DR - Interrupt 4 us (8*500ns) Values at fCPU=8 MHz, Baud rate = 2 MHz 2,75 us 0,625 0,375 |
|
|
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 |