Shop OBEX P1 Docs P2 Docs Learn Events
does SERIN has some inherent delay? — Parallax Forums

does SERIN has some inherent delay?

TAMILTAMIL Posts: 11
edited 2009-12-08 22:38 in BASIC Stamp
hi,
im using bs2p40 and communicate with it from LabView front end env.
i wanted to know what is the minimum delay involved in serin processin.
for this i tried an example which sends 6 bytes frm front end to bs2p40 and rcv the same bytes thro serout.
my expectation was that, if i change the value of A from my gui, i shld see change happenin in the display(which receives serout msg).

i used wait function in serin, but the problem here is, i receive proper update of the value only with a timeout value of 350 in serin and above. if i bring it less than that, the response is slow and random.
[noparse][[/noparse]note: i use serial to usb cable]
does SERIN has some inherent delay?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-08 21:51
    There is some initial setup overhead for SERIN and SEROUT, but it's well under a millisecond with a BS2p. What you're probably seeing is the SERIN timeout taking place. 350 is less than 300us on a BS2p and that's less than the transmit time of a byte at 9600 Baud.
  • TAMILTAMIL Posts: 11
    edited 2009-12-08 22:09
    hi mike,
    in the reference manual i saw the unit for timeout in serin is 0.4ms. so i thought 350 * 0.4 = 140ms. also im runnin at 19200baud.
    so, r u sayin this is not correct?
    the timeout constant value range frm 0-65k. whts the unit of that constant?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-08 22:38
    I don't know what I was thinking. You're correct.
    It might help for you to post a copy of your source program as an attachment to your reply
Sign In or Register to comment.