9 Bit Transmission


Results 1 to 11 of 11

Threaded View

  1. #10
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Pesti,

    With the VB MScomm control you can set the parity as following:

    Code:
    Setting   Description 
    E         Even 
    M         Mark 
    N         (Default) None 
    O         Odd 
    S         Space

    If you use MARK parity, then the bit after the data word is a logical 1.
    If you use SPACE parity, then the bit after the data word is a logical 0.

    With MARK parity the slave device will see the data as a 9-bit transmission. (Last bit = 1)
    Use the MARK parity to send the address to the slaves.

    With SPACE parity the slave device will see the data as a 9-bit transmission. (Last bit = 0)
    Use SPACE parity to send the data to the selected slave.


    (Click on the picture to enlarge)

    (VB pseudocode)
    Code:
    VB pseudocode
    .....
    Insert a delay here to ensure that UART FIFO buffer of the PC is 
    empty before you change the parity. The UART 16550 has up to 16 bytes 
    for the FIFO transmit buffer. 
    
    MSComm.Settings = "9600,M,8,1"
    MSComm.Output = (The slave Address) 
    
    Insert a delay here to ensure that UART FIFO buffer of the PC is 
    empty before you change the parity. The UART 16550 has up to 16 bytes 
    for the FIFO transmit buffer. 
    
    MSComm.Settings = "9600,S,8,1"
    MSComm.Output = (The data for the selected slave)
    .....
    From the Windows control panel you can adjust the size of the FIFO buffers of the used serial port.

    (Click on the picture to enlarge)

    Best regards,

    Luciano
    Last edited by Luciano; - 5th August 2007 at 12:22.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 10:38
  3. Sleep Mode
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th March 2008, 10:31
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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