![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
CombatWombat Guest
|
pic10f222 doesnt work with CCS |
Posted: Thu Jan 08, 2009 6:01 pm |
|
|
Hello, I cannot get my pic10f222 program to work using CCS. The same pic and circuit will work when programmed through assembly.
I am using compiler version 4.013.
My test code is as follows,
Code: | #include <10f222.h>
#use delay(clock=4000000)
#fuses nomclr, noprotect, nowdt, intclk
void main()
{
while(true)
{
output_high(PIN_B0);
}
} |
None of the pins will go high. I have tried explicitly putting the TRIS_B to output. This did not help.
I have searched and found that earlier versions of the compiler had problems with where they located the config bits on the pic10's. I am not sure how to check that, but here is the .hex output.
Code: | :100000002500020A6400FF0C2B000B040B02060003
:1000100006052B040B02060026054B040B02060006
:060020004605050A03007D
:021FFE00E90FE9
:00000001FF
;PIC10F222
|
I notice the last line ":021FFE00E90FE0" is different from that which is found in the hex file for my asm code; ":021FFE00EB0FE7". Is this the issue? How do I correct this? |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Jan 09, 2009 8:20 am |
|
|
Compiler v4.013 is very old and _very_ unreliable. To indicate how bad this release was consider we are now at v4.084, a stunning number of 71 releases further...
V4.013 was never released as a stable version, it was only there for developers requiring the new v4 compiler features. The v4 compiler became usable around v4.030 and fit for production quality code around v4.070.
Even if we could solve your current problem you will run into another problem with the next change you make. Save everybody, including yourself, a lot of time by upgrading to a new compiler version. |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|