Simple doubt PIC16F505


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79

    Default Simple doubt PIC16F505

    Hi.
    I'm using 16F505 and i want to put RC5 as an output. In datasheet says that it has dual purpose RC5/TOCKI.
    Even if i put TRISC to use as an output it cannot drive my led. I think TOCKI overwrite my TRISC and i cannot drive my led.

    What's happen?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Clear OPTION_REG bit 5.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    yes, but what's the instruction to clear in option_reg<5>
    clear ?

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Option_reg.5 = 0
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thank you.

  6. #6
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Sorry but another questions concerning PIC16F505.
    When i drive my relay it seems my PIC reset's, because it goes to my programs beginning.
    I already put my "master clear enable" to internal and external and nothing. What i can do in software without change my hardware.
    I already had a similar problem in pic16F872 and i resolved putting a 10uF capacitor near my +5V.
    There are other without changemy hardware?

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    On software side, you can play with BOD_OFF / BOD_ON,

    and also WDT_OFF / WDT_ON


    I suggest that you go one by one so you will know which one works for you.


    ---------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    I tried but i think it's not working.
    But i'll try more... If you remember another way to do it???

  9. #9
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    How much current is the relay drawing? Do you have a protection diode across it?

    Ron

  10. #10
    Join Date
    Feb 2005
    Location
    Portugal
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Yes i have a protection relay diode.
    I resolved my problem by hardware, i put a 10uF capacitor between +5V and GND. It's possible to resolve this with software? My doubt continues...
    What i dont understand is with PIC16F505 i have reset problems and with PIC16C505 i don't.
    I saw datasheets i didn't see anything relevant different.

    Maybe PIC16Fxxx is more sensitive to turn on relay than PIC16Cxxx!!???

  11. #11
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Sayzer said," "

    Quote Originally Posted by sayzer
    On software side, you can play with <font color=green>BOD_OFF</font color>
    Hi leonel, check what sayzer said here.
    When your relay pulls, in the input voltage drops and the PIC likely reboots due to brown out reset fuse set on, the capacitor helps supply that inrush current and prevents the brown out reset.
    JS

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  3. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  4. Replies: 4
    Last Post: - 7th September 2005, 14:11
  5. Simple Serial communications
    By kitcat in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th July 2005, 19:42

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