cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Reading port pins in FX2LP

Anonymous
Not applicable

Reading port pins in FX2LP

Question: How to read ports pins in FX2LP?

 

Answer:

Consider that PORT C has to be configured as input port and its data has to be read. The below code configure PORT C as input port and reads the PORTC pins.

 
BYTE pinData;
PORTCCFG = 0x00;            // PORTC is is configured as an I/O 
OEC = 0x00;                    // PORTC is an input
pinData = IOC;                 // Reading the Port C pins
0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Jul 05, 2010 07:01 AM
Updated by:
Anonymous
 
Contributors