![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
arrow
Joined: 17 May 2005 Posts: 213
|
Switching off the PIC16F84A? |
Posted: Fri Dec 09, 2005 5:28 am |
|
|
Hi
I have 2 PICs connected and what I would like to do is to set a pin H and activate the 2nd PIC. Then I would like to set the pin L and deactivate the 2nd PIC.
I have tried to do this by connecting the pin to the MCLR of the 2nd PIC. What I find is that PIC 2 does its own thing. Sometimes it just switches on when there is a general power up and the pin is on L. Other times it works fine. Then when my pin goes L (on the MCLR of pic #2) nothing happens- the 2nd pic keeps on functioning (LED's do not switch off).
Can someone please help me?
Thank you in advance.
a. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Fri Dec 09, 2005 5:52 am |
|
|
The only way to physically turn the chip 'off', would be to disable it's supply (MOSFET feeding the supply rail, controlled by the other PIC). However you could get almost the same effect, by putting the chip to sleep in the right way. Basically connect your signal to the interrupt input. Then when the interrupt is seen, have the PIC invert the interrupt 'level' to which it will respond, clear the interrupt flag, turn off all the peripheral pins, and execute a sleep instruction. This will then stop the oscillator, and the chip will be asleep. When the pin changes again, the interrupt flag will be set, the chip will wake up, and you would then need to reset all the lines to the state they were in before you went to sleep, and carry on in the main program.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
arrow
Joined: 17 May 2005 Posts: 213
|
|
Posted: Fri Dec 09, 2005 6:17 am |
|
|
Hi Ttelmah
I have been trying to use the 4066 quad bilateral switch. Where Pic #1 controls the on/ off of 4066.
This does not seem to work either.
I have a RS232 line comming out of pic #2. Can this line somehow power pic #2?
This problem is really tough for me!
Thank you
a. |
|
![](templates/subSilver/images/spacer.gif) |
arrow
Joined: 17 May 2005 Posts: 213
|
|
Posted: Fri Dec 09, 2005 6:20 am |
|
|
Also what exaclty does MCLR actually do?
If I drive MCLR low will this switch off the chip?
a. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Fri Dec 09, 2005 9:19 am |
|
|
First of all, a 4066, has a relatively high 'on' resistance. A lot is going to depend on what load is on your PIC, but whan it starts, if it has an oscillator present, the load is going to be noticeable. Also you talk about driving LED's, and this implies significant current. Better to use something with rather more drive capability (even a PIC's output itself, is better than this...).
The behaviour of MCLR depends on what PIC is involved. Generally, the oscillator stops, and outputs may change to inputs, but I have found that on many PICs, they will stay driven, until MCLR releases.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|