'Why not TRIS? (Was What is OPCODE for TRIS instruc'
|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
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
(all?) bank switching in the f84.
Now, a question: Does the following code work:
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
- ~~~~ ~~ ---- icn.siemens.deNuno.Pedrosa
- ~~~~ ~~ ---- "MSWindows - Best run on a SlideShow"
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- New search...