Shop OBEX P1 Docs P2 Docs Learn Events
Simple Serial Reception — Parallax Forums

Simple Serial Reception

christopherchristopher Posts: 31
edited 2007-02-20 15:13 in Propeller 1
Hi,

I am using simple serial to read responses from a modem. I have disabled echo . When the output is sent to pc I receive crlfOKcrlf combination but when I have the prop read same from simple_serial on a pic I only read from Kcrlf.

SER.START(12,17,1200) 'nice and slow
dira[noparse][[/noparse]0..7]~~
ser.tx(65) 'A
ser.tx(84) 'T
ser.tx(13) 'CR

'read modem response


outa[noparse][[/noparse]0..7] := ser.rx

I can only correctly read from the 4th byte "K" onward. Can simple-serial be used like this ? Even when I insert a delay I am only accurately reading from the 4ht byte onward. Where am I going wrong?

Thanks

Chris

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-20 14:55
    Clearly you're missing the first couple of characters. Without an oscilloscope or logic analyzer, it's hard to tell exactly why. There may be something about how the modem responds (timing wise) that's confusing the simple serial routine. Theoretically, simple serial ought to be usable for this. Practically speaking, just switch to using the FullDuplexSerial routines since they're buffered and won't miss a response. The PC works because it's buffered.
  • christopherchristopher Posts: 31
    edited 2007-02-20 15:13
    I guess I'll switch.

    Thanks
    Chris
Sign In or Register to comment.