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

    Join Date
    Jun 2017
    Posts
    3
    Helped
    0 / 0
    Points
    300
    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: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,639
    Helped
    3122 / 3122
    Points
    66,847
    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.



    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 3
    Points: 6,741, Level: 19

    Join Date
    Jan 2015
    Posts
    977
    Helped
    307 / 307
    Points
    6,741
    Level
    19

    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



--[[ ]]--