serial LCD problem (avrdude: stk500_getsync(): not in sync: resp=0x00)


im trying lcd work, , "avrdude: stk500_getsync(): not in sync: resp=0x00".
arduino uno r3.  
this display.
http://www.nkcelectronics.com/16x2-serial-lcd-module-amber-on-black_p_349.html

the pins on display wired such "pin1 connected digital pin 1(tx), pin2 connected ground, , pin3 connected 5v. orientation lcd pins on top left when looking @ display front.

if disconnect digital pin 1 on arduino sketch upload, still doesnt work when hook up.

code: [select]
/*
  nkc electronics 16x2 serial lcd test
 
 16x2 serial lcd pinout uart serial communication
pin 1: rx
pin 2: gnd
pin 3: +5v

connect pin1 arduino digital pin 1
connect pin2 arduino gnd
connect pin3 arduino +5v

default communication speed 9600
 */
 
char esc = 0xfe;
 
void setup()
{
  serial.begin(9600);
  
  // initialize lcd module
  serial.write(esc);
  serial.write(0x41);
  serial.write(esc);
  serial.write(0x51);
  // set contrast
  serial.write(esc);
  serial.write(0x52);
  serial.write(40);
  // set backlight
  serial.write(esc);
  serial.write(0x53);
  serial.write(8);
  
  serial.print(" nkc electronics");
  
  // set cursor line 2, column 0
  serial.write(esc);
  serial.write(0x45);
  serial.write(0x40);
  
  serial.print(" 16x2 serial lcd");
}

void loop()
{
}


the verbose ouput
code: [select]


avrdude: version 5.11, compiled on sep  2 2011 @ 19:38:36
         copyright (c) 2000-2005 brian dean, http://www.bdmicro.com/
         copyright (c) 2007-2009 joerg wunsch

         system wide configuration file "c:\program files (x86)\arduino\hardware/tools/avr/etc/avrdude.conf"

         using port                    : \\.\com4
         using programmer              : arduino
         overriding baud rate          : 115200
avrdude: send: 0 [30]   [20]
avrdude: send: 0 [30]   [20]
avrdude: send: 0 [30]   [20]
avrdude: recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  thank you.



any hints appreciated!

i use spi interface communicate lcd.


Arduino Forum > Using Arduino > Programming Questions > serial LCD problem (avrdude: stk500_getsync(): not in sync: resp=0x00)


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code