S
S
Stanislav Tamat2015-10-16 22:07:37
Arduino
Stanislav Tamat, 2015-10-16 22:07:37

What is the difference between digital pins in arduino?

Greetings!
What is the difference between arduino digital pins marked with a tilde (~) and simply numbered? And is it possible to use pinmode for 0 and 1 (TX and RX)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
svd71, 2015-10-17
@YokiToki

Alas, this is exactly the case in which using the Arduino "ideology" is evil. Curly Brace correctly wrote - this is PWM (PWM) - outputs for generating pulse-width modulation. But this is secondary.
Primarily, each microcontroller has both ordinary ports inserted, which can be configured both for input and output, and a bunch of additional functions, which, due to the loss of these contacts for input or output, can be made to work in specific modes.
For example, the XTAL1, XTAL2 and RES pins are no longer available for use in Arduino projects - they simply perform the necessary task needed by the Arduino itself. Although, if desired, they can be easily reprogrammed. The same applies to TX, RX - either digital outputs or UART. And what is called analog outputs only says that, in addition to numbers, they can be made to respond to changes in the signal level in the range from 0 to Vcc, relative to the settings of some registers and the voltage at the ARef pin with signal conversion from analog to digital (ADC).
In addition, there are already indicated PWMs, Interrupts, Timers and several interfaces for data exchange on board.
You can find more information about these goodies in the datasheet for your specific controller in your version of Ardurin at atmel.com

C
Curly Brace, 2015-10-16
@stasuss

this is hardware PWM
and tx can be used as you like, as long as you do not need a usb communication channel between the computer and the arduino

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question