Page 1 of 1

Differences

Posted: Sun Jul 02, 2017 3:08 am
by weaverdr1
I wrote an application based on a DigiSpark Pro (ATtiny167). My problem is it works on my newer systems and not on the older core 2 Duo based ones. In an effort to gain understanding I loaded the DigiSpark HID keyboard example. It just prints “Hello DigiSpark” in a loop. Like my application, it works on the new and fails on the old. So I loaded it on DigiSpark (ATtiny85) and found it worked on all systems. Obviously there are a few configuration differences in usbconfig.h Other then that all the software, including V USB version, is the same. I have observed that the idle state on the ATtiny85 has D- HIGH and D+ LOW while it is the other way round on the ATtiny167. I don’t know about on the wires but just on the board pins so this could be a red hearing. Anyway, as I understand it this idle state indicates bus speed so I thought it could be related. Any suggestions or insights? Thanks.

Re: Differences

Posted: Tue Jul 04, 2017 9:31 am
by declan smith
VUSB works in USB 1 mode as your Tiny85 setup.
Check if your Tiny167 board had pull up resistor at D-

Re: Differences

Posted: Wed Jul 19, 2017 11:28 am
by RecceBrander
The same, VUSB works in USB 1 mode. And yes, the first reason can be Tiny167 board.

Regards,
Intechcore

Re: Differences

Posted: Wed Jul 19, 2017 4:48 pm
by weaverdr1
Pull-ups are there. I found some previously overlooked differences in usbconfig.h that accounted for the D+/D- differences. "Fixing" those, however, did not change the fact the ATtiny85 works on all systems and the ATtiny167 does not. The reason must be in the timing routines, the ATtiny85 uses
usbdrvasm165.inc and the Attiny167 uses usbdrvasm16.inc for timing info out onto the USB bus.