V VRL_15 New Member Feb 1, 2011 #1 -------------------------------------------------------------------------------- I am using PIC 16f887 I have a timer of 50 ms Using that timer I want to create a pulse at the output port The pulse should be 100 ms on then 100 ms off and then 500 ms off. If anyone has an idea please let me know Thank you
-------------------------------------------------------------------------------- I am using PIC 16f887 I have a timer of 50 ms Using that timer I want to create a pulse at the output port The pulse should be 100 ms on then 100 ms off and then 500 ms off. If anyone has an idea please let me know Thank you
P Pommie Well-Known Member Most Helpful Member Feb 1, 2011 #2 How about, Code: loop bsf PORTA,0 call del50 call del50 bcf PORTA,0 call del50 call del50 goto loop I'll let you figure out how to set the pin to output. Oh, yes, didn't understand the 500 off bit. Sounds like 600mS off to me. Mike.
How about, Code: loop bsf PORTA,0 call del50 call del50 bcf PORTA,0 call del50 call del50 goto loop I'll let you figure out how to set the pin to output. Oh, yes, didn't understand the 500 off bit. Sounds like 600mS off to me. Mike.
P Pommie Well-Known Member Most Helpful Member Feb 1, 2011 #6 del50 is your 50mS delay. I didn't bother explaining it as I thought it was kinda obvious. Mike.