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

LCD420 Question

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



Joined: 11 Mar 2006
Posts: 9

View user's profile Send private message

LCD420 Question
PostPosted: Tue Mar 21, 2006 8:27 pm     Reply with quote

Does anyone know why LCD420.C works beautifully on PIC16F devices and not at all on PIC18F devices?
_________________
Eric
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 21, 2006 9:25 pm     Reply with quote

Quote:
Does anyone know why LCD420.C works beautifully on PIC16F
devices and not at all on PIC18F devices?

Code:
#byte lcd = 6    // This puts the entire structure
                 // on to port B (at address 6)

The register addresses are different between the 16F and 18F devices.
Download the data sheet for your PIC. Look in the Table of Contents
on the left side in the Acrobat reader. Find the register map table.
Then look up the address for the Port B register, and substitute that
address for the value of 6, above. This assumes that you have wired
your LCD to Port B.
Code:

Data Memory Organization
--- SPECIAL FUNCTION REGISTERS
------ SPECIAL FUNCTION REGISTER MAP
physiks



Joined: 11 Mar 2006
Posts: 9

View user's profile Send private message

LCD420 Question
PostPosted: Wed Mar 22, 2006 6:29 am     Reply with quote

That worked, Thanks.
_________________
Eric
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