| Electronic Components Datasheet Search |
|
AN247 Datasheet(PDF) 28 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
AN247 Datasheet(HTML) 28 Page - Microchip Technology |
|
28 / 32 page ![]() AN247 DS00247A-page 28 2003 Microchip Technology Inc. ; ***************************************************************************** ; Function: VOID _CANSendAck() ; VOID _CANSendResponce() ; ; PreCondition:TXB0 must be preloaded with the data. ; Input: None. ; Output: None. ; Side Effects: N/A. ; Stack Requirements: N/A ; Overview: These routines are technically not functions since they will not ; return when called. They have been written in a linear form to ; save space. Thus 'call' and 'return' instructions are not ; included, but rather they are implied. ; ; These routines are used for 'talking back' to the source. The ; _CANSendAck routine sends an empty message to indicate ; acknowledgement of a memory write operation. The ; _CANSendResponce is used to send data back to the source. ; ; ***************************************************************************** #ifdef ALLOW_GET_CMD _CANSendAck: btfss MODE_ACK bra _CANMain clrf TXB0DLC ; Setup for a 0 byte transmission bra _CANSendMessage #endif #ifdef ALLOW_GET_CMD _CANSendResponce: movlw 0x08 ; Setup for 8 byte transmission movwf TXB0DLC _CANSendMessage btfsc TXB0CON,TXREQ ; Wait for the buffer to empty bra $ - 2 movlw CAN_TXB0SIDH ; Set ID movwf TXB0SIDH movlw CAN_TXB0SIDL movwf TXB0SIDL movlw CAN_TXB0EIDH movwf TXB0EIDH movlw CAN_TXB0EIDL movwf TXB0EIDL bsf CANTX_CD_BIT ; Setup the command bit btfss CAN_CD_BIT bcf CANTX_CD_BIT bsf TXB0CON, TXREQ ; Start the transmission bra _CANMain #endif ; ***************************************************************************** END |
|
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 |