Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Creating pulses at output port of PIC

Status
Not open for further replies.

VRL_15

New Member
--------------------------------------------------------------------------------

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
 
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.
 
del50 is your 50mS delay. I didn't bother explaining it as I thought it was kinda obvious.

Mike.
 
Status
Not open for further replies.

Latest threads

Back
Top