| 전자부품 데이터시트 검색엔진 |
|
PIC18F258-E/LSQTP 데이터시트(PDF) 206 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18F258-E/LSQTP 데이터시트(HTML) 206 Page - Microchip Technology |
|
206 / 402 page ![]() PIC18FXX8 DS41159E-page 204 © 2006 Microchip Technology Inc. EXAMPLE 19-1: WIN AND ICODE BITS USAGE IN INTERRUPT SERVICE ROUTINE TO ACCESS TX/RX BUFFERS (CONTINUED) RXB0Interrupt BCF PIR3, RXB0IF ; Clear the interrupt flag GOTO AccessBuffer AccessBuffer ; This is either TX or RX interrupt ; Copy CANCON.ICODE bits to CANSTAT.WIN bits MOVF CANCON, W ; Clear CANCON.WIN bits before copying ; new ones. ANDLW b’11110001’ ; Use previously saved CANCON value to ; make sure same value. MOVWF CANCON ; Copy masked value back to TempCANCON MOVF TempCANSTAT, W ; Retrieve ICODE bits ANDLW b’00001110’ ; Use previously saved CANSTAT value ; to make sure same value. IORWF CANCON ; Copy ICODE bits to WIN bits. ; Copy the result to actual CANCON ; Access current buffer… ; User code ; Restore CANCON.WIN bits MOVF CANCON, W ; Preserve current non WIN bits ANDLW b’11110001’ IORWF TempCANCON, W ; Restore original WIN bits MOVWF CANCON ; Do not need to restore CANSTAT - it is read-only register. ; Return from interrupt or check for another module interrupt source |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |