Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: Help - Nokia 1100 lcd - PCF8814  (Read 7688 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone can help me with the schematics to connect the lcd  smiley-sad

http://www.freeduino.de/blog/nokia-1100-lcd-display

on page I leave there are examples of code, a schematic would help me a lot to understand.
I am a rookie with arduino, thanks for your time...


// Arduino pinout // Nokia 1100 LCD pinout (VDD & VDDI ==> 3.3V, VLED+ connected via 10 ohm resistor to 3.3V)
 smiley-confuse#define PIN_SCE 10 // 2 XCS Connected via resistor-voltage-divider 1.8K & 3.2K smiley-confuse
#define PIN_SDIN 11 // 4 SDA
#define PIN_RESET 12 // 1 XRES
#define PIN_SCLK 13 // 5 SCLK


sorry for my english  smiley-sweat
« Last Edit: June 28, 2011, 08:23:37 am by charliec114 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See if this is helpful for you. Attached jpg.
Note that I use the following Arduino pinout: (But can be any of your own choice)
// Arduino pinout         // Nokia 1100 LCD pinout
#define PIN_SCE 9        // 2 XCS Connected via resistor-voltage-divider 1.8K & 3.2K
#define PIN_SDIN 10     // 4 SDA
#define PIN_RESET 8    // 1 XRES
#define PIN_SCLK 11    // 5 SCLK


* Arduino connected to Nokia 1100 LCD.jpg (32.78 KB, 784x445 - viewed 339 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

many thanks, I'll be testing soon and will surely be counting on you here, thank you very much, I really needed  smiley-lol smiley-lol smiley-lol smiley-lol
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have one of these hooked up to my arduino and cant get the code to compile smiley-sad im sure its just something simple but

the first one on that link gives me
sketch_mar12a.cpp: In function 'void LcdCharacter(char)':
sketch_mar12a:116: error: invalid conversion from 'const byte*' to 'byte'
sketch_mar12a:116: error: initializing argument 2 of 'void LcdWrite(byte, byte)'

and the second one tells me
sketch_mar12a.cpp: In function 'void LcdPixel(byte, byte, int)':
sketch_mar12a:559: error: invalid conversion from 'byte*' to 'byte'
sketch_mar12a:578: error: incompatible types in assignment of 'byte' to 'byte [780]'




i will repost the code here for simplicity

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the first is
line 117

);



the second one is
line 560

data = LcdCache
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

got it
Code:
// Arduino Dueminalove Atmega328
// Interfacing with the Nokia 1100 LCD, PCF8814

// Arduino pinout // Nokia 1100 LCD pinout (VDD & VDDI ==> 3.3V, VLED+ connected via 10 ohm resistor to 3.3V)
#define PIN_SCE 3 // 2 XCS Connected via resistor-voltage-divider 1.8K & 3.2K
#define PIN_SDIN 4 // 4 SDA
#define PIN_RESET 5 // 1 XRES
#define PIN_SCLK 6 // 5 SCLK

#define LCD_C LOW // Command
#define LCD_D HIGH // Data


const int buttonPin = 12;     // the number of the pushbutton pin
static const byte ASCII[][5] ={
{0x00, 0x00, 0x00, 0x00, 0x00} // 20
,{0x00, 0x00, 0x5f, 0x00, 0x00} // 21 !
,{0x00, 0x07, 0x00, 0x07, 0x00} // 22 "
,{0x14, 0x7f, 0x14, 0x7f, 0x14} // 23 #
,{0x24, 0x2a, 0x7f, 0x2a, 0x12} // 24 $
,{0x23, 0x13, 0x08, 0x64, 0x62} // 25 %
,{0x36, 0x49, 0x55, 0x22, 0x50} // 26 &
,{0x00, 0x05, 0x03, 0x00, 0x00} // 27 '
,{0x00, 0x1c, 0x22, 0x41, 0x00} // 28 (
,{0x00, 0x41, 0x22, 0x1c, 0x00} // 29 )
,{0x14, 0x08, 0x3e, 0x08, 0x14} // 2a *
,{0x08, 0x08, 0x3e, 0x08, 0x08} // 2b +
,{0x00, 0x50, 0x30, 0x00, 0x00} // 2c ,
,{0x08, 0x08, 0x08, 0x08, 0x08} // 2d -
,{0x00, 0x60, 0x60, 0x00, 0x00} // 2e .
,{0x20, 0x10, 0x08, 0x04, 0x02} // 2f /
,{0x3e, 0x51, 0x49, 0x45, 0x3e} // 30 0
,{0x00, 0x42, 0x7f, 0x40, 0x00} // 31 1
,{0x42, 0x61, 0x51, 0x49, 0x46} // 32 2
,{0x21, 0x41, 0x45, 0x4b, 0x31} // 33 3
,{0x18, 0x14, 0x12, 0x7f, 0x10} // 34 4
,{0x27, 0x45, 0x45, 0x45, 0x39} // 35 5
,{0x3c, 0x4a, 0x49, 0x49, 0x30} // 36 6
,{0x01, 0x71, 0x09, 0x05, 0x03} // 37 7
,{0x36, 0x49, 0x49, 0x49, 0x36} // 38 8
,{0x06, 0x49, 0x49, 0x29, 0x1e} // 39 9
,{0x00, 0x36, 0x36, 0x00, 0x00} // 3a :
,{0x00, 0x56, 0x36, 0x00, 0x00} // 3b ;
,{0x08, 0x14, 0x22, 0x41, 0x00} // 3c <
,{0x14, 0x14, 0x14, 0x14, 0x14} // 3d =
,{0x00, 0x41, 0x22, 0x14, 0x08} // 3e >
,{0x02, 0x01, 0x51, 0x09, 0x06} // 3f ?
,{0x32, 0x49, 0x79, 0x41, 0x3e} // 40 @
,{0x7e, 0x11, 0x11, 0x11, 0x7e} // 41 A
,{0x7f, 0x49, 0x49, 0x49, 0x36} // 42 B
,{0x3e, 0x41, 0x41, 0x41, 0x22} // 43 C
,{0x7f, 0x41, 0x41, 0x22, 0x1c} // 44 D
,{0x7f, 0x49, 0x49, 0x49, 0x41} // 45 E
,{0x7f, 0x09, 0x09, 0x09, 0x01} // 46 F
,{0x3e, 0x41, 0x49, 0x49, 0x7a} // 47 G
,{0x7f, 0x08, 0x08, 0x08, 0x7f} // 48 H
,{0x00, 0x41, 0x7f, 0x41, 0x00} // 49 I
,{0x20, 0x40, 0x41, 0x3f, 0x01} // 4a J
,{0x7f, 0x08, 0x14, 0x22, 0x41} // 4b K
,{0x7f, 0x40, 0x40, 0x40, 0x40} // 4c L
,{0x7f, 0x02, 0x0c, 0x02, 0x7f} // 4d M
,{0x7f, 0x04, 0x08, 0x10, 0x7f} // 4e N
,{0x3e, 0x41, 0x41, 0x41, 0x3e} // 4f O
,{0x7f, 0x09, 0x09, 0x09, 0x06} // 50 P
,{0x3e, 0x41, 0x51, 0x21, 0x5e} // 51 Q
,{0x7f, 0x09, 0x19, 0x29, 0x46} // 52 R
,{0x46, 0x49, 0x49, 0x49, 0x31} // 53 S
,{0x01, 0x01, 0x7f, 0x01, 0x01} // 54 T
,{0x3f, 0x40, 0x40, 0x40, 0x3f} // 55 U
,{0x1f, 0x20, 0x40, 0x20, 0x1f} // 56 V
,{0x3f, 0x40, 0x38, 0x40, 0x3f} // 57 W
,{0x63, 0x14, 0x08, 0x14, 0x63} // 58 X
,{0x07, 0x08, 0x70, 0x08, 0x07} // 59 Y
,{0x61, 0x51, 0x49, 0x45, 0x43} // 5a Z
,{0x00, 0x7f, 0x41, 0x41, 0x00} // 5b [
,{0x02, 0x04, 0x08, 0x10, 0x20} // 5c ¥
,{0x00, 0x41, 0x41, 0x7f, 0x00} // 5d ]
,{0x04, 0x02, 0x01, 0x02, 0x04} // 5e ^
,{0x40, 0x40, 0x40, 0x40, 0x40} // 5f _
,{0x00, 0x01, 0x02, 0x04, 0x00} // 60 `
,{0x20, 0x54, 0x54, 0x54, 0x78} // 61 a
,{0x7f, 0x48, 0x44, 0x44, 0x38} // 62 b
,{0x38, 0x44, 0x44, 0x44, 0x20} // 63 c
,{0x38, 0x44, 0x44, 0x48, 0x7f} // 64 d
,{0x38, 0x54, 0x54, 0x54, 0x18} // 65 e
,{0x08, 0x7e, 0x09, 0x01, 0x02} // 66 f
,{0x0c, 0x52, 0x52, 0x52, 0x3e} // 67 g
,{0x7f, 0x08, 0x04, 0x04, 0x78} // 68 h
,{0x00, 0x44, 0x7d, 0x40, 0x00} // 69 i
,{0x20, 0x40, 0x44, 0x3d, 0x00} // 6a j
,{0x7f, 0x10, 0x28, 0x44, 0x00} // 6b k
,{0x00, 0x41, 0x7f, 0x40, 0x00} // 6c l
,{0x7c, 0x04, 0x18, 0x04, 0x78} // 6d m
,{0x7c, 0x08, 0x04, 0x04, 0x78} // 6e n
,{0x38, 0x44, 0x44, 0x44, 0x38} // 6f o
,{0x7c, 0x14, 0x14, 0x14, 0x08} // 70 p
,{0x08, 0x14, 0x14, 0x18, 0x7c} // 71 q
,{0x7c, 0x08, 0x04, 0x04, 0x08} // 72 r
,{0x48, 0x54, 0x54, 0x54, 0x20} // 73 s
,{0x04, 0x3f, 0x44, 0x40, 0x20} // 74 t
,{0x3c, 0x40, 0x40, 0x20, 0x7c} // 75 u
,{0x1c, 0x20, 0x40, 0x20, 0x1c} // 76 v
,{0x3c, 0x40, 0x30, 0x40, 0x3c} // 77 w
,{0x44, 0x28, 0x10, 0x28, 0x44} // 78 x
,{0x0c, 0x50, 0x50, 0x50, 0x3c} // 79 y
,{0x44, 0x64, 0x54, 0x4c, 0x44} // 7a z
,{0x00, 0x08, 0x36, 0x41, 0x00} // 7b {
,{0x00, 0x00, 0x7f, 0x00, 0x00} // 7c |
,{0x00, 0x41, 0x36, 0x08, 0x00} // 7d }
,{0x10, 0x08, 0x08, 0x10, 0x08} // 7e ←
,{0x78, 0x46, 0x41, 0x46, 0x78} // 7f →
};
int buttonState = 0;         // variable for reading the pushbutton status


void LcdCharacter(char character)
 {
  LcdWrite(LCD_D, 0x00);
  for (int index = 0; index < 5; index++)
  {
    LcdWrite(LCD_D, ASCII[character - 0x20][index]);
  }
}
void LcdClear(void){
for (int index = 0; index < 864 ; index++)
LcdWrite(LCD_D, 0x00);
}

void LcdInitialise(void){
digitalWrite(PIN_RESET, LOW);
digitalWrite(PIN_RESET, HIGH);
LcdWrite(LCD_C, 0x23); // CONTRAST?
LcdWrite(LCD_C, 0x2F); // Charge pump ON
LcdWrite(LCD_C, 0x24); // Vop MSB *Don't change*
LcdWrite(LCD_C, 0x80); // Vop LSB *Here you can change contrast*
LcdWrite(LCD_C, 0xA4); // A4 = normal display mode, A5 = all pixels ON
LcdWrite(LCD_C, 0xAF); // Display ON
}

void LcdString(char *characters){
while (*characters){
LcdCharacter(*characters++);
}
}

void LcdWrite(byte dc, byte data){
digitalWrite(PIN_SDIN, dc); // dc is sampled with the first rising SCLK edge
digitalWrite(PIN_SCE, LOW); // LCD enable
digitalWrite(PIN_SCLK, HIGH); // First rising SCLK edge
digitalWrite(PIN_SCLK, LOW);
shiftOut(PIN_SDIN, PIN_SCLK, MSBFIRST, data); // SDIN is sampled at the rising edge of SCLK.
digitalWrite(PIN_SCE, HIGH);
}

void setup(void){
pinMode(PIN_SCE, OUTPUT);
pinMode(PIN_RESET, OUTPUT);
pinMode(PIN_SDIN, OUTPUT);
pinMode(PIN_SCLK, OUTPUT);
pinMode(buttonPin, INPUT);
digitalWrite(PIN_RESET, LOW);
digitalWrite(PIN_SCE, HIGH);
digitalWrite(PIN_SCLK, LOW);
LcdInitialise();
LcdClear();
LcdWrite(LCD_C, 0xA7); // Inverted display
delay(200);
LcdWrite(LCD_C, 0xA6); // Normal display
}

void loop(void){

buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    // turn LED on:   
    LcdClear();
    LcdString(":-)DAMNIT I SAID DONT DO THAT !!");
    delay(2500);
    LcdInitialise();
    LcdClear();
  }
  else {
    // turn LED off:
    LcdString("DONT PUSH MY BUTTONS");
    LcdInitialise();
   
  }
}
 

