Page 1 of 1

Throughhole design works, SMD doesnt

Posted: Sat Apr 20, 2013 10:21 pm
by simtr
Hi guys,

I can't seem to figure out why my design works with my through-hole prototype, but not with the fabbed SMD version.

Code: Select all

[10521.468256] usb 1-1.2: new low-speed USB device number 20 using ehci-pci
[10521.482102] hub 1-1:1.0: unable to enumerate USB device on port 2


My setup is pretty similar to this one:
http://codeandlife.com/2012/01/25/avr-a ... al-part-2/

The parts on the through-hole prototype:
ATTINY2313A-PU-ND,IC MCU AVR 2K FLASH 20MHZ 20DIP
10uF Caps (decoupling caps for the attiny=
296-31455-1-ND,IC REG LDO 3.3V .1A TO92
X147-ND,CRYSTAL 12.000393MHZ 18PF THRU
18pf Caps

Parts on the SMD version:
ATTINY2313A-SU-ND IC MCU AVR 2K FLASH 20MHZ 20SOIC
311-1355-1-ND CAP CER 10UF 10V Y5V 0805 (decoupling)
1219-1084-1-ND IC REG LDO 3.3V SOT23-5
300-8549-1-ND CRYSTAL 12.000393MHZ 18PF SMD
22pf Caps

I tried the 18pf th caps on the SMD board, no luck either. A test program on the attiny that just turns a pin high an low every 5 seconds works fine.

I use a 1k5 pullup for D- and a 1M pulldown for D+. A hub in between device and host did not solve the issue.

The fuses are set like this:
lfuse:w:0xef:m
hfuse:w:0xdb:m
efuse:w:0xff:m

Any help would be appriciated!

Re: Throughhole design works, SMD doesnt

Posted: Sun Apr 21, 2013 5:51 pm
by vouvoume
The SMD AVRs have multiple Vcc and GND pins compared to their PDIP counterparts.

Have you ensured to connect them all. Please make sure also to connect AVcc.

If not all of them are connected the device may not work properly with larger clocks!

Best regards,

Re: Throughhole design works, SMD doesnt

Posted: Sun Apr 21, 2013 11:20 pm
by simtr
Thx, but DIP and SOIC seem to have the same pinout

Re: Throughhole design works, SMD doesnt

Posted: Mon Apr 22, 2013 6:21 pm
by simtr
Maybe there is something wrong with my schematic? If I just assemble the USB part of the circuit, it doesn't work either:

Image

Re: Throughhole design works, SMD doesnt

Posted: Mon Apr 22, 2013 11:56 pm
by vouvoume
Vcc is 3V ?
Your firmware is configured to 12MHz and its correct PINS (PD2 and PD3)?

Best regards,

Re: Throughhole design works, SMD doesnt

Posted: Tue Apr 23, 2013 11:18 am
by simtr
VCC is 3.3V, firmware is configured like this:

Code: Select all

#define USB_CFG_IOPORTNAME      D
/* This is the port where the USB bus is connected. When you configure it to
 * "B", the registers PORTB, PINB and DDRB will be used.
 */
#define USB_CFG_DMINUS_BIT      3
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
 * This may be any bit in the port.
 */
#define USB_CFG_DPLUS_BIT       2
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
 * This may be any bit in the port. Please note that D+ must also be connected
 * to interrupt pin INT0! [You can also use other interrupts, see section
 * "Optional MCU Description" below, or you can connect D- to the interrupt, as
 * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
 * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
 * markers every millisecond.]
 */

Re: Throughhole design works, SMD doesnt

Posted: Fri Apr 26, 2013 12:39 am
by vouvoume
Are the fuses configured correctly? (For external full swing crystal?)
Is the crystal connected properly?

Best regards

Re: Throughhole design works, SMD doesnt

Posted: Fri Apr 26, 2013 8:52 am
by simtr
Fuses :
lfuse:w:0xef:m
hfuse:w:0xdb:m
efuse:w:0xff:m