Programming the microcontroller


Posted on Feb 6, 2014

The brain of the robot is made of Atmel Tiny2313 microcontroller. This MCU has a cool feature called In-System Programming which can be used to program memories of the MCU with almost-no-cost programmer. I used simple programmer which connects to parallel port. It is described in [ 2 ] and its schematic is below. The 74HC08 integrated circuit, whi


Programming the microcontroller
Click here to download the full size of the above Circuit.

ch is the only part of this programmer besides the connector, costs about 50 cents. Everything can be built directly into the 25-pin LPT connector without any PCB. On the microcontroller side of the cable, I use pinhead female connector with my own layout as shown in fig. 4. 2. Note that the cable should not be longer than about 50 cm. If parallel port is not available on your computer, you can use PonyProg software [ 4 ] with interface for serial port. The programming device is also very simple. Note that if you use laptop with USB to Serial converter PonyProg may run very slow (10 minutes for programming the memory) so this is not a good choice. I did not find any solution for this yet, but luckily my laptop has a parallel port and my old PC has both serial and parallel port. The simplest solution would be to buy some commercial Atmel programmer for USB, such us ISP MK II, which can cost about $40. The program for the MCU is built in AVR Studio, which is free IDE provided by Atmel [ 5 ]. AVR studio allows writing programs in assembly language only, but there is free set of tools including C compiler called WinAVR [ 6 ] available. WinAVR integrates into AVR studio seamlessly, so it is possible to write programs for the MCU in C. So to sum it all up, the program for microcontroller is written in C and built with WinAVR tools integrated into AVR studio. First, download and install AVR studio. Then install WinAVR and it will...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Telephone motor Controller
    LED Dice II
    Nite Rider LED Lights
    simple 2 watt small switching power
    5V power supply with overvoltage protection
    Prepping Residential Gateways for WAN Access
    A Very Simple LED Tester
    Video Signal Amplifier
    Circuit example of the LM381
    The brake a little dynamic braking circuit
    Host stall after stall to auxiliary control circuit



    Top