Shop OBEX P1 Docs P2 Docs Learn Events
SX28 hangs while trying to execute RX_BYTE function?? — Parallax Forums

SX28 hangs while trying to execute RX_BYTE function??

eagletalontimeagletalontim Posts: 1,399
edited 2009-01-18 14:37 in General Discussion
would anyone know any reason that would cause an SX28 to lock up when running this function?

FUNC RX_BYTE
  SERIN RX, Baud, temp1
  RETURN temp1
  ENDFUNC




usage : cmd = RX_BYTE

I have 2 SX's talking to each other. One is the Display chip which shows a menu on an LCD and it also saves to an eeprom. The other is the data chip which controls user input. Everything works perfect when sending data from the Data chip to the Display chip, but when the Data chip sends the command to the Display chip to load information from the eeprom, it processes everything correctly but the Data chip does not retrieve the data. Sometimes it will retrieve it, but it takes over 30 seconds. All help will greatly be appreciated!!!

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-01-18 06:51
    Possible reasons are:
    SERIN never receives data
    Baud is wrong (although that usually leads to wrong data, not blocking)
    RX is an output rather than input
    temp1 is an alias for a __PARAMx systemvariable used by SERIN

    Best advice: post the complete code as attachement
    if you can't solve it.

    regards peter
  • eagletalontimeagletalontim Posts: 1,399
    edited 2009-01-18 14:37
    Thanks for the reply! I found that I was using temp1 in a sub that was called from the same function and that I did not pause long enough between sending data and receiving data.
Sign In or Register to comment.