Reading and storing pulses from 8 bit port


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Reading and storing pulses from 8 bit port

    I'm pretty sure there are PICs with a full 8-bit port worth of IOC capable pins and some devices lets you set it up so it only triggers on rising or falling (and not both).

    But since this is still a fairly low frequency input I guess you could just poll the port, periodically (like 10 times per second) and XOR the port with the result from the previous poll. Any bits set in the result have changed. Increment your 8 counters based on state of each bit. This has the drawback of incrementing the counter twice for each pulse but there are ways around that too of course.

    /Henrik.

  2. #2
    Join Date
    Feb 2009
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: Reading and storing pulses from 8 bit port

    Henrik,

    Thank you for the prompt info.
    I will have a look at the Pics available and try experimenting.

    /Danie

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Reading and storing pulses from 8 bit port

    Look for IOC feature. I remember seeing PICs that would monitor all of port B for a change.

    PIC18(L)F2X/4XK22:

    RBIE: Port B Interrupt-On-Change (IOCx) Interrupt Enable bit
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Feb 2009
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: Reading and storing pulses from 8 bit port

    Thanks Demon. I will do a search

Similar Threads

  1. Newbie question on reading port staus
    By SOTASOTA in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th December 2012, 21:25
  2. Index a bit through a portion of a port
    By ecoli-557 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 12th March 2012, 22:22
  3. Reading Input on Port B
    By bodgetts in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 31st July 2011, 01:01
  4. Reading the port - Little help needed
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th June 2011, 19:15
  5. storing arrays and reading arrays
    By Yue in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th March 2004, 22:03

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