chipKIT® Development Platform

Inspired by Arduino™

Do I have a paper-weight here?

Created Sat, 12 Nov 2011 03:41:50 +0000 by photomankc


photomankc

Sat, 12 Nov 2011 03:41:50 +0000

Got a program uploaded from my Arduino library once, but several of the libraries that compiled didn't behave right. Went to upload a simple blink-the LED program and now all I get is this:

"Binary sketch size: 5288 bytes (of a 126976 byte maximum) avrdude: verification error, first mismatch at byte 0x0180 0x00 != 0xff avrdude: verification error; content mismatch"

Nothing runs on it now apparently. LD4 blinks at a steady rate buts that's all that ever happens? Anyone have ideas?


photomankc

Sat, 12 Nov 2011 06:19:51 +0000

Well, I guess it may be time to pack it back up. Neat idea but I'm not in the mood to fight with this kinda thing. I did finally get it to take a new program every now and again but the results make no sense at all.

I upload the following:

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
}

void loop() {
  uint16_t sensorValue = 30;
  sensorValue = sensorValue + 2;
  delay(500);
  Serial.println(sensorValue, DEC);
}

I get this output on the serial terminal:

32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32

Either this thing can't loop and count or something is fubar'd in the Serial library. Either way, I can't debug even the most simple issue like this if I can't believe the output I'm getting.


avenue33

Sat, 12 Nov 2011 07:36:12 +0000

On the loop, sensorValue is always reseted to 30. I suggest:

uint16_t sensorValue;

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
  sensorValue = 30;
}

void loop() {
  sensorValue = sensorValue + 2;
  delay(500);
  Serial.println(sensorValue, DEC);
}

What the role played by pinMode(2, INPUT)?

Have a look at the menu Examples and enjoy ;)


photomankc

Sat, 12 Nov 2011 07:57:00 +0000

Good lord you're right. That's what I get for programming while ticked off. That may well explain another weird issue I was having. Sorry, should not post and code while angry.


avenue33

Sat, 12 Nov 2011 17:23:33 +0000

You're welcome. That's the way for learning ;)


GeneApperson

Tue, 13 Dec 2011 07:41:26 +0000

Are you still having verification errors when programming the board?

After the boards were initially released, Microchip introduced a new mask rev on the PIC32MX3xx series parts that changed the write timing for the flash. The original boot loader failed to function correctly on the new rev of chip. It's possible that you have a board with the version of the boot loader that doesn't work reliably with the newer chips.

If you're still having problems, let me know, or contact Digilent customer support. If the board is defective, we will replace it.

Gene Apperson Digilent


photomankc

Sun, 25 Dec 2011 16:22:47 +0000

Are you still having verification errors when programming the board? Digilent

I have not seen the problem again for a long time now. I have no idea why it started or why it decided to quit but for now I am having no issues programming it. Thanks for following up on it.