• 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.

Could you help with a pic program please

Status
Not open for further replies.

varkunus

New Member
Hello there I know this is a bit wrong and trust me I have tried doing it myself but having no luck, so can someone just tell me how to do it please. I am making an alarm to go in a safe and need to make a program in flowchart (or basic if I must). I need this program to be split into 2 parts, the first being when the alarm is active, the other being when the alarm is inactive. During the innactive period there just needs to be a delay of 5 minutes. However, during the part where the alarm is active, the alarm needs to be scanning for an input going low regularily whilst still maintaining an accurate 5 minute time delay. I have tried using Inc and compare, but you can only increase that to 255 milliseconds - so no good. I have tried using wait commands, and although they can be looped it means I cant do it because if I have a decision box then the procedure will keep repeating. Bit hard to explain but I know what I mean :D So could you guys tell me, a PIC noob how to do it or do it for me. By the way, once the alarm is triggered I need to go to a subprocedure, but I can do that part
 

runingbamboo

New Member
need some help

can any one help me to make piece of program? I just want make a 4 lights controller. the lights on/off by 4 micro switches. i am using pic16f88 and icd2.
 
Last edited:

binzer

Member
can any one help me to make piece of program? I just want make a 4 lights controller. the lights on/off by 4 micro switches. i am using pic16f88 and icd2.
1) generate config code for your mcu
2) Setup input and output ports
3) Generate your code with debounce on input pins which turn on your output pins.

Most of this can be found in sample code on the microchip site or from code found on sites such as Nigels, Pommie, 3vo, blueroom, and others. You have to do the homework, iknow it's there because I have read it also.

Good Luck, Mike.
 

binzer

Member
but I need the code urgent, so if you can help me out
You did not post what mcu that you are using, or what language you are using, and you did not read what I wrote. People who write code for a living do not do it for free. I do not write code, for me this is a hobby for learning. I did point you to places where you can find info so you can understand how to accomplish your task (homework/school project).
Good Luck, Mike.
 

varkunus

New Member
hhhm actually guys dont worry, I think I have done it putting a wait command and decision box as a sub procedure and looping it. It is not ideal but it works, but thanks for all the help anyway
 

runingbamboo

New Member
Thanks Binzer, I realized that it will be some cost for doing the code. Unfortunately I am not smart enough to get the skill before the deadline. So I rather then let some one to do it. For learning the PIC, I copied some sample programs to my ICD2 from Nigels but none of them works. Do I need edit them before make them working? Is where any bugs on it?
Any way, if any one is interested please drop me a line on [email protected]
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top