Two function(program) in one pic


Closed Thread
Results 1 to 2 of 2
  1. #1
    swordman's Avatar
    swordman Guest

    Default Two function(program) in one pic

    Hi ,
    How can do this in pbp

    1. Adread - read analog value and calculate.For example:

    adcin 0,read
    if read = x then ....(LABEL- math calc => control portb.5/pwm)
    if read <x then ....(LABEL- math calc=> control portb.5 )
    if read >x then ....(LABEL- math calc )

    2. Main program (IF,pause,lcdout,etc...)

    When the main program work , "1.adread" must work allways in background.
    Can I do this.

    Tnx

  2. #2
    FrankM's Avatar
    FrankM Guest


    Did you find this post helpful? Yes | No

    Default

    To make that, you could use interrupts with a timer.

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 1

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