Since i'm not really sure again of what you're trying to do with the PULSIN statement, try this and post reply.
Maybe i'm totaly dumb but in case this is not solve the problem, tell me exactly, like a children, what you want to do. In case of X pulse..... in case of pulse.....Code:DEFINE OSC 20 Rx_Data Var Byte[7] Rx_Byte Var Byte Rx_Bit Var Bit Pulse Var Word I Var Byte w Var Byte Start: Pulse = 0 PULSIN Rx_Pin, 0, Pulse IF Pulse < 290 THEN Start Get_Data: FOR i = 0 to 6 FOR w = 0 TO 5 Pulse = 0 PULSIN Rx_Pin, 0, Pulse If (Pulse > 80) and (Pulse < 128) THEN Rx_Bit = 0 IF (Pulse >= 128) AND (Pulse < 220) Then Rx_Bit = 1 Rx_byte = pulse Rx_Byte = Rx_Byte << 1 Rx_byte = Rx_Byte & $FE Rx_Byte.0 = Rx_bit NEXT w Rx_Data[i] = Rx_Byte NEXT i GOSUB Send_Data GOTO Start
regards




Bookmarks