Skip to content
coopzone-dc edited this page Sep 24, 2020 · 8 revisions

Welcome to the GotekLEDC68 wiki!

This repository is based on an article found here [TM1651 Arduino Library]

The original work was a library for a 10 bar LED display, but it used the same TM1651 chip at the Gotek 3 digit LED display. So I re-worked it to drive the LEDC68 circuit board from Gotek drives where they have been upgraded to OLED.

There is a datasheet in the docs directory.

Connections to the board are (veiwed from the rear):

LEDC68 Pinout

Once you install the library zip file (i.e. unzip it in your Arduino/libraries folder) you will be able to use the library by using the Sketch/include library menu. See the examples included from the "file/examples/GotekLEDC68" folder.

The examples don't show the use of the displayDP(uint8_t dp) function, it's not of much use - i can only get it to turn on/off the decimal point(s) together not independent of each other. It appears from the circuit diagram that this is the only way to use them? This is the circuit and as you can see the DP is connected to the same output as the bottom segment.

LEDC68 Circuit

The library contains the following public functions:

TM1651(uint8_t, uint8_t); // Set up a new instance to use in your sketch.

Create an instance with TM1651 NAME(CLK,DIO);

Where CLK and DIO are the pin number used for this instance, you can create different instances using a different NAME. Each can have different pins, so you can drive several display modules if needed.

Low level library access.

void writeByte(int8_t wr_data);// Primitive low level send a command

void start(void);//Primitive send start bits, used with writeByte

void stop(void); //Primitive send stop bits, used with writeByte

Main functions

void displayNum(pos, num);// Display a number/character

You can use this function to set any digit (pos numbered 0-2 from left to right) to any number typically 0-9. You can also use 10-15 for digits A-F, or in other words HEX numbers. There are also special shapes starting at number 16 onwards illustrated below.

void displayInteger(num);// Display a number 0-999

Display a normal numeric value from 0 - 999

void displayDP(uint8_t pos);

This will turn the Decimal point on/off, however it does not really work. Due the the way the hardware is wired. I have left this in the library for future use. It currently turns the last two dots on/off no way to distinguish them.

void displayClear(void);

Resets the display to 000, with no decimal point.

void displaySet(uint8_t = BRIGHT_TYPICAL);

Turns the display on with a brightness level of N, 0-7 0=dim 7= bright

void displayOff();

Blanks the display, turns it off

**Special Characters **

...
. .
...
. . Decimal 16
... All off, blank character

...
. .
***
* * Decimal 17
*** Lower part of display zero

***
* *
***
. . Decimal 18
... Upper part of display zero

***
. .
...
. . Decimal 19
... Top line

...
. .
***
. . Decimal 20
... Midle line

...
. .
...
. . Decimal 21
*** Lower line

Have fun.

Clone this wiki locally