USB AVR programmer

32,136

Circuit Image

Currently, USB is the most widely used connection between PCs and peripherals, such as AVR programmers, printers, and scanners. Therefore, it became necessary to modify an old serial AVR In-System Programmer (ISP) to function with a USB connection. One solution is to use a USB to Serial adapter to connect the AVR ISP to the PC. However, this approach would be more expensive than using a single FT232BM chip, as it would require an additional USB to RS232 adapter and a power supply for the programmer, totaling nearly $30. The alternative solution involved replacing the two transistors that adapted RS-232 voltage levels to TTL voltage levels with a USB to RS-232 chip like the FT232BM. Following the schematic diagram from the FT232BM manual, connections were made between the ATtiny2313 and FT232BM. The FT232BM requires only a few standard components to operate. When this circuit is connected to a PC, a message indicating "new hardware found" appears, along with the factory name of the FT232BM. IC1 is a serial EEPROM used to store user settings, allowing the programmer to be renamed as "AVR In-System Programmer" or "MyAVR programmer," and it can also include the firmware version of the circuit. This EEPROM is optional, as the programmer functions with or without it, although FTDI recommends its use. LED D1 flashes when data is transmitted or received by the FT232BM. CN1 is a USB-B connector, and CN2 is a 6-pin connector for the target AVR, which connects to the AVR to be programmed. The S1 switch supplies +5V to the target circuit from the USB connector of the PC, eliminating the need for an additional power supply for the target circuit. It is important to note that a single USB port can provide up to 500mA of current, and this limit should not be exceeded, including the current required by the AVR programmer.

The circuit design integrates an FT232BM USB to Serial converter, which facilitates the communication between the ATtiny2313 microcontroller and the PC through a USB interface. The FT232BM chip is responsible for handling the USB protocol and converting the USB signals to serial RS-232 signals that the ATtiny2313 can understand. The schematic includes the necessary connections for power, data transmission, and control signals, ensuring proper operation of the programming process.

Powering the circuit is achieved through the USB-B connector (CN1), which connects to the PC. This connector provides the necessary +5V supply to the circuit, with the S1 switch allowing the user to control power delivery to the target AVR. The 6-pin connector (CN2) is configured to interface directly with the programming pins of the AVR, allowing for seamless programming and debugging.

The inclusion of the serial EEPROM (IC1) provides additional functionality, enabling the storage of user-defined settings and the identification of the programmer when connected to a PC. This feature allows for customization of the programmer's name and firmware version, enhancing user experience and providing essential information during operation.

LED D1 serves as an indicator, providing visual feedback to the user regarding data transmission and reception activities. This feature is critical for troubleshooting and ensuring that the communication between the programmer and the PC is functioning correctly.

In summary, this modified AVR In-System Programmer circuit effectively utilizes the FT232BM chip to convert USB signals to RS-232 levels, enabling efficient programming of AVR microcontrollers while maintaining user-friendly features such as power control, customization options, and visual feedback. The design ensures that the circuit operates within the current limitations of USB power supplies, making it a practical solution for modern programming needs.Nowadays, USB is the most popular connection connection between PC and peripherals such as AVR programmers, printers, scanners etc. For that reason I had to modify my old serial AVR In-System-Programmer (ISP) to work with USB connection.

You can say, "use a USB to Serial adaptor to connect your AVR ISP with your PC". Yes, that could be a solution but it would cost me more money than a singe FT232BM chip because I had to include an USB to RS232 adaptor and a power supply for my programmer. (almost 30). So, the solution was to replace the two transistors, that were used to adapt the RS-232 voltage levels to TTL voltage levels, with a USB to RS-232 chip such as FT-232BM.

Following the schematic diagramthat I read in the FT232BM manual I made the connections between ATtiny2313 and FT232BM. The FT232BM requires a few and ordinary components to work. When you connect this circuit to your PC you will see the message " a new hardware was found" and then the factory name of FT232BM.

IC1 is a serial EEPROM that used to store user`s settings. So, you can rename this programmer to be appeared as "AVR In-System-Programmer" or "MyAVR programmer". Furthermore, you can add the firmware version of your circuit. Of cource, you can bypass this component because it`s optional. I saw that the programmer works with orwithout this EEPROM. Anyway, FTDI suggests you to use this EEPROM. Led D1 flasheswhen data are transmitted or received by FT232BM. CN1 is a USB-B connector and CN2 is a 6-pin connector to your target AVR (it is connected to the AVR to be programmed).

The S1 switch is used to supply your target circuit with +5V from the USB connector of your PC. In this case you won`t need any additional power supply for your target circuit. Consider that a single USB port can supply up to 500mA current. You should not exceed this current limitation including the current that needs your AVR programmer too. 🔗 External reference