| Electronic Components Datasheet Search |
|
AN1445 Datasheet(PDF) 3 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1445 Datasheet(HTML) 3 Page - STMicroelectronics |
|
3 / 7 page ![]() 3/7 USING THE ST7 SPI TO EMULATE A 16-BIT SLAVE Figure 4. Disassembled interrupt routine code where: typedef unsigned char u8; /* unsigned 8 bit type definition */ typedef signed char s8; /* signed 8 bit type definition */ typedef unsigned int u16; / * unsigned 16 bit type definition */ typedef signed int s16; /* signed 16 bit type definition */ typedef unsigned long u32; / * unsigned 32 bit type definition */ typedef signed long s32; / * signed 32 bit type definition */ typedef union { /* unsigned 16 bit type for 8 & 16 */ u16 w_form; /* bit accesses: 16> var.w_form */ struct { /* 8> var.b_form.high/low */ u8 high, low; } b_form; } TwoBytes; Note: On some devices, another flag called OVR (overrun) can also cause an SPI interrupt to occur. In this case, you will have to add some code to the interrupt routine to handle this. _SPI_Interrupt: btjf _SPISR,#7,L501 ld a,_SPIDR ld _SPI_Interrupt$L-1,a L311: btjt _SPISR,#7,L311 ld a,_SPIDR ld _SPI_Interrupt$L-2,a iret L501: ld a,#196 ld _SPICR,a iret |
|
|
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 |