Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

PIC24FJ Sleeping for duration controlled by software

$
0
0
Hi. I'm in the process of converting on of my projects from a PIC16F18323 to a PIC24FJ64GA705 and some functionality seems to have dropped out. Whereas for the PIC16F I could control the sleep period like so...
Code (Text):
  1.  
  2.         if(armStage==INIT)
  3.             WDTCONbits.WDTPS   = 0b10000;  // if we've just turned on the MOTIONMODULE, sleep for 1 minute
  4.         else if(isAlerting)
  5.             WDTCONbits.WDTPS   = 0b01000; // try again quickly
  6.         else
  7.             WDTCONbits.WDTPS   =...
PIC24FJ Sleeping for duration controlled by software

Viewing all articles
Browse latest Browse all 4923

Trending Articles