First of all, I apologize: I made a mistake in the abstract, it is USBASP with PDI interface.
USBasp - USB programmer for Atmel AVR controllers
This is a downloader based on ATMEL's microcontroller that can download programs to 51 series and AVR series microcontrollers.
The basic circuit refers to the official version (project address: http://www.fischl.de/usbasp/), adds a PDI port, and cooperates with the USBASB-PDI firmware and the modified avrdude, which can replace expensive equipment to implement PDI interface programming.
Several masters in the open source community have released USBASP. The main reason why I want to make a version is that when making a DIY Chameleon Mini (chameleonmini_reve_rebooted) , I need a convenient PDI interface programmer, so I came up with this project.
In terms of hardware, this design is actually based on the original design of USBASP, adding a jumper and PDI interface.
Firmware address that supports PDI: github.com/nieldk/USBASP-PDI.
In addition, you need to cooperate with a magic modification avrdude. The project address is: github.com/nieldk/avrdude.
I will put the above compiled firmware and software in the attachment.
This USBASP requires another programmer to flash its firmware. There are two methods:
1. Use a good USBASP brush:
1. Short-circuit J2 of the USBASP to be flashed with USBASP-PDI (SELF PROG) and set the voltage jumper to 5V;
2. Use the second USBASP as the flashing line and set its output voltage to 5V;
3. Set the second USBASP to 5V. Plug a USBASP into the computer and use Zadig to install the USBASP driver as "libusb-win32 (v1.2.6.0)";
4. Use a 10Pin cable to connect the two USBASPs; 5. Use AVRDUESS to flash the first USBASP Programmer
through the second USBASP
Set to USBASP
MCU Set to ATmega8
Select Flash to the patched USBASP-PDI firmware
Fuse bit set L 0xEF H 0xC9 E 0x00 LB 0xFF
Or directly use the command line to flash:
avrdude -c usbasp -p m8 -U lfuse:w:0xEF:m -U hfuse:w:0xC9:m -U lock:w:0xFF:m
avrdude -c usbasp -p m8 -U flash:w:"D: workingUSBASP-PDImain.hex":a
2. Use Arduion ISP brush written by Arduion UNO:
1. Flash the Arduino UNO development board to ArduinoISP : Select to open the ArduinoISP project, compile and upload it to UNO , making UNO a programmer.
2. Use this ArduinoISP to perform the "burning boot program" operation:
3. Hardware connection:
The left side is the pin number on the UNO development board, the right side is the USBASP pin number, VCC is connected to 5V , GND is interconnected, the JP1 jumper of USBASP is jumped to 5V , and JP2 is shorted.
(Hand drawn, funny)
4. Use avrdude to flash firmware:
avrdude -v -c stk500v1 -p m8 -c stk500v1 -P COM3 -b 19200 -e -U lock:w:0x00:m -U lfuse:w:0xEF:m -U hfuse:w:0xC9:m
avrdude -c stk500v1 -p m8 -P COM3 -b 19200 -U flash:w:"main.hex":a
Implementation:
D:workingUSBASP -PDI >avrdude -v -c stk500v1 -p m8 -c stk500v1 -P COM3 -b 19200 -e -U lock:w:0x00:m -U lfuse:w:0xEF:m -U hfuse:w: 0xC9:m avrdude: Version 6.4 Copyright (c) Brian Dean, http://www.bdmicro.com/ Copyright (c) Joerg Wunsch System wide configuration file is "D:workingUSBASP-PDIavrdude.conf" Using Port: COM3 Using Programmer: stk500v1 Overriding Baud Rate: 19200 AVR Part: ATmega8 Chip Erase delay: 10000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00 lfuse 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00 hfuse 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00 lock 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00 calibration 0 0 0 0 no 4 1 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.07s avrdude: Device signature = 0x1e9307 (probably m8a) avrdude: safemode: lfuse reads as EF avrdude: safemode: hfuse reads as C9 avrdude: erasing chip avrdude: reading input file "0x00" avrdude: writing lock (1 bytes): Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.12s avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0x00: avrdude: load data lock data from input file 0x00: avrdude: input file 0x00 contains 1 bytes avrdude: reading on-chip lock data: Reading | ################################################## | 100% 0.01s avrdude: verifying ... avrdude: WARNING: ignoring mismatch in unused bits of "lock" (0xc0 != 0x00). To prevent this warning set unused bits to 1 when writing (double check with your datasheet first). avrdude: 1 bytes of lock verified avrdude: reading input file "0xEF" avrdude: writing lfuse (1 bytes): Writing | ############################################## ## | 100% 0.03s avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xEF: avrdude: load data lfuse data from input file 0xEF: avrdude: input file 0xEF contains 1 bytes avrdude: reading on -chip lfuse data: Reading | ############################################## ## | 100% 0.01s avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: reading input file "0xC9" avrdude: writing hfuse (1 bytes): Writing | ############################################## ## | 100% 0.01s avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xC9: avrdude: load data hfuse data from input file 0xC9: avrdude: input file 0xC9 contains 1 bytes avrdude: reading on -chip hfuse data: Reading | ############################################## ## | 100% 0.03s avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: safemode: lfuse reads as EF avrdude: safemode: hfuse reads as C9 avrdude: safemode: Fuses OK (E:FF, H :C9, L:EF) avrdude done. Thank you.
D:workingUSBASP -PDI >avrdude -c stk500v1 -p m8 -P COM3 -b 19200 -U flash:w:"main.hex":a avrdude: AVR device initialized and ready to accept instructions Reading | ############################################## ## | 100% 0.04s avrdude: Device signature = 0x1e9307 (probably m8a) avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "main.hex" avrdude: input file main.hex auto detected as Intel Hex avrdude: writing flash (6626 bytes): Writing | ############################################## ## | 100% 10.10s avrdude: 6626 bytes of flash written avrdude: verifying flash memory against main.hex: avrdude: load data flash data from input file main.hex: avrdude: input file main.hex auto detected as Intel Hex avrdude: input file main.hex contains 6626 bytes avrdude: reading on -chip flash data: Reading | ############################################## ## | 100% 5.34s avrdude: verifying ... avrdude: 6626 bytes of flash verified avrdude: safemode: Fuses OK (E:FF, H :C9, L:EF) avrdude done. Thank you. |
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet