How do RCIF works?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Another thought. You can even use the serial communicator (no ICD) and use an USART interrupt routine that will do something you ask.

    Let's make things more clear by using an example.

    Let's say i want to change a,b,c parameter while the program is running. With serial communicator i'll send a specific start character, then the parameter i want to change. let's say UUCHANGEA#120

    in the interrupt routine i'll write something like
    Code:
    HSERIN [WAIT("CHANGE"),VarToBeChange,ValueToBeChange)
    Select case VarToBeChange
        CASE "A" : a=ValueToBeChange
        CASE "B" : b=ValueToBeChange
        CASE "C" : c=ValueToBeChange
        END SELECT
    By sending UUCHANGEA#120 , the a Variable is suppose to be equal to 120. Read the Serial Communicator help on that (under Transmit windows>> Parse control character) Really handy sometimes.

    But be aware of the latency of your whole program... maybe a bigger amount of UU "Header" will be usefull. OR simply send something then wait fow the PIC question... as you wish.

    HTH
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Hi Steve.

    The # sign in the sending message isn't it read by the ValueToBeChange variable?

    Ioannis

    Quote Originally Posted by mister_e
    Let's say i want to change a,b,c parameter while the program is running. With serial communicator i'll send a specific start character, then the parameter i want to change. let's say UUCHANGEA#120

    in the interrupt routine i'll write something like
    Code:
    HSERIN [WAIT("CHANGE"),VarToBeChange,ValueToBeChange)
    Select case VarToBeChange
        CASE "A" : a=ValueToBeChange
        CASE "B" : b=ValueToBeChange
        CASE "C" : c=ValueToBeChange
        END SELECT

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    NOPE, it's a MCS feature. Look in the help file. The parse control character must be enable in the MCS serial communicator.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PORTA.0 works, PORTB.7 or .6 do not
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd September 2009, 04:25
  2. Replies: 42
    Last Post: - 14th January 2008, 11:38
  3. TMR1 How it works?
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 12th January 2007, 14:24
  4. EPIC Programmer - Works for all chips but the 16F876A
    By 4Lewis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th April 2006, 23:59
  5. 16F628A using PORTA.4, and it works, but...
    By zx81 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th August 2005, 08:45

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