Author Topic: Need Help with getting a LCD Display to work with Digispark  (Read 1376 times)

matt_funder27

  • Newbie
  • *
  • Posts: 1
Need Help with getting a LCD Display to work with Digispark
« on: November 13, 2018, 08:50:31 pm »
Using a Digispark Attiny85, I have been unsuccessful with getting an I2C bus adapter to work with my 16x2 display so I went back to the basics, and tried to get the Digispark to work with the lcd display by wiring it with all of the pins.

I slightly modified the code that's in the HelloWorld example sketch located within the LiquidCrystal library. All that I changed with the code is the pin numbers to align with the Digispark.

The code will successfully upload to the Digispark, but I cannot get anything to print on the display, any suggestions?

Running Arduino 1.8.7

I have the Digispark wired as follows:

LCD Pins to Digi Spark P0-P5

1  2  3  4    5   6    7  8  9  10 11 12 13 14 15 16
-------------------------------------------------------------
-  +  P   p5  -    p4                    p3  p2 p1 p0  +  -

p = potentiometer
- = ground
+ = 5v
This  diagram shows how my potentiometer and resistor is wired

Code: [Select]
/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 5
 * LCD Enable pin to digital pin 4
 * LCD D4 pin to digital pin 3
 * LCD D5 pin to digital pin 2
 * LCD D6 pin to digital pin 1
 * LCD D7 pin to digital pin 0
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe
 modified 7 Nov 2016
 by Arturo Guadalupi

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld

*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 5, en = 4, d4 = 3, d5 = 2, d6 = 1, d7 = 0;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

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);
}
« Last Edit: November 13, 2018, 09:03:28 pm by matt_funder27 »