3 Replies Latest reply on Mar 1, 2017 3:50 AM by user_1377889

    Can i write directly the port

    ferhatyol_2020106

      Hi

         

      Can I write data directly to the por? For example, can I write an 8-bit value directly to port 4? I want to write data directly to the port without using the Control Register.

         

      I need to do the writing process very quickly.

        • 1. Re: Can i write directly the port
          user_1377889

          No problem: just define a pin component(named "MyPort") with 8 pins. assign MyPort[7:0] to your required port.

             

          Now a MyPort_Write(0b10101010) will write the pattern to the port.

             

           

             

          Bob

          • 2. Re: Can i write directly the port
            ferhatyol_2020106

            Hi Bob

               

            Yeah, I did it the way you said. I created a port named HUB75 using Port 4 [7: 0]. I am writing 8-bit data to this port.

               

            This is my code

               

                for(i=0;i<32;i++)
                {
                   HUB75_Write(pdata[i]);
                   CLK_Write(1);CLK_Write(0);
                }

               

            These operations take 24us for 64Mhz cpu frequency. I can not increase the CPU frequency any more (for cy8c5868axi, max 68Mhz) Max data size 32. Can I use DMA to speed up this process?

            • 3. Re: Can i write directly the port
              user_1377889

              Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
              Creator->File->Create Workspace Bundle (minimal)
              and attach the resulting file.

                 

              Furthermore: What are you exactly intending to perform? What kind of hardware is connected to that port?

                 

               

                 

              Bob