A serial interface for the Truly MTC-C162DPLY-2N using ATmega8515

The 10k potentiometer, just above the ISP connector near the lower middle of the board,is used to adjust the display contrast according to your vertical viewing angle.

ATTINY2313/AT90S2313 AVRStudio assembler source, LDCbutons040904Ca.htm
ATTINY2313/AT90S2313 AVRStudio assembler source,

Truly LCD driver include file,
tlcd309Ba.htm AT90S8515/ATMega8515 AVRStudio assembler source by Rafael A. Alcocer.
Original version of posted AT90S2313 code in zip archive tlcd030929A.zip

Note on hex files and source code: The source code was written for the AT90S2313 and AT90S8515, but once assembled, the hex files will operate correctly on the ATTINY2313 and ATMEGA8015 respectively as long as the appropriate fuses are set. In particulat take note of the AT90S8515 compatibility fuse in the ATMEGA8515 and the clock fuses for the ATTINY2313. You should select an external medium frequency clock with a long startup dealy for the ATTINY2313.
The 040904C version of the code has a larger UART receive buffer and supports two pushbuttons that send either and ASCII “R” ($52) or an ASCII carriage Something to keep in mind when using AVR controllers that support 16 bit addressing(specifically, the ATTINY2313/AT90S2313 only has an 8 bit stack pointer, while some others have 16 bit stack pointers) found by Rafael A. Alcocer has been taken into account in version ATTINY2313AT90S2313 version 030929A as well as being incorporated into the ATMEGA8515/AT90S8515 version.  This code should be able to run on the ATTINY2313 without modifications, as well as the other AVR controllers with appropriate modifications for things such as clock speed and I/O port assignments.

The Truly MTC-C162DPLY-2N-LCD is an inexpensive two line LCD display and seems to be ideal as a display for some of my projects that have serial data outputs. Before building this interface, I used to either have a computer on the workbench to serve as a terminal or run an RS-232 cable from the desk with the computer on it to the workbench. When I saw the backlit version of displays being offered for less than US$6.00, I thought “Why not?”.
The Truly display uses the Samsung KS0070B controller, which is (reportedly) compatible with the Hitachi HD44780 controller. I found a set of initialization and control routines that were written and placed on the on the web by Richard Hosking which only required a minor adjustment to get the Truly display working. Mr. Hosking’s code was used in the assembler code that was originally posted and is in the ATMega8515 version. Mr. Hosking’s code served as a model for the .include file driver that is used in the current AT90S2313 version.
For more detail: A serial interface for the Truly MTC-C162DPLY-2N using ATmega8515

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top