Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Storage / Re: 24LC256 I2c eeprom with i2c lib insteed of wire on: October 14, 2013, 07:29:52 pm
ok heres my attempt

Code:

void i2c_eeprom_write_byte_rot(int eeaddress,byte data )
{
int waydata = data;
int deviceaddress = 0x50;
//I2c.beginTransmission(deviceaddress);
I2c.write(deviceaddress,eeaddress >> 8); // MSB
I2c.write(deviceaddress,eeaddress & 0xFF); // LSB
I2c.write(deviceaddress,data);
//I2c.endTransmission();

delay(20);
}

But it fails with this error
Code:
ArduCopter.cpp: In function 'void i2c_eeprom_write_byte_rot(int, byte)':
commands:193: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
C:\Users\User\Desktop\QUAD STUFF\arudmegacopter\arduino-1.0.1\libraries\I2C/I2C.h:88: note: candidate 1: uint8_t I2C::write(int, int)
C:\Users\User\Desktop\QUAD STUFF\arudmegacopter\arduino-1.0.1\libraries\I2C/I2C.h:87: note: candidate 2: uint8_t I2C::write(uint8_t, uint8_t)

this confused me alittle could anyone explane those errors?
2  Using Arduino / Storage / 24LC256 I2c eeprom with i2c lib insteed of wire on: September 30, 2013, 06:57:21 am
Hey guys im looking to to expand the memory of my eeprom to store more waypoints for my quadcopter
im using arudcopter so when i tried to add my eeprom read write functions that are depended on the Wire library it failed as some of the functions ect are the same as the I2c library that arudcopter uses so id like to know how to use my eeprom with this library https://github.com/ninjablocks/arduino/tree/master/I2C as i believe thats the library there useing.

my read / write functions for the Wire lib are as follows

Code:

void i2c_eeprom_write_byte_rot(unsigned int eeaddress,byte data )
{
int waydata = data;
int deviceaddress = 0x50;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.write(data);
Wire.endTransmission();

delay(20);
}

byte i2c_eeprom_read_byte_rot( unsigned int eeaddress )
{
int deviceaddress = 0x50;
byte wayreaddata = 0xFF;
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);
if (Wire.available()) wayreaddata = Wire.read();
return wayreaddata;

}


but im unsure how to use the i2c lib with my eeprom there is an example here https://github.com/ninjablocks/arduino/blob/master/I2C/examples/HMC5883L/HMC5883L.pde for useing a i2c magnetometer but i i couldn't sort it out

any help will be much appreciated

hector.
3  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd | Solved. on: April 27, 2012, 10:49:22 pm
yep thats the first thing i just did then no point writeing them pic's each time i load it takes a far bit of time lol so yea i just made one to load all my pics then one to just load them from eeprom smiley . now i can save so much space im so happy lol working on that last night was a bad idea really needed the sleep , thanks for all your help its been great understanding these little chips abit better.


now i have to move on to color displays i have a few 6610 lcd's i think " there the 10 pinout jobs" going to be fun xD
4  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd Please help on: April 27, 2012, 10:09:22 pm
Solved smiley

all it needed was a delay of 20ms after each write ofcourse i feel silly now after reading that in the datasheet at least twice.


working code for anyone who comes across this

