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 support@ccsinfo.com

odd number of ram variables hangs lcd.c on pic33

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



Joined: 29 Jun 2007
Posts: 62
Location: Raleigh, NC

View user's profile Send private message Visit poster's website

odd number of ram variables hangs lcd.c on pic33
PostPosted: Wed Apr 27, 2011 9:51 am     Reply with quote

I'm using a PIC33FJ128GP804 with a standard 2-line LCD and the CCS lcd.c driver. It has been working fine during initial code setup/test/development, there are no hardware issues.

As I add code to my application, I find that startup sometimes hangs inside the lcd init routine.

Looking closely at the compiled assembler instructions in the lcd routines, I have found that if there is an odd number of 8-bit variables declared in my code (which appear before the include statement for lcd.c) , then routines inside lcd.c will hang. If I declare one additional (unused) int8 variable to push everything up 1 byte, then lcd.c works fine again.

As I add code and variables I must comment/uncomment the added int8 variable to ensure the lcd.c routines will run.

Not having looked any closer yet, my intuition thinks that part of the compiler is still "thinking 8-bit" even though I'm using a 16-bit part.

Am I doing something wrong, or does this sound like a compiler bug?

Thank you for your time,
Jim
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