this one also has a button routine
« Last Edit: March 14, 2012, 08:10:52 am by dudeman420 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have adapted the GFX library from adafruit for the PCF8814 smiley-grin i have uploaded it to github
https://github.com/pechurc/Nokia1100-Library
Here u can see an video in action smiley-razz
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This thread helped me connect the lcd to my arduino uno!
Schematics from PokePjerrot worked perfectly! Thank you!
I used 3.0 and 1.6 kohm resistors instead of 3.3 and 1.8.
Now I will need to figure out how to get 3.3 volts on my DIY Arduino s3v3.

« Last Edit: July 22, 2012, 03:29:49 am by bavovna » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi everyone!

pechurc posted a video with nokia 1100 lcd showing sensor values.
I'm trying to do the same thing - show values from different sensors on the lcd.
My lcd is already connected and working fine. It shows static message from the test sketch.
Code:
LcdString("ARDUINO UNO R3  SMD + NOKIA 1100 LCD. HELLO FROM UKRAINE!");
    LcdInitialise();

Now I would like to take a sensor value (integer data type) and show it on the lcd screen, but I can't figure out how to do that.
For example:

Code:
void loop(void){
 
sensorValue = analogRead(sensorPin);
LcdString(sensorValue); // ??? I know it is not correct, but how do I do this???
LcdInitialise();
delay(100);
}

