cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

Anonymous
Not applicable

 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?

0 Likes
2 Replies
Anonymous
Not applicable

 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.

0 Likes
Anonymous
Not applicable

 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

0 Likes