Shop OBEX P1 Docs P2 Docs Learn Events
TRIS_X assignment issue — Parallax Forums

TRIS_X assignment issue

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2009-07-30 14:56 in General Discussion
Bean,
For the SX48/52
When I use a local byte to assign it to tris_x,
the compiler generates error "Byte parameter expected"

SUB mySub
· a var byte
· b var word
· tris_A = __param1 'ok
· a = tris_A 'ok
· tris_A = a 'generates error
ENDSUB

I don't see a reason why this should be. If necessary
a can be loaded into a __PARAMX first.

Another question regarding tris_x:
For the sx48/52, __TRIS EQU $FF is declared (also TRIS_X).
Where is this __TRIS used for?

regards peter

Comments

  • BeanBean Posts: 8,129
    edited 2009-07-20 21:01
    Peter,
    Yes, your right. I'll fix that right away.

    Thanks again.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Does that byte of memory hold "A", 65, $41 or %01000001 ?
    Yes it does...


    ·
  • BeanBean Posts: 8,129
    edited 2009-07-20 21:31
    Peter,
    · Here is a new Beta for 2.00.30

    · I think I fixed the problem. I also optimized the localbyte = register instructions (they no longer use __PARAM1).

    Bean



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Does that byte of memory hold "A", 65, $41 or %01000001 ?
    Yes it does...
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-07-20 22:00
    Thanks, looks fine.

    Just what·is TRIS_X ($ff) used for?
    Certainly not for just changing pin direction.


    regards peter

    Post Edited (Peter Verkaik) : 7/20/2009 10:06:29 PM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-07-30 14:56
    Hi Bean,

    Will this version 30 be posted in the sticky thread?

    And what about TRIS_X for the SX48/52?
    Is there any SX/B command that uses that location?

    regards peter
Sign In or Register to comment.