hi,
OK, so please post your full code so that we can check it out.
thanks!
this small script only flick on & off the leds 4 & 5 at a rate giving by TMR0 + CT15.
the MPLAB !!does do it!!, but the micro in the circuit does not!!
checking the pins with a Tektronik does not show any oscilation:
tmr0 equ 0x01
optionr equ 0x81
status equ 0x03
Trisa equ 85H
Porta equ 0x05
Trisb equ 86H
portb equ 0x06
intcon equ 0x0b
acub equ 0x0c
stab equ 0x0d
ct1 equ 0x0e
ct2 equ 0x0f
F equ 1
W equ 0
ct3 equ 0x10
ct4 equ 0x12
ct5 equ 0x14
ct6 equ 0x15
ct7 equ 0x16
ct8 equ 0x17
ct12 equ 0x22
ct15 equ 0x28
#define gie intcon,7
#define intf intcon,1
#define toif intcon,5
#define Banco0 Bcf status,5
#define Banco1 bsf status,5
;cierre del sw1
org 00
goto int1;int1;goto init
;.....................................................
;activacion de los reles
int1: call reloff; todos los leds= off
newlight: movlw 1e; 0d6
movwf ct15
timing1: Banco1
bcf intcon,2;clear de overflow flag
bsf optionr,0
bcf optionr,1
bcf optionr,2; tmr0 rate= 1:255
;bsf gie; habilita todas las interrupciones
;bsf intcon,5; habilita interupcion tmr0
bcf optionr,3; tmr0=activado
bcf optionr,5; reloj interno= on
;verificamos si el tmr0 es overflow
timing2: btfss intcon,2; toif; intcon,5; tmr0=overflow
goto timing2b
goto salto1
timing2b: Banco0
bsf portb,6
goto timing2
salto1: bcf intcon,2; overfow flag offf
call rel7on
decfsz ct15
; goto timing2 ;newlight ;timing1
Banco0
btfss portb,4; bifurcacion 0/1
goto sicero
call rel4off;bsf portb,4; rb4=1
call rel5off
goto rama1
sicero: call rel4on;bcf portb,4; rb4=0
call rel5on
rama1: goto newlight
;......................................................
redon Banco1
;movlw 01
;clrf Trisb
bsf Trisb,4
Banco0
bsf portb,3 ;red = on
return
relon ;Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
Banco0
bsf portb,4
bsf portb,5
bsf portb,6
bsf portb,7
return
rel4on Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,4
Banco0
bsf portb,4
return
rel5on Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,5
Banco0
bsf portb,5
return
rel6on Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,6
Banco0
bsf portb,6
return
rel7on Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,7
Banco0
bsf portb,7
return
reloff Banco1
movlw 01
;clrf Trisb
movwf Trisb
Banco0
bcf portb,4
bcf portb,5
bcf portb,6
bcf portb,7
return
rel4off Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,4
Banco0
bcf portb,4
return
rel5off Banco1
;movlw 01
;clrf Trisb
;movwf Trisb
bcf Trisb,5
Banco0
bcf portb,5
return
rel6off Banco1
;movlw 01
;clrf Trisb
bcf Trisb,6
Banco0
bcf portb,6
return
rel7off Banco1
;movlw 01
;clrf Trisb
bcf Trisb,7
Banco0
bcf portb,7
return
redoff Banco1
;movlw 01
;clrf Trisb
bcf Trisb,4
Banco0
bcf portb,3
return
end