| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| arduino:t6a34_driver_library [2018/11/19 11:29] – tony | arduino:t6a34_driver_library [2026/09/04 20:46] (current) – tony |
|---|
| {{:pilone.png |Cone icon by Fornax, CC-BY-SA 3.0, wikimedia commons}} ((PAGE UNDER CONSTRUCTION)) | |
| <html><p style="text-align:right;">Published 19 Nov 2018</p></html> | <html><p style="text-align:right;">Published 19 Nov 2018</p></html> |
| <html><p style="text-align:center"><b><font size="6">Arduino T6A34 driver library</font></b></p></html> | <html><p style="text-align:center"><b><font size="6">Arduino T6A34 Driver Library</font></b></p></html> |
| \\ | \\ |
| |
| 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 Toshiba T6A34 controller chip. | 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. |
| <HTML> | <HTML> |
| <div class="shadows" style="text-align:center"> | <div class="shadows" style="text-align:center"> |
| <a href="/dokuwiki/_detail/electronic/lcd/pa101815a.jpg" class="media"><img width="45%" src="/dokuwiki/_media/electronic/lcd/pa101815a.jpg" class="media" title="UF-V40 LCD panel front" alt="UF-V40 LCD panel front" /></a> <a href="/dokuwiki/_detail/electronic/lcd/pa101817a.jpg" class="media"><img width="45%" src="/dokuwiki/_media/electronic/lcd/pa101817a.jpg" class="media" title="UF-V40 LCD panel back" alt="UF-V40 LCD panel back" /></a> | <a href="/dokuwiki/_detail/electronic/lcd/pa101815a.jpg" class="media"><img width="45%" src="/dokuwiki/_media/electronic/lcd/pa101815a.jpg" class="media" title="UF-V40 LCD panel front" alt="UF-V40 LCD panel front" /></a> <a href="/dokuwiki/_detail/electronic/lcd/pa101817a.jpg" class="media"><img width="45%" src="/dokuwiki/_media/electronic/lcd/pa101817a.jpg" class="media" title="UF-V40 LCD panel back" alt="UF-V40 LCD panel back" /></a> |
| <div class="container"> | <div class="container"> |
| Panasonic UF-V40 LCD panel that uses a T6A34 controller | <a href="/dokuwiki/electronic/lcd/dzyc0543">Panasonic UF-V40 LCD panel that uses a T6A34 controller</a> |
| </div> | </div> |
| </div> | </div> |
| 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. | 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. |
| |
| {{:electronic:lcd:pb192751a.jpg?50 |T6A34 pixel layout}}The 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 get this board to display an underline cursor or switch to 5 by 10 character mode. | {{:electronic:lcd:pb192751a.jpg?50 |T6A34 pixel layout}}The 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 ===== | ===== Arduino to T6A34 wiring ===== |
| |
| Electrically the interface is pretty simple, there are three signal lines data_in, data_out and clock. Plus rest, 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. | 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 key-switches 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. | 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. | 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. | 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. | 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. | 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 ===== | ===== 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. | 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. |
| * home() | * home() |
| * Sets the location for next data output (cursor location) to 0,0. | * Sets the location for next data output (cursor location) to 0,0. |
| * noDisplay(); | |
| * display(); | * display(); |
| * noBlink(); | * noDisplay(); |
| * blink(); | * blink(); |
| | * noBlink(); |
| * setCursor(col, row) | * setCursor(col, row) |
| * Set location for next character to be displayed. | * Set location for next character to be displayed. |
| | |
| The functions appear to be the same as for the HD44780 but have not been extensively tested for compatibility. | The functions appear to be the same as for the HD44780 but have not been extensively tested for compatibility. |
| | \\ |
| | \\ |
| | <HTML> |
| | <div class="shadows" style="text-align:center"> |
| | <a href="/dokuwiki/_detail/arduino/t6a34/pb192735b.jpg" class="media"><img width="80%" src="/dokuwiki/_media/arduino/t6a34/pb192735b.jpg" class="media" title="UF-V40 LCD panel LCD test" alt="UF-V40 LCD panel LCD test" /></a> |
| | <div class="container"> |
| | LCD module displaying text output of LCD_test_T6A34.ino program |
| | </div> |
| | </div> |
| | </HTML> |
| | \\ |
| |
| \\ | \\ |
| The programs:\\ | The programs (v1.11):\\ |
| * {{arduino:.ino}}, sketch to test the LCD library | * {{:arduino:t6a34:v1.11:lcd_test_t6a34.ino}}, sketch to test the LCD library |
| * {{arduino:.h}}, NEC uPD7228 library | * {{:arduino:t6a34:v1.11:liquidcrystal_t6a34.h}}, Toshiba T6A34 library |
| * {{arduino:.cpp}}, NEC uPD7228 library | * {{:arduino:t6a34:v1.11:liquidcrystal_t6a34.cpp}}, Toshiba T6A34 library |
| |
| ====== References and Additional Resources ====== | ====== References and Additional Resources ====== |
| |
| * Datasheet for T6A34 [[]] | * Datasheet for T6A34 {{:electronic:datasheet:toshiba:t6a34.pdf}} |
| * Information about using Arduino PWM outputs is provided by arduino.cc at [[https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM|Arduino PWM]]. | * Information about using Arduino PWM outputs is provided by arduino.cc at [[https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM|Arduino PWM]]. |
| |
| | |
| * [[https://playground.arduino.cc/Code/LCD|Arduino LCD display drivers]] | * [[https://playground.arduino.cc/Code/LCD|Arduino LCD display drivers]] |
| |
| * [[https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home|New LiquidCrystal]] | * [[https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home|New LiquidCrystal]] |
| |
| * [[https://github.com/adafruit/Adafruit-RGB-LCD-Shield-Library/blob/master/Adafruit_RGBLCDShield.cpp|Adafruit RGB LCD Shield-Library | * [[https://github.com/adafruit/Adafruit-RGB-LCD-Shield-Library/blob/master/Adafruit_RGBLCDShield.cpp|Adafruit RGB LCD Shield-Library |
| ]]. | ]]. |
| | |
| | * [[:arduino:ks0073 driver library|KS0073 SPI LCD]], LCD display panel Arduino driver |
| | * [[:arduino:metp0000 driver library|METP0000]], NEC µPD7225 based LCD display panel Arduino driver |
| | * [[:arduino:mx300 driver library|Canon MX300]], Canon MX300/310 printer LCD display panel Arduino driver. |
| | * [[:arduino:uPD7228 driver library|NEC µPD7228]] and μPD16434 LCD display panels Arduino driver |
| | * [[:arduino:spilcd driver library|SPI LCD]], LCD display panel Arduino driver |
| |
| <html><small>If any referenced page no longer exists, try looking for its URL on <a href="http://archive.org">http://archive.org</a>.</small></html> | <html><small>If any referenced page no longer exists, try looking for its URL on <a href="http://archive.org">http://archive.org</a>.</small></html> |