I'm using an F2802x microcontroller and I saw in Embedded Coder in Simulink that I have Digital output block. When I use this block, how does it work?
GPIO stands for General Purpose Input Output. Lets assume you want to generate a pulse at pin 39 as in the below image. So when you wire the pulse to pin 39 the underline software will generate the necessary code to configure pin 39 to be an output pin enabling the pin to output a pulse.
Below is the code stack between Simulink and Microcontroller. So when you create a Digital Output block the software will essentially convert and configure your Digital Output block into a Digital output pin. The code will convert into binary code to be able to loaded into the micro controller. Below is a high level diagram that explains the process.