Serout2 question


+ Reply to Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    415

    Default Re: Serout2 question

    Code:
    serout2 PORTB.1, 84, ["This is my value:", dec MyValue, 13,10]
    There's no "packet" created... bytes are streamed out the software UART as they are made ready.

    There may be a small delay between the last char of "This is my value:" and the 'dec MyValue' portions because it takes time for the uC to convert the binary data to an ASCII string. How long that takes would depend on the uC, clock, and MyValue.

  2. #2
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    137

    Default Re: Serout2 question

    Quote Originally Posted by tumbleweed View Post
    Code:
    serout2 PORTB.1, 84, ["This is my value:", dec MyValue, 13,10]
    There's no "packet" created... bytes are streamed out the software UART as they are made ready.

    There may be a small delay between the last char of "This is my value:" and the 'dec MyValue' portions because it takes time for the uC to convert the binary data to an ASCII string. How long that takes would depend on the uC, clock, and MyValue.
    Okay, interesting. So that small delay might be triggering the RF transceiver to interpret the end of the packet. I'm running an 8mhz clock on a PIC18F26K83 so there is scope to play with clock speeds. I'll have a play.

    Troy

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,827

    Default Re: Serout2 question

    Either one character or million of characters, the RS-232 sends each character alone. It has start bit, stop bit, maybe a parity bit too and the data itself. So, if between characters, there is small or big delay it should not matter, in most cases anyway.

    You have to study carefully the modules you use if they need specific timings.

    Some LORA modules I use seems to wait for a bit of time and if next character has not arrived in this time frame, sends the characters already in the buffer. Then the next characters are not lost but sent immediately after the previous transmission.

    Now, what happens on the receiver side is the users responsibility to collect the data in good order.

    Or make sure to send in a timely manner. Though the small delay tumbleweed noted would not be of any concern in most cases.

    A read about RS-232 may help you clarify things.

    Ioannis

  4. #4
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    137

    Default Re: Serout2 question

    Quote Originally Posted by Ioannis View Post
    Either one character or million of characters, the RS-232 sends each character alone. It has start bit, stop bit, maybe a parity bit too and the data itself. So, if between characters, there is small or big delay it should not matter, in most cases anyway.

    You have to study carefully the modules you use if they need specific timings.

    Some LORA modules I use seems to wait for a bit of time and if next character has not arrived in this time frame, sends the characters already in the buffer. Then the next characters are not lost but sent immediately after the previous transmission.

    Now, what happens on the receiver side is the users responsibility to collect the data in good order.

    Or make sure to send in a timely manner. Though the small delay tumbleweed noted would not be of any concern in most cases.

    A read about RS-232 may help you clarify things.

    Ioannis
    It's just weird that I'm only transmitting at 9600 baud, and the same thing happens no matter how long the 1st string is. Only happens with that transceiver module, none of the other models from the same manufacturer have the issue. No joy in getting any response from the manufacturers either. Might try sending it through hardware perhaps.

    Troy

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,827

    Default Re: Serout2 question

    Are you sure the settings of the internal registers are the same on all you modules?

    Can you check/verify that?

    Also, power supply should be capable to withstand the peak currents of the module. Should be able to supply clean 3.5A with no problem.

    Have you added decoupling capacitors?

    Ioannis

  6. #6
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    137

    Default Re: Serout2 question

    Also, power supply should be capable to withstand the peak currents of the module. Should be able to supply clean 3.5A with no problem.
    Okay, that's something that could be an issue. I normally run a 2W transceiver on this system and I remember checking battery and voltage reg to ensure capability there; but I have to fess, it's one thing I overlooked when switching up to a 5W module. Good call - thanks! Actually, good calls on all those points.

    Cheers,

    Troy

  7. #7
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    137

    Default Re: Serout2 question

    Ioannis, I owe a you a beer or 3 My voltage reg was underrated to that required 3.5A. I got away with it for the 2W modules, but not these. I never would've thought of that being the culprit for this issue, but, well, so far so good in testing with a beefier reg.

    THANK YOU!

    Troy

Similar Threads

  1. SEROUT2 Question ?
    By andybarrett1 in forum Serial
    Replies: 2
    Last Post: - 12th April 2015, 22:49
  2. Serin2/Serout2 Question
    By scottl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th November 2007, 09:11
  3. Serout2
    By Mostafa in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th April 2007, 07:37
  4. serout2
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th February 2007, 23:51
  5. serout2 help please...
    By cpayne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd March 2006, 19:37

Members who have read this thread : 9

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