When I verify the sketch in Arduino IDE, it gives me an error message: "error: invalid conversion from 'int' to 'char*'"

Please could you explain me how I should convert "int" to "char"?
Maybe you could send me some example sketch?

Thanks beforehand!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

today I uploaded my test sketch (with library from pechurc) to Arduino Uno and it worked!!! So the issue is not in the code, but in my self-made Arduino s3v3.
It is strange because other sketches worked absolutely fine on both Uno and s3v3.

Does anyone know why this code works on UNO but not on s3v3 (Severino)?

Code:
#include <Nokia2.h>

LCD Display = LCD();

const int sensorPin = A0;    // pin that the sensor is attached to

// variables:
int sensorValue = 0;         // the sensor value
int sensorMin = 1023;        // minimum sensor value
int sensorMax = 0;           // maximum sensor value

int time = 0;
int lastTime = 0;

void setup()
{


  // photocell calibration. This code is copied from http://arduino.cc/en/Tutorial/Calibration
 // turn on LED to signal the start of the calibration period:
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);

  // calibrate during the first five seconds
  while (millis() < 5000) {
    sensorValue = analogRead(sensorPin);

    // record the maximum sensor value
    if (sensorValue > sensorMax) {
      sensorMax = sensorValue;
    }

    // record the minimum sensor value
    if (sensorValue < sensorMin) {
      sensorMin = sensorValue;
    }
  }

  // signal the end of the calibration period
  digitalWrite(13, LOW);
  //end of calibration


  Display.Setup();
  Serial.begin(9600);
  Display.Clear();
  Display.print ("Hello From Argentina! I'm Axel");
  Display.Update();

}

