Input pin help


Closed Thread
Results 1 to 6 of 6

Thread: Input pin help

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    With the folowing lines an input pin gives a pulse during 1 complete program cycle and a new pulse wil be generated after changing the input state back to 0 and brought back to 1 again yust what you want.

    HULP0 VAR BIT
    PULSE VAR BIT

    INPUTPIN VAR PORTX.Y

    PULSE = INPUTPIN & ~ HULP0
    HULP0 = INPUTPIN

    succes with it.

  2. #2
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59


    Did you find this post helpful? Yes | No

    Default

    Thank you Mat - that looks really interestiung. I'll try it.
    Kind regards

    Adrian

  3. #3
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59


    Did you find this post helpful? Yes | No

    Default

    Mat - the code worked great - also, as a newcomer to these techiques my understanding and use of bitwise operators has taken a leap forward. Thank you once again

    Adrian

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. 16f88 - pin RA4 as analog input
    By savnik in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 15th December 2006, 13:55
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07

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