View previous topic :: View next topic |
Author |
Message |
juinhooley
Joined: 02 Aug 2011 Posts: 10
|
Enable LCD pins for PIC16F1946 |
Posted: Mon Aug 22, 2011 11:23 pm |
|
|
Hi,
The above microcontroller has 46 segments for LCD control. Hence there are six LCDSEn registers.
I use this line for lcd setup:
setup_lcd( LCD_TYPE_B | LCD_MUX13 | LCD_BIAS13 | LCD_REF_ENABLED | LCD_B_HIGH_POWER | LCD_TIMER1, 0, 0x3E0E85FFF0FF);
CCS gives me error 103: Constant out of the valid range.
Apparently it'll only take 4 bytes of data. What can I do to let setup_lcd accept this six-byte data?
Or do I have to configure this manually?
Thank you. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 23, 2011 1:30 pm |
|
|
I got the same error with vs. 4.124. Yes, you can do a work-around by
manually setting the Segment registers. Put #byte statements to define
the registers above main(), and then write to them directly in code in main().
If you own the compiler, email CCS and ask them to fix the bug. Show
them the example code that fails and explain that it won't accept more
than 4 bytes. If you don't want to email them, then let me know and I'll
do it. |
|
|
juinhooley
Joined: 02 Aug 2011 Posts: 10
|
|
Posted: Tue Aug 23, 2011 5:12 pm |
|
|
Quote: | If you own the compiler, email CCS and ask them to fix the bug. Show them the example code that fails and explain that it won't accept more than 4 bytes. If you don't want to email them, then let me know and I'll do it. |
Yes we own CCS. Please email them for me. Thank you. |
|
|
|