First is it possible to run a low voltage digital sensor switch to work on this board and how?
First is it possible to run a low voltage digital sensor switch to work on this board and how?
Hi Jasonstew,
Please give a bit more detail, I am pretty sure the answer is yes. What voltage and type of sensor do you want? Digital or analog ?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
As i said it will be a digital sensor and i believe the voltage is 5 volts, the same as the pickit 2
Why would you think or wonder that it would not work?
Have you tried it?? If so what problems did you encounter?
As Archangel indicated you need to provide enough detail to back up your question.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
I was just wondering how to use digital sensors on PIC's
Can you give a specific part number of the sensor?
or some example code that you have tried?
I(we) are quite willing to helpl but need enough detail so that the question can be addressed.
As you probably know, there are litterally hundreds of digital and analog sensors.
Are you trying to sense light, temperature, sound, mass, movement?
Here is an article showing how to interface with one or many "Dallas Semiconductor 1-wire Temperature sensors (DS18B20)"
http://www.picbasic.co.uk/forum/cont...r-nine-of-them
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Well JasonStew,
Digital is simple, if you have the 5 v it is a one and if not it is a zero, so set one of the ports to input, just for hoots I will say PortB.7 like so TRISB = %10000000 and now portb.7 is an input. Now really simple Psuedocode If Portb.7 = 1 then portb.6 = 1 and viola if portb.7 is switched on then it switches the output on portb.6 to on status. You see I set the other 3 usable ports on PortB as outputs in the tris statement. I think it causes less confusion if you get in the habit of using all 8 bits in your port and register declarations even when the port has "unimplemented" bits like the 4 lower bits(ports) in portb of the 16f690. When you setup the ports and tris registers, it seems counter intuitive but set the port register first then set up the tris register. That way any outputs are set to the desired state before they become outputs (THANKS BRUCE ).
Last edited by Archangel; - 24th June 2011 at 17:04.
Bookmarks