View previous topic :: View next topic |
Author |
Message |
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
PCW V3.185 problems? |
Posted: Wed Feb 25, 2004 10:17 am |
|
|
There was a post maybe a week ago about a problem with the V3.185 compilers and incorrect bit manipulation or bit I/O. Has anybody else encountered this problem or other known issues with V3.185? _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Wed Feb 25, 2004 11:04 am |
|
|
I think the bug was related to settings a variable bit. Something like bit_set(x,y+4)
The variable in the second parameter combined with a computation is not going to compile to clean assembly code because of the PIC instruction set. I don't know why CCS suport a variable in the second parameter at all. I'm not supprised that this is a weak point. |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Wed Feb 25, 2004 1:22 pm |
|
|
Actually, I am using that exact thing 'set_bit(x, j)', where j is a position counter and x is used as a configuration word. This makes it very easy to set or clear the bits inside the configuration word. This is also messing up my program. It took me a while to figure out that this was causing my problem. I've sent the info to CCS also. In the mean time, I've placed a switch statement in it's place until CCS comes out with a fix. If you use 'set_bit(x, 1)' then things work just fine. It only messes up if you put a variable in the 'bit' position.
Ronald |
|
|
|