My Projects

Published 19 Nov 2018

Arduino T6A34 driver library


I have a display panel from a Panasonic UF-V40 fax, that I wish to use in an Arduino project. This a 1 line by 20 character LCD status display, controlled by a T6A34 Toshiba serial interfaced LCD controller/driver chip.


Overview

I looked for an Arduino library that would talk to this chip-set, but failed to find one.

I based my library module for this on a standard Arduino library for the Hitachi HD44780 chip, LiquidCrystal.cpp. The programs included here are LCD_test.ino, LiquidCrystal_t6a34.cpp and LiquidCrystal_t6a34.h.

The Toshiba T6A34 command set is much the same as the Hitachi HD44780, but it has a serial interface and reset pin.

Hardware description

The controller consists entirely of a single T6A34 chip. The display is a single line of twenty, 5 by 7 pixel, characters, but this is addressed as two lines of ten characters.

T6A34 pixel layoutThe standard chips have a 5 by 7 pixel, and 5 by 10 pixel ASCII and Japanese (Katakana) character set, with a separate 8th underscore row for a cursor. I experimented a little, but could not get this board to display an underline cursor or switch to 5 by 10 character mode.

Arduino to T6A34 wiring

Electrically the interface is pretty simple, there are three signal lines data_in, data_out and clock. Plus reset, power and ground. The Reset power and ground can be directly connected to the same pins on a 5V Arduino board. I haven't looked at using data_out, but the driver chip encodes the onboard keyswitches into a serial stream. Presumably this could be decoded by an interrupt driven Arduino routine.

The data clock is also the chip's clock that is used to produce the LCD scanning. The datasheet says 500kHz down to 125kHz, typically 250kHz. My board seemed to be quite happy to operate at 1MHz and was still working down to 50kHz, albeit with a lot of flicker. Data is clocked on the rising edge of the clock signal, starts with three low start bits, two register select bits (instruction, data, and two LED control registers), an 8 bit command or data, and at least one high stop bit. The register select and command/data words are sent least significant bit first.

A suitable clock signal can be generated from the Arduino using one of the timers (I have used Timer1), but the main difficulty is synchronising the data out from the Arduino to this clock. I could perhaps use timer interrupts to drive an output routine that puts out one bit at each clock pulse, but to do this in C in less than 8µS (125kHz clock) seemed difficult. For testing purposes I did something a bit simpler: In the data output routine, I simply turned off the timer clock and 'manually' generated clock and data pulses, then turned on the timer clock when finished. Although the resultant clock during data transmission is something like 73kHz, it seems to work fine. But I see when analysing the clock output that there are occasionally nasty short clock cycles when switching from timer clock to data clock and back. These have no effect upon the communication as they occur when the data pin is high and so don't generate spurious start bits etc, but probably aren't good for the driver chip or LCD.

There is no “busy” pin, so delays between commands are necessary, 80µS normally and 1640µS for display clear when using a 250kHz clock.

There was no contrast adjustment on this board.

The data pin could be most any Arduino pin, but the clock pin has to be one that can generate PWM outputs, and pin 9 was the appropriate pin when using Timer1 for this purpose.

T6A34 Library

As mentioned earlier the library is based on a standard Arduino HD44780 LCD library. Most T6A34 hardware commands, including programmable characters, seem to be compatible with the HD44780, but there are some minor variations when comparing datasheets.

The functions implemented are:

  • begin(col,row)
    • Initializes the display, usually done once in a sketch's setup() routine.
  • clear()
    • Clears the screen of all pixels and homes the cursor.
  • home()
    • Sets the location for next data output (cursor location) to 0,0.
  • display();
  • noDisplay();
  • blink();
  • noBlink();
  • setCursor(col, row)
    • Set location for next character to be displayed.
  • cursor()
    • Show cursor at location ready for next character.
  • noCursor()
    • Turn off cursor display.
  • scrollDisplayLeft()
    • Scroll current line one character to the left.
  • scrollDisplayRight()
    • Scroll current line one character to the right.
  • leftToRight()
    • Normal Western language display mode where words are written starting at the left of the display.
  • rightToLeft()
    • Mode used for Japanese and other languages where characters are written starting at the right of the display.
  • autoScroll()
    • Automatically scroll when the cursor (whether visible or not) reaches the far edge of the display.
  • noAutoscroll()
    • Turns off autoscroll.
  • createChar()

The functions appear to be the same as for the HD44780 but have not been extensively tested for compatibility.

UF-V40 LCD panel LCD test
LCD module displaying text output of LCD_test_T6A34.ino program



The programs (v1.11):

References and Additional Resources

  • Information about using Arduino PWM outputs is provided by arduino.cc at Arduino PWM.

Other Arduino LCD drivers

  • METP0000, NEC µPD7225 based LCD display panel Arduino driver
  • Canon MX300, Canon MX300/310 printer LCD display panel Arduino driver.
  • NEC µPD7228 and μPD16434 LCD display panels Arduino driver
  • SPI LCD, LCD display panel Arduino driver

If any referenced page no longer exists, try looking for its URL on http://archive.org.