Page 1 of 1

HIDKeys: usage of PD1

Posted: Fri Jan 17, 2014 2:59 pm
by Ross_ValuSoft
Hi all.

The HIDKeys sample application provides for 17 keys.
The pin assignments include "PD1 debug tx".
The circuit diagram shows PD1 disconnected and yet a portion of the "hardwareInit" function states...

Code: Select all

    
DDRD = 0x07;    /* 0000 0111 bin: all pins input except USB (-> USB reset) */
   j = 0;
   while(--j){     /* USB Reset by device only required on Watchdog Reset */
      i = 0;
      while(--i); /* delay >10ms for USB reset */
   }
    DDRD = 0x02;    /* 0000 0010 bin: remove USB reset condition */


What is the reason for this assignment and treatment of PD1?

Could PD1 be used to expand the 17 keys to 18 keys instead?

Many thanks,

Ross

Re: HIDKeys: usage of PD1

Posted: Sun Jan 19, 2014 11:30 am
by Ross_ValuSoft
Too difficult to answer?

Re: HIDKeys: usage of PD1

Posted: Mon Jan 20, 2014 2:53 am
by blargg
Looking at the tiny schematic on HIDKeys' page, it says PD1 is TX. usbdrv includes optional debugging output over TX. If you don't need it, then I see no reason why it can't be used for an extra key.

Re: HIDKeys: usage of PD1

Posted: Mon Jan 20, 2014 4:00 pm
by Ross_ValuSoft
Many thanks for your reply.

Cheers,

Ross