Hi all,
I bought some cheap 6 digit, 7-segment LCDs from AliExpress, and found that information and support for them is scarce. At least they use the well-documented HT1621 LCD driver chip. So I wrote a GCB driver for this display, that makes its use easy.
This driver is mainly intended to display numbers from -99999 to 999999, with the ability to set a decimal point at any of the three locations this display allows, and also controlling its battery level indicator.
If a value outside the acceptable range is sent, the driver will make the display show "Error".
If anybody wants to use my driver to send other letters to the display, or write just one character at a time, it can be done, but is less convenient. If you want to do it, look into the driver source code to see how to do it.
All variable names and subroutines used by the driver begin with "LCD7", to minimize chances of conflict with user programs.
The driver, and a small demo program that shows how to use it, are attached. Maybe somebody out there might find this useful.
My driver is certainly not highly optimized. A better programmer than I am can surely make a much more efficient driver - but this one works, at least!
I tested it on a PIC16F1788, but it should run on most MCUs suppoted by GCB. It makes no use of specific MCU hardware.
The PDC-6X1 display (at least the flavor I got) runs well on either 3.3 or 5V (or anything in between), but requires changing the LCD bias resistor accordingly. It comes with 20kΩ, which is optimal for roughly 4V. In my testing I found that optimal values are roughly 15kΩ for 3.3V, and 75kΩ for 5V. Installing a 100kΩ trimpot in place of the original 20kΩ resistor is the best solution.
The power consumption of this display is very low. I measured 165µA on 3.3V, with the backlight off. On 5V it takes roughly 280µA.
well, the demo program I provided is pretty close to that, only the header format is a little different. If you want, I can change it and re-upload.
Do you mean that, or do you mean that I should make a stand-alone demo program, that has the LCD driver subroutines in it?
What I uploaded is a driver consisting of a set of subroutines and variable definitions, that can be included in the user's program, plus a short demo program that shows how to use it.
Both the driver and the demo could be polished a lot! I don't know if what I uploaded can be considered good enough to be published with GCB...
Manfred
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I bought some cheap 6 digit, 7-segment LCDs from AliExpress, and found that information and support for them is scarce. At least they use the well-documented HT1621 LCD driver chip. So I wrote a GCB driver for this display, that makes its use easy.
This driver is mainly intended to display numbers from -99999 to 999999, with the ability to set a decimal point at any of the three locations this display allows, and also controlling its battery level indicator.
If a value outside the acceptable range is sent, the driver will make the display show "Error".
If anybody wants to use my driver to send other letters to the display, or write just one character at a time, it can be done, but is less convenient. If you want to do it, look into the driver source code to see how to do it.
All variable names and subroutines used by the driver begin with "LCD7", to minimize chances of conflict with user programs.
The driver, and a small demo program that shows how to use it, are attached. Maybe somebody out there might find this useful.
My driver is certainly not highly optimized. A better programmer than I am can surely make a much more efficient driver - but this one works, at least!
I tested it on a PIC16F1788, but it should run on most MCUs suppoted by GCB. It makes no use of specific MCU hardware.
The PDC-6X1 display (at least the flavor I got) runs well on either 3.3 or 5V (or anything in between), but requires changing the LCD bias resistor accordingly. It comes with 20kΩ, which is optimal for roughly 4V. In my testing I found that optimal values are roughly 15kΩ for 3.3V, and 75kΩ for 5V. Installing a 100kΩ trimpot in place of the original 20kΩ resistor is the best solution.
The power consumption of this display is very low. I measured 165µA on 3.3V, with the backlight off. On 5V it takes roughly 280µA.
The driver didn't get attached... here it is!
Great piece of work.
I if you make into a working demo then I would recommend we put a copy into the demos. Then, it will not be lost in this forum.
A working demos would be based on your chip, with an header that looks like this.
This demo program would be placed in the Github repository and would be available online and within the Demonstrations published as part of GCBASIC.
Thank you for contributing.
Evan
Hi Evan,
well, the demo program I provided is pretty close to that, only the header format is a little different. If you want, I can change it and re-upload.
Do you mean that, or do you mean that I should make a stand-alone demo program, that has the LCD driver subroutines in it?
What I uploaded is a driver consisting of a set of subroutines and variable definitions, that can be included in the user's program, plus a short demo program that shows how to use it.
Both the driver and the demo could be polished a lot! I don't know if what I uploaded can be considered good enough to be published with GCB...
Manfred
Thank you. I was being dim.
I have uploaded and created a litle readme file.
https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/7_Segment_LED_Solutions/7_Segment_PDC-6X1_Solutions
If you want any changes please let know.
Thank you for your contribution to the project and for permitting sharing.