+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 3
    Points: 329, Level: 3

    Join Date
    Jun 2017
    Posts
    4
    Helped
    0 / 0
    Points
    329
    Level
    3

    Use RA4 input as impulse input

    Hi,
    I use PIC16F84A.
    I want to use the RA4 input as a pulse input, instead of RB0
    is it possible or not?
    frequency between 1Hz and 300Hz,
    thank you

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 68,591, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,003
    Helped
    3206 / 3206
    Points
    68,591
    Level
    63

    Re: Use RA4 input as impulse input

    Hi,

    is it possible or not?
    for sure it is possible.

    in detail it depends on
    * voltage levels
    * and how you want to process the pulses.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Advanced Member level 3
    Points: 7,108, Level: 20

    Join Date
    Jan 2015
    Posts
    992
    Helped
    316 / 316
    Points
    7,108
    Level
    20

    Re: Use RA4 input as impulse input

    Let me guess - you were using RB0 because of the external 'INT' (interrupt). On that device you can't reassign functions to pins so you will need to use some other technique to detect the changes. It might be a little easier as you can only use the INT signal to detect either a raising edge or a falling edge (i.e. you can detect that a pulse appears but not how long for).
    RA4 does NOT have 'interrupt on change' capability so any pulse detection (i.e. change of state on the pin) will have to come from you constantly monitoring the state of the pin and detecting the changes in software - won't let your MCU do much else then!
    So yes, it is possible but there are many, MANY other factors that need to be taken into account before you can decide if it is practical.
    Susan



    •   AltAdvertisment

        
       

  4. #4
    Newbie level 3
    Points: 329, Level: 3

    Join Date
    Jun 2017
    Posts
    4
    Helped
    0 / 0
    Points
    329
    Level
    3

    input help RA4 PIC16F84A

    Hi,
    I want to use the input RA4 input.
    I try several times I can not activate it.
    to realize a led tachometer.
    I am looking for a code example that uses this input RA4 on pic16f84.
    frequency between 1 Hz to 300 Hz,
    max.
    Thank you.



  5. #5
    Super Moderator
    Points: 76,079, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,439
    Helped
    4144 / 4144
    Points
    76,079
    Level
    67

    Re: Use RA4 input as impulse input

    Show us your code so far and we will try to find the problem. Also tell us which compiler or assembler you are using.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #6
    Full Member level 6
    Points: 1,913, Level: 10

    Join Date
    Aug 2017
    Posts
    360
    Helped
    37 / 37
    Points
    1,913
    Level
    10

    Re: Use RA4 input as impulse input

    RA4 is a open drain pin.



    •   AltAdvertisment

        
       

  7. #7
    Super Moderator
    Points: 76,079, Level: 67
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,439
    Helped
    4144 / 4144
    Points
    76,079
    Level
    67

    Re: Use RA4 input as impulse input

    RA4 is a open drain pin.
    Makes no difference, it still works as an input.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



--[[ ]]--