4 Replies Latest reply on Aug 5, 2016 12:09 PM by user_301665782

    Uint64 type

    user_301665782

      Hi everyone
      I would need help with a straightforward code for PSoC 5 LP.
      I need to send 64 bit throuhg IR link.
      The code I am attached  is just a sumulation to verify why it doesn't work.
      The bits stream is simulated with the Bit_Array[64].
      When I'm debbug  step by step the code work, it mean that in the  uint64 Word_Received I get the Bit_Array[64].
      But may be I'm missing something when I want to speed up the process ann put a break point with some condition like Bt=40 at instruction CyDelay(3).

         

       

         

      Here is the code

         

      #include <project.h>

         

       

         


      int main()
      {
          
           uint8  Bit, Bt; ;
           uint64 Word_Received=0;
           uint64 Logic_Value=0, MASK=0x8000000000000000;
          
           CYBIT Bit_Array[64]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,
                               1,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0};
          
          
       
          CyGlobalIntEnable; /* Enable global interrupts. */
          
           for(;;)
          {
                
                              
               for ( Bt=0; Bt<64; Bt++)
          
          
            {
              
                       Word_Received|= Bit_Array[Bt];
                  
           
                        if (Bt!=63)   
                       { Word_Received<<= 1;}
                        CyDelay(3);
                       
          
                       }      

         


          }
      }

         

       

         

       

         

       

         

       

         

      Can I get some help.
      Thank you in advance