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.

12F675

Status
Not open for further replies.

rthuey

Member
wanting to use a circuit that i found on the outer webs. trying to determine the reasoning why the specific pin was used. so a 12F675 was used.

Pin 1 shows voltage as if it was an input.
Pin 2 has an led which is being turned on and off.
Pin 5 has a motion sensor connected to it.

My understanding of the circuit is when motion is detected from the device on Pin 5. It allows the voltage on Pin1 to pass to Pin 2 and turn on the led.

Me deciphering the data sheet;
Pin 1 is positive supply which is self explanatory.
Pin 2 can be used four different ways GP5/T1ckI/OSC1/CLKIN. My guess is as GP5. Of the four it is the only one that is an output.
Pin 5 can be used five different ways GP2/AN2/T0CKI/INT/COUT. I read that four can be used as inputs. Don't know which is the way they would have intended.

Any thoughts?
 
thought i explained it quite well, but sure here is the visual
sensor2.tiff
 
Hi,

Yes you are almost right on your pin assumptions.

Pins 1 and 8 are the power supply to run the chip.
All the other 6 pins are General Purpose Multifunction pins that can be configure as Inputs or Output plus the other special functions assigned to each pin.

Are you wanting to make a programmed circuit like that or just to understand what that circuit is doing ?

Download the 12F675 Datasheet from Microchip for starters.

If you see the Stickys at the top of the forum there are many helpful links and tutorials.
 
thought i explained it quite well

Your understanding of the pin layout and function of each on the 12F675 itself is fine, and you are likely correct about the input from the sensor, but it's the type of sensor and how it is being used with the 12F675 that I was wanting more information on. Hence my asking you to post a link to the circuit you refer to from the "outer web". The sensor could be digital, just a simple switch or some fancy analog thing. This will dictate which type of function GP2 is most likely to perform :)
 
Are you aware that the 12f675 is a microcontroller and runs code you program into it?
 
You are correct the circuit does show a more complete picture and can help enormously to get my answers..

Yes i was able to see that the other 6 can be multi function or special function. Was Pin 5 used for aesthetic or space reasons to even out the pins used, doubtful. Could Pin 5 been used specifically for its special purpose, External Interrupt?

Yes i already had the data sheets as mentioned in OP.

This from the sensors data sheet;
"The sensor can be easily used to produce a series of CMOS or TTL level logic level or pulse train using a single resistor to limit current. The signal level can be read directly by a digital input. This can be used to interrupt (wake up) a micro controller or can be counted to estimate the amount and duration of activity. The sensor is fully passive, requires no signal conditioning, and draws as little as 50 nA of continuous current."

I would like to use the sensor to (wake up) a micro controller. Did i just see/answer my own question? Had read that over a couple times and the use of interrupt did not click.

Both. Yes i know that the micro controller needs to be programmed. I need to be sure what the circuit is doing before i can try to explain to someone what i want the program to do.
 
Fair enough.
Yes the int pin is probably a good idea, havent used the '675 for a bit but you can wake up the chip with that pin from memory, there might be other ways too such as a change on the port.
 
I want to post on freelancer. Are these specific enough instructions.

I would like the 12F675 programmed to listen for a signal from Pin 5. If it hears one i would like it to listen for a follow up signal in 3 seconds. If there is not a second signal it should go back to sleep. If there is a second signal it should allow the voltage from Pin 1 pass through to Pin 2. As long as it is getting a signal from Pin 5 it should allow voltage from Pin 1 pass to Pin 2. If signal stops from Pin 5 then voltage should not pass from Pin 1 to Pin 2. Any power saving capabilities possible should be used.
 
Specific enough to generate more questions than answers :)

Are you using the internal or an external oscillator? How long before the micro goes back to sleep from it's last active state/ detection? Immediately? After 3 seconds etc? Also I think you should state which sensor you are planning on using on pin5. From your description I assume it's one of the SignalQuest devices, perhaps the SQ-Min200 tilt sensor? The trouble with making any assumptions is that they are invariably wrong. Be very specific about every last detail of your requirements or you may end up with something that meets your specification but is useless for your application :)
 
I will be posting an image of the circuit with my description. Which does not show an external oscillator. The sensor model is stated on the circuit. These should not be questions then.

I would like the 12F675 programmed to listen for a signal from Pin 5. If it hears one i would like it to listen for a follow up signal in 3 seconds. If there is not a second signal it should go back to sleep. If there is a second signal it should allow the voltage from Pin 1 pass through to Pin 2. As long as it is getting a signal from Pin 5 it should allow voltage from Pin 1 pass to Pin 2. If signal stops from Pin 5 then voltage should immediately not pass from Pin 1 to Pin 2. Any power saving capabilities possible should be used.

Thank you for walking me through this. Is it clearer now?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top