Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

Re: is usb connected (the software method)

$
0
0
Still trying to figure this out. I tried using this piece of code:

PCMSK0 |= (1 << PCINT0);
PCICR |= (1 << PCIE0);

ISR(PCINT0_vect)
{
   usbConnected = 1;
}


I am using PCINT0 = D-: is it the right way?

Viewing all articles
Browse latest Browse all 4524