void loop()
{
  Display.setCursor(0,17);
  Display.print("Hello from Ukraine! I'm Olexiy");
  sensorValue = analogRead(sensorPin);

  Display.Update();

}
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got the LCD to work but the contrast is very low and you can only see light gray letters. How do u set contrast settings. its bit unclear in datasheet. thank you.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

got it fixed. juz changed the
LcdWrite(LCD_C, 0x80); // Vop LSB *Here you can change contrast*
to
LcdWrite(LCD_C, 0x87); // Vop LSB *Here you can change contrast*
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Now I will need to figure out how to get 3.3 volts

While specified for 3.3v, those devices work fine at 5v.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 i maybe necro posting here....
i tryed to use pechurc lib but it wont work for the new version of arduino
annyone that can help me edit it so it works ?
i'm kinda new to  this all  so recoding this for me is a bit  to advanced
 thanx in advance 
and sorry for the horrible spelling and gramae 

this is the error that i get
BareMinimum.cpp.o: In function `LCD':
D:\Users\Kitsune\Desktop\arduino-1.0.4\libraries\Nokia1100_Library_master/Nokia2.h:27: undefined reference to `vtable for LCD'
D:\Users\Kitsune\Desktop\arduino-1.0.4\libraries\Nokia1100_Library_master/Nokia2.h:27: undefined reference to `vtable for LCD'
BareMinimum.cpp.o: In function `loop':
D:\Users\Kitsune\Desktop\arduino-1.0.4/BareMinimum.ino:54: undefined reference to `LCD::setCursor(int, int)'
D:\Users\Kitsune\Desktop\arduino-1.0.4/BareMinimum.ino:58: undefined reference to `LCD::Update()'
BareMinimum.cpp.o: In function `setup':
D:\Users\Kitsune\Desktop\arduino-1.0.4/BareMinimum.ino:44: undefined reference to `LCD::Setup()'
D:\Users\Kitsune\Desktop\arduino-1.0.4/BareMinimum.ino:46: undefined reference to `LCD::Clear()'
D:\Users\Kitsune\Desktop\arduino-1.0.4/BareMinimum.ino:48: undefined reference to `LCD::Update()'
« Last Edit: May 17, 2013, 11:01:03 am by imasu » Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: