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

Question about Hitachi 44780 and PIC24

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mcr1981



Joined: 27 Oct 2010
Posts: 28

View user's profile Send private message

Question about Hitachi 44780 and PIC24
PostPosted: Fri Dec 27, 2013 1:15 pm     Reply with quote

Hello.

I will probably make the leap from 18F to 24F but would like to know if the flex_lcd driver works with the 24F series.

Will probably get the explorer 16 from Microchip and I know it has an LCD but I'm unaware of its driver.

Thanks and I apologize for my English (it's a little rusty).
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Fri Dec 27, 2013 3:08 pm     Reply with quote

Probably. I used the "standard" CCS lcd driver with a dsPIC33F with no issues. The flex driver is loosely based on that, so you're probably going to be okay. That said, it's really not hard to modify any of them to suit your processor/hardware.
jeremiah



Joined: 20 Jul 2010
Posts: 1353

View user's profile Send private message

PostPosted: Fri Dec 27, 2013 3:15 pm     Reply with quote

Glancing through it, I didn't see anything that poked out as a normal porting problem. All the variable types have specified sizes that I saw. The only thing of possible concern is that variables aren't labelled signed/unsigned which can sometimes cause problems in certain versions of PCD (some versions have bugs with sign extension and size promotion unless specifically specified).

Though I primarily use PIC24, none of my projects have allowed me to use the parallel interface, so I don't have any experience with the flex_lcd driver specifically.
mcr1981



Joined: 27 Oct 2010
Posts: 28

View user's profile Send private message

Will try it and let you know...
PostPosted: Fri Dec 27, 2013 4:55 pm     Reply with quote

If you have used the standard LCD driver with a dsPIC, I hope I don't have problems.

I'll probably have some PIC24F in DIP before the Explorer 16, I'll test those first.


The thing about the types might be an issue. If the PIC24 is a 16 bit one, the int is 16 instead of 8.

Reading your answers makes me hopeful of the use of the LCD.

Thanks.
jeremiah



Joined: 20 Jul 2010
Posts: 1353

View user's profile Send private message

Re: Will try it and let you know...
PostPosted: Fri Dec 27, 2013 5:30 pm     Reply with quote

mcr1981 wrote:

The thing about the types might be an issue. If the PIC24 is a 16 bit one, the int is 16 instead of 8.


At a glance, the 8bit vs 16bit shouldn't be an issue as the flex_lcd driver specifies the size, which is portable. I don't know about the normal lcd driver though.
mcr1981



Joined: 27 Oct 2010
Posts: 28

View user's profile Send private message

Looks like I have a connection problem....
PostPosted: Mon Jan 13, 2014 3:32 am     Reply with quote

The driver works with PIC16 and PIC18 (I've tested it).

Probably the connections are bad.

Changed the int8 to unsigned int8 in the flex driver just to be sure.


Looking at the device definitions (I use PCD with MPLAB X), the definitions for char are the same and that's odd:

Code:


#if (!defined(__PCD__)||defined(__ISNT_CCS__))
#define _bif
[b]#define int8 char[/b]
#define int16 int
#define int32 long
#define int48 long
#define int64 long long
#define float32 float
#define float48 float
#define float64 double
[b]#define int1 char[/b]

#endif





1:12 AM here, will resume later in the day.


Confused
mcr1981



Joined: 27 Oct 2010
Posts: 28

View user's profile Send private message

Got it working but....
PostPosted: Tue Jan 14, 2014 1:19 am     Reply with quote

Had to use the built in LCD driver from CCS.

Their driver had support for PCD command compiler, Flex_lcd does not.


Had to use one more PIN for R/W, but at least it's working now.

Thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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