Searching \ for '[Fwd: change table read or what]' 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: 'change table read or what]'.

Exact match. Not showing close matches.
PICList Thread
'[Fwd: change table read or what]'
1998\11\27@174746 by marbel

picon face
part 0 2185 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

Hello i am simulating the wheels i a mouse the X part of the following
code works fine but then there is the problem with the Ymovement part
when i want to move the data to portB i don't wand any bits affected
i thought to do this with xorwf  but the data on pin 1,2 is not affected
data on pin 3,4 disturbs table output
how to solve this change table?


; quadrature.ASM


         PIC84    equ 0x00
         PortA    equ 0x05
         PortB    equ 0x06
         Stepx    equ 0x0C
         Rightx   equ 0x00
         Countx   equ 0x0D
         Stepy    equ 0x0E
         Righty   equ 0x01
         County   equ 0x0F
         temp     equ 0x10
         F2Posi   equ 0x01
         Flags2   equ 0x11
         Xbit     equ 0x05
         Ybit     equ 0x07

ORG 0x05

Table                            ; tabel to look up previous or next step
        addwf   PCL,f
        retlw   b'00000000'
        retlw   b'00000010'
        retlw   b'00000011'
        retlw   b'00000001'

        clrf    PortA           ;
        movlw   B'00000010'     ; make pin 2 input others output
        TRIS    PortA           ; move to tristate register
        clrf    PortB           ;
        movlw   B'00000000'     ; all pin's on port B output
        TRIS    PortB           ; move to tristate register
        clrf    Stepx           ; clear step X register
        clrf    Stepy           ; clear step Y register
        clrf    TMR0            ; clear timer register
        clrf    temp            ; clear temp register
        movlw   0x10
        movwf   Countx
        movwf   County
        btfsc   PortB,F2Posi
        bsf     Flags2,F2Posi
        btfsc   PORTB,Xbit      ; test xbit= horizontal    |
        goto    RightLabel_Y    ; if lo goto y = vertical  |
        bcf     PORTB,Ybit      ; Switch Yinput off        |
        bsf     PORTB,Xbit      ; Switch Xinput on         |
        goto    RightLabel_X

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