Hardware problem or what ?


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2007
    Posts
    9

    Default Hardware problem or what ?

    Something strange happens in my circuit......

    Think a PIC16F877A were PORTD.1 (pin 20)
    is defined as Input (WELDEND VAR PORTD.1)

    This pin is pulled to Vdd with a 4.7K resistor and there is (was)
    a 0.1uF condenser between the pin to ground (Vss) wich i put
    thinking to void noise problem but...

    Now the problem....

    a signal (Vdd) come to this pin through a n.o. external switch.

    When you close the switch no problem

    When you open the switch the pic is resetted !!!

    Removing the condenser the problem disappear.....


    Did you have any idea about.... why?



    Steve S.

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


    Did you find this post helpful? Yes | No

    Default

    Did you put 0.1uF on both Vdd lines as well?

    Did you disable the LVP mode?

    How the MCLR pin is attach to VDD?
    Steve

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

  3. #3
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    MCLR is tied up to vdd through a 4.7K res
    VLP has been disabled during programming.
    Vdd and Vss are both connected and there is a 0,1uF cond between.

    WDT is off
    BOR is off

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


    Did you find this post helpful? Yes | No

    Default

    can you post the offending code here... i miss something...
    Steve

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

  5. #5
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Steve S. View Post
    Something strange happens ...
    This pin is pulled to Vdd with a 4.7K resistor ...
    a signal (Vdd) come to this pin through a n.o. external switch....
    Indeed strange – it's not clear to me from what you wrote above .. is your n.o tied to ground? The way you have it written, it looks like it is tied to Vdd because Vdd “come to this pin through” it which makes no sense if your pin is tied weak high.

    Something to try ...

    If your n.o. is tied to ground, you could

    a) increase the pull-up value on the pin in an effort to slow the recharging of the condenser when the switch opens in case your power supply is very very very soft
    b) add a decoupler cap of 10uF electrolytic close to your .1uF bypass cap between VDD and VCC
    c) add a bypass on MCLR between the pin and the resistor.

    Like you said, you fixed it by removing the cap but I am sure you would like to know why - gremlins are scary.

    Like Steve said, It would be interesting to see your code as well as what else is going on with your circuit hardware.
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  6. #6
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Thumbs up

    Thank Paul,

    Yes, i forgot to write that switch connect the pin to ground Vss

    Code is very long but it do nothing of strange....



    ENDWELD VAR PORTD.1
    .
    .
    INPUT ENDWELD
    .
    .
    PRESSED CON 0
    NOTPRESSED CON 1
    .
    .
    .
    End_Weld: 'wait for end of welding cycle

    if ENDWELD = NOTPRESSED then goto End_weld
    .
    .


    I'm testing the software on the machine and seems to be
    insensistive to noise but i wouldn't like to meet with gremlins!

  7. #7
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    It sounds like your power suppy is "sagging" when you release the switch, because the cap on the PortD.1 is charging, and drawing current from either your MCLR circuit or your power supply.

    Add some 10uF caps across the bypass caps on your PIC power pins and the problem should go away.

    I learned years ago to use DS1233 reset generator chips on my MCLR pin to solve little issues like this. Never had a problem since.

  8. #8
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Try disabling the brownout reset

    Hi,

    It all seems so strange. It is really difficult to comment without having the schematics and the code handy. If you are using Brownout reset enabled then you can try disabling it. If that solves the problem then there is something wrong with your PS. Also take care that all your VDD/VSS pins (11/12<->32/31) are hardwared. Although they are internally connected you cannot give power to one and draw out from the other.
    Regards

    Sougata

  9. #9
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Thanks to all,

    i will try monitoring the power line and MCLR to see if something strange will appear also if without the cap seems to work fine and seem also to be insensitive to noise.

    about PIC programming.... oscillator XT all aother flags OFF.

    This week the hardware and firmware will be extensively tested
    on a induction welding machine in a very electrically noisy environment

    AC and DC line will be monitorized...

    When the gremlins will be found i will post his head in the forum!









    about

Similar Threads

  1. Power Up problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th October 2009, 03:38
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. 16F628 Hardware USART problem
    By atomski in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th May 2004, 07:10

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