Skip to main content

Posts

Showing posts from September, 2021

Can D13 pin of Arduino Uno and nano be use as input pin?

D13 pin can be use as  digital output pin. D13 pin can be use as i nput pin  together with  external pull-up  and  pull-down resistor . It is not recommand to use the  D13 internal pull-up  resistor because instead of the regular 5V, the voltage will be hanging around 1.7V. Most of Arduino newbies have their first code to blink the LED with D13 pin as an output pin. This really give us big confident to know the code can be successfully executed on the microcontroller. However, due to the build-in D13 pin on different Arduino board has slightly different circuit design,  is there any limitation to use the D13 GPIO pin as input pin ? Let’s find out more! Experiment condition I investigate both the value of D13 digital input and LED light status with the following code with  Arduino Uno Rev3 . and  Arduino nano 3.0.  void setup() { pinMode(13, INPUT); Serial.begin(9600); } void loop() { Serial.println(digitalRead(13)); } I will illustr

Talking about ATMega328 packages

Package of ATMega328P chip ATmega328/ATmega328P chip become popular together with Arduino. This chip comes with different packages. Today we are going to intrude a little bit more on the package of the chip. As the one being founding on Arduino Uno, the first one most people may encounter is the  DIP package . Also , if you play around with Arduino nano and Arduino pro mini, you might see the  QFT package  being mounted on the board . Besides the DIP and QFP package, there are actually also  QFN/MLF package . Difference between DIP/QFP/QFN chip Depend on the purpose and the target circuit board size, we can choose different package for our future project. But what are the difference between these packages? The major difference between package is the size and pin arrangement. Dual in-line package(DIP, DIL) As the one being found on the Arduino Uno board, the DIP package shaped like a    “cockroach”  with two parallel rows(legs) of electrical connecting pins being laid on each sides.  Th