Controlling power to a PIC with another PIC


Closed Thread
Results 1 to 4 of 4
  1. #1
    jswayze's Avatar
    jswayze Guest

    Default Controlling power to a PIC with another PIC

    Hi Again,

    My project has an one PIC12F629 dedicated to I/O and one PIC12F629 dedicated to the actual task (flashing some LEDs).

    The I/O pic has two PWM inputs, each controlling one output. If the PWM signal is over a certain width, the output goes high.

    The second output directly controlls a high-current LED, but the first output is supposed to turn on or off my second PIC12F629.

    My current (and somewhat working) solution is for the second PIC to read the signal from my I/O PIC and either run the program or wait in a loop until the signal goes high. For the sake of simplicity, let me just say that there are drawbacks to this method.

    What I'd like to do is actually cut power to the second PIC when the I/O line is low and supply power when it is high. I'm not an electrical engineer, so I don't really know the best way to do this. It seems like a bipolar transistor would take up too much voltage (I need all of the 5 volts to run the LEDs) and I'd be concerned with how much current a small relay would use to hold the circuit closed (or open)

    Does anyone have any thoughts on the best way to do this - that is, given a 5v source, either supply or cut the full 5v to another PIC?

    Thanks,

    Jeff

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    relay could be used... some reed relay are small and don't need many current.

    BUT you can also use transistor (PNP) or a MOSFET (P-Channel) to do the same thing. What is the current needed by the whole i/o PIC with all component attach to?

    OR you can also use the MCLR pin on the I/O PIC. By sending a high level to this pin, your program will run and while holding it to ground, it will stop....
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    jswayze's Avatar
    jswayze Guest


    Did you find this post helpful? Yes | No

    Default

    Steve, you've come through again - Thank you!

    The MCLR trick was the way to go.

    For some reason when I was checking this pin while the program was running I'd still have some random dim flashes of my LEDs - even though the PIC was stuck in a loop... weird.

    Anyhow, thanks again.

    -Jeff

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    what about if you add a PAUSE 50 or a bit much at the top of your code to give time to the internal oscillator to stabilize???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  2. Pic getting part power from Analog Port
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 22nd April 2009, 10:34
  3. Ideal backup power for PIC micro
    By emavil in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 00:07
  4. PIC power backup with "super capacitor"
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 24th January 2007, 23:51
  5. problems on power up of PIC
    By dmairspotter in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th June 2006, 14:11

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts