15.08.2013 Views

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When an interrupt is generated by the MCP2515, the PIC12CE674 reads the CANINTF<br />

register of the MCP2515 to determine the source of the interrupt. If a valid message has been<br />

received, then the MsgRcvd subroutine is executed (See Figure 5.37), and if an error has<br />

occurred, the error handling subroutine is executed (See Figure 5.38).<br />

Timer0 Time-out<br />

Start Conversion on<br />

AN0<br />

Interrupt<br />

Occurred?<br />

Yes<br />

Store AN0 Value into<br />

RAM Variable<br />

Load AN0 Value into<br />

MCP2515 TxMsg<br />

Buffer<br />

Send RTS Command<br />

to MCP2515<br />

Clear Interrupt Flag<br />

Reload Timer0<br />

Re-enable Interrupts<br />

(RETIE Command)<br />

Exit ISR<br />

Figure 5.36 Timer0 Interrupt Service Routine Flowchart [47].<br />

177<br />

No

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!