tschen
Junior Member level 3
;2.5s DELAY
DELAY1: CLRF TMR0 ;START TMR0
LOOPA MOVF TMR0,W ;READ TMR0 INTO W
SUBL .9766 ;TIME - W
BTFS STATUS,Z ;CHECK TIME - W = 0
GOTO LOOPA
RETLW 0 ;RETURN AFTER TMR0=>(1MHz/256) = 3906.25Hz
I'm using TLP/RLP 434A conncted to PIC16F877A with 4MHz external clock. I intend to send a pulse using the delay subroutines. 2.5s represents a logic 0, 5s for logic 1 and 7.5s for a start bit.
I tested the .asm codes on the breadboard and it seems that the pulse is not generated. Why is that???
DELAY1: CLRF TMR0 ;START TMR0
LOOPA MOVF TMR0,W ;READ TMR0 INTO W
SUBL .9766 ;TIME - W
BTFS STATUS,Z ;CHECK TIME - W = 0
GOTO LOOPA
RETLW 0 ;RETURN AFTER TMR0=>(1MHz/256) = 3906.25Hz
I'm using TLP/RLP 434A conncted to PIC16F877A with 4MHz external clock. I intend to send a pulse using the delay subroutines. 2.5s represents a logic 0, 5s for logic 1 and 7.5s for a start bit.
I tested the .asm codes on the breadboard and it seems that the pulse is not generated. Why is that???