How to implement 8E2 serial protocol?


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237

    Lightbulb

    When recieving, do what Dave said, just use 8E1. PBP will see the extra stopbit as a little pause between the characters, no problems atall and nothing you need to worry about.

    When sending, you need to add that extra stopbit. You do that by adding a short pause(1/19200=52us) after each character. You can also use character pacing(which does exactly that). The biggest problem with that is that SEROUT2 paces with milliseconds. If you specify 1ms it may take too much time to send the entire message, but it will work. If your messages are short it may not be a problem.

    /Ingvar

  2. #2
    imt_67's Avatar
    imt_67 Guest

    Default Thanks a lot!

    As all of you wrote, I tried using 19200-8-E-1 protocol to connect my weather station (now writing a little program for PC using freepascal...fast and lazy way ;-) ) and it seems to be tolerant to 1 or 2 stop bits, both for tx and rx.
    So I'll try with SERIN and SERUOT as soon I'll have some time to spend (this weekend...I hope!). Fortunately I have to send only very small commands to ws ( four bytes or so... with fixed values), so also the "bit bang" idea (very nice!) may be useful...

    Again, thanks a lot!

    Marco.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 03:17
  2. How to define serial protocol ?
    By chrischristian in forum mel PIC BASIC
    Replies: 1
    Last Post: - 24th October 2009, 04:42
  3. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 18:03
  4. Serial protocol not supported?
    By paxmowa in forum Serial
    Replies: 3
    Last Post: - 11th September 2007, 14:11
  5. UPS serial protocol
    By sougata in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th November 2006, 03:49

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