************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi Ace,
Thanks for your reply.
The button is pressed by the piston on a gear box. As i said on other post, my actual reading is 15 to 20 cycles per sec. And i need to stop the piston, after 3 cycles.
I have some Ir sensors. But putting them inside the gearbox or some where around, it is not a good idea.
Hence, buttons is the best for my application i think.
Thanks.![]()
20 c/s is 50 ms ... 3 cycles are 150 ms ...
electronics works for 80 ms per 3 cycles ...
SO ... if your switch is a good quality / low inertia one... it Works !!!
but, of course ... if it works in oil ... ( gear box ...)
magnetic detector looks to be THE thing ... I think telemecanique also have nice proximity switches that can reach 50 or 100 Hz ... ( I have some home ...)
at least it's no more an electronics problem ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Why not a mag/prox sensor on a connecting rod or gear.
Maybe even find a gear that is 3/1??
Dave
Always wear safety glasses while programming.
Hello All,
After trying with different sensor, and switches, I have found out that the reason for the strange behaviour, or mal functioning of the code, it is due to the excess of current supply.
I have notice that when you have the "finger" on any of the conections, the systems works!!, but if you remove the finger, starts to go nuts again.
So at the moment i am supplying from 3v = 2xAA bateries. I will put a LM317 to allow only 250ma to go through.
See if that helps.
I will post my results.
Best regards.
And thank you all for your help.
Hello All,
I have put the voltage regulator, configured as a corrent regulator, allowing to pass only 250 mmA to the pic.
Still does not work....if i put the finger on any conection...no problem, it works. But as soon as i remove my finger fron the conection, it goes dead.
Why?...i thoght it was because the current, but this experiment has proved that it is not that. Hence, i am starting to believe that it may be because configuration in the pic.
After having a closer look at the code, i notive pull ups where enable, should not that option be of sice i have pull up resistors in the circuit as shown, ?/...or is it the other way around?..
Any body please?
Ace?...
Best regards.
Sounds like you need a capacitor across VDD/VSS.
You posted a schematic earlier but said this is what I have with this and that exception and you also said your were using the software to set the configs.
If we knew what the configs are set to and how the chip is connected it may help.
Dave
Always wear safety glasses while programming.
Bookmarks