Creating pulses at output port of PIC

Thread Starter

RG23

Joined Dec 6, 2010
304
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
 

Thread Starter

RG23

Joined Dec 6, 2010
304
I want to create that pulse which is 100 ms ON and 500 ms off using the timer of 50 ms only

please let me know if you have an idea
 

bertus

Joined Apr 5, 2008
22,278
Hello,

I am not a programmer, but if you set the port high, loop the 50 mS twice,
set the port low, loop the 50 mS 10 times and you will have the wanted result.

Bertus
 
School project?

Setup up a timer that will cause an interrupt every 50ms. The PIC spec PDF will detail which settings to use to get that.

Then have a variable count the timer ticks (occurs every interrupt) . Reset your tick counter to 0 when it reaches 12.
Activate a port pin digital output on the 16f887 when the tick value is <3, and shut it off (low) when tick >=3.
 

Thread Starter

RG23

Joined Dec 6, 2010
304
Setup up a timer that will cause an interrupt every 50ms. The PIC spec PDF will detail which settings to use to get that.

Then have a variable count the timer ticks (occurs every interrupt) . Reset your tick counter to 0 when it reaches 12.
Activate a port pin digital output on the 16f887 when the tick value is <3, and shut it off (low) when tick >=3.
________________________________________________________________

I am not clear with this idea
Can you please explain once again

Thanks
 
Top