CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Flexible LCD driver
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
gumust



Joined: 02 Sep 2011
Posts: 1

View user's profile Send private message Visit poster's website

edit
PostPosted: Mon Sep 05, 2011 7:56 am     Reply with quote

If you replace this part
Code:

#define LCD_DB4 PIN_D0
#define LCD_DB5 PIN_D1
#define LCD_DB6 PIN_D2
#define LCD_DB7 PIN_D3

#define LCD_E PIN_A1
#define LCD_RS PIN_A3
#define LCD_RW PIN_A2


with this part
Code:

#ifndef LCD_DB4
   #define LCD_DB4   PIN_D0
#endif
#ifndef LCD_DB5
   #define LCD_DB5   PIN_D1
#endif
#ifndef LCD_DB6
   #define LCD_DB6   PIN_D2
#endif
#ifndef LCD_DB7
   #define LCD_DB7   PIN_D3
#endif
#ifndef LCD_E
   #define LCD_E     PIN_A1
#endif
#ifndef LCD_RS
   #define LCD_RS    PIN_A3
#endif
#ifndef LCD_RW
   #define LCD_RW    PIN_A2
#endif

you can include flex_lcd.c in all project easily.

to use:
Code:

#include "main.h"

#define LCD_DB4   PIN_C4
#define LCD_DB5   PIN_C5
#define LCD_DB6   PIN_C6
#define LCD_DB7   PIN_C7

#define LCD_RS    PIN_B0
#define LCD_RW   PIN_B2
#define LCD_E      PIN_B1

#include "flex_lcd.c"

void main()
{
   lcd_init();
   delay_ms(250);
   lcd_putc("\fExample");
   
   while(TRUE) {
      output_high(PIN_B3);
      delay_ms(200);
      output_low(PIN_B3);
      delay_ms(1000);
     
   }
   
}
gmua



Joined: 07 Feb 2011
Posts: 11

View user's profile Send private message

LCD 2x16 Driver for MikroElektronika EasyPic v7 Board
PostPosted: Wed Jan 25, 2012 10:07 pm     Reply with quote

PCM programmer wrote:
Why use it ?

2. If you're a newbie and your board isn't configured to use the CCS driver, and you don't
know how to modify it or Mark's driver, then this driver can get you up running quickly.


LCD 2x16 Driver for MikroElektronika EasyPic v7 Board

I modified the following lines to make the LCD work with the EasyPic v7 and CCS C and is working great.

Code:

// These pins are for the MikroElektronika EasyPIC v7 Board

#define LCD_DB4   PIN_B0
#define LCD_DB5   PIN_B1
#define LCD_DB6   PIN_B2
#define LCD_DB7   PIN_B3

#define LCD_E     PIN_B5
#define LCD_RS    PIN_B4
// #define LCD_RW    PIN_A2

// If you only want a 6-pin interface to your LCD, then
// connect the R/W pin on the LCD to ground, and comment
// out the following line.

// #define USE_LCD_RW   1     

Thanks a lot PCM programmer.
wordizlife



Joined: 08 Mar 2012
Posts: 38
Location: Canada

View user's profile Send private message

PostPosted: Tue Apr 17, 2012 2:34 pm     Reply with quote

Just wanted to thank you for this great post. Very user friendly coding, very appreciated! Smile
Velraj



Joined: 11 Mar 2014
Posts: 2

View user's profile Send private message

8 bit flex_lcd
PostPosted: Tue Mar 11, 2014 5:21 am     Reply with quote

Can anyone code for 8bit flex_lcd ??
cyril.carlita



Joined: 20 Jul 2023
Posts: 5

View user's profile Send private message Visit poster's website

drive for lcd 1602
PostPosted: Thu Jul 20, 2023 7:00 am     Reply with quote

Hello, i try the first driver for 2x16 ligne but lcd_gotoxy function don't work for me.

I can't go to the ligne 2 with lcd_gotoxy(1,2) , Why?

Can you show me a driver that work for 2x16 lignes?
cyril.carlita



Joined: 20 Jul 2023
Posts: 5

View user's profile Send private message Visit poster's website

PostPosted: Thu Jul 20, 2023 11:53 am     Reply with quote

Finnaly, it work for me
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group