Datasheet
Table Of Contents
- Introduction
- Theory of Operation
- MCP2003 Power-Down Mode and Wake-Up Handling in the Case of LIN Bus Loss
- Corporate Office
- Atlanta
- Boston
- Chicago
- Cleveland
- Fax: 216-447-0643
- Dallas
- Detroit
- Kokomo
- Toronto
- Fax: 852-2401-3431
- Australia - Sydney
- China - Beijing
- China - Shanghai
- India - Bangalore
- Korea - Daegu
- Korea - Seoul
- Singapore
- Taiwan - Taipei
- Fax: 43-7242-2244-393
- Denmark - Copenhagen
- France - Paris
- Germany - Munich
- Italy - Milan
- Spain - Madrid
- UK - Wokingham
- Worldwide Sales and Service
- Trademarks
- Worldwide Sales

TB3067
DS93067A-page 4 © 2011 Microchip Technology Inc.
FIGURE 4: PIC
®
Microcontroller Code Example for Forced Power-Down Mode.
/* design specific */
#define TXPINLATCbits.LATC6
#define CSPINLATCbits.LATC0
/* please refer to data sheet regarding maximum values */
#define WaitTimeTx2CS() Nop(); Nop();Nop(); Nop();
#define WaitTimeCSactive() unsigned char dly; dly = 55; while(--dly);
/**********************************************************************/
/**********************************************************************/
void ForcedSleepMCP200x(void)
{
/* set LATregister of corresponding IOpin for TX -> 0 */
TXPIN = 0;
/* depending if TXEN in TXSTA register allows the use of the
/* corresponding IOpin for TX as a normal IO when TXEN = 0 then set */
/* TXPIN = 0 otherwise reset the whole UART module. Please refer to */
/* controller specific data sheet and review the UART section */
#if defined (TXEN_FREE_IO) /* TX also usable as IO */
TXEN = 0;
#else
RCSTA = 0;
#endif
WaitTimeTx2CS(); /* refer to data sheet */
CSPIN = 1; /* CS = 1 -> transceiver activated but TX = 0 */
WaitTimeCSactive(); /* refer to data sheet */
CSPIN = 0; /* CS = 0 -> transceiver in SLEEP mode */
}
/**********************************************************************/
/**********************************************************************/