AVR ISP MKII

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

I loaded a program to Atmega328 using AVR ISP MKII programmer.

The program works fine but when I remove the AVR ISP & just give power to the Atmega328 which is on breadboard the program doesn't work?

How to fix it?

 

 

First Fail & then succeed, this is what Engineering teach me.

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

Make sure you have a pull-up resistor between Reset and Vcc, 10k is common. Also, make sure you have a 0.1uF capacitor between Vcc and Gnd pins.

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

Are you sure you still have a gnd connection after you remove the ISP?  Did you actually measure the Vcc to AVR gnd with the programmer removed?  While the MKII ISP cable does not supply power, it could be acting as your gnd to the outside world.  Then pulling the cable, essentially removes power (broken gnd). 

Any external inputs (switches, sensors ,etc) need to share gnd with the AVR...they can also be "fake" grounded through the ISP.  Pull the cable & they mysteriously quit, possibly affecting the program execution.

 

 

How are you sure the program is not running? 

Make sure you have ALL chip ground pins are grounded

Make sure AVcc is connected to Vcc.

Are you ISP pins (MOSI,MISO, SCK) used as any part of your program?  If so, are they configured properly?  

 

just to verify: The program works fine ..did you mean to say programmer...or does the actual program operate fine with ISP hooked up? 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sat. Jan 11, 2020 - 10:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

a clear picture is worth a 1k words, post a clear picture of your setup, please.

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

I have a Chinese AVRISP mkII that does power the board.  Very strange.  It shouldn't, but it does.

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

I have a Chinese AVRISP mkII that does power the board.  Very strange.  It shouldn't, but it does.

I installed a switch hack on my ISP MKII to pull 5V from it's USB so I didn't need to run around & grab a supply.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

I did that but still, the problem exists.

First Fail & then succeed, this is what Engineering teach me.

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

All chip grnd pins are grounded & AVCC is connected to VCC. The program works fine with ISP hooked up. But when I use USB to power the board it doesn't work.

First Fail & then succeed, this is what Engineering teach me.

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

Is R42 the correct value ?

 

ki0bk wrote:

a clear picture is worth a 1k words, post a clear picture of your setup, please.

A clear circuit schematic is worth over 2k words, post a clear diagram of your setup, please. {post inline preferred vs attachment}

 

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

pos11 wrote:

But when I use USB to power the board it doesn't work.

 

That's the first time USB has been mentioned. How are you using USB to power your chip? Have you proved that your USB is providing power right at the chip's pins?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

There is a problem with the power supply. I connect USB to the power circuit which has a voltage regulator to power the board. 

First Fail & then succeed, this is what Engineering teach me.

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

pos11 wrote:
the program doesn't work?
Not much of a fault report - what does "doesn't work" actually mean?

 

A common issue can be when a debugger/programmer provides a common ground for example. Say you use UART but you only connected TXD/RXD but not Gnd as well - then while the programmer was in place it might provide the AVR-PC Gnd connection that was otherwise missing when the programmer is removed.

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

pos11 wrote:

There is a problem with the power supply. I connect USB to the power circuit which has a voltage regulator to power the board. 

 

OK, but have you actually measured the voltage the chip is getting AT THE PINS OF THE CHIP?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

The power supply board has 5v & 3.3v pins so I have checked with both the voltages, there was an issue with the GND pin which I sorted out & now the program runs fine without a programmer.

First Fail & then succeed, this is what Engineering teach me.

Last Edited: Mon. Jan 13, 2020 - 02:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 there was an issue with the GND pin 

I've seen too many students forget to hook up gnd somewhere. They remove a parasitic gnd (such as scope probe) & mysteriously things quit working

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!