Announcement

Collapse
No announcement yet.

atmega8 programming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Positively try with another chip, maybe you mess up IC’s due to some PCB layout problem. Only basic controls, RST, MISO, MOSI, SCK, +5V and GND are needed, try to program it stand-alone. (not sure, but clock components, Xtal and 2 capacitors are not needed for programming, not tried, always was ISP) If you try ISP, ALLWAYS remove 100n cap from RST to GND, this pin is used for programming and will not work when C is installed, check power and GND connection to the chip, famous criss-cross around middle pins on Atmega.Also check zenner diode orientation in programmer.

    USB programmer i mentioned is nice, but this is why i made it (aside i need it for field use with my netbook, having nothing else than USB): USB programmers are cheap, available and anyone makes them, so DIY is just waste of time, even locally some cheap kits with preprogrammed MCU and ready made boards are available, supporting only PIC devices. But this one is open source project, i hope it will be updated as new devices appear, and will not become too obsolete too soon.

    I never made minipulse3, my friend did, i just made adjustment, and this is very decent detector i can tell. Basically analog machine, equipped with oversized MCU for fancy display and timing generation. Avoid original MOSFET, use IRF9640 instead, dumping R is nor 2K but slightly lower for about any coil, if you have some ringing here whole thing will not work at all or very poorly, omit 400V suppressor, not needed.If you have trouble finding LF357, normal opamps will work here, unlike in some other detector designs based on LF357, i tried LM318 and 5534 too

    Comment


    • #32
      Thanks for your information Tepco

      satdaveuk
      I have the AT8 in my programmer already to go ( just needs a mouse click )
      looks like I will have to download avr studio to compare the fuse and oscillator options and settings between avr studio and burn o mat.

      I am currently using burn o mat, for the ATtiny projects, its is a gui for avrdude, having a little language problem with minipulse AT8 figuring out the correct settings to use in burn o mat.
      The brown out bit I think is ok, but the crystal oscillator settings don't look right

      This is where most of these projects fall down in the support area, not much information is given about the correct settings, and so easy for us hobbyists to get it wrong.

      Comment


      • #33
        Originally posted by Qiaozhi View Post
        As a correction to my last post:

        I notice that the RS232 connection already has pins 6 and 7 joined together, which are Data Set Ready (DSR) and Request To Send (RTS). These signals also go to the ICSP connector, as does the Clear To Send (CTS) and Data Terminal Ready (DTR) signals. So presumably this means that a handshaking procedure is required programming. I assume this must be correct, since the Receive Data (RD) pin 2 is not used. If the programmer is not supplying the required handshaking, the PC will simply wait forever for a response, and no data will be transmitted. It looks to me like the System Clock (SCK) is generated by the PC using the RTS and DSR lines, and then it expects the programmer to latch in the data from RD and reply using either CTS or DTR. This appears to be the handshaking sequence. You should be able to check this with an oscilloscope.

        Also, it looks like the programming board is expecting the +5V supply to be supplied externally, as the 10k resistor is a pull-up to the BC549 transistor.
        Yes the 5v I been takeing from the usb port, presume thats ok is it? checked with meter on load and its 5.1v
        Regards

        Comment


        • #34
          Originally posted by satdaveuk View Post
          Yes the 5v I been takeing from the usb port, presume thats ok is it? checked with meter on load and its 5.1v
          Regards
          Your original diagram showed that you were using the RS232 port. Are you running an extra wire from a USB port as well?

          To avoid confusion, please explain your current setup with a diagram.

          Comment


          • #35
            What I have been doing is with more than one setup, when using ISCP directly to the pulse3 construction been unplugging all contecting leads apart from the main feed, and switching the machine on which has given me a direct 5v supply to the atmega8.
            When using the standalone circuits been getting the supply from the usb socket, just a lead choped and 2 wires -+ for supply which reads 5.1v with load.
            The latest stand alone ATmega8 board i made is 100% copy of what ive posted here under circuit 2 pdf, only differences are no LCD connected and my 5v feed rather than from the in circuit regulator is taken from a usb port on the PC which loads of people have done in the past with no problems or so they say.
            The data cables Ive tryed have been 1: ICSP to RS232 serial port, 2: LPT printer port, 3: USB to RS232 serial port converter, 4: USB to LPT port converter, All give the same symptom.
            The latter serial devise I built was what Tepco used which has two lights on it, one for power, the other for RW which is handy, on my computer in my office if using serial port when sending the hex file you do actually get blinking which seems to point that its trying to send imformation but to know availe
            Tryed windows 7, and Vista up in the office on the del pc, tryed downstairs with toshiba which is xp, using either converter RW blinks when sending hex
            Next is workshop where ive got my old pc loaded with 98se.
            Been using pony and another simpler one which both says cant comunicate with device
            Still waiting for delivery of another chip but not arrived yet, so much to there same day dispatch promise.

            Regards

            Over the weekend time permitting will scope the output and take some pictures they speak a thousand words or more.

            Regards

            Comment


            • #36
              Originally posted by satdaveuk View Post
              Over the weekend time permitting will scope the output and take some pictures they speak a thousand words or more.

              Regards
              Also, have a look in the Windows Device Manager at the COM ports. Check the port settings, where you can define the Flow Control. This is set to "None" by default, but may need changing to "Hardware".

              Comment


              • #37
                Originally posted by Tepco View Post
                Positively try with another chip, maybe you mess up IC’s due to some PCB layout problem. Only basic controls, RST, MISO, MOSI, SCK, +5V and GND are needed, try to program it stand-alone. (not sure, but clock components, Xtal and 2 capacitors are not needed for programming, not tried, always was ISP) If you try ISP, ALLWAYS remove 100n cap from RST to GND, this pin is used for programming and will not work when C is installed, check power and GND connection to the chip, famous criss-cross around middle pins on Atmega.Also check zenner diode orientation in programmer.

                USB programmer i mentioned is nice, but this is why i made it (aside i need it for field use with my netbook, having nothing else than USB): USB programmers are cheap, available and anyone makes them, so DIY is just waste of time, even locally some cheap kits with preprogrammed MCU and ready made boards are available, supporting only PIC devices. But this one is open source project, i hope it will be updated as new devices appear, and will not become too obsolete too soon.

                I never made minipulse3, my friend did, i just made adjustment, and this is very decent detector i can tell. Basically analog machine, equipped with oversized MCU for fancy display and timing generation. Avoid original MOSFET, use IRF9640 instead, dumping R is nor 2K but slightly lower for about any coil, if you have some ringing here whole thing will not work at all or very poorly, omit 400V suppressor, not needed.If you have trouble finding LF357, normal opamps will work here, unlike in some other detector designs based on LF357, i tried LM318 and 5534 too
                Hi Tepco
                Ok will do standalone excluding crystal and capacitors and just connect basic programing connections, I see what you mean by excluding the crystal because the atmega chip has a built in clock.
                Now this is very important question.... you mention two times about 100nf from RST to ground needs to be removed, which I understand , but where is it? i do not see a 100nf capacitor going to ground on my project circuit diagram, or are my eyes tricking me?
                Many thanks

                Comment


                • #38
                  Originally posted by Qiaozhi View Post
                  Also, have a look in the Windows Device Manager at the COM ports. Check the port settings, where you can define the Flow Control. This is set to "None" by default, but may need changing to "Hardware".
                  Ok thanks Qiaozhi will do
                  Many thanks

                  Comment


                  • #39
                    Originally posted by 6666 View Post
                    Thanks for your information Tepco

                    satdaveuk
                    I have the AT8 in my programmer already to go ( just needs a mouse click )
                    looks like I will have to download avr studio to compare the fuse and oscillator options and settings between avr studio and burn o mat.

                    I am currently using burn o mat, for the ATtiny projects, its is a gui for avrdude, having a little language problem with minipulse AT8 figuring out the correct settings to use in burn o mat.
                    The brown out bit I think is ok, but the crystal oscillator settings don't look right

                    This is where most of these projects fall down in the support area, not much information is given about the correct settings, and so easy for us hobbyists to get it wrong.
                    Looking at the spec sheet for the atmega8 it should be set at 1mhz internal oscillator, fuse bit settings bootsz1 and bottsz0 need to be turned on ie tick in the boxs , all other bootlocks off. Bare in mind im a novice at programming so better get it confirmed by the more experienced programmers here.


                    Regards

                    Comment


                    • #40
                      Would anybody know what the correct command line would be for AVRDUDE to burn the mini pulse 3 hex code into the chip ?

                      thanks
                      6666


                      I took a bit of a guess and burned the hex code with Burn o mat, this is the session, will check later today if it worked.

                      C:\WinAVR-20090313\bin\avrdude.exe -C C:\WinAVR-20090313\bin\avrdude.conf -p m8 -P lpt1 -c bascom -U flash:w:C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX:a

                      avrdude.exe: AVR device initialized and ready to accept instructions

                      Reading | ################################################## | 100% 0.00s

                      avrdude.exe: Device signature = 0x1e9307
                      avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
                      To disable this feature, specify the -D option.
                      avrdude.exe: erasing chip
                      avrdude.exe: reading input file "C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX"
                      avrdude.exe: input file C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX auto detected as Intel Hex
                      avrdude.exe: writing flash (2664 bytes):

                      Writing | ################################################## | 100% 1.09s

                      avrdude.exe: 2664 bytes of flash written
                      avrdude.exe: verifying flash memory against C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX:
                      avrdude.exe: load data flash data from input file C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX:
                      avrdude.exe: input file C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX auto detected as Intel Hex
                      avrdude.exe: input file C:\Mini Pulse3\MINIPULS3PART1\M8HEX\MINIPULS_3.HEX contains 2664 bytes
                      avrdude.exe: reading on-chip flash data:

                      Reading | ################################################## | 100% 0.86s

                      avrdude.exe: verifying ...
                      avrdude.exe: 2664 bytes of flash verified

                      avrdude.exe done. Thank you.

                      Comment


                      • #41
                        The first burn has failed no pulses

                        Comment


                        • #42
                          Its further than ive got at least your avr initialized lol

                          Try one of these hex files
                          Attached Files

                          Comment


                          • #43
                            Originally posted by 6666 View Post
                            The first burn has failed no pulses
                            Just thinking, you say know pulses, what wireing setup have you done around the atmega8 ? have you got the circuit you can post?

                            Regards

                            Comment


                            • #44
                              I am useing this schematic, no pulses on PB1, oops maybe I need to check the reset pin,

                              Comment


                              • #45
                                Just tied pin 1 to +5v, still nothing.

                                Comment

                                Working...