Microcontroller

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

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

  Joined February 12, 2018      696
Monday at 02:11 PM

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.

  Joined November 06, 2020      64
Friday at 08:06 PM

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.

  Joined February 27, 2020      55
Thursday at 11:08 AM