Pages: [1]   Go Down
Author Topic: error msg when i add image  (Read 362 times)
0 Members and 1 Guest are viewing this topic.
jordan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 when I check the code , msg shows [ done
 compiling ] but when I upload to arduino ,error msg show
[ avrdude : vertification error, first mismatch at a byte 0x06bc
               0x18 != 0xff
 avrdude : vertification error, content mismatc ]
this code to add image :
Code:
#include <ITDB02_Graph16.h>
#include <avr/pgmspace.h>
extern uint8_t SmallFont[];

prog_uint16_t FR[0x33BE] PROGMEM ={
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, )
0xFFFF, 0xFFFF, 0xFFFF,

.
.
.
.
.
.
.
.
.

0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,   // 0x2E50 (11856)
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,   // 0x2E60 (11872)
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,   // 0x2E70 (11888)
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,   // 0x2E80 (11904)
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,   // 0x2E90 (11920)
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFDE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,   // 0x2EA0 (11936)
0x0000, 0x0000, 0xA618, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
};


ITDB02 myGLCD(38,39,40,41);

void setup()
{ myGLCD.InitLCD(PORTRAIT);
  myGLCD.setFont(SmallFont);
  drawDisplay();
     }

void drawDisplay()
{
myGLCD.fillScr(255,255,255);
myGLCD.drawBitmap(35, 213, 32, 32, FR);
}

void loop()
{}
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18794
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a bug in the bootloader where consecutive 0xFF can cause some of the memory not to be programmed (hence the content mismatch).

I think that applies if a whole "page" is 0xFF because the programmer assumes they have been cleared to 0xFF in advance, when they haven't.

See if you can work out an encoding (compression) scheme such that you don't need all those 0xFFs.

One possible approach could be to simply invert them (so 0xFF becomes 0x00) and then re-invert them for displaying.

You could use my programming sketch here: http://www.gammon.com.au/forum/?id=11638

That doesn't use avrdude, and does clear memory to 0xFF before programming.
Logged


Pages: [1]   Go Up
Jump to: