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 CCS Technical Support

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



Joined: 23 Mar 2006
Posts: 1

View user's profile Send private message

PIC18F8722 help; nothing happening
PostPosted: Thu Mar 23, 2006 9:27 am     Reply with quote

I am having trouble getting any output on my LED when using the PIC18F8722... please help:


#include <18F8722.h>
#include "FLEX_LCD420.C"

void main()
{

lcd_init();

while(1)
{
output_high(PIN_F2);
delay_ms(1000);
output_low(PIN_F2);

printf(lcd_putc, "Hello World.");
lcd_putc("f");

delay_ms(1000);
}
}

The only change I made to the FLEX_LCD420.c was to change the appropriate pin connections I am using:

#define LCD_DB4 PIN_F4
#define LCD_DB5 PIN_F5
#define LCD_DB6 PIN_F6
#define LCD_DB7 PIN_F7

#define LCD_E PIN_F2
#define LCD_RS PIN_F0
#define LCD_RW PIN_F1
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 24, 2006 12:47 am     Reply with quote

That's [spam]'s code. He's going to have to support it.
Just letting you know.
vitorego



Joined: 18 Apr 2006
Posts: 3

View user's profile Send private message

PostPosted: Tue Apr 18, 2006 5:26 pm     Reply with quote

The flexible lcd code also works with powertip LCD modules with 16x2 and 5*8 dots?
I can�t configure this LCD manually with function sets and all this things.
noisepic



Joined: 24 Jul 2005
Posts: 20

View user's profile Send private message

PostPosted: Fri May 05, 2006 8:03 pm     Reply with quote

I have used flex_lcd.c for Pic16F877A but it doesn't working. I don't know why. I used PORTB
RS PIN_B2
E PIN_B3
D4-D7 PIN_B4-PIN_B7

help me pls? or another code!!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sat May 06, 2006 8:44 am     Reply with quote

Did you remember to include NOLVP in your fuses?
fuzzy



Joined: 26 Feb 2005
Posts: 64

View user's profile Send private message

PostPosted: Sun Jun 04, 2006 5:07 am     Reply with quote

Hi,

could you please tell me how can i write a variable value on this kind of LCD with these drivers??
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sun Jun 04, 2006 8:16 am     Reply with quote

lcd_putc() will display a single char.
You can redirect the printf command to the LCD by supplying this function name as the first parameter of the printf. Look at the help for printf to see an example.
TheNewHetfield



Joined: 13 Jun 2006
Posts: 1

View user's profile Send private message

PostPosted: Mon Jun 26, 2006 4:05 pm     Reply with quote

It's a very useful code!!

I'm using it in a huge project, needing to optimize the use of the ports, and this code has become an excelent solution

Greetings from Santiago de Chile
Sergio
pdswar



Joined: 18 Jul 2006
Posts: 33
Location: Maryland, USA

View user's profile Send private message

how can I modify flex_lcd.c to drive NKK Smartswitch LCD
PostPosted: Tue Jul 18, 2006 7:18 am     Reply with quote

I am a beginner to PIC programming and I am using PIC 18F6722 to drive NKK Smartswitch LCD.

http://www.nkksmartswitch.com/PDF/IS01NCF.pdf?

// As defined in the following structure the pin connection of Port F is as
// follows:
// F0 rs
// F1 rw
// F2 enable
// F3 LCD_LP
// F4 LCD_DOUT
// F5 LCD_BL
// Pins F6 and F7 are not connected

How can I modify flex_lcd.c to drive 36 X 24 pixel NKK Smartswitch LCD
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Tue Jul 18, 2006 8:26 am     Reply with quote

Your going to have to write a whole new driver. This device is serial in nature, like a 74595/74165 see example ex_expio.c
http://www.nkksmartswitch.com/Uploads/DrivingSSPart1and2.pdf

And note that this is the wrong place to be asking for help.
see item 2.
http://www.ccsinfo.com/forum/viewtopic.php?t=27260
Ask for help in the main forum. This area is a place to share complete tested code.
javi.ar



Joined: 17 Feb 2006
Posts: 59
Location: Argentina

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

Ignorance
PostPosted: Thu Jul 20, 2006 1:52 pm     Reply with quote

Sorry about this silly question but can anyone explain what are the meaning of this line

output_bit(LCD_DB4, !!(nibble & 1));

i think is putting on the PIN (#define LCD_DB4 PIN_D0) D0 one bit, so far so good, but what is !!, I cannot find out why do you need twice negative (nibble & 1) which I think is always the LSB of each byte...

Please clarify, and thanks in advance.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 20, 2006 2:16 pm     Reply with quote

There is a note in the source code which explains this:
Quote:
void lcd_send_nibble(int8 nibble)
{
// Note: !! converts an integer expression
// to a boolean (1 or 0).

output_bit(LCD_DB4, !!(nibble & 1));
output_bit(LCD_DB5, !!(nibble & 2));
output_bit(LCD_DB6, !!(nibble & 4));
output_bit(LCD_DB7, !!(nibble & 8));

delay_cycles(1);
output_high(LCD_E);
delay_us(2);
output_low(LCD_E);
}



The CCS output_bit() function wants the 'value' parameter to be 0 or 1.
From the CCS manual:
Quote:
Syntax:
output_bit (pin, value)

Parameters:
Pins are defined in the devices .h file. The actual number is
a bit address. For example, port a (byte 5) bit 3 would have
a value of 5*8+3 or 43. This is defined as follows: #define
PIN_A3 43. Value is a 1 or a 0.


Doing a double negation (!!) will convert an integer value to a 0 or 1.
I am giving the output_bit() function what it needs.
jaime



Joined: 25 Nov 2005
Posts: 56
Location: Porto - Portugal

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

PostPosted: Tue Dec 19, 2006 10:38 am     Reply with quote

What i need to do to use it with 24x2 display??

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Dec 19, 2006 1:21 pm     Reply with quote

Quote:
What i need to do to use it with 24x2 display ?

Give the manufacturer and part number of the 24x2 LCD that you
want to use. Post a link to the data sheet. I'll look at it.
jaime



Joined: 25 Nov 2005
Posts: 56
Location: Porto - Portugal

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

PostPosted: Tue Dec 19, 2006 1:46 pm     Reply with quote

In the silkscreen i have:
SII L2432 N11V0

There's some info in the net but i cannot find the site of the manufaturer...

Thanks

http://www.eio.com/l2432ap.htm
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  Next
Page 2 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