Documente Academic
Documente Profesional
Documente Cultură
/////////////////////////////////////////////////////////////////////////
//// EX_WAKUP.C ////
//// ////
//// This example shows how to use the sleep function. When the ////
//// button is pushed, the processor goes into sleep mode. When ////
//// the button is released, the processor wakes up and continues ////
//// counting. ////
//// ////
//// Configure the CCS prototype card as follows: ////
//// Jumper from pin 40 to 47. ////
//// See additional connections below. ////
//// ////
//// This example will work with the PCM and PCH compilers. The ////
//// following conditional compilation lines are used to include a ////
//// valid device for each compiler. Change the device, clock and ////
//// RS232 pins for your hardware if needed. ////
/////////////////////////////////////////////////////////////////////////
//// (C) Copyright 1996,2003 Custom Computer Services ////
//// This source code may only be used by licensed users of the CCS ////
//// C compiler. This source code may only be distributed to other ////
//// licensed users of the CCS C compiler. No other use, ////
//// reproduction or distribution is permitted without written ////
//// permission. Derivative programs created using this software ////
//// in object code form are not restricted in any way. ////
/////////////////////////////////////////////////////////////////////////
#if defined(__PCM__)
#include <16F877.h>
#fuses HS,WDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9200, xmit=PIN_C6, rcv=PIN_C7) // Jumpers: 8 to 11, 7 to 12
#elif defined(__PCH__)
#include <18F452.h>
#fuses HS,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9200, xmit=PIN_C6, rcv=PIN_C7) // Jumpers: 8 to 11, 7 to 12
#endif
https://class.ee.washington.edu/475/peckol/code/PIC/Examples/EX_WAKUP.C 1/2
12/30/2017 https://class.ee.washington.edu/475/peckol/code/PIC/Examples/EX_WAKUP.C
printf("\n\n");
https://class.ee.washington.edu/475/peckol/code/PIC/Examples/EX_WAKUP.C 2/2