My Projects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arduino:t6a34_driver_library [2019/01/16 09:57]
tony
arduino:t6a34_driver_library [2023/03/12 22:00] (current)
tony
Line 31: Line 31:
 ===== 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 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.+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.
Line 43: Line 43:
 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.
Line 111: Line 111:
 ]]. ]].
  
 +     * [[:​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:​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:​mx300 driver library|Canon MX300]], Canon MX300/310 printer LCD display panel Arduino driver.