; ; *************************************************************************** ; *** Bubble Software Parallax to PIC Source Converter. Copyright 1999. *** ; *** http://www.picnpoke.com email: sales@picnpoke.com *** ; *************************************************************************** ; ; PULSOUT port, pin, time ; Generates an output pulse in 10-cycle (10 us at 4 MHz) units, ; based on a 16-bit (1 to 65,535) value. The pulse is the reverse ; of the pin's state when pulsout is called. For instance, if the ; specified pin is initially 1, Pulsout will invert it to make a ; negative-going pulse. P = pic16c55 #include <16c55.inc> ; processor assembler definitions _CONFIG _xt_osc & _wdt_off & _protect_off org 8 TRISB_copy Res d'1' org 0 MOVLW b'11110000' ; Make a copy of TRISB. MOVWF TRISB_copy MOVF TRISB_copy,w ; Move copy into TRISB. TRIS 6h ; >>TRISB now contains 11110000b. ; ... ; Other instructions. MOVLW b'10000000' ; Reverse bit 7 of copy. XORWF TRISB_copy MOVF TRISB_copy,w ; Move copy into TRISB. TRIS 6h ; >>TRISB now contains 01110000b. end