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

Enable LCD pins for PIC16F1946

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



Joined: 02 Aug 2011
Posts: 10

View user's profile Send private message

Enable LCD pins for PIC16F1946
PostPosted: Mon Aug 22, 2011 11:23 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2011 1:30 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2011 5:12 pm     Reply with quote

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.
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