Ra4/tock


Closed Thread
Results 1 to 12 of 12

Thread: Ra4/tock

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mychangl View Post
    Correct me if i am wrong.
    PIC16F84 - RA4/TOCK has dual function as I/O port and as clock input to TMR0.
    To make it as input; OPTION_REG=OPTION_REG OR %0010000
    ( set bit 5 as advise in datasheet )
    Stop faffing about (another new word Adam?) and give a straight answer if you're going to give one...

    This post has a little ambiguity, if you want to make RA4 a DIGITAL INPUT then all you need to do is set the TRISA Register accordingly...

    TRISA.4=1

    If you need to use this as a CLOCK INPUT to TMR0 then you need to do a little more...

    TRISA.4=1
    OPTION_REG.5=1

    By setting the INDIVIDUAL BIT in the Register, you leave all the other bits alone. This saves a little worry as to whether you're setting other things correctly or not. Otherwise you run the risk of setting or resetting something you've not paid attention to, which could impact on your program unnescessarilly.

    You may also need to set to set Bit 4 of OPTION_REG depending if you want High-to-Low pulse transition to trigger the clock rather than Low-to-High. See Figure 4-1 of the Datasheet (DS30430C Page 16 in case your Datasheet isn't the same as mine) for detail on the OPTION_REG settings.

    Done, dusted and saves on wasted bandwidth.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,140


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    ....
    Done, dusted....
    Goodwifes!

    (I have some dust here too... :-) )

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Goodwifes! - plural - you mean you have more than one?

    I have some dust here too... :-) - for a small fee I'll loan you my housekeeper...

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,140


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    Goodwifes! - plural - you mean you have more than one?
    As of 21st of October 2006, yes!
    http://www.picbasic.co.uk/forum/showthread.php?t=4889

    She 's not dusting yet but hope in a couple of years...

    Ioannis

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