TbayGeek.ca

New Site Updating soon.

Flowchart
Placeholder Picture

//-----------------------------------------------------------------------------
// DIP SWITCH STATE
//-----------------------------------------------------------------------------
// Determine the state of DIP switches (open or closed)

void DIPState (void){
BYTE bDIP=0;
bDIP=PORTC & 0x30; // mask off for only PORT bits 5 & 6
if(bDIP<<5){
DIPSwitch1=TRUE; // DIP switch 1 is high
}
if(bDIP<<6){
DIPSwitch2=TRUE; // DIP switch 2 is high
}

return;
}
//-----------------------------------------------------------------------------
// END DIP STATE
//-----------------------------------------------------------------------------

References:

  1. Lorem ipsum dolor sit amet, consectetur adipiscing
  2. Suspendisse pulvinar mi at hendrerit gravida libero
  3. Aliquam erat volutpat sed augue semper porta
  4. Interdum et malesuada fames ac ante ipsum
  5. Maecenas scelerisque massa sit amet molestie congue