Shop OBEX P1 Docs P2 Docs Learn Events
UART Break? — Parallax Forums

UART Break?

computer guycomputer guy Posts: 1,113
edited 2010-01-06 16:12 in BASIC Stamp
Has anyone had success with sending a UART Break signal with the BS2?

I need to send a UART Break to the Easy Bluetooth module, however my attempts are failing dismally.

My attempts are
LOW TX
WAIT 100




and

SEROUT, TX, Baud, [noparse][[/noparse]$00,$00,$00,$00,$00,$00,$00,$00,$00,$00]





Thank you smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"powered by Propeller" domed stickers $1.50 - Find them here
Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-01-05 01:33
    One possibility is
    SEROUT tx, $1fff,[noparse][[/noparse] 0]  ' zero byte at 122 baud true, slowest possible on Stamp
    



    73.8 milliseconds should be long enough to be recognized as BREAK

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • computer guycomputer guy Posts: 1,113
    edited 2010-01-05 01:46
    Thank you Tracy,
    However that didn't work either.

    Any other ideas? smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "powered by Propeller" domed stickers $1.50 - Find them here
    Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-01-05 05:11
    How long a BREAK is needed?

    You could gate in a pulse of whatever length you need from a regular Stamp pin via a diode.

     p0 -------->|-----o------- to external device
                              |
                              |
     tx-----------------'
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • computer guycomputer guy Posts: 1,113
    edited 2010-01-05 05:22
    I have been struggling with this for a week now.
    The manual/datasheet just says "A UART break is needed to leave transparent mode and enter command mode".
    No length is specified.

    If I was to use the circuit above, what code would I need?



    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "powered by Propeller" domed stickers $1.50 - Find them here
    Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
  • computer guycomputer guy Posts: 1,113
    edited 2010-01-05 06:49
    SEROUT tx, $1fff,[noparse][[/noparse] 0]  ' zero byte at 122 baud true, slowest possible on Stamp
    
    


    Gives me
    attachment.php?attachmentid=66449

    Sending data
    SEROUT TX, Baud, [noparse][[/noparse]$02,$52,$03,$00,$00,$55,$03]
    
    


    gives me
    attachment.php?attachmentid=66450

    Is it just me or is there something weird going on with the TX line?


    Although sending "j" gives me
    attachment.php?attachmentid=66451
    Which looks fine to me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "powered by Propeller" domed stickers $1.50 - Find them here
    Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net

    Post Edited (computer guy) : 1/5/2010 6:57:43 AM GMT
    735 x 447 - 43K
    730 x 451 - 47K
    735 x 446 - 49K
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-01-05 08:44
    Somehow I got to thinking that you wanted a BREAK on the BS2 p16 debug port, I missed the part about the device being the easy bluetooth module, which I am not familiar with. I see from the instructions that it has means to both send and receive breaks in of milliseconds, from 0 to 3000 ms, it seems. But I don't see where it says how much of a BREAK is required. It might be as little at two byte times, which at 9600 baud would be about 2 milliseconds. But it is not clear, is it?

    The first 'scope picture looks like there is contention going on. Both sides are trying to be outputs at the same time, one high and one low, so it ends up at 2.5 volts.

    I like to put in code to make a simple trigger edge for channel 2 of the scope, because RS232 signals can be a mess if the triggering is not right. There is more going on in the last two scope pictures.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • computer guycomputer guy Posts: 1,113
    edited 2010-01-05 10:01
    After much frustration and confusion. I finally managed to get it working, in the end I tried something I had done before however this time it worked.
    Time for bed I think. smile.gif



    Thank you for your help smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "powered by Propeller" domed stickers $1.50 - Find them here
    Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net

    Post Edited (computer guy) : 1/5/2010 12:09:47 PM GMT
  • FranklinFranklin Posts: 4,747
    edited 2010-01-05 23:04
    Computer Guy said...
    After much frustration and confusion. I finally managed to get it working, in the end I tried something I had done before however this time it worked.
    OK, so what did you do?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • computer guycomputer guy Posts: 1,113
    edited 2010-01-06 03:25
    As for the uart break, I am not sure yet. I will have to do some testing after I finish configuring the module.
    However I managed to get the device to respond to commands after sending it
    $02, $52, $4E, $01, $00, $A1, $00, $03
    
    


    Set Event Filter, "Report All Events".
    I believe it was set to "No Events Reported, No UART Break".

    I tried sending that command before however it failed. At about 9:00PM last night I decided to try it again.
    Much to my surprise, it responded with "Mode Set" (well the response code equivelant).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "powered by Propeller" domed stickers $1.50 - Find them here
    Check out my Design and Technology project for my Higher School Certificate www.ecosureblog.net
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-01-06 16:12
    I thought a "UART BREAK" signal could be generated with:

    PULSOUT TX, 0, 500 ' -- Goal here to generate a low-pulse of 100 mSecs.
Sign In or Register to comment.