8 Replies Latest reply on Sep 6, 2016 7:01 AM by MichaelF_56

    Examples using irtxdriver and syncedpulse?

    userc_3581

      Hi,

      I would like to use irtxdriver to send IR Codes on P4 but I can't figure out how this driver is supposed to be used. For instance I don't know how I should fill the IR_TX_CLOCK_SETTING struct.

      Would it be possible to provide us with an exemple using this driver?

       

      Same question for syncedpulse. I understood that we would use this driver to perform IR Code learning ?

       

      Thanks for your help.

        • 1. Re: Examples using irtxdriver and syncedpulse?
          jota_1939431

          Hello neals

           

          At present, we don't have examples for IRTX driver but may have more information in 4th quarter of this year.

           

          Our syncedpulse implementation is not used in the IR learning use case.

           

          Let us know if this answers your question.

           

          Thanks

           

          JT

           

          • 2. Re: Examples using irtxdriver and syncedpulse?
            userc_3581

            Hi,

            Thank you for you reply.

            I managed to have the irtx driver work alone.

            For those interested in using this driver, here is an basic example of use.

             

            BYTE IRTX_PORT = 0;

            BYTE IRTX_PIN = 4;

            IR_TX_CLOCK_SETTING irtxClockSet;


            #define SIZE_BUFFER 16     //Must be >=8

            UINT16 send_buffer[SIZE_BUFFER];


            #define HIGH(value) (value | (1<<15))

            #define LOW(value) (value & (~(1<<15)))


            void hello_sensor_create(void)

            {

                 /*********************/


                 //Setup code


                 /*********************/


                 irtx_setIrTxPortPin(IRTX_PORT, IRTX_PIN);

                 irtxClockSet.invertOutput=0; //Invert HIGH and LOW if true

                 irtxClockSet.modulateFreq=38000; //Modulation frequency 38KHz


                 //Prepare an array to send

                 send_buffer[0]=HIGH(8000);  //Stay high for 8000us

                 send_buffer[1]=LOW(4000);   //Stay low for 4000us

                 send_buffer[2]=HIGH(600);   //Stay high for 600us

                 send_buffer[3]=LOW(1000);   //etc...

                 send_buffer[4]=HIGH(600);

                 send_buffer[5]=LOW(1000);

                 send_buffer[6]=HIGH(600);

                 send_buffer[7]=LOW(600);

                 send_buffer[8]=HIGH(1000);

                 send_buffer[9]=LOW(600);

                 send_buffer[10]=HIGH(1000);

                 send_buffer[11]=LOW(600);

                 send_buffer[12]=HIGH(600);

                 send_buffer[13]=LOW(1000);

                 send_buffer[14]=HIGH(1000);

                 send_buffer[15]=LOW(600);


                 //Send IR Code

                 irtx_sendData(send_buffer, SIZE_BUFFER, irtxClockSet);


                 //Hardware IR Bloc is turned off during deep sleep

                 //We must wait until the transmission is done before going to sleep

                 while (! irtx_isAvailable());

            }


            • 3. Re: Examples using irtxdriver and syncedpulse?
              userc_3581

              Just a last question :

               

              Could you please tell me if it is possible to use the IR RX Bloc described in the datasheet of the BCM20732 with the SDK 1.1 ?

               

              Thanks !

              • 4. Re: Examples using irtxdriver and syncedpulse?
                MichaelF_56

                Note that the IR RX function is also described in the 20732S module datasheet as well (alternate function).

                 

                I am not aware of any dependencies on SDK 2.0 to leverage this functionality, so it should work.

                 

                IR-RX.png

                 

                IR-RX2.png

                • 5. Re: Examples using irtxdriver and syncedpulse?
                  userc_3581

                  Thank you,

                  Where can I find the drivers to control the IR RX ?

                  • 6. Re: Examples using irtxdriver and syncedpulse?
                    jota_1939431

                    Hello neals,

                     

                    Currently, we do not provide any specific drivers for the infrared receiver.

                     

                    We will let you know of the support in our upcoming SDK Releases.

                     

                    Let me know if this answers your question.

                     

                    Thanks

                    JT

                    1 of 1 people found this helpful
                    • 7. Re: Examples using irtxdriver and syncedpulse?
                      user_1720661

                      Hi:

                          now i have the question about the IRRx ,I want to use the IRRx function.but i don't know how to use it, can you privider the API function to support the function now ?MichaelF_56

                       

                      Thanks

                      Geary

                      • 8. Re: Examples using irtxdriver and syncedpulse?
                        MichaelF_56

                        As mentioned previously, we do not provide any specific drivers/software within the SDK to leverage the IR functionality on the device.