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

Problems porting 1-wire code from 16F877 to 18F4525

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jan 06, 2007 3:54 pm     Reply with quote

Quote:
#bit TOUCH_PIN_BIT = 5.1 // Port A (5) pin 1

You've defined the address of the PortA register as 0x05.
That's valid for the 16F series, but not for the 18F series.
Look in the data sheet for your PIC, in the section titled
"SPECIAL FUNCTION REGISTER MAP". It will list the correct
register address for PortA for your PIC.

If any of your #included files have the same problem, you'll
need to fix them as well.


Also, when you post code, be sure to disable HTML. There's
a checkbox to do this, if you look below the posting window.
You should Edit your post, delete the code, and copy and paste
a fresh copy from your editor. Then disable HTML before
clicking the Submit button.
Quote:

x Disable HTML in this post
perkins



Joined: 03 Jan 2004
Posts: 2

View user's profile Send private message

PostPosted: Sun Jan 07, 2007 10:52 am     Reply with quote

Thankyou,

All works well with changes. AP
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