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.

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.
 
shoie01 said:
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.

New Articles From Microcontroller Tips

Back
Top