|
|
View previous topic :: View next topic |
Author |
Message |
juinhooley
Joined: 02 Aug 2011 Posts: 10
|
lcd_symbols function doesn't take 16-bit in PIC16F1946!! |
Posted: Sun Sep 04, 2011 11:44 pm |
|
|
Hi,
In the help file, it says that the lcd_symbols function take 8-bit or 16-bit symbol.
My code didn't work when I had:
Code: |
int16 const Digit_Map[10] =
// 0 1 2 3 4 5 6 7 8 9
{0xFC00, 0x6020, 0xDB00, 0xF100, 0x0700, 0xB700, 0xBF00, 0x8028, 0xFF00, 0xE700};
|
It works perfectly when I had:
Code: |
int8 cons Digit_Map[10]
{0xFC,0x60,0xDB,0xF3,0x67,0xB7,0xBF,0xE0,0xFF,0xE7};
// CHAR1 is 14-segment character
lcd_symbol( Digit_Map[i], CHAR1 );
|
What else can I do?
Thanks,
Juin |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
juinhooley
Joined: 02 Aug 2011 Posts: 10
|
|
Posted: Mon Sep 05, 2011 12:57 am |
|
|
Thanks. That's great!
I found another problem.
In the PIC16f1946.h file the constants for the commons are
COM0 0
COM1 24
COM2 48
COM3 72
Since this micrcontroller has 46segments, shouldn't the numbers be 0, 46, 92 & 138?
I tried to write my own constants to overwrite this but CCS was turning on wrong segments. Any idea how to fix this one?
Thank you! |
|
|
juinhooley
Joined: 02 Aug 2011 Posts: 10
|
LCD problems with PIC16F1946 |
Posted: Tue Sep 06, 2011 12:04 am |
|
|
Hi, just wondering if anyone has used ccs version 4.124 to compile code for PIC16F1946 with the LCD driver function. It doesn't work?!!
Problem 1:
It thinks that it has only up to 24 segments. Hence the constant for COM0, COM1, COM2 and COM3 are wrong. Even when manually input the correct address number as the 2nd arg of the lcd_symbol function it still compile the code as if it has only 24 segments.
Problem 2:
Then I tried to write code manually and check the WA (write allow) bit before writting to the LCDDATAx registers. It turned out that the WA bit code never go low... so I can't write to the register.
Problems after problems... can someone help please?!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 06, 2011 12:27 pm |
|
|
If the CCS functions don't work for the PIC you have, then you can:
1. Report the bugs and CCS may fix them in the future. But maybe not
soon enough to help you.
2. Or, you can write your own LCD functions.
3. Or, you can write directly to the LCD control registers to setup the
LCD module. |
|
|
|
|
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
|