DIY编程器网

标题: UsbProg-SHARP [打印本页]

作者: liyf    时间: 2012-1-17 00:07
标题: UsbProg-SHARP
UsbProg-SHARP
A Multi-purpose USB Device


Introduction
This project is an instance of the UsbProg project created by Benedikt Sauter.Bene released the schematics, board layout and firmware as an open-sourceproject.  I took that project and made these modifications:
The addition of JP3 has special considerations.  Place a jumper across JP3 pins1 and 2 to make UsbProg-SHARP exactly compatible with the original UsbProg.
Or, optionally, place a jumper across JP3 pins 2 and 3 so that LED1 iscontrolled by PD7.  This frees up PA4 so that all 8 pins of PORTA can beused.  PORTA is available via CONN3.  When the jumper is in this position,the UsbProg-SHARP board is no longer compatible with stock UsbProg firmwareand requires a special version of the firmware that has yet to be created.
Myself and other members of SHARP are making circuit boards for this projectusing at-home etching techniques.

Status
The board works when connected to a Win32 PC and with an update to the firmware,enumerates on a Macintosh as well!  However, there is still no Mac OS X driver;work shall begin on that soon.
Log:

Schematic

usbprog.sch (161.63 KB, 下载次数: 0)
usbprog.brd (30.8 KB, 下载次数: 0)
usbprog_mirrored.pdf (35.42 KB, 下载次数: 0)
Parts ListThe following table presents the parts list for a single UsbProg-SHARP board:
[td]
Part No.PartPackageDigiKey Part No.VendorQtyPriceSubtot
IC1ATmega3244-TQFPATMEGA32-16AU-NDAtmel18.178.17
IC2USBN960428-SOICUSBN9604-28M-NDNational Semi15.855.85
Q1Crystal 24 MHz (18 pF)HC-49XC702CT-NDECS Inc10.730.73
CONN1USB Mini-B ConnMini-B SMTH2961CT-NDHirose11.391.39
CONN2,3Hdr 2x5 shop elsewhere 2
JP1,2,3Hdr 1x3 shop elsewhere 3
JP4Hdr 1x2 shop elsewhere 1
R1R 1M0805RHM1.00MCCT-ND 10.38/100.04
R5R 100 K0805RHM100KCCT-ND 10.38/100.04
C8,9C 27 pF (xtal load)0805PCC270CGCT-NDPanasonic20.49/100.49
C11C 1 uF (decouple 3.3v)0805399-1172-1-NDKemet11.21/100.12
C1,2,6,10C 100 nF (decouple 5v)0805PCC1828CT-ND 40.62/101.24
R2,3,4R 1.5 K(LED pullup)0805RHM1.50KCCT-ND 30.38/100.04
R6R 10 K0805RHM10.0KCCT-ND 10.38/100.04
LED1,2LED (green)0805404-1021-1-ND 22.51/250.20
Grand Total18.35

Jumpers
This section explains the purposes of the four jumpers on the UsbProg-SHARPand the meanings of the different settings.
Results
The first attempt at etching a board was on 2007/07/22.  This attempt was notsuccessful because the layout transparency was scaled 5% smaller than thenecessary size.  However, the etching technique worked very well and theresulting board looks clean despite the many fine-pitch traces and footprints.We also learned a few things about solder paste and how to use a hot-plateto simultaneously solder many components.
The second attempt at etching took place on 2007/07/28.  With thetransparency at the correct scale, we etched the board (revision 2007/07/26).Again, the etching process produced a fantastic board.  Clean traces withempty spaces in between.  We populated the board using Kester solder pasteand a hot air gun set to 302 degrees C.  The order of the components was asfollows: USB mini-B connector, all 0805 components, crystal, USBN9604and the ATmega32.  The header connectors, jumpers and seven air wires werethen soldered using a solder pencil.
After one night of debugging, the board is able to communicate with anAtmel STK500 and be programmed!  The board is functional.A second day of work and the board is recognized by a Win32 PC andoperates as a clone of AVRISP mkII.
Engineering Notes
Crystal Capacitors
This section explains the choice of capacitors connected to the USBN9604'scrystal resonator circuit.
ECS's CSM-7 series crystals have a load capacitance of 10 pF minimum, 20 pFTypical and "series" as a maximum.
The "rule of thumb" equation is:
Cload = Cxtal^2 / 2*Cxtal + CparasiticFor Cparasitic = 0:
20 = Cxtal^2 / 2*CxtalCxtal = 40 pFFor Cparasitic = 4 pF:
20 = Cxtal^2 / 2*Cxtal + 4Cxtal = 32 pFMeet halfway: Cxtal = 36 pF; Digikey doesn't have 0805 of this rating.Using nearest-valued 0805 instead: Cxtal = 39 pF.

Debugging and avrdude
No connect between IC1 pins 1, 8, 40 and their padsReflowing solder, testing, passes:
cd ~/Code/other/usbprog/avrisp...flash the code:
avrdude -p atmega32 -P /dev/cu.USA19H191P1.1 -c stk500v2 -U flash:w:main.hexCheck the fuses in interactive mode:
avrdude -p atmega32 -P /dev/cu.USA19H191P1.1 -c stk500v2 -tavrdude> dump lfuse>>> dump lfuse0000  e1                                                |.               |avrdude> dump hfuse>>> dump hfuse0000  99                                                |.               |Set new fuse values (still in interactive mode):
avrdude> write hfuse 0 0x89>>> write hfuse 0 0x89avrdude> write lfuse 0 0xe0>>> write lfuse 0 0xe0Verify the changes took (still in interactive mode):
avrdude> dump hfuse>>> dump hfuse0000  89                                                |.               |avrdude> dump lfuse>>> dump lfuse0000  e0                                                |.               |>>> quit







欢迎光临 DIY编程器网 (http://diybcq.com./) Powered by Discuz! X3.2