10 Replies Latest reply on Apr 5, 2019 12:11 PM by EvPa_264126

    RF Preamble

    BUTA_1301626

      I want to make RF communications.The RF device has a protocol. "TX : preamble + sencron + data1+.....+dataX"  5 bytes can be 0x55 or 0xAA. The times of sent 1 and 0 must be equal.The length of this bit directory may vary depending on the application requirements or constraints. 5 bytes 0x00 + 5 bytes can be 0xFF or the user can decide what will happen. The preamble is not observed on the RX side. Only the sencron is searched, then the data is read.

      udea preamble.JPG

      Pin Name:DIO

        DIO_Write(0x55); Preamble

          DIO_Write(0x55);Preamble

          DIO_Write(0x55);Preamble

          DIO_Write(0x55);Preamble

          DIO_Write(0x55);Preamble

          DIO_Write(0x00);Sencron

          DIO_Write(0x00);Sencron

          DIO_Write(0x00);Sencron

          DIO_Write(0x00);Sencron

          DIO_Write(0x00);Sencron

          DIO_Write(0xFF);Sencron

          DIO_Write(0xFF);Sencron

          DIO_Write(0xFF);Sencron

          DIO_Write(0xFF);Sencron

          DIO_Write(0xFF);Sencron

          DIO_Write(0xFE); DATA

      is this code correct?  or should I put my cydelay together for every 1 and 0 using the for loop?