View previous topic :: View next topic |
Author |
Message |
shaned Guest
|
T5CKI on an 18F4431 |
Posted: Sat May 13, 2006 12:39 pm |
|
|
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
|
A device problem in CCS I think... |
Posted: Sat May 13, 2006 7:36 pm |
|
|
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
|
|
Posted: Sat May 13, 2006 8:57 pm |
|
|
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 |
|
|
|