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

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

Postby vloki » Wed Apr 29, 2015 10:49 am

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 ...
Attachments
LCD_LIB_TEST_20190920.zip
(17.33 KiB) Downloaded 1191 times
LCD_LIB_TEST_20150608.zip
(16.14 KiB) Downloaded 1819 times
Last edited by vloki on Fri Sep 20, 2019 11:54 am, edited 1 time in total.
vloki
Verified identity
 
Posts: 186
Joined: Wed May 28, 2014 8:42 am
Location: Germany
PIC experience: Professional 5+ years with MCHP products

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

Postby ric » Tue Jul 31, 2018 4:33 am

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
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

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

Postby vloki » Wed Aug 01, 2018 7:28 am

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...
vloki
Verified identity
 
Posts: 186
Joined: Wed May 28, 2014 8:42 am
Location: Germany
PIC experience: Professional 5+ years with MCHP products

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

Postby ric » Mon Feb 04, 2019 9:44 am

I've removed posts by "RodneyBoris" and "RobertAlvarado", and banned both users, after they edited their posts to include hidden spammy links.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

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

Postby RISC » Tue Apr 14, 2020 5:37 pm

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
Attachments
PICDEM2PLUS_18875_MCC_LCD+PRINTF.X.ZIP
16x2 LCD library for XC8 v2.10 using MCC & MPLAB X v5.30
(52.86 KiB) Downloaded 826 times
RISC
Verified identity
 
Posts: 4
Joined: Tue May 10, 2016 4:49 am
PIC experience: Professional 5+ years with MCHP products

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

Postby HKPhysicist » Wed Apr 28, 2021 12:40 pm

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!
User avatar
HKPhysicist
 
Posts: 16
Joined: Wed Feb 24, 2021 5:53 am


Return to Graphics and LCD

Who is online

Users browsing this forum: No registered users and 2 guests

cron