serin2?


Results 1 to 12 of 12

Thread: serin2?

Threaded View

  1. #4
    Join Date
    May 2006
    Posts
    19

    Default

    ok here is the whole code:

    on the stamp:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' {$PORT COM1}

    dat VAR Byte
    DO
    SEROUT 10, 396, ["blink"]
    SERIN 10, 396, [WAIT("t"), dat]
    DEBUG "data: ", DEC dat, CR

    PAUSE 1000
    LOOP


    on the pic:


    define OSC 20
    INCLUDE "modedefs.bas"

    S_in var PORTC.0
    S_Out var PORTC.0
    Led var PORTC.3
    dat var byte

    Main:
    SerIn2 S_in,396,[dat]
    gosub blink
    SEROUT s_out, T2400,["1234t", dat]
    pause 50
    goto main

    Blink:
    high led
    pause 10
    low led
    return


    this code only returns me "data: 0" in my debugwindow, if i use the code
    SerIn2 S_in,396,[wait("k")]
    on my pic and remove the SERIN 10, 396, [WAIT("t"), dat] on my stamp it never blinks and it keeps waiting for that "k" the osc is an external 20 mhz crystal
    Last edited by chriroz; - 30th October 2006 at 09:55.

Similar Threads

  1. GPS $GPRMC to PIC16F684. Need help with SERIN2
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th November 2009, 10:47
  2. Getting SERIN2 to work?
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 22nd July 2009, 21:10
  3. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 03:38
  4. SERIN2 digit parsing
    By skimask in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th January 2007, 00:15
  5. SEROUT2 and SERIN2 commands
    By bangunprayogi in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th August 2005, 10:03

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