PowerSwitch on Tiny2313 - problems

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
_Petya_
Posts: 4
Joined: Tue Mar 15, 2011 4:28 pm

PowerSwitch on Tiny2313 - problems

Post by _Petya_ » Tue Mar 15, 2011 4:39 pm

Hello!

I'm trying to build the powerswitch project on breadboard, but I have problems making it work.

On my breadboard, I have successully built a "1-button keyboard" before, using V-USB, the Zener-diode method, and an ATMEGA16 chip. I have removed the ATMEGA16 and the parts required for the "1-button keyboard" project, leaving the USB part intact, therefore I'm fairly sure that there is no problem with the USB interfacing resistors/zerers/etc.

So, I have installed the tiny2313, made all the connections, connected to ISP, set the fuses according to the supplied Makefile, and flashed the precompiled hex into the chip.

After that, the circuit wouldn't work, I get the "unable to enumerate device" message on the PC.

(Only for curiosity, I have rebulilt the 1-button keyboard using the Atmega16 on the same breadboard, and it works perfectly. Rebuilt the powerswitch, not works)

The only changes to the supplied schematic are the tiny2323 instead of AT90S2313 and the Zener-diode method instead of the 3.5V regulator (LE35CZ).

Could anyone please give me some hints?

regards,
Peter

_frank26080115

Re: PowerSwitch on Tiny2313 - problems

Post by _frank26080115 » Wed Mar 16, 2011 9:54 am

_Petya_ wrote:So, I have installed the tiny2313, made all the connections, connected to ISP, set the fuses according to the supplied Makefile, and flashed the precompiled hex into the chip.


Did you check usbconfig.h?

_Petya_
Posts: 4
Joined: Tue Mar 15, 2011 4:28 pm

Re: PowerSwitch on Tiny2313 - problems

Post by _Petya_ » Thu Mar 17, 2011 12:55 am

_frank26080115 wrote:
_Petya_ wrote:So, I have installed the tiny2313, made all the connections, connected to ISP, set the fuses according to the supplied Makefile, and flashed the precompiled hex into the chip.


Did you check usbconfig.h?


Yes, it is configured properly:

Code: Select all

#define USB_CFG_IOPORTNAME      B
#define USB_CFG_DMINUS_BIT      0
#define USB_CFG_DPLUS_BIT       1


Of course I recompiled the project to make sure this is what is inside the hex, still no success...

regards,
Peter

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: PowerSwitch on Tiny2313 - problems

Post by maxi » Fri Mar 18, 2011 10:02 pm

_Petya_ wrote:The only changes to the supplied schematic are the tiny2323 instead of AT90S2313 and the Zener-diode method instead of the 3.5V regulator (LE35CZ)

Are you using a separate power supply or are you powering the device entirely from USB? Maybe drawing too much current?

_Petya_
Posts: 4
Joined: Tue Mar 15, 2011 4:28 pm

Re: PowerSwitch on Tiny2313 - problems

Post by _Petya_ » Sat Mar 19, 2011 6:55 pm

maxi wrote:
_Petya_ wrote:The only changes to the supplied schematic are the tiny2323 instead of AT90S2313 and the Zener-diode method instead of the 3.5V regulator (LE35CZ)

Are you using a separate power supply or are you powering the device entirely from USB? Maybe drawing too much current?


I' m powering it from USB, but when flashing the AVR, I disconnect USB, connect the same USB cord to my programmer, connect 5V power from my lab power supply, and do the flashing. During, and after flashing, the current limit of my power supply (set to a few hundred milliamps) is not reached. So the circuit is obviously not drawing too much current (> 500 mA) from the USB either.

Anyway, if the current draw would be the problem, I'd get the syslog message about this, (I have seen that kind of message before, but never with this circuit.)

regards,
Peter

Guest

Re: PowerSwitch on Tiny2313 - problems

Post by Guest » Fri May 20, 2011 9:44 pm

Petya, any success? I'd like to replicate the same project - using tiny2313 and zenner diods instead of mega and a stabilizer.
I guess, there are some differences in attiny2313 and that at90s2313, so it wouldn't be that easy, at leas, some time ago I saw an article explaining how to modify the at90s firmware to fit tiny2313.
By the way, what's the url to that project you're trying to do?

fusebox

Re: PowerSwitch on Tiny2313 - problems

Post by fusebox » Tue Aug 23, 2011 5:21 pm

Hi!

I see that 'USB_CFG_DPLUS_BIT' is set to 1...but by default USB_CFG_DPLUS_BIT needs to be an INT0 pin.
So on Attiny2313 it should be in PORT D and PIN 2.
Maybe it helps someone.


_Petya_ wrote:
_frank26080115 wrote:
_Petya_ wrote:So, I have installed the tiny2313, made all the connections, connected to ISP, set the fuses according to the supplied Makefile, and flashed the precompiled hex into the chip.


Did you check usbconfig.h?


Yes, it is configured properly:

Code: Select all

#define USB_CFG_IOPORTNAME      B
#define USB_CFG_DMINUS_BIT      0
#define USB_CFG_DPLUS_BIT       1


Of course I recompiled the project to make sure this is what is inside the hex, still no success...

regards,
Peter

Post Reply