I didn't read the whole thing but here's one fast suggestion for you.
Pulsout have to return the pin to it's previous state right? but nowhere the initial state have been set. When you turn on a PIC, the state of all pin is hard to predict. add those lines at the top of your code.
Code:
PORTB=0 ' Clear all PORTB pin
TRISB=0 ' Set all PORTB pins to output
if it doesn't work, you could still place a LOW PORTB.7 after each PULSOUT.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks