Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 823 Bytes

4-1-a-how-does-your-program-tells-mcu-what-to-do.org

File metadata and controls

22 lines (14 loc) · 823 Bytes

How does your program tell MCU what to do?

Why we use MCU?

The usual answer is: Want to control the external peripherals (some kind of sensors, robot arms, motors, etc).

So, right now the question turns to how you can control the external peripherals? The answer is via the peripheral register inside the MCU.

Then what is a register?

A register is a special region of memory that controls a peripheral. A peripheral is a piece of electronics that sits right next to the processor within the microcontroller package and provides the processor with extra functionality.

There are couples of supported peripherals inside the RP2040:

  • GPIO
  • I2C
  • SPI
  • USART
  • Clock
  • ....etc

That said, you send bytes (unsgined 32-bit integer) to the particular register, then RP2040 knows what you want to do:)