IMPLEMENTED SO FAR

- Support for 4x20 LCD Display and large number display
- Brightness and contrast adjustment with remote
- (OPUS/Wolfson WM8741) DAC volume control: remote and rotary encoder
- (OPUS/Wolfson WM8741) DAC random filter selection 1 to 5 with remote
- (OPUS/Wolfson WM8741) DAC upsampling selection (L, M, H -this is the OSR setting)
- I2C level shifting (5V to 3.3V)
- Optimized power-up sequence

Monday, April 6, 2009

ATMega I/O pull up resistor

Here is a diagram from the spec describing the circuit configuration for each I/O pin.



According to the spec, all ports have individually selectable pull-up resistors with a supply-voltage invariant resistance of 20K-50K ohm. In addition, all ports have protection diodes to both VCC and GND.

The pull up resistor can be enabled by software with the following code:
pinMode(pin, INPUT);     // set pin to input
digitalWrite(pin, HIGH); // turn on pullup resistors


This means when the pin is configured as input:
  • No need for external pull up/down resistors
  • Value of pin when nothing is connected is "pulled-up": HIGH (1)
Note: (From the Arduino reference documentation)

"Consequently a pin that is configured to have pullup resistors turned on when the pin is an INPUT, will have the pin configured as HIGH if the pin is then swtiched to an OUTPUT with pinMode(). This works in the other direction as well, and an output pin that is left in a HIGH state will have the pullup resistors set if switched to an input with pinMode()"

"The analog pins also have pullup resistors, which work identically to pullup resistors on the digital pins. They are enabled by issuing a command such a:"

digitalWrite(14, HIGH);  // set pullup on analog pin 0


No comments: