Introduction

Attiny is an 8-bit microcontroller created by Atmel in 1999. Attinys are small chips that often have fewer inputs/outputs than their competitors from Microchip, for example.

In this course, we’ll look at how to connect an LCD screen to an ATtiny and display text on it.

Here is the circuit diagram for connecting the LCD screen:

Programming

Here’s the program to display the text “Arduino Factory” on your screen using the LiquidCrystal library:

#include <LiquidCrystal.h> // Library used for LCD screen

LiquidCrystal lcd(1, 0, 5, 4, 3, 2); // We declare the pins used for the screen

void setup() {
  lcd.begin(16,2); // Initialize library with screen size
  lcd.print(“Arduino Factory !”); // We write our message
  lcd.setCursor ( 0, 1 ); // We place what we've just described on the first line on the second tile.
}

void loop() {}

Here’s the program to display the text “Arduino Factory” on your screen using the LiquidCrystal library: