Microcontroller

ShriRanjani Narasimhan's picture

Offline

Joined: Oct 22, 2020

Replies: 0
Microcontroller
October 24, 2020 - 5:40pm

What happens if we give an analog data to the ports of microcontrollers?

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 360

It's dependent on the type if analog signal, frequency and voltage level.

Michal Podmanický's picture

Offline

Joined: Nov 06, 2020

Replies: 43

You are probably asking, when i/o-s are configured in digital mode. In this case, the state of pins will change according to level of your analog voltage.

 

Lets say, your uController is supplyed by 5V.

Than if your analog voltage is less than about 2.5V (it depends on uC), you will read a "0" on your pin.

If more than 2.5V , you will read a "1".

 

Generally, the digital mode isnt suitable for analog signals, but in some cases like not enough free analog peripherals (ADC, comparator), you can use it for basic checking of analog signals.

Olivia Williams's picture

Offline

Joined: Feb 27, 2020

Replies: 23

A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system. A typical microcontroller includes a processor, memory and input/output peripherals on a single chip.