Problem Programming PIC16F84A

Status
Not open for further replies.

shoie01

New Member
Hi I am a beginner and am trying to prgram my PIC16F84A. This is what I am trying to do; I will have three inputs(momentary switches), i want to be able to hit switch 1 and have output 1 turn on a led for 1 second then turn off, if switch 2 is enabled i want led 2 to be on for 1 second then turn off, and if switch three is enabled i want led 1 and 2 to be on for 1 second. I am using Mp Lab to write the program and the main problem i am having is figuring out how to make the output only stay on for a specified time then turn off (Like I said I am very much a beginner), please any help here will be greatly appreciated. Oh ya and I am using a 4Mhz crystal oscillator.
 

You might have a look at my PIC tutorials?, for the specific time delay you can do it either with software loops or by using one of the timers - software loops are probably easier.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…