serial coms - again


Closed Thread
Results 1 to 40 of 58

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try it without the DEC modifiers on your HSERIN lines.

    And it's going to hang until all bytes it's expecting arrive unless you use a timeout/label option.
    Last edited by Bruce; - 20th August 2010 at 18:42.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Bruce, thanks for the prompt reply.

    I've tried commenting out all but the first vairiable so it is only expecting only one value, but that still caused the thing to run really really slowly ... as does removing the DEC modifier could you provide me with a quick example of how to to a time out to try?

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Malc,

    There's an example in the manual, but it works like this;

    HSERIN 100,Timesup,[B0]

    Timesup:
    do something here is data not received

    If no character is received in B0 within 100mS it jumps to Timesup.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    cheers Bruce...

    Sorry, heat of the moment, quicker to ask than dig out the manual !

  5. #5
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Bruce,

    One other thing that has come to light is that I need clear the buffer after
    Code:
    HSEROUT [dec StopHour[0],dec StopMin[0],dec StopHour[1],dec StopMin[1],dec StopHour[2],dec StopMin[2],dec StopHour[3],dec StopMin[3]
    I gather this is required so that it places the correct variable in the right location in the application.

    Any ideas

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I'm not 100% sure what you're asking Malc?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    To be honest I'm not sure either - I thought if you sent A,B,C through the port it would just loop that over and over again... do PICs have buffers ? I thought they sent data straight out and in ? but then I'm really getting out of my depth with this.

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