+ Reply to Thread
Results 1 to 9 of 9

Thread: even paraty setup

Hybrid View

  1. #1

    Default even paraty setup

    Hi

    I always use the Fullduplex.spin for serial comunication. It is working fine. Now I need to interface to a device that has specification 2400,8,E,1.

    The baud rate is not a problem to set up.

    How do I specify the E (Even parity)??

    Stef

  2. #2

    Default Re: even paraty setup

    Hi Stef

    Search for "FD_Serial_Conf.spin" in the forum, this object should do what you want.

    Andy

  3. #3

    Default Re: even paraty setup

    You can use FullDuplexSerial by computing the parity yourself and adding it into the 8-bit value you're sending. For transmitting a 7-bit character CH with even parity, do:
    FDS.tx((CH & %1111111) | (((CH<<1) ^ (CH<<2) ^ (CH<<3) ^ (CH<<4) ^ (CH<<5) ^ (CH<<6) ^ (CH<<7) ^ %10000000) & %10000000))
    On receive, you'd do a similar calculation, but compare the result with what was actually received.

  4. #4

    Default Re: even paraty setup

    Tanks to all

    I'm going to try it out.

    Stef

  5. #5

    Default Re: even paraty setup

    Wait a mintute. I thought 8,E,1 meant 8 Data bits plus 1 parity bit plus 1 stop bit. So putting the parity bit into the top bit of the 8 bits of data does not do what you want.

  6. #6

    Default Re: even paraty setup

    I think 8, E means 8 bits including even parity, 8+parity would mean 9 bits...

+ Reply to Thread

Similar Threads

  1. bs2 setup
    By juancho in forum BASIC Stamp
    Replies: 1
    Last Post: 11-27-2007, 10:20 AM
  2. Led matrix I/O pin setup ?
    By Areal Person in forum Propeller 1 Multicore Microcontroller
    Replies: 12
    Last Post: 08-18-2007, 05:01 PM
  3. TV Term Setup ?
    By Areal Person in forum Propeller 1 Multicore Microcontroller
    Replies: 36
    Last Post: 01-18-2007, 03:39 AM
  4. PropStick setup
    By PMinMO in forum Propeller 1 Multicore Microcontroller
    Replies: 4
    Last Post: 10-16-2006, 01:06 PM
  5. memory setup...
    By FORD in forum Propeller 1 Multicore Microcontroller
    Replies: 8
    Last Post: 02-27-2006, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts