Help needed - PIC12F635- MCU does not read Ports


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Add a time out to the serial command. If a signal is not received then the code will not get stuck waiting for a serial command.
    Did that and it works - BUT- now when I power up the circuit, my gpio.5 goes high after 1-2 seconds even though I haven't send any signal.
    Any solutions?
    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Do you have gpio.0=1 pulled down with a 10K resistor?
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Do you have gpio.0=1 pulled down with a 10K resistor?
    NO, do I have to?
    I am new in this field, I may sound silly but I have not used any resistor on any pins, they are connected directly to leds. What does this resistor do?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I was not meaning the pins with LEDs.

    It sounds like you have gpio.0 connected to a switch of some kind.
    When the switch is pressed the pin goes HIGH.
    A pull down, resistor to ground(zero rail) will keep the pin LOW, not allowing false signals until the switch is pressed forcing the pin HIGH.
    Dave
    Always wear safety glasses while programming.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I was not meaning the pins with LEDs.

    It sounds like you have gpio.0 connected to a switch of some kind.
    When the switch is pressed the pin goes HIGH.
    A pull down, resistor to ground(zero rail) will keep the pin LOW, not allowing false signals until the switch is pressed forcing the pin HIGH.
    Thank you very much. This problem is solved.
    Regards

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. How to read stored data from MCU EEPROM into PC?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd October 2009, 15:26
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  4. Write and Read from eeprom
    By savnik in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 9th June 2007, 14:56
  5. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34

Members who have read this thread : 0

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