Differences

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
weaverdr1
Posts: 2
Joined: Sun Jul 02, 2017 2:38 am

Differences

Post by weaverdr1 » Sun Jul 02, 2017 3:08 am

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.

declan smith
Rank 1
Rank 1
Posts: 32
Joined: Fri Nov 02, 2012 3:26 pm

Re: Differences

Post by declan smith » Tue Jul 04, 2017 9:31 am

VUSB works in USB 1 mode as your Tiny85 setup.
Check if your Tiny167 board had pull up resistor at D-

RecceBrander
Posts: 1
Joined: Wed Jul 19, 2017 11:12 am
Contact:

Re: Differences

Post by RecceBrander » Wed Jul 19, 2017 11:28 am

The same, VUSB works in USB 1 mode. And yes, the first reason can be Tiny167 board.

Regards,
Intechcore

weaverdr1
Posts: 2
Joined: Sun Jul 02, 2017 2:38 am

Re: Differences

Post by weaverdr1 » Wed Jul 19, 2017 4:48 pm

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.

Post Reply