Handling Serial 8N2


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Default

    I think you are correct (about how to do 8N2) except the hardware UARTs are "true" meaning they idle high - therefore the stop bits need to be high. Using software, you can run true (idle high) or invereted (idle low) using serin, serout, etc.

    also see this thread for a semi-related discussion

    http://www.picbasic.co.uk/forum/showthread.php?t=1749
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Thinking about it .... you can just use SERIN and SEROUT in regular 8N1 format:

    Receiving - 8N2 instead of 8N1 is of no consequence since the stop bit is the same as the idle position (the extra stop bit will be ignored with no effort on your part)
    .
    Transmitting - you can use “DEFINE CHAR_PACING VALUE” to pause between transmissions of each byte. (Just pause the length of on bit transmission to get the second stop bit)

    What baud rate do you want? (e.g., VALUE above would be 104 or more for 9600 baud.) See the PBP manual.
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

Similar Threads

  1. Replies: 33
    Last Post: - 19th March 2010, 04:02
  2. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 18:03
  3. Serial data to USB
    By cooksydesign in forum USB
    Replies: 18
    Last Post: - 29th October 2008, 16:10
  4. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 21:39
  5. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 23:35

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