View previous topic :: View next topic |
Author |
Message |
mcr1981
Joined: 27 Oct 2010 Posts: 28
|
Question about Hitachi 44780 and PIC24 |
Posted: Fri Dec 27, 2013 1:15 pm |
|
|
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: 1907
|
|
Posted: Fri Dec 27, 2013 3:08 pm |
|
|
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: 1345
|
|
Posted: Fri Dec 27, 2013 3:15 pm |
|
|
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
|
Will try it and let you know... |
Posted: Fri Dec 27, 2013 4:55 pm |
|
|
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: 1345
|
Re: Will try it and let you know... |
Posted: Fri Dec 27, 2013 5:30 pm |
|
|
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
|
Looks like I have a connection problem.... |
Posted: Mon Jan 13, 2014 3:32 am |
|
|
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.
|
|
|
mcr1981
Joined: 27 Oct 2010 Posts: 28
|
Got it working but.... |
Posted: Tue Jan 14, 2014 1:19 am |
|
|
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. |
|
|
|