17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

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

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

Charges the ultra-low power wake-up capacitor on PIN_A0 for time<br />

microseconds, and then puts the PIC to sleep. The PIC will then wake-up<br />

on an 'Interrupt-on-Change' after the charge on the cap is lost.<br />

Ultra Low Power Wake-Up support on the PIC (example, PIC12F683)<br />

#USE DELAY<br />

while(TRUE)<br />

{<br />

if (input(PIN_A1))<br />

//do something<br />

else<br />

sleep_ulpwu(10); //cap will be charged for 10us,<br />

//then goto sleep<br />

}<br />

None<br />

#USE DELAY<br />

sleep_ulpwu( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

sleep_ulpwu(time)<br />

time specifies how long, in us, to charge the capacitor on the ultra-low<br />

power wakeup pin (by outputting a high on PIN_B0).<br />

undefined<br />

Charges the ultra-low power wake-up capacitor on PIN_B0 for time<br />

microseconds, and then puts the PIC to sleep. The PIC will then wake-up<br />

on an 'Interrupt-on-Change' after the charge on the cap is lost.<br />

Ultra Low Power Wake-Up support on the PIC (example,<br />

PIC124F32KA302)<br />

#USE DELAY<br />

while(TRUE)<br />

{<br />

if (input(PIN_A1))<br />

//do something<br />

else<br />

sleep_ulpwu(10); //cap will be charged for 10us,<br />

//then goto sleep<br />

}<br />

None<br />

#USE DELAY<br />

312

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

Saved successfully!

Ooh no, something went wrong!