Pass on serial data


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    If you get 8 characters, you send them off...

    If you get 5 characters, how do you know that's all you're going to get?
    Is it a timed thing? Is the 5th character a CR or LF or something that would be recognizable?
    hmm. good point. i can make it so theres only 2 characters per chip and i can send something like (255) to show the end of the data.

    that means the chip reacts to [250],lineid,[1],[2],[3],[4],[255] AND [250],lineid,[1],[255]. how would i do that?

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


    Did you find this post helpful? Yes | No

    Default

    I could analyse the STR macro, but i'm lazy today

    So you could still fill ALL variable array cells with zero before SERIN, and after SERIN checking which one is still = 0.
    Steve

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

  3. #3
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    yep. thats my workaround way :P i wont have to check them after though, just set them to the correct outputs

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


    Did you find this post helpful? Yes | No

    Default

    One thing i could feel... the internal R0 variable should store the last character. Seems there's no counter variable. For that i would prefer to build my own routine BUT using the PIC USART... no SERIN/DEBUGIN/HSERIN at all.
    Steve

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

  5. #5
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    One thing i could feel... the internal R0 variable should store the last character. Seems there's no counter variable. For that i would prefer to build my own routine BUT using the PIC USART... no SERIN/DEBUGIN/HSERIN at all.
    ill have a look into that later. isnt there a way of doing it with serin2? eventually i will need to use the timeout things too

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


    Did you find this post helpful? Yes | No

    Default

    If your PIC have a USART and you need only 1 SerialInput pin, there's no advantage to use SERIN, SERIN2, DEBUGIN. Even if you need only 1 SerialInput pin, there's no real advantage to not choosing a PIC without USART.

    With a built-in USART, the whole thing could be hapilly managed with interrupts, which it's not really reliable with SERIN... unless you send tons of 'preamble' NULL character or so.

    Yeah, i'm from an old school
    Steve

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

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    i cant do anything with interrupts. ive already made the PCBs up for these circuits and the only interrupt pin is an output. i never thought i would need it

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


    Did you find this post helpful? Yes | No

    Default

    can you post your schematic?
    Steve

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

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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