help with ATmega168 programmer board

Discussion in 'Programmer's Corner' started by ron roberts, Jan 15, 2010.

  1. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Hi all I need some help with an ATmega168 programmer board this is the diagram I’ve put together.

    [​IMG]
    Enlarged diagram link http://img37.imageshack.us/img37/1576/atmega168.jpg


    This is the website and the source of the original diagram
    http://electronics-diy.com/avr_programmer.php

    the thing is can this be reworked to use the 5volt of the rs232 instead of the added 5 volt regular I have added if so can you please post how to modify it.

    This is my board layout but not built yet.
    [​IMG]


    So all I’m trying to do is use the 5 volt from the RS232 port to power the ATmega168 without having an external PSU. Thanks for any help.
     
    Last edited: Jan 15, 2010
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    This programmer is designed to be used with the COM port on a typical PC. Since these lines can swing between plus and minus 12 volts in some computers, these zeners are provided to constrain the signal to 5 volt logic levels.

    Perhaps you can explain why you think that you don't need these zeners.

    hgmjr
     
  3. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Sorry it's not the zeners its the 5volt regulator I’ve added that i was trying to remove the programmer is designed in two parts and is intended to program the atmega in circuit, I’ve tried to put it together as one stand alone programmer hence the 5 volt regulator. Sorry for the size of the pics on the forum I’ve tried to make them smaller without success please use the scroll bar to see the entire diagram. Thanks
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Is the ATMEGA168 that appears in the schematic your target processor? In other words, are you trying to program the ATMEGA168?

    hgmjr
     
  5. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    yes i'm trying to program ATMEGA168?
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If you power your device from the RS232 port during programming, how do you propose to power the ATMEGA168 when it is not connected to the COM port?

    hgmjr
     
  7. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Sorry for not explaining in more detail.

    The unit above is for programming only, it will not form any part of the intend use of the ATmega. Its roll is just to program an ATMEGA168 then when my ATMEGA168 is fully programmed it will be removed from the programmer above and placed in its intended stand alone device.

    So the above diagram is just a means to program ATMEGA168.

    Thanks for your replies.
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Now, I see what you attempting to do.

    As you may know, the real power/flexibility of the AVR processor family is their ability for be programmed in-circuit.

    It seems that you would want to take advantage of that feature by including an ISP6PIN or ISP10PIN programming header as part of your design. Then you would not have to contend with arranging to power your AVR with the programmer since the target AVR would be powered by its own power supply.

    hgmjr
     
  9. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Yes you are correct but I’m looking to do this as above and not as part of a system in anyway.

    Any ideas?
    Can it be done?
    If so how?
    Thanks.
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I am uncomfortable with powering your target processor from a standard PC port.

    Out of concern for the reliability of the programming of the ATMEGA168 and the risk of damage to your PC's COM port, I am going to recommend that you get aquainted with designing your target system with the ISP header. By doing so you will make updating your software on the fly much easier in the long haul.

    hgmjr
     
  11. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Ok I understand but once the ATmega168 is programmed it will never be reprogrammed except with a boot loader, so a want be going with an ISP header it’s completely unnecessary for my project. I will have to use an external PSU as my above diagram. Or I will use the USB 5 volt rail as the power source maybe I will just make up a new USB programmer instead. Thanks for all your input.
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Using the USB port to power the target device is a more feasible approach. I believe you can find designs for just such a programmer on the web.

    I think your reluctance to include an ISP programming connector into your design will come back to haunt you in the end. Even the arduino board which has a very powerful boot loader still provides an ISP porgramming header for those users who would rather bypass the bootloader and take control of the AVR themselves.

    However, I respect your wish to control the design and trust that you have consider the impact of omitting an ISP and found it an acceptable design decision.

    hgmjr
     
  13. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    I have been building the units that the atmega168 is used in for about 2 years and have built about 8 of the units to date and I have always installed an ISP header but never had to use it again so a complete waste of time and cost in my new project.
    After all the entire unit will be using the same instructions just placing a 24x2 display and buttons and a card reader/writer in a different location on the PCB to fit the new panel mount.

    But the above diagram would work if I just coupled a 12 PSU up to it.
    Well I think it will.
     
    Last edited: Jan 15, 2010
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You could probably get away with using a 9V battery since you have a regulator.

    That would at least make it more convenient. Don't forget to provide an on/off switch though.

    hgmjr
     
  15. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Thanks Hgmjr you have been a help on all my posts.
    Just one quick think will I need to add a push reset button.
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Since this is as dedicated programmer, I would think that a reset button would be of no use. The programmer will assert reset and keep the AVR held in reset throughout the programming cycle.

    hgmjr
     
  17. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Just a quick up date on my ATmega168 programmer board.

    I built it has you see it in above post.

    I successfully copied ATmega168 out of a device and rewrote in to a second ATmega168 and it works!

    Thanks to hgmjr for all your input.

    If any interest I will video the board ripping a program from one ATmega168 and programming a second one and testing it.
     
  18. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I know I am interested in seeing a video of your project?

    hgmjr
     
  19. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I would like to take a look at it also.
     
  20. ron roberts

    Thread Starter Active Member

    May 7, 2008
    49
    0
    Well I have got my work friend (boss) to do the video for me as I stammmmmmmmmmmer a lot, so it’s not me doing the videoing and it’s uploaded to one of my friend YouTube accounts.

    This is the video hope it’s ok for you all if not he will redo it for me.

    http://www.youtube.com/watch?v=7B4TFAj0Kjw
     
Loading...