DIY编程器网

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 2903|回复: 0
打印 上一主题 下一主题

UsbProg-SHARP

[复制链接]
跳转到指定楼层
楼主
发表于 2012-1-17 00:07:06 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
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:
  • Changed CONN1 to a type Mini-B receptacle (so it would be surface mount).
  • Changed most parts to have surface mount packages (except jumpers and headers).
  • Added capacitors C1 and C2 for decoupling.
  • Added CONN3 2x5 pin header for Port A (the ADC inputs).
  • Added JP3 jumper header to choose which pin controls LED1.
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:
  • 2007/11/12: I corrected the values for C8,9 to 27 pF in the BOM afterreceiving a review from Steve.  C8,9 still have the wrong value in theschematic.
  • 2007/08/12: Benedikt emailed me a new firmware binary for avrispmk2klonthis morning that allows the UsbProg-SHARP to enumerate on a Mac!By the end of the day, Bene had put the new code in the subversion SCM.
  • 2007/07/30: Fuse settings were changed to be in agreement with thosesuggested here.
  • 2007/07/29: The board communication problems were due to 3 ATmega32 pinsnot making contact with their pads.  Reflowing those pins solved the issue.The board is functional.  Fuses were set so the ATmega32 will use the clockfrom the USBN9604.
  • 2007/07/28: Etched and populated the board rev 2007/07/26.Attempted to flash the ATmega32 via ISP, but niether AvrDude nor AVR Studiocould communicate with the board.  An effort is underway to debug thecommunication problem.
  • 2007/07/26: Changed the 2x5 headers footprints to be thicker(larger annulus).
  • 2007/07/22: Changed the footprint of the two 2x5 Headers to bethrough-hole.  Arty felt that the surface mount headers might peel-offwhen subjected to the forces on a ribbon cable.
  • 2007/07/19: Updated schematics and layout to UsbProg 3.0(per schematic on UsbProg mailing list)

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.
  • JP1: Connects either Vcc or GND to the ATmega32's RESET' pin.Connect JP1 pin 1 and 2 to apply Vcc to the RESET' pin.  This is the defaultsetting and is used for normal operation of the UsbProg.Connect JP1 pin 2 and 3 to apply GND to the RESET' pin.  This settingkeeps the ATmega32 in reset state which is needed to re-flash the ATmega32(a.k.a. Bootloader mode).
  • JP2: This is an output connector for the ATmega32's USART.  You should notapply a jumper to any of these pins.  JP2 pin 1 is GND, pin 2 is RX and pin 3is TX.  The pins are at "TTL" level and cannot connect directly to a PC'sserial port.  An RS-232 level shifter is necessary to connect to a PC'sserial port.
  • JP3: Selects which ATmega32 pin lights up LED1.  Connect JP3 pin 1 and 2in order for PA4 to light LED1.  This is the default setting (compatible tothe original UsbProg).  Connect JP3 pin 2 and 3 in order for PD7 to lightLED1.  This setting should only be used if you need all PORTA pins on CONN3when running custom firmware on the ATmega32.
  • JP4: Serves to connect Vcc (which is +5V from the USB bus) to CONN2 pin 2.The default setting is to place a jumper on JP4 so that +5V is applied to thetarget device.An alternate method is to remove JP4 so +5V is not applied to target devicesthat supply their own power.
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


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 分享分享 支持支持 反对反对
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|文字版|手机版|DIY编程器网 ( 桂ICP备14005565号-1 )

GMT+8, 2024-5-8 15:38 , 耗时 0.094497 秒, 21 个查询请求 , Gzip 开启.

各位嘉宾言论仅代表个人观点,非属DIY编程器网立场。

桂公网安备 45031202000115号

DIY编程器群(超员):41210778 DIY编程器

DIY编程器群1(满员):3044634 DIY编程器1

diy编程器群2:551025008 diy编程器群2

QQ:28000622;Email:libyoufer@sina.com

本站由桂林市临桂区技兴电子商务经营部独家赞助。旨在技术交流,请自觉遵守国家法律法规,一旦发现将做封号删号处理。

快速回复 返回顶部 返回列表