Page 1 of 1

4/8bit LCD library for HD44780, HD47780, ST7036 TestProject

PostPosted: Wed Apr 29, 2015 10:49 am
by vloki
MPLAB-X project with differnt configurations for testing LCD lib
on different boards and with different PICs and compilers.

- PICDEM 2+, PIC18F4520, XC8
- PICDEM USB, PIC18F4550, C18
- custom board, PIC18F25K22, C18 + XC8


(? http://www.microchip.com/forums/FindPost/860680 )


<edit> 20150608 added 8bit data support ...

<edit2> 20190920 removed C18 and added XC8 C99 support ...

Re: 4/8bit LCD library for HD44780, HD47780, ST7036 TestPro

PostPosted: Tue Jul 31, 2018 4:33 am
by ric
In LCD_LIB_BUSY.H
Code: Select all
// Cursor / Display shift       0   0   |   0   0   0   1   S/C R/L -   -
    #define DISPLAY_SHIFT_R     0x1C
    #define DISPLAY_SHIFT_L     0x18
    #define CURSOR_MOVE_R       0x14
    #define CURSOR_MOVE_L       0x14

The last line should be 0x10, not 0x14

Re: 4/8bit LCD library for HD44780, HD47780, ST7036 TestPro

PostPosted: Wed Aug 01, 2018 7:28 am
by vloki
Oh, yes.
My git repository tells me that I corrected that in November 2015.
Guess it was never used until now ;-)

There is at least one more thing that should be corrected.
In the same header a delay after the Clear display macro was added;
Code: Select all
void LCD_Init(void);
#define LCD_Clear() LCD_Command(CLEAR_DISPLAY); LCD_DELAY_5MS()
#define LCD_Home()  LCD_Command(RETURN_HOME); LCD_DELAY_5MS()


I should rebuild the test project with actual sources and post it here...

Re: 4/8bit LCD library for HD44780, HD47780, ST7036 TestPro

PostPosted: Mon Feb 04, 2019 9:44 am
by ric
I've removed posts by "RodneyBoris" and "RobertAlvarado", and banned both users, after they edited their posts to include hidden spammy links.

Re: 4/8bit LCD library for HD44780, HD47780, ST7036 TestPro

PostPosted: Tue Apr 14, 2020 5:37 pm
by RISC
Hi Vloki,

You 16x2 LCD library is absolutely excellent. :D :D
I tried several ones without any success mostly because they are difficult to adapt to a specific hardware.

It should be mentioned here that it is VERY easy to configure to ANY 8 bits PIC based hardware BECAUSE each PIN needed by the LCD can be defined one by one in one header file to match your exact schematics.
It is rare to see libraries with such flexibility. Congratulations !!!!

It took me half day to have it working with PIC16F18875 on PICDEM2+ (last version with black PCB) and also another 8 bits PIC board with another LCD module !!!
I attach it here for other users ;=)
It uses MPLAB X v5.30, XC8 v2.10 and MCC plugin v3.95
The LCD module on PICDEM2+ is Ocular OM16214 which uses a SPLC782A LCD controller (compatible with HD44780 / KS0066U / ST7066U / ... )

I am now trying to also make it adaptable to the various delays needed by various LCD controller chips. If I succeed I will post it back here
Regards

Re: 4/8bit LCD library for HD44780, HD47780, ST7036 TestPro

PostPosted: Wed Apr 28, 2021 12:40 pm
by HKPhysicist
COOL!

I am looking for such library for my China cheap 16x2 LCD! My book gives me some codes but it simply cannot display anything.

I hope this thread can help. Let me try!