Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Library for LCD19264 with UC1609C display (Oshosoft)

DogFlu66

Member

UC1609C Driver

  • Developed using Pic18 Basic with the Oshonsoft v5.73 compiler.
  • Implements communication with the UC1609C graphical display controller via SPI.
  • Defines essential control pins (Reset, Chip Select, Command/Data, Clock, Data).
  • Provides functions for initialization, command transmission, and data writing.
  • Includes cursor control functions to set the display position.
  • Supports text rendering through character and string printing functions.
  • Implements pixel manipulation for basic graphics like lines and individual pixels.
  • Optimized for monochrome 128x64 display operation.

Implemented Functions

UC1609C_Locate

  • Positions the cursor to a specified row and column.
  • Translates text coordinates into display pixel locations.

UC1609C_Send_XY

  • Sets the internal cursor position using x (column) and y (page) coordinates.
  • Splits x into lower and upper nibbles and sends commands accordingly.

UC1609C_Print

  • Prints a string of characters on the display.
  • Iterates through each character and calls UC1609C_PutC.

UC1609C_PutC

  • Displays a single character on the screen.
  • Retrieves the font bitmap and sends data column by column.

UC1609C_PrintP

  • Prints a string of characters at a specific x, y position.
  • Allows custom character width and height.

UC1609C_PutCP

  • Displays a single character at a given x, y position.
  • Retrieves the font data and applies scaling for size adjustment.

UC1609C_Clear_Display

  • Clears the entire display by writing zeros to memory.
  • Iterates through all pages and columns.

UC1609C_Init

  • Initializes the UC1609C display.
  • Configures I/O pins, resets the display, and sends initialization commands.

UC1609C_Power_Down

  • Powers down the UC1609C display.
  • Executes the reset sequence to enter low-power mode.

UC1609C_Pixel

  • Draws a single pixel at an (x, y) coordinate.
  • Uses the vertical line function for precise control.

UC1609C_Line_H

  • Draws a horizontal line from (x, y) to (x2, y).
  • Calls the vertical line function for each pixel.

UC1609C_Line_V

  • Draws a vertical line from (x, y) downward.
  • Uses bitwise operations to set pixels within memory pages.
UC1906C_192x64.jpg
 

Attachments

  • UC1609C.bas
    17 KB · Views: 40
  • Tabla ASCII.bas
    10.9 KB · Views: 42
  • _Pic18F46K22Lib.bas
    43.4 KB · Views: 41
  • Test LCD UC1609C.bas
    2.2 KB · Views: 39
Last edited:
I'd just like to say thanks to the OP for bringing this display to my attention, while I'm not using Oshonsoft (I'm using XC8), the display seems ideal for a forthcoming project - and also it will fit as a replacement for the normal LCD1602 we already use in a long term product we make.

The picture shows the UC1609 display on the new PCB, in the old case, the old display next to it, and the 3D printed spacers I used to mount the display - it's mounted using two 6x2mm self tapping screws on each end at the top, and a single one at each end in the middle of the bottom. If anyone wants the STL file?, feel free to ask, but it's really a very simple part to design, and the height can easily be adjusted as needed.

In this application the cases are machined for us by the manufacturer, so the 'window' for the display only covers part of the UC1609 screen, as does the window in the existing keypad, but it still gives us space for two decent sized lines of 16 characters (same as the LCD1602), and the choice of using graphics if need be. And while I've carefully positioned the centre of the display to match the window, the two lines can be aligned to single pixel accuracy in the software. The PIC used is a 16F18857, or can be swapped for a 18F27K42 - they are pin compatible.

All in all, a really nice little display.

IMG_0228[1].JPG
 
It looks great, with an impressive finish.
I program in C using the CCS compiler, and I discovered the LCD by chance. I thought it would be fun to write the library for Oshonsoft.
I've also been building a small automation system for almost 15 years. Although it uses a graphical display, it's become increasingly expensive, so I'm thinking of replacing it with this one.

COSKIT23A11.jpg
 

Latest threads

New Articles From Microcontroller Tips

Back
Top