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

PIN_D7 on PIC18F4580

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



Joined: 26 Oct 2005
Posts: 19

View user's profile Send private message

PIN_D7 on PIC18F4580
PostPosted: Sun Jan 08, 2006 3:05 pm     Reply with quote

Hi all,

Can someone tell my why this pin is not defined in the 18F4580.h file, and why in the debugger it shows me the MSB of portd/trisd as an X? The chip datasheet doesn't give me any indication that there is anything special about this i/o pin (that I could see).

I know I must be missing something simple here, but I can't seem to make sense of it. I am having a problem with a project I am migrating from a 18F458 chip where I use this pin to write to an LCD.

Matt
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 08, 2006 3:14 pm     Reply with quote

What's your compiler version ? PCH vs. 3.241 has it defined:
Quote:
#define PIN_D0 31768
#define PIN_D1 31769
#define PIN_D2 31770
#define PIN_D3 31771
#define PIN_D4 31772
#define PIN_D5 31773
#define PIN_D6 31774
#define PIN_D7 31775

If you have PCWH, then use the Device Editor to check if Pin D7 is
properly defined in the i/o ports section. Screenshot of Device Editor:
http://www.ccsinfo.com/pix/Device%20Editor.gif
mdares



Joined: 26 Oct 2005
Posts: 19

View user's profile Send private message

PostPosted: Sun Jan 08, 2006 7:13 pm     Reply with quote

I am uning 3.242, just upgraded from 3.224 when I noticed the problem. It is defined properly in the device editor, but only displaying 7 bits in the debugger (portd/trisd show up as set to x1111111 under peripherals in the debugger).
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jan 08, 2006 7:57 pm     Reply with quote

What if this is a debugger issue, and not a compiler or hardware issue ?
mdares



Joined: 26 Oct 2005
Posts: 19

View user's profile Send private message

PostPosted: Sun Jan 08, 2006 9:02 pm     Reply with quote

I think I found it:

When I regenerated the header file for the new project with the updated compiler it set this fuse:
#FUSES NOXINST

which was under 3.224 was (or maybe by a misclick from me)
#FUSES XINST

Anyway this seems to have been my problem.


Thanks for your time
Matthew Dares
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