Searching \ for 'Why not TRIS? (Was What is OPCODE for TRIS instruc' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Why not TRIS? (Was What is OPCODE for TRIS instruc'.

Truncated match.
PICList Thread
'Why not TRIS? (Was What is OPCODE for TRIS instruc'
1999\03\25@053311 by Nuno Pedrosa

Just my 2.5Esc on this:

I use the 16f84. (Hopefully I'll have my first non-(blinking led)
project in two weeks available to anyone who wants it.)

Someone once said that removing the TRIS instruction is not a good idea.
Yes, it's nice to have a standard way of accessing memory, but I would
rather prefer
getting rid of the banking schemes.

As for the TRIS instruction being fased out... So what?
Most of the code can't be easily ported anyway.

I would go nuts, if I tried to make my code usable in all PICs.
This one has more memory, that one has more timers, that one has FOUR
memory banks, etc.
Not even in C, you can easily go around this.

My opinion: use TRIS. If you need to replace it later, just define a
With TRIS, I usually save one instruction in several places, and get rid
of most
(all?) bank switching in the f84.

Now, a question: Does the following code work:

  movlw TRISX
  movwf FSR
  movlw k
  movlw INDF

Could be useful in some cases, if you really want to avoid TRIS.


Ravi Pailoor wrote:
> Instead of using TRIS instruction, after bank switching use the
> following instruction
>             MOVLW k
>             MOVWF PORTX

----  ~~~~~~~  -------  Nuno Filipe Freitas Pedrosa
--  ~~~~     ~~  -----  SIEMENS S.A. Portugal       TEL: +351 1 4242454
-  ~~~~       ~~  ----
-  ~~~~       ~~  ----  "MSWindows - Best run on a SlideShow"

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...