All Projects → goncalor → vusbtiny

goncalor / vusbtiny

Licence: GPL-2.0 license
Small ISP programmer that uses an ATtiny running V-USB

Programming Languages

assembly
5116 projects
c
50402 projects - #5 most used programming language
PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to vusbtiny

Avr Cheat Sheet
AVR cheat sheet for the ATmega328p
Stars: ✭ 64 (+255.56%)
Mutual labels:  avr, programmer
AVR-Programmer
Collection of AVR Programmers and Accessories
Stars: ✭ 25 (+38.89%)
Mutual labels:  avr, programmer
FASTUSBasp
This is the fast avr programmer for AVR MCUs based on cheap stm32f103c8t6 board with usb-to-serial support.
Stars: ✭ 78 (+333.33%)
Mutual labels:  avr, programmer
Calunium
Arduino clone based on the ATmega644P/ATmega1284P
Stars: ✭ 30 (+66.67%)
Mutual labels:  avr, hardware
Rhme 2017
Riscure Hack Me embedded hardware CTF 2017-2018.
Stars: ✭ 65 (+261.11%)
Mutual labels:  avr, hardware
3d printed keyboard
A fully 3D printed computer keyboard
Stars: ✭ 31 (+72.22%)
Mutual labels:  avr, hardware
ATtiny84-TinyCalibrator
OSC Calibrator and High-Voltage Fuse Resetter for 8-Pin ATtinys
Stars: ✭ 39 (+116.67%)
Mutual labels:  avr, programmer
avr-ds18b20
AVR library for controlling DS18B20 temperature sensors
Stars: ✭ 52 (+188.89%)
Mutual labels:  avr
ATtiny13-TinyUPS
Uninterruptible Power Supply
Stars: ✭ 92 (+411.11%)
Mutual labels:  avr
ioBroker.denon
Denon AVR adapter for ioBroker
Stars: ✭ 15 (-16.67%)
Mutual labels:  avr
Open-SAE-J1939
SAE J1939 protocol free to use for embedded systems or PC with CAN-bus
Stars: ✭ 120 (+566.67%)
Mutual labels:  avr
awesome-electronic-engineering
Awesome Electronic Engineering
Stars: ✭ 54 (+200%)
Mutual labels:  hardware
apollo
microcontroller-based FPGA / JTAG programmer
Stars: ✭ 32 (+77.78%)
Mutual labels:  programmer
arduino
required (and optional) source files for the Arduino development environment, specifically the hardware/arduino sub-directory, to support xmega processors
Stars: ✭ 18 (+0%)
Mutual labels:  hardware
LabVIEW-OOP-Classes
Simple, clear, and organized object oriented approach to LabVIEW
Stars: ✭ 18 (+0%)
Mutual labels:  hardware
Pool2021
Pools organized for Epitech's students in 2021.
Stars: ✭ 19 (+5.56%)
Mutual labels:  hardware
cc-tool
Mirror of cc-tool from SourceForge
Stars: ✭ 144 (+700%)
Mutual labels:  programmer
community
ROS 2 Hardware Acceleration Working Group community governance model & list of projects
Stars: ✭ 34 (+88.89%)
Mutual labels:  hardware
openstage
Arduino-based microscope stage controller
Stars: ✭ 34 (+88.89%)
Mutual labels:  hardware
ESP32 Thing
Development platform for the Espressif ESP32 WiFi/Microcontroller SoC
Stars: ✭ 66 (+266.67%)
Mutual labels:  hardware

Introduction

VUSBtiny is a small in-system programmer (ISP) for Atmel AVR microcontrollers. It allows you to program microcontrollers on the go, without carrying a big programmer with you.

VUSBtiny is based on the USBtinyISP. It uses an Atmel AVR microcontroller running V-USB, which allows it to communicate with your computer via a USB port.

The programmer was not developed by me, but with this repository I added to it in some ways:

  • edited the code so that it compiles with the most recent versions of avr-gcc
  • designed a PCB for the project, in a way which should make it simple to be hand produced
  • wrote this readme, which can help you make your own VUSBtiny.

You can find the original VUSBtiny page here (or here).

License

VUSBtiny is licensed under GNU GPL v2.0. The license is in the file LICENSE.txt. The changes I made are released under the same license.

The V-USB driver is licensed under GNU GPL v2.0. If you intend to use V-USB commercially read this page.

Needed components

