user21224: 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?




user2944: 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.
Trinket:
#include <SoftwareSerial.h>
// Create a software serial port!
SoftwareSerial comm = SoftwareSerial(0, 1); //RX,TX
#define LEDPIN  PINB2
void setup() {
  //set baud
  comm.begin(9600);
  DDRB |= (1 << LEDPIN);  // set LED pin to output mode
}

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

  comm.println('a');
  PORTB |= (1 << LEDPIN); // turn on LED
  delay(500);            // 0.5 second delay
  PORTB &= ~(1 << LEDPIN); // turn off LED
  delay(1000);
}

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:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Ready...");

  // set the data rate for the SoftwareSerial port
  Serial1.begin(9600);
}

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

}

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.

Recomendations
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.


21224: <p>I'm trying to simply program an Arduino trinket to display some text on an LCD display.</p>

<p>I'm basically trying to follow <a href="https://learn.adafruit.com/usb-plus-serial-backpack/testing-with-ttl-serial" rel="nofollow noreferrer">this</a>, except connect it to a Trinket rather than an Arduino Uno. The background color of the LCD display is changing as expected from the <code>loop</code> function in my Arduino code, but it's just displaying some o's and arrow's for text on the LCD display.</p>

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

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

<p><a href="https://i.stack.imgur.com/sSr1t.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sSr1t.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/7Wc9S.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Wc9S.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/TE3Hg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TE3Hg.jpg" alt="enter image description here"></a></p>
 2944: <p>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.</p>

<hr>

<p>First off connect to the LCD Backpack using the <a href="https://learn.adafruit.com/usb-plus-serial-backpack/testing-with-usb" rel="nofollow">USB connector</a> and test it through there to rule out it being faulty.</p>

<p>At the bottom of that page:</p>

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

<hr>

<p><strong>Testing Trinket Serial:</strong></p>

<p>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.</p>

<p>Trinket:</p>



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

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

  comm.println('a');
  PORTB |= (1 &lt;&lt; LEDPIN); // turn on LED
  delay(500);            // 0.5 second delay
  PORTB &amp;= ~(1 &lt;&lt; LEDPIN); // turn off LED
  delay(1000);
}
</code></pre>

<p>Then you need another Arduino, like an Uno, Leonardo:</p>



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


  Serial.println("Ready...");

  // set the data rate for the SoftwareSerial port
  Serial1.begin(9600);
}

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

}
</code></pre>

<p>Or the stock balnk sketch and connect the Trinket Serial out to Arduino <code>TX-&gt; 1</code>.</p>

<p>If using an UNO you can set up a SoftwareSerial style of the above.</p>

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

<p>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.</p>

<p>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 <code>Serial.println(Serial1.read());</code> with <code>Serial.println(Serial1.read(),HEX);</code>.</p>

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

<hr>

<p><strong>LCD Backpack</strong></p>

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

<p>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.</p>

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

<hr>

<p><strong>Recomendations</strong></p>

<p>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.</p>

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

<hr>
