2 Replies Latest reply on Apr 24, 2013 12:33 AM by nikhil.naik

    What is different between IOA & OEA?

    lee.carter

       Hi i want handle PORTA of fx2lp-56pin in slave fifo mode. 

         

      More detail, i want make what PORTA.0 is output and PORTA.1 is input. 

         

      But i don't know how am i supposed to make configuration in F/W. 

         

      Also, could you please let me know what is different between OEA and IOA?

        • 1. Re: What is different between IOA & OEA?
          nikhil.naik

           dv2

             

          IOA and OEA are clearly explained in FX2LP TRM.

             

          This information is present in the TRM in page173:

             

           

             

          The EZ-USB has up to five 8 bit wide, bidirectional I/O ports.

             

          Each port is associated with a pair of registers.

             

          ■ An ‘OEx’ register. It sets the input/output direction of

             

          each of the 8 port pins (0 = input, 1 = output).

             

          ■ An ‘IOx’ register. Values written to IOx appear on the

             

          pins configured as outputs; values read from IOx indicate

             

          the states of the 8 pins, regardless of input/output

             

          configuration.

          • 2. Re: What is different between IOA & OEA?
            nikhil.naik

             In your case:

               

            By default all port pins are in input state, so to chnage PA.0 to output, use

               

            OEA|=0x01

               

            The value you write to IOA will appear on output pin, for example to output 1 on PA.0, use

               

            IOA|=0x01