Syntax SEROUT2 and SERIN2 commands


Closed Thread
Results 1 to 2 of 2
  1. #1
    crocodilebobbie's Avatar
    crocodilebobbie Guest

    Red face Syntax SEROUT2 and SERIN2 commands

    Hi:

    I cannot get the SEROUT2 and SERIN2 commands to compile. No matter what
    the settings are.

    I am able to get SEROUT and SERIN to work. I am transmitting a voltage/count from a PIC 16F684 to a PIC 16F877A output on LCD.

    command on 16F877A
    SERIN PortC.0, T300, [170, 170, TempIn]

    command on 16F684
    SEROUT portC.0, T300, [170,170], TempOut is the syntax.

    The voltage count is displayed on a 4x20 LCD, but the result is always,
    64, 128, which is binary 100000, and 1000000. Anyone, some ideas on how to make this simple setup work flawlessly?

    bobbie

  2. #2
    hawk72500's Avatar
    hawk72500 Guest


    Did you find this post helpful? Yes | No

    Default Try this code!

    INCLUDE "modedefs.bas"
    TRISB=%00000010
    B0 VAR BYTE


    loop:
    SerOut2 PORTB.0,84,["Put a number",13,10]
    SerIn2 PORTB.1,84,[DEC B0]
    SerOut2 PORTB.0,84,["I took number:",DEC B0,13,10]

    GoTo loop

    ------------------------------
    For me this code has worked.You must connect your serial port with PORTB.0
    and PORTB.1 with your computer.If you open terminal (Start->Accesories->Communications->Hyperterminal and set up a communication of 9600 (that means the number 84 in the above code) you must see "Put a number".

    I don;t know if i helped you....

Similar Threads

  1. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  2. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 02:38
  3. SEROUT2 and SERIN2 commands
    By bangunprayogi in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th August 2005, 09:03
  4. Simple PC Menu System with Serin2
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd April 2005, 08:27
  5. Serin2 and Serout2 with or without level converter
    By fbestepe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st May 2004, 07:10

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