To assemble your own VUSBtiny you will need the following components:

  • an Atmel AVR microcontroller compatible with V-USB. I suggest ATtiny45 or ATtiny85
  • one USB port (male and type A)
  • two 68 Ω resistors
  • one 1.5 kΩ resistor
  • two 3.6 V Zener diodes
  • a 10 μF capacitor (optional but recommended)
  • a breadboard, perfboard or PCB to assemble the circuit.

How to flash the AVR

The following instructions teach you how you can flash the Atmel AVR you chose to be the brain of your VUSBtiny. I will assume you are using ATtiny45 or ATtiny85. The instructions should be very similar even if you are using others.

With an Arduino Uno

  1. Choose a microcontroller compatible with V-USB. You can read about the required specs here. You need at least a 2 kB flash and 128 B of RAM. If you don't want to use an external oscillator your microcontroller must have a 16.5 MHz internal RC oscillator.
  2. Setup your Arduino as an ATtiny programmer
  3. Program Arduino Uno with the "ArduinoISP" sketch. This step is done without the capacitor between the RESET and GND pins of the Arduino. After you upload the "ArduinoISP" sketch connect the capacitor, as described in the link above
  4. Adjust the following options in the makefile:
    • MCU=attiny85, for example
    • possibly adjust PROGRAMMER_MCU also. For ATtiny85/45 this is not needed
    • AVRDUDE_PROGRAMMERID=avrisp
    • AVRDUDE_PORT=/dev/ttyACM0 or to whatever port the Arduino Uno is connected to. You check which port to use by running dmesg right after you connect your Arduino. The last lines in the output should mention some tty port
    • BAUD=19200. This value must match the one in the Serial.begin() in the "ArduinoISP" example
    • change the fuses if needed (FUSE_L and FUSE_H)
  5. Do make. The source should compile successfully
  6. Do make install
  7. Set the fuses (if needed). On ATtiny85/45 we need to disable the reset pin which will be used as a normal I/O pin, which means you will not be able to program this microcontroller anymore using the Arduino Uno. If you need to reverse this step you need a HVSP (High Voltage Serial Programmer).
    • the fuses differ from device to device. The makefile is prepared for ATtiny85/45. If you have another MCU search for a fuse calculator that can aid you setting the correct fuses
    • when you're ready run make fuse

How to use your new programmer

Your newly made programmer will be seen as a USBtinyISP programmer. That means the options you give to avrdude will be the same as if you had a true USBtinyISP connected. Example (flashing a simple blink code):

avrdude -c usbtiny -p t85 -U flash:w:blinkC.hex

You may have to run with sudo, or set correct options in your system.

Troubleshooting

  1. Checking if your device was recognised

    Little after you connect the VUSBtiny to your computer if you run dmesg you should see something like this:

     [27548.612082] usb 4-1.5: new low-speed USB device number 105 using ehci-pci
     [27548.639576] usb 4-1.5: New USB device found, idVendor=1781, idProduct=0c9f
     [27548.639587] usb 4-1.5: New USB device strings: Mfr=0, Product=2, SerialNumber=0
     [27548.639592] usb 4-1.5: Product: USBtinyISP
    

    If instead you see only error messages this means the VUSBtiny was not correctly recognised, so it will not work. Try reconnecting.

  2. When programming with VUSBtiny avrdude throws Operation not permitted error

     avrdude -c usbtiny -p t85 -U flash:w:blinkC.hex
    
     avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted
     avrdude: initialization failed, rc=-1
              Double check connections and try again, or use -F to override
              this check.
    
     avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted
     avrdude done.  Thank you.
    

    If you see avrdude throwing the previous error back atcha it is probably a permissions problem and you have two options:

  3. When programming with VUSBtiny avrdude throws initialization failed, rc=-1 error

     avrdude -c usbtiny -p t85 -U flash:w:blinkC.hex 
    
     avrdude: initialization failed, rc=-1
     	 Double check connections and try again, or use -F to override
     	 this check.
    
    
     avrdude done.  Thank you.
    

    If you see this error you probably made a mistake when hooking up the programmer (VUSBtiny) to the target (whatever microcontroller you are programming). Recheck your connections against a 6-pin ISP header pinout and the MISO, MOSI, SCK, RST, VCC and GND pins of your microcontroller.

Improvements

Some improvements that should be made to the PCB are:

  • leave more space between the capacitor and the ISP headers. This way the capacitor can be bent to be made horizontal without difficulting access to the ISP header pins

  • increase spacing between traces. This is meant to ease manual production and soldering of the board

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].