The 0xC0 Error [SOLVED]

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

Howdy All!

 

Just trying to figure out some weird bug I've been having that's re-occurring between designs. It's the elusive 0xC0 error. It usually occurs mid-development of a system and it's really starting to rustle my jimmies. One of my friends was able to solve the error by forcing avrdude to re-write the default fuse bits (they were never touched during development). I can't figure out if this is a software issue or a hardware issue but it's popped up on three different board designs. I have decoupling caps on all of my power pins and I'm running with the internal oscillator. All of my devices on the spi bus are pulled into shutdown via 10k pullup/down resistors so it's not other devices trying to talk over the chip. Any hints? My solutions in the past have been to desolder the 328p and drop in a fresh one. Like I mentioned previously, this occurs mid-development so the chips I put into the system are fine and functional to start with. I've attached the error message.

 

The only thing that changed from the last time I programmed to this time was me connecting the negative terminal of my power supply to ground.

 

Some things I've tried:

 

Power cycling the chip (AVRISPMKII behaves as expected)

Reducing the clock speed

Restarting my system

Checking the voltage on the MKII (obviously this can be done without talking to the chip)

 

Things I cannot do:

 

Read the device ID, FUSES, Security bits, erase chip.

 

Specs:

 

Chip: Atmega328P

OS: Windows 10 (gag)

Programmer: AVRISPMKII ("Good" internal Green LED is ON so my connection isn't bad)

Voltage: 4.9V (Far above the BOD options)

 

Also: What does the Green LED even mean? Is it just checking that power is applied to the correct pin? Is it actually trying to check for a device on the SPI bus?

 

EDIT! APPLYING SIGNIFICANT PRESSURE TO MY CONNECTOR (PRESS FIT IN PLACE) MUST HAVE SET A BAD CONNECTION. I'll just solder this thing in and desolder when I'm done. My question now is why is the device replying with 0xC0 consistently even when the connection is bad?

 

Kindly,

 

-Conrad Farnsworth

Attachment(s): 

;Conrad Farnsworth

Last Edited: Sat. Aug 12, 2017 - 09:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

IDC connectors like the one on the end of the ISP cable, when taken on/off many times will stress the cable where it enters the connector and break one of the tiny wires in the cable.

I find when connections get flaky, this is what has happened.  The fix is simple.

 

Pry the top off the connector, pull the ribbon cable off, and slide it down the cable about one connectors length, then press the top back onto the connector. Use a sharp box cutter to remove the excess cable.

The cable is a bit shorter now, but fully functional once again.  Rinse and repeat as needed, until cable is too short to use.  Enjoy!

 

 

Jim

 

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

And rule #1: Don't remove IDC connectors by pulling the cable. Grab the connector itself. This minimizes the need for Jims trick above.

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]