packageGpio
Digital pins: outputs, read-back, wake-up on input change, time cost of the accesses (gpioOpTime)
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Contents
| Name | Description |
|---|---|
| Two-way LED chaser: one LED (Peripherals.LED) per pin GP0-GP7, laid out in a ring around the microcontroller, lit one at a time in the order GP0->GP3 (left) then GP7->GP4 (right), then the other way round | |
| GP1 toggles, GP2 reads back its electrical state, GP3 copies what was read (with LEDs on GP1 and GP3 for visualisation) | |
| Verification scenario no. 3: GP1 (input) toggles during a sleep(3600), the script must react without waiting for the end of the sleep | |
| Internal pull resistors: two push buttons without any external resistor (Pin.PULL_UP, Pin.PULL_DOWN), and a pin whose pull is switched against a weak external resistor |