Go Down

Topic: [SOLVED] Attiny84 and LCD16x2 (Read 291 times) previous topic - next topic

qbone

Jun 06, 2014, 09:14 pm Last Edit: Jun 06, 2014, 10:35 pm by qbone Reason: 1
Hey guys, I am going crazy here. Been googling for hours for a solution, but with no luck.
I am trying to get my LCD to work on an Attiny84A.

My Arduino is an Arduino UNO, and on top of it I have a Tinyldr 2.5 shield for programming other ICs.

I am trying to get the simple LCD tutorial to work.

Code: [Select]
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

void setup() {
 // set up the LCD's number of columns and rows:
 lcd.begin(16, 2);
 // Print a message to the LCD.
 lcd.print("hello, world!");
}

void loop() {
 // set the cursor to column 0, line 1
 // (note: line 1 is the second row, since counting begins with 0):
 lcd.setCursor(0, 1);
 // print the number of seconds since reset:
 lcd.print(millis()/1000);
}


I read somewhere to try and insert a delay(1000); right before lcd.begin(); but that didn't help.
The datasheet for the chip can be found here: http://www.atmel.com/Images/doc8006.pdf

Now is it me who is missing something with those pins not being suitable for this or what am I doing wrong?
The code works on my Arduino UNO, and the Attiny84 works (testet with the Blink sketch).

I hope someone can help me :)

EDIT: I have a pot connected correctly to the contrast of the display, but all I get is black boxes (vaguely cause I adjusted the contrast). Also pin R/W is connected to GND. The display I use is a DMC-16202NY-LY-BJE-BLN (http://www.digikey.com/product-detail/en/DMC-16202NY-LY-BJE-BLN/73-1346-ND/2242964)

qbone

Aaarh it totally hit me when reading the blink code. Pin 1 in arduino is not pin 1 on the IC >_<

Herone

Hi! i'm trying to make a project with attiny84 and i want to include an lcd. I've trying to connect that lcd to attiny84, i've changed the lcd pins on sketch but it's not working.

Would you share how do you manage to make it?

cheers!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy