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

T5CKI on an 18F4431

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







T5CKI on an 18F4431
PostPosted: Sat May 13, 2006 12:39 pm     Reply with quote

I have an application that requires T5CKI to be input on pin RD0 of a PIC18F4431 - this should be the default setting for the chip according to Microchip docs.

I'm using MPLAB7.30 for software simulation support and I use the CCS plug-in to have MPLAB interoperate with the PICC compiler toolset. I'm using pch 3.226.

No matter whether I specify the SSP_RC or SSP_RD fuses (or none of these fuses at all), MPSIM always shows T5CKI associated with the alternate pin RC3. I cannot select RD0 through compilation. Even if I force the config bit in MPLAB Config Settings to RD0, as soon as I load the PICC code to start debugging, the T5CKI signal reverts to pin RC3.

I didn't find anything on the Microchip SIM/IDE message boards on this. I also scanned the PICC release mods, but didn't find anything about timer5 (though there were some references to PIC18 optomizations). Am I doing something dumb or am I running into a bug?
shaned



Joined: 13 May 2006
Posts: 3

View user's profile Send private message

A device problem in CCS I think...
PostPosted: Sat May 13, 2006 7:36 pm     Reply with quote

I found my problem and I've corrected it. I found a mention to the "Device Editor" in the PICC manual. There I discovered the SSP_RC and SSP_RD fuse definitions. I noticed that both mask for the bit that controls TMR0/T5CKI. However, I noticed further that both SSP_RC and SSP_RD set this TMR0/T5CKI mux bit to 1. It never gets set to 0.

I modified the SSP_RD fuse option to clear bit 4. After re-compling the project with pch, MPLAB's SIM now shows the TMR5 input set to RD0 as it should be.

(Now, is it reasonable to have the SSP_RD fuse option configure the TMR0/T5CKI mux feature? Did I overlook a more appropriate fuse label? I don't know - that's for bigger minds to decide.)

Has this already been updated in a later revision of pch?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat May 13, 2006 8:57 pm     Reply with quote

Quote:
Has this already been updated in a later revision of pch?


PCH vs. 3.249 with SSP_RD fuse:
[quote]Configuration Fuses:
Word 3: 993C T1LOWPOWER HPOL_HIGH LPOL_HIGH PWMPIN MCLR FLTAC1 SSP_RD PWM4B5 EXCLKC3

PCH vs. 3.249 with SSP_RC fuse:
Configuration Fuses:
Word 3: 9D3C T1LOWPOWER HPOL_HIGH LPOL_HIGH PWMPIN MCLR FLTAC1 SSP_RC PWM4B5 EXCLKC3
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