Having problems getting my boards to program! Hardware issue? AtMega8

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So my post that I'd typed out just got lost when I tried to submit.  So I'll post the short version.

 

Normally this board is programmed with a straight parallel cable to the pcb with no extra hardware. I'm trying to switch to use a USB programmer.  USBASP and TinyAVRprogrammer have both not worked with either avrdude or loading a bootloader in the Arduino IDE.  Mostly I get an invalid chip signature error, but don't see any reason I should be getting that aside from something to do with adding an external crystal.

 

On the schematic all pins are direct connections to the chip but pin6.  It has some extra connections on the way to the Reset Pin of the chip.  Could someone look at that and see if that may be what's causing things to fail when I'm using the USB programmers?  I want to see if it's a board layout issue making it impossible before I dig much deeper into the process.

 

Thanks for any help.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Before sending this out to a PCB house, there are several things that need to be addressed.

 

1) Each VCC/GND pin pair needs a 100nf cap as close to and accross the pin pair as possible.

2) Same for AVCC/GND

3) Never connect AREF to VCC, just connect another 100nf cap from pin to GND, damage will occur if an internal vref is choosen for the ADC with it wired like you have it.

4) the voltage to ADC3 exceeds max input voltage for a pin (9v?), add a voltage divider to reduce the voltage to the correct range.

5) if H2 is the ISP connector, C2 is too large to allow programming to occur.

 

Is H2 the isp connector? it pin out does not match standard Atmel pinout for ISP

 

Address these issues and post an update.

Good luck with your project.

Jim

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well.... here's the hard part.  I had these designed YEARS ago.  Like 2006 time frame and they've been working and I've been selling them like this for over ten years now.  But I've lost touch with the guys that did the designs for me over the years.  So I've got a few hundred more pcbs, and don't sell enough these days to make board changes.  I'm more trying to find a way that can make it easier for my end users to change things on the board.

 

If there was a USB adapter that would allow connection as LPT1, I'd try that out.  My GUI will only connect through that port and that guy and source code are long gone.

 

So I'm at the point of if it can't be done easily, I won't do it at all since it's basically just to support previous customers.

 

The H2 is the programming header.  I have NO IDEA why they went with that, or why it's the way it is.

 

Thanks again! I really appreciate it!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

C1 is a 10uF cap from Reset to Gnd.

Remove this capacitor - it interferes with the programming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great I'm building a handful of these tomorrow.  I'll check it out.  

 

Is there any reason that's there?  I don't see where that's crucial to the function of the board, but like I said, I'm not expert.

 

thanks for the info!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The H2 programming connector is likely a custom design:  l assume that it is a 1x6 0.1" header.   The programming connection from the USBASP is either a 3x2 0.1" header or a 5x2 0.1" header.

Check your wiring.  The wiring on the USBasp connectors is:  

 

MISO     1    2   Vcc

SCK       3     4  MOSI

Reset    5     6  Gnd

 

(seen from above)

 

 MOSI   1    2   Vcc

  n.c.     3    4  Gnd

 reset   5    6 gnd

SCK      7    8  gnd

 MISO   9   10  gnd

 

Here is command line to use with avrdude.exe:

avrdude -p m8 -c usbasp -P usb -U flash:w:myfile.hex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goldiedpimp wrote:
Is there any reason that's there? 

 

To reduce sensitivity to electrical noise.

 

Try it without the capacitor.

If that solves the problem, try with a 0.1uF capacitor instead of the 10uF cap.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

4) the voltage to ADC3 exceeds max input voltage for a pin (9v?), add a voltage divider to reduce the voltage to the correct range.

All good advise above, but I think the voltage into ADC3 will be OK.

 

The LM 1117-5 is a fixed voltage, 5 V, linear regulator.

The 1117 is usually used in its "adjustable" model variants, where two external resistors determine the Vout, but the "-5" suffix identifies it as a fixed Vout version.

 

JC

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goldiedpimp wrote:
The H2 is the programming header.

ok, make up an adapter cable between the usbasp and your board h2 connector, if your populating new boards , leave off the cap until after you program it.

Use avrdude to program it, although it is a command line program and not a GUI.

an alternative GUI programmer is extreme burner if using windows, and works with your usbasp h/w.

jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yup. I've got all the adapters built. I'm building some boards right now. So hopefully I'll have some news this afternoon.

Attachment(s):