problem in a pic16f877a project

Discussion in 'The Projects Forum' started by IEmpire, Apr 24, 2010.

  1. IEmpire

    Thread Starter New Member

    Apr 24, 2010
    2
    0
    Hi,
    I am using a pic16f877a mcu and a 6v 400mA power supply with a lm317 variable voltage regulator. i am using the pic to light four leds in a specified sequence. the circuit works perfectly as desired until i connect another IC , (a 7447 decoder/driver) to the power supply. instantly the pic halts and stops working. the moment i remove the other ic the pic resume its task asif nothing happened.
    i measured the current and voltage supplied to the pic before and after inserting the IC and found the following:
    before :
    10mA @ 4.85 v
    after :
    4mA @ 4.66 v

    the current is not even reaching the maximum 400mA so why is this happening.
    does the pic need a detecated power supply or what?
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    The lm317 requires at least 1V (and up to 2.5V) more than the voltage it is supplying. The amount varies with temperature and current drawn by the circuit.
    Lookup the dropout voltage graph in the datasheet.
    If you could supply it with 9V it would work fine.
     
  3. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    PIC processors have "brownout reset" where the chip goes into reset when the power supply drops out of spec. I don't remember what the threshold is, but if it's 4.5V then 4.66V is getting too close for comfort. You can turn the brownout reset feature off in the configuration word. If it's not already off, it might be worth trying.

    But yes, you can't get 5V from 6V with an LM317. Find a low-dropout 5V regulator.
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    It could not has been the BOR of the 877A PIC as its typical operating voltage is 4.0V (4.35V max.).

    Judging from the reduced current drain, your PIC's clocking may be stop oscillating. Are you using an external crystal and what is its frequency?

    You can get more help if you post your schematic.
     
  5. IEmpire

    Thread Starter New Member

    Apr 24, 2010
    2
    0
    yes i am having a 4MHz crystal oscillator but without using capacitors, i ve tried using 7805 voltage regulator betweem the lm317 and the pic , but this halted the pic.
    I cant post the schematic now but its simply four leds and four 690ohm resistors connected in series with the leds and all connected to portb
    additionally portc is input and i am usign C0 only using a pull down resistor of 50kohm

    a weird thing happened, by mistake i removed the voltage from the Vdd pin and ....... the pic continued to works as if nothing has happened !!!!

    is my pic damaged or my brain !!! probably both
     
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I would say brain. ;)

    You removed the power and it worked? I would DOUBLE check your wiring.

    Are you SURE you are using the correct pin out? If you had 5v on Vcc and GND, and you removed it from the GND pin, (and ground was found elsewhere) it would have started.


    Are you using a breadboard?
     
  7. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    That's right about the input pin, and not just for PIC processors. The pins have diodes to Vcc and Gnd, so if you power a port pin Vcc would go to one diode drop below that input, which might be enough to run the chip.

    Two more ways to lose with PICs: the reset pin needs to be pulled high, or the chip is in low-voltage programming mode (another config word setting) and pin B.3 is left floating (must be grounded in lo-v mode).
     
Loading...