Get free YouTube views, likes and subscribers
Get Free YouTube Subscribers, Views and Likes

I / O Ports | The first program | Microcontrollers from scratch #4

Follow
Dmitriy Zabarilo

I / O ports are the primary and only node through which the microcontroller interacts with external devices. Therefore, before writing the first program, you should learn how to configure the I / O ports of the microcontroller. For this purpose there are two registers: DDRx and PORTx. For example, if port B of the microcontroller needs to be set to output, then 0 should be written to the corresponding DDRB bit, and if to input 1. By writing 0 or 1 to the PORTB register, this port pin B is set to high or low potential.

posted by rivivrete0j