jhanus
New Member
Hello,
I found a part of code, but it's written in "old" way. So plz convert it that it uses bcf bank0...
I tried, but what is OPTION in middle of nowhere, argh...
CODE:
Thanks
I found a part of code, but it's written in "old" way. So plz convert it that it uses bcf bank0...
I tried, but what is OPTION in middle of nowhere, argh...
CODE:
Code:
;ORIGINAL
start clrf PORTA
clrf PORTB
movlw B'00010000'
tris PORTA ;<=PROBLEM
movlw B'00000000'
tris PORTB ;<=PROBLEM
movlw B'00000011'
option ;<=PROBLEM
movlw 0
movwf temp
clrf work
movlw B'10100000'
movwf INTCON
return
;********************************
;My conversion, probably wrong, because it's not working
;********************************
start clrf PORTA
clrf PORTB
[COLOR="Red"] bsf STATUS,RP0[/COLOR]
movlw B'00010000'
[COLOR="Red"] movwf TRISA[/COLOR]
movlw B'00000000
[COLOR="Red"] movwf TRISB[/COLOR]
movlw B'00000011'
[COLOR="Red"] movwf OPTION_REG [/COLOR]
;
[COLOR="Red"] bcf STATUS,RP0 [/COLOR]
movlw 0
movwf temp
clrf work
movlw B'10100000'
movwf INTCON
return
Thanks