AnsweredAssumed Answered

Best way to control port bits

Question asked by Ross Myers on Sep 24, 2007
Latest reply on Sep 24, 2007 by Ross Myers
Hi all,
 
So which of the below is 'acceptable' or most code efficient? Or does it not matter?
lda   #%00000000   ; Set up Port A values before turning on.
sta   PORTA        ; Values to Port A
lda   #%11110011   ; Set up Port A pullups before turning on.
sta   PTAPUE       ; Enable some pullups
lda   #%00000000   ; Store Port A Data Directions.
sta   DDRA         ; Configures Port A[7..0] as inputs
 
OR
 
mov   #%00000000,PORTA    ; Set up Port A values before turning on.
mov   #%11110011,PTAPUE   ; Set up Port A pullups before turning on.
mov   #%00000000,DDRA     ; Store Port A Data Directions.
 
Thanks,
Ross
 


Message Edited by Bloodhound on 2007-09-25 12:23 AM

Outcomes