.: EMICROS :.  Embedded Micro Software
Home CAN232 CANUSB I2C232 I2CUSB CanWiser Learn C
Add your text here
Contact

Email : info@emicros.com

Ordering Information

.: Ordering using our PayPal powered shopping cart (PayPal account not required).

CAN232 : $79
CANUSB : $89
I2C232 : $79

I2CUSB : $89

Click here to View Cart and check out.

 

 

 

 

Let's explore how to read a port pin. In the last set of examples, we focused on writing to a port pin that is set as an output. How do you think we can read a pin? The answer is set the port pin as an input and either read the port pin individually or read the port and mask off the desired bit.

The following schematic shows 2 additional components needed to read a switch. A 10kohm pullup resistor connecting RB1 on pin 22 to VCC has been added as well as a push button switch connecting RB1 to ground.

 

 
 
Copyright 2010 Embedded Micro Software. All rights reserved