View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Dec 18, 2004 11:34 pm |
|
|
I tested the most commonly used PICs for the PCM compiler vs. 3.214
to see if they used the obsolete TRIS instruction. A lot of them do.
Here is the simple test program that I used:
Code: | #include <16F628.h>
void main()
{
set_tris_a(0x55);
} |
I didn't test every PIC that's supported by the PCM compiler,
because for a lot of the older 16c series, the TRIS instruction is legal.
But I think for most of the 16F series, the data sheet says not to use it.
As we've seen in this thread, if you use it for some PIC processors,
it doesn't work correctly. I think it's just some chaff left in the silicon
by Microchip. It's not reliable. They really should have turned it into
a NOP or something, rather than leaving a "half-assed" partially-working
instruction in there.
I think the reason that CCS has it in so PICs, is because they use
the Device Editor screen for one PIC as a template, and then it gets
propagated into a lot of other PICs as they add new devices.
I actually don't see this bug, because I never use the "fast_io" directive.
But for those people who do, it probably contributes to the idea of a
flakey program or PIC, or compiler.
I'm going to email CCS this list and suggest that they fix all the Device
Editor files for the next release.
Code: |
12C671
12C672
12CE673
12CE674
12F629 Uses TRIS instruction
12F635 Uses MOVLW
12F675 Uses TRIS instruction
12F675F Uses TRIS instruction
12F675H Uses TRIS instruction
12F675K Uses TRIS instruction
12F683 Uses TRIS instruction
16C61
16C62
16C62A
16C62B
16C63
16C63A
16C64
16C64A
16C65
16C65A
16C65B
16C66
16C67
16C70
16C71
16C72
16C72A
16C73
16CR62
16CR63
16CR64
16CR65
16CR72
16F72
16F73
16C432
16C433
16C554
16C558
16C620
16C620A
16C621
16C621A
16C622
16C622A
16C642
16C662
16C710
16C711
16C712
16C715
16C716
16C717
16C73A
16C73B
16C74
16C745 Uses TRIS instruction
16C74A
16C74B
16C76
16C77
16C83
16C84
16C84A
16CE623
16CE624
16CE625
16CR83
16CR84
16F627 Uses TRIS instruction
16F627A Uses TRIS instruction
16F628 Uses TRIS instruction
16F628A Uses TRIS instruction
16F630 Uses MOVWF
16F636 Uses MOVWF
16F648A Uses TRIS instruction
16F676 Uses MOVWF
16F684 Uses MOVWF
16F688 Uses MOVWF
16F716 Uses TRIS instruction
16F737 Uses MOVWF
16F74 Uses TRIS instruction
16F76 Uses TRIS instruction
16F77 Uses TRIS instruction
16F83 Uses TRIS instruction
16F84 Uses TRIS instruction
16F84A Uses TRIS instruction
16F87 Uses TRIS instruction
16F88 Uses TRIS instruction
16LC74B Uses TRIS instruction
16LF84A Uses TRIS instruction
16C641 Uses TRIS instruction
16C661 Uses TRIS instruction
16C765 Uses TRIS instruction
16C770 Uses TRIS instruction
16C771 Uses TRIS instruction
16C773 Uses MOVWF
16C774 Uses MOVWF
16C781 Uses TRIS instruction
16C782 Uses TRIS instruction
16C923 Uses TRIS instruction
16C924 Uses TRIS instruction
16C925 Uses TRIS instruction
16C926 Uses TRIS instruction
16F747 Uses MOVWF
16F767 Uses MOVWF
16F777 Uses MOVWF
16F818 Uses MOVWF
16F819 Uses MOVWF
16F870 Uses MOVWF
16F871 Uses MOVWF
16F872 Uses MOVWF
16F873 Uses MOVWF
16F873A Uses MOVWF
16F874 Uses MOVWF
16F874A Uses MOVWF
16F876 Uses MOVWF
16F876A Uses MOVWF
16F877 Uses MOVWF
16F877A Uses MOVWF
16F785 Uses TRIS instruction
16F913 Uses TRIS instruction
16F914 Uses TRIS instruction
16F916 Uses TRIS instruction
16F917 Uses TRIS instruction |
|
|
|
GDetienne
Joined: 20 Sep 2003 Posts: 47 Location: Brussel - Belgium
|
|
Posted: Sun Dec 19, 2004 7:08 am |
|
|
Thanks for your research about the reason of this problem.
I send also a mail to CCS. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Dec 22, 2004 3:08 pm |
|
|
I got an email back from CCS support. They can't duplicate the
problem with the 16F88 given in the first part of this thread.
Because of that, they implied to me that they are not going
to change the TRIS instructions to MOVWF in the list of PICs
that I previously posted. |
|
|
GDetienne
Joined: 20 Sep 2003 Posts: 47 Location: Brussel - Belgium
|
|
Posted: Wed Dec 22, 2004 4:26 pm |
|
|
This is the answer received today from CCS about this problem :
Code: |
The TRIS does work fine on the 16F88 part. I just tested it. If the instruction bothers you then use the TOOLS > DEVICE EDITOR to select your part then expand OTHER FEATURES and set TRIS to false.
Send me your program that does not work and I can review it.
|
I do it tomorrow.
Thanks. |
|
|
|