Shop OBEX P1 Docs P2 Docs Learn Events
How to send BIN# using SEROUT w/ PropBasic? — Parallax Forums

How to send BIN# using SEROUT w/ PropBasic?

$WMc%$WMc% Posts: 1,884
edited 2010-06-11 00:20 in Propeller 1
Hello All

·I would like to send BIN#s out with the SEROUT command to a RF TX unit (Parallax p# 27980). I did this with ease with the BS2, But I seem to be missing something with the Prop and PropBasic. The BIN#s are one BYTE wide and all start with a 0. Something Like this "%0011_0011".

·All·I see is zeros from the TxPin to the RF unit with my O-scope.Sometimes I'll see a "1" but it seems to be random.
"··· Baud CON· "T9600"··································· "
'··· TxPin PIN· 20 LOW····· ' HIGH· makes not diff.· "
"··· node·VAR·· Long······································· ·"
"·· PROGRAM Start·········································· "
" Main:························································· "
"····· DO······················································· "
"········ node = %0011_0011···························· "
"········ SEROUT TxPin, Baud, node···················· "
"········ PAUSE 1000········································ "
"····· LOOP···················································· "

Their isn't a whole lot of info yet in the DOC.s for SERIN/SEROUT, So I don't have a lot to drop back on.

Any info on how to send Bin#s or an example code of SEROUT sending BIN#s would be great.


Thanks in advance

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA


You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.·

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-06-09 04:26
    PropBASIC doesn't have serial formatting niceties like PBASIC. What PropBASIC does allow, however, is the creation of libraries to extend the language. I've attached a demo that uses my formatted serial library.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • $WMc%$WMc% Posts: 1,884
    edited 2010-06-10 00:23
    Thanks JonnyMac

    ·I see why all I was getting was zeros now.

    After I figured out I needed the latest and greatest PropBasic 00.00.98 or higher, then I was able to run the tx_formatting.pbas with the·two .lib files.

    I have 2 questions about tx_formatting.pbas: using PropBasic 00.01-68.exe

    1: is the XIN setting of "XIN· 6_250_000", I assume you were using a 6.25mHz Xtal instead of a 5.0mHz xtal.?· With the 6.25mHz setting all I was getting was some Hieroglyphics. After I discovered this I changed the xin to "XIN 5_000_000" since I'm using the PropProBoard w/ a 5 mHz xtal. I this rite?

    2: In the bst.TERM.or the PST·window is this what I should expect to see from tx_formatting.pbas ? I see the "Banner" start,But I'm not sure about the rest of it. I have attached a screen shot of tx_formatting,pbas running in the bstTERM.window.

    Thanks Again


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA


    You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.

    Post Edited ($WMc%) : 6/10/2010 12:31:47 AM GMT
    677 x 497 - 28K
  • BradCBradC Posts: 2,601
    edited 2010-06-10 00:26
    $WMc% said...

    2: In the bst.TERM.or the PST window is this what I should expect to see from tx_formatting.pbas ? I see the "Banner" start,But I'm not sure about the rest of it. I have attached a screen shot of tx_formatting,pbas running in the bstTERM.window.

    That _looks_ like PST control codes being passed to the terminal. bst terminal is not yet compatible with the control codes used by PST.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "I mean, if I went around sayin' I was an emperor just because some moistened bint had lobbed a scimitar at me they'd put me away!"
  • $WMc%$WMc% Posts: 1,884
    edited 2010-06-10 00:47
    BradC

    Thanks for the feed back. I just ran a quickie w/ PST.exe and It does look a little better. I'm not sure what the program tx_formatting does exactly, I need some more study, only an hour or so rite now w/ tx_formatting.pbas

    I think this will take Me a little while to get the hang of , But I like it.

    Thanks for the bst by the way!!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA


    You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.

    Post Edited ($WMc%) : 6/10/2010 12:52:21 AM GMT
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-06-11 00:20
    Yes, sorry, I tend to use 6.25MHz crystals. I also tend to use PST for output and my library includes PST formatting codes that doe get used in the program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
Sign In or Register to comment.