list p=16F628A
#include <p16F628A.inc>
errorlevel -302, -207
__CONFIG _CP_OFF & _DATA_CP_OFF & _LVP_ON & _BOREN_ON & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _XT_OSC
;...................
#define status STATUS
#define Banco0 bcf status,5
#define Banco1 bsf status,5
#define portb PORTB
#define Trisb TRISB
#define trisb TRISB
#define Trisa TRISA
#define porta PORTA
#define trisa TRISA
;....................
goto prueba_de_encendido
prueba_de_encendido: Banco1
clrf trisa ;porta salida
clrf trisb
Banco0
movlw 0xff
movwf portb ;encendido de todos los leds
movlw 0x01
movwf porta ;encendido de A0
movwf portb
bsf PORTA,0
bsf porta,1
bcf portb,0
bsf portb,1
movlw 0xff
movwf porta
nop
stop
end
...........................................
¿¿Why is the port A can not be written??...and meanwhile the same instruction
can write port B perfectly???
clrf trisa;..... moves a 20H instead a "0"
movwf to porta;.... moves nothing to porta as the wreg have a "1".
bsf PORTA,0;...........does not work
bsf porta,1;.............does not work
trisa is 0 so the information should go trough!!!
;.......................................
Thanks to all for your time!!!
spotter-b
#include <p16F628A.inc>
errorlevel -302, -207
__CONFIG _CP_OFF & _DATA_CP_OFF & _LVP_ON & _BOREN_ON & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _XT_OSC
;...................
#define status STATUS
#define Banco0 bcf status,5
#define Banco1 bsf status,5
#define portb PORTB
#define Trisb TRISB
#define trisb TRISB
#define Trisa TRISA
#define porta PORTA
#define trisa TRISA
;....................
goto prueba_de_encendido
prueba_de_encendido: Banco1
clrf trisa ;porta salida
clrf trisb
Banco0
movlw 0xff
movwf portb ;encendido de todos los leds
movlw 0x01
movwf porta ;encendido de A0
movwf portb
bsf PORTA,0
bsf porta,1
bcf portb,0
bsf portb,1
movlw 0xff
movwf porta
nop
stop
end
...........................................
¿¿Why is the port A can not be written??...and meanwhile the same instruction
can write port B perfectly???
clrf trisa;..... moves a 20H instead a "0"
movwf to porta;.... moves nothing to porta as the wreg have a "1".
bsf PORTA,0;...........does not work
bsf porta,1;.............does not work
trisa is 0 so the information should go trough!!!
;.......................................
Thanks to all for your time!!!
spotter-b