Code:
/*
 * 3310 lcd - Interface for arduno .
 *
 * Copyright (c) 2012 rotceh_dnih <rotceh_dnih@hotmail.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
#include <Wire.h>
#include <PCD8544.h>
#include <string.h>         //Used for string manipulations
#define eeprom1 0x50
#define STRLEN 16

static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};

char buffer[STRLEN];
int  bufferIndex = 0;

static const byte LCD_WIDTH = 84;
static const byte LCD_HEIGHT = 48;
int scrollPosition = -13;
// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };
static PCD8544 lcd;

void setup() {
 
  int me_bitmap_start_address = 0;     //change this to wherever you want to store your bitmap on eeprom & keep track
int me_bitmap_length = 504;            //so that multiple bitmaps don't overlap


 
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);
  Wire.begin();
  Serial.begin(9600);
 
for(int j=0; j < me_bitmap_length; j++)
{
    i2c_eeprom_write_byte(eeprom1,(me_bitmap_start_address + j),me[j]);
    delay(20);
}
  //i2c_eeprom_write_page(eeprom1, 0x0040, (byte*)me2, sizeof(me2)); // write to EEPROM
delay(2000); //add a small delay
  boot();
  delay(1000);
  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
 
}



void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print(" Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley
 
  lcd.setCursor(0, 2);
 lcd.print("CONSOLE:");
 
  lcd.setCursor(0, 3);
 
  if( Serial.available())
  {
    char ch = Serial.read();
    if( ch == '\r')  // is this the terminating carriage return
    {
buffer[ bufferIndex ] = 0; // terminate the string with a 0
    bufferIndex = 0;  // reset the index ready for another string
    //lcd.print("                ");
    lcd.clearLine();
    lcd.print(buffer);
    }
    else
    buffer[ bufferIndex++ ] = ch; // add the character into the buffer   
}
   
  Scroll("testing shiz",0,4);
  delay(500); 
 
  counter++;
}

void boot()


 // int addr=0x0040; //EEPROM Address 0
  int addr=0; //EEPROM Address 0
    delay(20); //add a small delay


delay(20); //add a small delay

//Serial.print((char)b); //print content to serial port

unsigned char bitmap_array[504];

for(int j = 0; j < 504; j++)
{
bitmap_array[j]=i2c_eeprom_read_byte(eeprom1,addr);
 
addr++;
}

lcd.setCursor(0, 0);
lcd.drawBitmap(bitmap_array, 84,38);
delay(3000);
lcd.clear();
delay(500);

}




void Scroll(String message,unsigned char xy,unsigned char yx)
{
  lcd.setCursor(xy, yx);
 
  for (int i = scrollPosition; i < scrollPosition + 14; i++)
  {
    if ((i >= message.length()) || (i < 0))
    {
      lcd.print(' ');
    }
    else
    {
      lcd.print(message.charAt(i));
    }
  }
  scrollPosition++;
  if ((scrollPosition >= message.length()) && (scrollPosition > 0))
  {
    scrollPosition = -13;
  }
}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}




5  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd Please help on: April 27, 2012, 11:34:42 am
smiley thanks man i've found a issue i made a simple read wirght code and just sent the first 16 again for testing and found its gets converted somehow not sure whats going on there

heres the output

Code:
me2 from array
C2
41
0
0
0
0
0
0
0
0
0
0
0
0
0
80
 
me2 from eeprom
C2
65
63
74
6F
72
20
69
73
20
74
68
65
20
62
65

heres the code

Code:
#include <Wire.h> //Include the Arduino I2C Library</pre>
#include <string.h>         //Used for string manipulations

#define eeprom1 0x50
#define eeprom2 0x51

static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};

static const byte me2[] = {
  0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80
};



void setup() {

Wire.begin(); //Start I2C connections
Serial.begin(9600);
 
int me_bitmap_start_address = 0;     //change this to wherever you want to store your bitmap on eeprom & keep track
int me_bitmap_length = 16;            //so that multiple bitmaps don't overla   

for(int j=0; j < me_bitmap_length; j++)

{

    i2c_eeprom_write_byte(eeprom1,(me_bitmap_start_address + j),me2[j]);
   
}

delay(2000);

Serial.println("Memory written");
}

void loop() {
 
int addr=0; //EEPROM Address 0
delay(20); //add a small delay
//Serial.print((char)b); //print content to serial port
Serial.println("me2 from eeprom");
unsigned char bitmap_array[16];
for(int h = 0; h < 16; h++)
{
bitmap_array[h]=i2c_eeprom_read_byte(eeprom1,addr);
    Serial.println(bitmap_array[h],HEX);
addr++;
         
}


delay(10000);
Serial.println("me2 from array");
for(int p = 0; p < 16; p++)
{
 Serial.println(me2[p],HEX);
}

Serial.println(" ");
delay(10000);

}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}

thanks again for helping me with this its driveing me nuts
anyways must sleep it 2:30am atm xD
6  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd Please help on: April 26, 2012, 09:27:20 pm
Bump , anyone know whats going on here , im willing to try anything smiley
7  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd Please help on: April 26, 2012, 12:21:41 am
thanks mate , that makes scence however ever it still behaves the same :/

here is code

Code:
#include <Wire.h>
#include <PCD8544.h>
#include "logos.h"  //boot time logos
#include <string.h>         //Used for string manipulations
#define eeprom1 0x50
#define STRLEN 16

static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};

char buffer[STRLEN];
int  bufferIndex = 0;

static const byte LCD_WIDTH = 84;
static const byte LCD_HEIGHT = 48;
int scrollPosition = -13;
// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };
static PCD8544 lcd;

void setup() {
 
  int me_bitmap_start_address = 0;     //change this to wherever you want to store your bitmap on eeprom & keep track
int me_bitmap_length = 489;            //so that multiple bitmaps don't overlap


 
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);
  Wire.begin();
  Serial.begin(9600);
 
for(int j=0; j < me_bitmap_length; j++)
{
    i2c_eeprom_write_byte(eeprom1,(me_bitmap_start_address + j),me[j]);
}
  //i2c_eeprom_write_page(eeprom1, 0x0040, (byte*)me2, sizeof(me2)); // write to EEPROM
delay(2000); //add a small delay
  boot();
  delay(1000);
  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
 
}



void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print(" Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley
 
  lcd.setCursor(0, 2);
 lcd.print("CONSOLE:");
 
  lcd.setCursor(0, 3);
 
  if( Serial.available())
  {
    char ch = Serial.read();
    if( ch == '\r')  // is this the terminating carriage return
    {
buffer[ bufferIndex ] = 0; // terminate the string with a 0
    bufferIndex = 0;  // reset the index ready for another string
    //lcd.print("                ");
    lcd.clearLine();
    lcd.print(buffer);
    }
    else
    buffer[ bufferIndex++ ] = ch; // add the character into the buffer   
}
   
  Scroll("testing shiz",0,4);
  delay(500); 
 
  counter++;
}

void boot()


 // int addr=0x0040; //EEPROM Address 0
  int addr=0; //EEPROM Address 0
    delay(20); //add a small delay


delay(20); //add a small delay

//Serial.print((char)b); //print content to serial port

unsigned char bitmap_array[489];


for(int j = 0; j < 489; j++)
{
bitmap_array[j]=i2c_eeprom_read_byte(eeprom1,addr);
 
addr++;
}

lcd.setCursor(0, 0);
lcd.drawBitmap(bitmap_array, 84,38);
delay(3000);
lcd.clear();
  lcd.drawBitmap(me, 84, 38);
  delay(3000);
  lcd.clear();
  lcd.drawBitmap(JaycarLogo, 84, 38);
  delay(3000);
lcd.clear();
delay(500);

}




void Scroll(String message,unsigned char xy,unsigned char yx)
{
  lcd.setCursor(xy, yx);
 
  for (int i = scrollPosition; i < scrollPosition + 14; i++)
  {
    if ((i >= message.length()) || (i < 0))
    {
      lcd.print(' ');
    }
    else
    {
      lcd.print(message.charAt(i));
    }
  }
  scrollPosition++;
  if ((scrollPosition >= message.length()) && (scrollPosition > 0))
  {
    scrollPosition = -13;
  }
}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}


and a pic of what it looks like reading from eeprom



it looks like its shifted a small amount of the data over and over again :s
8  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage for 33310 lcd Please help on: April 25, 2012, 09:30:09 am
tried to wirite byte instedd of page but its not looking right "will post pics tommoro"

this time i tried the whole 488 or 489 byte that are in the bitmap but im to neeb to know what im doing  smiley-red

here's my code again
Code:
#include <Wire.h>
#include <PCD8544.h>
#include "logos.h"  //boot time logos
#include <string.h>         //Used for string manipulations
#define eeprom1 0x50
#define STRLEN 16

//static const byte me2[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80};

static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};


char buffer[STRLEN];
int  bufferIndex = 0;

static const byte LCD_WIDTH = 84;
static const byte LCD_HEIGHT = 48;
int scrollPosition = -13;
// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };
static PCD8544 lcd;

void setup() {
 
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);
  Wire.begin();
  Serial.begin(9600);
 
  for (int i=0; i < 489; i++){
    i2c_eeprom_write_byte(eeprom1,i,me[489]);
  }
  //i2c_eeprom_write_page(eeprom1, 0x0040, (byte*)me2, sizeof(me2)); // write to EEPROM
delay(2000); //add a small delay
  boot();
  delay(1000);
  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
 
}



void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print(" Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley
 
  lcd.setCursor(0, 2);
 lcd.print("CONSOLE:");
 
  lcd.setCursor(0, 3);
 
  if( Serial.available())
  {
    char ch = Serial.read();
    if( ch == '\r')  // is this the terminating carriage return
    {
buffer[ bufferIndex ] = 0; // terminate the string with a 0
    bufferIndex = 0;  // reset the index ready for another string
    //lcd.print("                ");
    lcd.clearLine();
    lcd.print(buffer);
    }
    else
    buffer[ bufferIndex++ ] = ch; // add the character into the buffer   
}
   
  Scroll("testing shiz",0,4);
  delay(500); 
 
  counter++;
}

void boot()


 // int addr=0x0040; //EEPROM Address 0
  int addr=0; //EEPROM Address 0
    delay(20); //add a small delay


delay(20); //add a small delay

//Serial.print((char)b); //print content to serial port

unsigned char bitmap_array[489];

for(int j = 0; j < 489; j++)
{
bitmap_array[j]=i2c_eeprom_read_byte(eeprom1,addr);
 
addr++;
}

lcd.setCursor(0, 0);
lcd.drawBitmap(bitmap_array, 84,38);
delay(3000);
lcd.clear();
  lcd.drawBitmap(me, 84, 38);
  delay(3000);
  lcd.clear();
  lcd.drawBitmap(JaycarLogo, 84, 38);
  delay(3000);
lcd.clear();
delay(500);

}




void Scroll(String message,unsigned char xy,unsigned char yx)
{
  lcd.setCursor(xy, yx);
 
  for (int i = scrollPosition; i < scrollPosition + 14; i++)
  {
    if ((i >= message.length()) || (i < 0))
    {
      lcd.print(' ');
    }
    else
    {
      lcd.print(message.charAt(i));
    }
  }
  scrollPosition++;
  if ((scrollPosition >= message.length()) && (scrollPosition > 0))
  {
    scrollPosition = -13;
  }
}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}


9  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage help on: April 25, 2012, 06:16:30 am
update

Video of how the image from eeprom looks
http://www.youtube.com/watch?v=ufpCZ6smzXw&feature=youtu.be

i tried to write the whole image but it failed so theres the 16 bytes as the first image the other two come from flash

heres the code as it is now
Code:
/*
 * 3310 lcd - Interface for arduno .
 *
 * Copyright (c) 2012 rotceh_dnih <rotceh_dnih@hotmail.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
#include <Wire.h>
#include <PCD8544.h>
#include "logos.h"  //boot time logos
#include <string.h>         //Used for string manipulations
#define eeprom1 0x50
#define STRLEN 16

static const byte me2[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80};

char buffer[STRLEN];
int  bufferIndex = 0;

static const byte LCD_WIDTH = 84;
static const byte LCD_HEIGHT = 48;
int scrollPosition = -13;
// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };
static PCD8544 lcd;

void setup() {
 
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);
  Wire.begin();
  Serial.begin(9600);
  i2c_eeprom_write_page(eeprom1, 0x0040, (byte*)me2, sizeof(me2)); // write to EEPROM
delay(10); //add a small delay
  boot();
  delay(500);
  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
 
}



void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print("Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley
 
  lcd.setCursor(0, 2);
 lcd.print("CONSOLE:");
  lcd.setCursor(0, 3);
 
  if( Serial.available())
  {
    char ch = Serial.read();
    if( ch == '\r')  // is this the terminating carriage return
    {
buffer[ bufferIndex ] = 0; // terminate the string with a 0
    bufferIndex = 0;  // reset the index ready for another string
    //lcd.print("                ");
    lcd.clearLine();
    lcd.print(buffer);
    }
    else
    buffer[ bufferIndex++ ] = ch; // add the character into the buffer   
}
   
  Scroll("testing shiz",0,4);
  delay(500); 
  counter++;
}

void boot()


  int addr=0x0040; //EEPROM Address 0
    delay(20); //add a small delay

lcd.setCursor(0, 0);
delay(20); //add a small delay

//Serial.print((char)b); //print content to serial port

unsigned char bitmap_array[16];

for(int j = 0; j < 16; j++)
{
bitmap_array[j]=i2c_eeprom_read_byte(eeprom1,addr);
addr++;
}

lcd.drawBitmap(bitmap_array, 54,28);


delay(3000);
lcd.clear();
  lcd.drawBitmap(me, 84, 38);
  delay(3000);
  lcd.clear();
  lcd.drawBitmap(JaycarLogo, 84, 38);
  delay(3000);
lcd.clear();
delay(500);

}




void Scroll(String message,unsigned char xy,unsigned char yx)
{
  lcd.setCursor(xy, yx);
 
  for (int i = scrollPosition; i < scrollPosition + 14; i++)
  {
    if ((i >= message.length()) || (i < 0))
    {
      lcd.print(' ');
    }
    else
    {
      lcd.print(message.charAt(i));
    }
  }
  scrollPosition++;
  if ((scrollPosition >= message.length()) && (scrollPosition > 0))
  {
    scrollPosition = -13;
  }
}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}


but i need this in the eeprom
Code:

static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};

10  Using Arduino / Programming Questions / Re: How to upload Arduino sketches manually (using avrdude)? on: April 25, 2012, 03:12:51 am
hmm yea i havent tried with a uno yet i'll grab one out and see smiley

edit my "uno board " is a freetronics usbdroid

http://www.freetronics.com/collections/arduino/products/usbdroid

so not sure it would , ill have a go when i find it .
11  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage help on: April 25, 2012, 03:11:12 am
smiley thanks man thats what im looking for i think .
one question ithis line here
Code:
for(int j = 0; j < 399; j++)
going to read from address 0 through to address 399?

and as im writing this i just tested it and i think it worked smiley but what do you think would be the best way to write the whole image to the eeprom as atm im only writing 16 bytes of it and i think wire can only handle 32 and my eeprom is 64 per page :s its all rather confuseing for me atm lol but i'll get there.

so i guess my question how to write a 488 byte array to my eeprom ? im guessing i could then store about 65 images to one eeprom smiley

thank you very much for your help so far kind sir!
12  Using Arduino / Programming Questions / Re: How to upload Arduino sketches manually (using avrdude)? on: April 25, 2012, 02:56:30 am
ive use the arduino as an isp a few times and it works well , the only thing i had issues with was the port speed in avrdude -P changes it i think i used 19200 or 38400 ,oh and you can change your programer setting to arduino as isp and just upload via the arduino ide for a atmega48 i used this in my boards.txt
Code:
##############################################################

atmega48.name=Rotceh-hack QM7298 w/ ATmega48V xD

attiny48.upload.using=arduino
atmega48.upload.maximum_size=4094
atmega48.upload.speed=19200

atmega48.bootloader.low_fuses=0xE2
atmega48.bootloader.high_fuses=0xDF
atmega48.bootloader.extended_fuses=0xFF
atmega48.bootloader.path=atmega
atmega48.bootloader.file=atmega48.hex
atmega48.bootloader.unlock_bits=0x3F
atmega48.bootloader.lock_bits=0x0F

atmega48.build.mcu=atmega48
atmega48.build.f_cpu=8000000L
atmega48.build.core=arduino
atmega48.build.variant=standard
then pick my board in the menu and compile / upload or find the temp .hex file via verbose compile like nick said
13  Using Arduino / Programming Questions / Re: 24LC256 bitmap storage help on: April 25, 2012, 01:53:41 am
ar true soz guys the lib im useing is called PCD8544 so not much help there lol i'll post the bitmap function

full code
Code:
#include <Wire.h>
#include <PCD8544.h>
#include "logos.h"  //boot time logos
#include <string.h>         //Used for string manipulations
#define eeprom1 0x50
#define STRLEN 16

static const byte me2[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80};

char buffer[STRLEN];
int  bufferIndex = 0;

static const byte LCD_WIDTH = 84;
static const byte LCD_HEIGHT = 48;
int scrollPosition = -13;
// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };
static PCD8544 lcd;

void setup() {
 
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);
  Wire.begin();
  Serial.begin(9600);
  i2c_eeprom_write_page(eeprom1, 0x0040, (byte*)me, sizeof(me)); // write to EEPROM
delay(10); //add a small delay
  boot();
  delay(500);
 
  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
 
}



void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print("Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley
 
  lcd.setCursor(0, 2);
 lcd.print("CONSOLE:");
  lcd.setCursor(0, 3);
 
  if( Serial.available())
  {
    char ch = Serial.read();
    if( ch == '\r')  // is this the terminating carriage return
    {
buffer[ bufferIndex ] = 0; // terminate the string with a 0
    bufferIndex = 0;  // reset the index ready for another string
    //lcd.print("                ");
    lcd.clearLine();
    lcd.print(buffer);
    }
    else
    buffer[ bufferIndex++ ] = ch; // add the character into the buffer   
}
   
  Scroll("testing shiz",0,4);
  delay(500); 
  counter++;
}

void boot()


  int addr=0x0040; //EEPROM Address 0
    delay(20); //add a small delay
byte b = i2c_eeprom_read_byte(eeprom1, addr); // access the first address from the memory
lcd.setCursor(0, 0);
delay(20); //add a small delay
while (b!=0) {
//Serial.print((char)b); //print content to serial port

lcd.drawBitmap(b, 84, 38);
addr++; //increase address
b = i2c_eeprom_read_byte(eeprom1, addr); //access an address from the memory
}


delay(3000);
 
 
 
  lcd.drawBitmap(me, 84, 38);
  delay(3000);
  lcd.drawBitmap(JaycarLogo, 84, 38);
  delay(3000);
lcd.clear();
delay(500);

}




void Scroll(String message,unsigned char xy,unsigned char yx)
{
  lcd.setCursor(xy, yx);
 
  for (int i = scrollPosition; i < scrollPosition + 14; i++)
  {
    if ((i >= message.length()) || (i < 0))
    {
      lcd.print(' ');
    }
    else
    {
      lcd.print(message.charAt(i));
    }
  }
  scrollPosition++;
  if ((scrollPosition >= message.length()) && (scrollPosition > 0))
  {
    scrollPosition = -13;
  }
}


void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Wire.write(rdata);

Wire.endTransmission();
}

void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddresspage >> 8)); // MSB
Wire.write((int)(eeaddresspage & 0xFF)); // LSB

byte c;
for ( c = 0; c < length; c++)
Wire.write(data[c]);

Wire.endTransmission();
}

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;

Wire.beginTransmission(deviceaddress);
Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);

if (Wire.available()) rdata = Wire.read();

return rdata;
}

drawbitmap
Code:
void PCD8544::drawBitmap(const unsigned char *data, unsigned char columns, unsigned char lines)
{
    unsigned char scolumn = this->column;
    unsigned char sline = this->line;

    // The bitmap will be clipped at the right/bottom edge of the display...
    unsigned char mx = (scolumn + columns > this->width) ? (this->width - scolumn) : columns;
    unsigned char my = (sline + lines > this->height/8) ? (this->height/8 - sline) : lines;

    for (unsigned char y = 0; y < my; y++) {
        this->setCursor(scolumn, sline + y);

        for (unsigned char x = 0; x < mx; x++) {
            this->send(PCD8544_DATA, data[y * columns + x]);
        }
    }

    // Leave the cursor in a consistent position...
    this->setCursor(scolumn + columns, sline);
}

the full image would look like this
Code:
static const byte me[] = {
0xC2, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0xC0, 0xC0, 0xF0, 0xF8, 0x38, 0x3E, 0x1A, 0x1F, 0x5F, 0x6F, 0xFF, 0xFF, 0x7F, 0x7F, 0x7F,
0xDF, 0xEF, 0x9F, 0x1F, 0x3F, 0xFF, 0x7F, 0xFF, 0xFE, 0xFE, 0x9D, 0x0F, 0x0F, 0x0F, 0x0B, 0x0F,
0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0xF0, 0xFE, 0xFD, 0xFE, 0xFF, 0xFF, 0xF5, 0x1F, 0x08, 0x48, 0x08, 0x08, 0x28, 0x20, 0x80,
0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0x67, 0x0E, 0x26, 0x20, 0x28, 0x28, 0x08,
0x08, 0x0C, 0x1C, 0x1A, 0x07, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0xC7, 0xFB, 0xFF, 0x7F, 0x7F,
0x7F, 0xFF, 0xFF, 0x7F, 0xFF, 0xFC, 0xFC, 0xF8, 0xA0, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x1B, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFC, 0xE0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x83, 0xC0, 0x80, 0x80, 0x80, 0x84, 0x84, 0x88, 0x88, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x0C, 0x0C, 0xC4, 0x04, 0x01, 0x00,
0x80, 0xE0, 0xE0, 0xF0, 0xD0, 0xF8, 0x3F, 0x1E, 0x1F, 0x1F, 0x1F, 0x1B, 0x17, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x0F, 0x1E, 0x3C, 0xDC, 0xF7, 0x83, 0x81, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x10, 0x10, 0x08, 0x0C, 0x04, 0x06, 0x03, 0x03,
0x01, 0x80, 0xC0, 0xF8, 0xFF, 0x7F, 0x3F, 0x3F, 0x13, 0x11, 0x10, 0x00, 0x00, 0x00, 0x30, 0x30,
0x30, 0x38, 0x38, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3E, 0x3E, 0x3E, 0x3C, 0x7C, 0x7C, 0xFC, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x01, 0x03, 0x03, 0x07, 0x87,
0xCD, 0x2F, 0x3B, 0x34, 0x08, 0x18, 0x18, 0x1C, 0x1E, 0x0C, 0x08, 0x00, 0x40, 0x20, 0x20, 0x10,
0x08, 0x0C, 0x86, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0xC4, 0x84, 0x84, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
0x00, 0x00, 0x88, 0xE8, 0xE8, 0xF8, 0xF8, 0x78, 0xFF, 0x1F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00,
0x00, 0x5C, 0x84, 0x83, 0xE0, 0x50, 0x70, 0xF0, 0xF0, 0xCC, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xF0, 0xF0, 0xFC, 0xF8, 0xE4, 0x24, 0x0C, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x40, 0xE0, 0xF0, 0xF8, 0xFC,
};
14  Using Arduino / Programming Questions / 24LC256 bitmap storage for 33310 lcd | Solved. on: April 24, 2012, 11:05:51 pm
hey there i seen a video from a few years back about pulling a bitmap from a 24lc256 eeprom to a 3310 lcd ,& im trying todo the same, i have my 24lc256 hooked up and i can write bytes and pages "i am alittle new to this" but when i try to put my image on the eeprom im not sure how to go about it. i tryed just putting 16 bytes of the image and try reading it back with this
Code:
"byte b = i2c_eeprom_read_byte(eeprom1, addr);
while (b!=0) {
lcd.drawBitmap(b, 84, 38);
addr++; //increase address
b = i2c_eeprom_read_byte(eeprom1, addr);
}

but it complanes about converting a byte into a char* :s
i not great with c codeing so any help would be great smiley

thanks for reading
15  Development / Other Hardware Development / Re: cheap alcohol breath tester = arduino! on: April 08, 2012, 09:55:25 pm
um good question its just a simple two pin sensor , around where its solderd on theres some text on the silkscreen that reads "S14434" and on the other side it says "HW050530118" if that helps . havent played with the sensor as i've moved on to a nother board from a heli that has a nrf240l chip built in with a atmega88 so as you can guess im haveing more fun with that smiley
Pages: [1] 2 3 4