I'm trying to simply program an Arduino trinket to display some text on an LCD display.

I'm basically trying to follow this, except connect it to a Trinket rather than an Arduino Uno. The background color of the LCD display is changing as expected from the loop function in my Arduino code, but it's just displaying some o's and arrow's for text on the LCD display.

I'm new to Arduino's (and EE in general), but am a computer programmer.

What am I doing wrong that the sample code in the above link doesn't print text on my LCD display?

enter image description here

enter image description here

enter image description here

  • If the code partially works (screen is cleared and starts to print) are you sure your closing syntax (; }) and delimiters are in place? If the BG 'for' loop is working, what is blocking the rest of the code? One tiny syntax error will do that.
    – Sparky256
    May 19, 2016 at 4:45
  • Since you mention the target board is an "Arduino Trinket" instead of "Arduino Uno", could there be some difference in how the LCD display was wired? In other words the pin assignments may be different than expected in the example code. As a diagnostic you could try the LCD Hello World example (under File - Examples - LiquidCrystal - HelloWorld if you're using the Arduino IDE). If that doesn't work then you need to find the schematic for your board, determine which LCD pin connects to which ATmega328 pin, and then which "Arduino" pin number that is, so you can update the source code.
    – MarkU
    May 19, 2016 at 5:39
  • 1
    Disregard my above comment; I misinterpreted the question; usually Arduino + LCD means an HD44780 LCD connected directly to the ATmega328. That's not the case here. You actually have a serial (RS232-like) connection between two devices. So the real problem is more likely incorrect baud rate, or some other RS232 protocol related issue.
    – MarkU
    May 19, 2016 at 5:44
  • 1
    Finally tracked down what Arduino Trinket is: ATtiny85 not ATmega328 - very different beast. Your linked example code uses SoftwareSerial (ATtiny85 has no hardware serial). Are you sure you have the correct flag settings? If the ATtiny85 was set to internal 1MHz clock instead of internal 8MHz clock, baud rate will be wrong. I'm not even sure if internal clock is stable enough to support serial comms. If the "trinket" has a external clock oscillator, make sure the ATtiny85 flags are correctly configured to use it. Try to wrangle an oscilloscope to verify the serial comms timing.
    – MarkU
    May 19, 2016 at 6:08
  • 1
    You could try this tutorial first to verify that you can get Serial working. Then add LCD. learn.adafruit.com/trinket-bluetooth-alarm-system/code. Use the software serial section to debug your trinket communication. May 25, 2016 at 19:55

2 Answers 2


Operating this display should not be out of the range of the ATTiny85 abilities. I have one using a two-way serial connection for a setup routine, that modifies EEPROM values.

First off connect to the LCD Backpack using the USB connector and test it through there to rule out it being faulty.

At the bottom of that page:

For more commands, check the github repository (see the Downloads tab) for a python script that will test all commands on the display.

Testing Trinket Serial:

What you can do is take your trinket and run a basic Serial connection program to test if the Trinket is sending the right info out.


#include <SoftwareSerial.h>
// Create a software serial port!
SoftwareSerial comm = SoftwareSerial(0, 1); //RX,TX
#define LEDPIN  PINB2
void setup() {
  //set baud
  DDRB |= (1 << LEDPIN);  // set LED pin to output mode

void loop() {
  //print a specific character once a second

  PORTB |= (1 << LEDPIN); // turn on LED
  delay(500);            // 0.5 second delay
  PORTB &= ~(1 << LEDPIN); // turn off LED

Then you need another Arduino, like an Uno, Leonardo:

// For leonardo use Serial1 for the connection to trinket 
void setup() {
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only


  // set the data rate for the SoftwareSerial port

void loop() { // run over and over
  if (Serial1.available()) {
    char incoming = Serial.read();


Or the stock balnk sketch and connect the Trinket Serial out to Arduino TX-> 1.

If using an UNO you can set up a SoftwareSerial style of the above.

I recommend this rather, a USB-Serial converter as it will be quicker and cleaner.

Next you need to see what is coming out. If the received data is correct then there is an issue in the LCD display, try re-flashing the LCD board with new firmware.

If the data comes through correctly then move onto using the Adafruit code and still connecting it to the other Arduino boards serial connection, replacing the Serial.println(Serial1.read()); with Serial.println(Serial1.read(),HEX);.

If the data still comes through correctly then the data is not being received properly by the LCD backpack.

LCD Backpack

You should test the display board with another Arduino, UNO or Leonardo (32u4).

Run the Adafruit tutorial code and see the results. If the code works then there is a problem with the Trinket and the SoftwareSerial library.

If there are again errors that happen with the LCD backpack when used with a 'normal' Arduino then it is the problem.


Download the ATTiny core from High-Low Tech and burn the 'bootloader' to reset the fuses to 8MHZ setting, also this is a good core to use if you want more space on the ATTiny.

Possibly re-flash the trinket bootloader and make sure the internal clock is 8MHz; the SoftwareSerial library is touchie I believe.


Warning: I do not have a ATtiny85 nor the lcd so this is purely based on what I found after some reading up on this mcu.

What I would do in your situation: As the trinket is using a ATtiny85 it does not have hardware serial. So a software variant is needed.
You opted for software serial (which is the most obvous in Arduino world) but which seems to be the hardest solution. According to this source Serial communication with the Tiny's is is possible (And I quote)

you might have to tune the internal oscillator to get a stable connection.

Assuming your lcd does not need to send data back; I would try the TinyDebugSerial.

  • Bear in mind that adding an external crystal would be the easiest/most reliable. But this will cost you 2 specific I/O pins. There might also be memory issues, since the ATTiny85 has a lot less memory as the ATMega328. The Arduino Nano (or pro micro) might fit your physical size requirements, while being a lot more "powerfull".
    – aaa
    May 30, 2016 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.