|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
another newbie
I know you hate to see this another dum newbie.
I am very interested learning to do simple programs. I have a back ground in motor controls with some PLC logic. I have some simple programs that I would like to do to replace relay logic. looking at the microchip flash starter kit for 8 and 14 pin chips. Is this a place that I can get some help. if not then I will just go away. ![]() |
|
#2
|
|||
|
|||
|
Re: another newbie
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: another newbie
Quote:
Quote:
(1) If you don't know anything about programming, you shouldn't start with embedded (embedded meaning low level circuit-y stuff) projects. Start with BASIC on a PC or perhaps html and javascript. (2) If you DO know something about programming, but nothing about embedded programming you have two routes. (2.1) Take the hard (but really cheap) road and start out with PIC microcontrollers. (2.2) Get a BASIC Stamp from parrallax IM me with questions: etherkill ![]() |
|
#4
|
||||
|
||||
|
Re: another newbie
I must disagree with Phrontist on point (1). If you are unfamiliar with programming, do not start with BASIC or web scripting. Start with a good book focusing on fundamentals and take a look at something like C++ or Java. Of cousre, if you are the type that loses interest easily and can't live without quick results, Phrontist is right.
|
|
#5
|
|||
|
|||
|
Re: another newbie
Quote:
|
|
#6
|
||||
|
||||
|
Re: another newbie
Quote:
Oh, yeah. I'm always happy to answer 'newbie' questions. It feeds my ego to be able to give answers to people who don't know something. ![]() |
|
#7
|
|||
|
|||
|
Re: another newbie
Hello,
What kind of relay-logic circuits are you looking to replace? If your circuits are simple enough, a good FPGA will suffice. They are not very hard to program, I have used a program called WinCUPL with them. I have only worked for a short time with them, but they sure beat using arrays of gates. Also, I will suggest you take a look at Circuitmaker. It is a very useful tool for people working/learning/messing around with electronics. There is a student version of Circuitmaker 6 available for free on the Microcode website. There is also a trial version of Circuitmaker 2000 available (30 days only). I have used both the student version of Circuitmaker 6 and the full version of Circuitmaker 2000, and there aren't many differences between them. PM me or IM me if you need any help and Good luck. |
|
#8
|
|||
|
|||
|
Re: another newbie
ok here is what I need to do.
this operates a camera using a pir motion. when the pir is tripped it has a output for 4sec. (adjustable) what I need to do is when the pir trips I need 1 output to stay on for 20sec (adjustable) from the time the pir trips then off 1 output to turn on 4 sec. (adjustable) after the pir trips and stay on for 4sec. (adjustable).then off. if the pir trips again dearing this cycle. it has no effect. ![]() |
|
#9
|
||||
|
||||
|
Re: another newbie
Quote:
Code:
Loop forever
Check if pir tripped
If it was, then
Turn Output on and wait 20sec
Turn Output on and wait 4sec
End of tripped situation
End check
End of loop
That help? ==EDIT== Looks like this is in C, so, slightly more detail: Code:
#define TRIPPED 1 // Whatever the "tripped" setting for the pir reads in the program
while(1)
{
if(pir == TRIPPED)
{
// Turn on outputs and wait approriate times.
// I'm not sure how'd you do this using your specific stuff.
}
}
Last edited by Ryan M. : 05-07-2004 at 17:15. |
|
#10
|
|||
|
|||
|
Re: another newbie
thanks Texan
that the thing I can do it with relays and 555 timer I can do it with plc logic. I would like to do it with a microcontroller. Iam looking at buying the mirochip flash starter kit to LEARN how too. if that would be a good choice? I know this is real simple stuff for the people on this forum Iam just a old man trying to stay with the times ![]() |
|
#11
|
|||||
|
|||||
|
Re: another newbie
Quote:
|
|
#12
|
||||
|
||||
|
Re: another newbie
Quote:
(I hope)Also, not sure on exactly what might be required in programs for it, but if you're lucky, you might just be about to have one file like this: In the file called pir.c (just as an example, it could be anything) Code:
// Here you could put in any '#include's which are required for input/output
// You'll have to find a manual to tell you what to do exactly
// Example: #include <example.h>
#define PIR_IS_TRIPPED pir_in == 1 // In place of the pir_in == 1 here, you would put
// whatever you need to do to determine if the pir is tripped
int main(int argc, char **argv) // What this is exactly depends somewhat on the compiler
// For instance, it might just be int main(void), instead
{
while(1)
{
if(PIR_IS_TRIPPED)
{
// Turn on outputs and wait approriate times.
// I'm not sure how'd you do this using your specific stuff.
}
}
return 1;
}
Quote:
![]() And, yes, for all you forum police out there, I am aware I duplicated some of that code... Don't bug me about it. ![]() |
|
#13
|
|||||
|
|||||
|
Re: another newbie
Quote:
Code:
//...
if(pir_in == 1 // In place of the pir_in == 1 here, you would put)
//...
|
|
#14
|
||||
|
||||
|
Re: another newbie
Quote:
![]() |
|
#15
|
|||
|
|||
|
Re: another newbie
this may not be the place for me. who are you today
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| navigate and default code newbie question | alan koch | Programming | 2 | 17-02-2004 22:25 |
| the question only a newbie would ask.. | archiver | 2001 | 2 | 23-06-2002 23:17 |
| Gratitude from a newbie | archiver | 2000 | 1 | 23-06-2002 22:52 |
| newbie | Mrs. Flynn | General Forum | 6 | 23-05-2002 17:45 |
| Total newbie to the Chairman's Award | A. Leese | Chairman's Award | 4 | 06-06-2001 22:03 |