View previous topic :: View next topic |
Author |
Message |
James B Guest
|
Running another micro from timerX output |
Posted: Mon Jul 10, 2006 6:25 pm |
|
|
Like the subject says really, except that I'm not sure if the Timer1_CLK_OUT will do it, and on what pin that would happen.
I have the pic driven from a crystal with the H4 fuse. I want to supply a clock to another micro that will only be used sometimes.
Trying to cut cost and space. Looked into a clock oscillator circuit but I don't really like that the only way to turn it off is to make the micro use the internal RC and toggle an output pin before it can go full speed. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jul 11, 2006 3:11 am |
|
|
Maybe the following thread is of any help http://www.ccsinfo.com/forum/viewtopic.php?t=27349
Quote: | Looked into a clock oscillator circuit but I don't really like that the only way to turn it off is to make the micro use the internal RC and toggle an output pin before it can go full speed. | I'm not sure what you mean to say here, can you be a bit more detailed? |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Jul 11, 2006 8:14 am |
|
|
Consider running both micros from 1 clock circuit. Then micro1 drives mclr of micro2. or a N-FET to power off the whole micro-2.
Do a search for 2 PICs from one clock for more info on that.
When using a crystal and caps you may have to fool with the cap value for
2 pics in H4 mode. If using an oscilator it should work right away. |
|
|
james B Guest
|
|
Posted: Tue Jul 11, 2006 11:58 am |
|
|
I read that post and couldn't tell if that guy knew what he was doing or not.
Only 1 pic will be in H4 mode. So the other will be more forgiving.
I get the idea. What is the difference in cap size I would use? 2pF different, 4pf ? Is there a way to calculate this or do I just guess ?
As far as turning the clock osc off. It has an inhibit pin but for me to trigger it I would need to be running off another clock. I didn't really like that idea too much... its OK but its hard for me to get small clock oscilators anyway where I live so I'll look at a crystal for right now. |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Jul 11, 2006 12:12 pm |
|
|
From the link, asmallri realy knows his stuff.
I don't know of a way to calc the cap size. But in the link it is implied that the
pic2 would inpose a cap load on the circuit. reduce the clock circuit caps by that amount.
I think if I was working on that project I would use both PICs with internal clocks. Then use a io pin from pic1 to release the mclr of pic2.
small size and less cost.
remember that most times your not tied to a certain pic. if the
footprint is the same,... just swap it out. microchip will even give you a sample.
I would find a pic that has an internal clock with the speed I need. some can do the H4 pll with internal clocks.. Tho these may drift with temp. |
|
|
James B Guest
|
|
Posted: Wed Jul 12, 2006 12:52 am |
|
|
I didnt mean to imply asmallri didn't know what he was doing. I was not following what the other people were talking about. I get the idea, I'm just a little cauious about using things I don't understand.
"pic2 would inpose a cap load on the circuit. reduce the clock circuit caps by that amount"
Well thats the problem I have no idea how much of a load pic2 is going to cause. Is this something I've overlooked or I would normally learn with experience ? |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Jul 12, 2006 8:03 am |
|
|
Yup, Thats where I'm stuck too. Perhaps in the fullness of the spec, somewhere, on some line, will show what input cap a pin will have.
Sorry, but that is all I know. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Wed Jul 12, 2006 9:42 am |
|
|
I hope asmallri knows his stuff or I will be disappointed :-)
You have to bear in mind every PIC datasheet data contains a disclaimer on load capacitance loading of the oscillator - equivalent wording to your mileage may vary, there are no guarentees, its up to you to test (or words to that effect).
A rule of thumb I use (when dealing with other rule of thumb numbers) is to assume a load capacitance presented by the PIC input to be of around 5pF. An alternative approach that you see often is is add a buffer (typically an inverter) from the OSC out of one to the OSC in of the next PIC (I have also done this) but realistically there is no real value in doing this unless you want to add additional loading - the reason being the input capacitance of the buffer and the input capacitance of the OSC input on the PIC are of the same order.
Generally (but not always as already mentioned) I add a second $0.60 crystal. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|