|
META TOPICPARENT |
name="WebHome" |
%DASHBOARD{ section="banner" |
| titlestyle="color:#F00000;"
}%
|
|
< < | The board support package for the STM32WB Nucleo Board is restricted to the Arduino UNO R3 pin header and the onboard LEDs and switches (buttons). The STM32 has much more capabilities then 14 digital I/O pins, 6 analog input pins, UART, SPI, and I2C interfaces. But if you want to use the more advanced features you can use the CubeMX to create source code for the internal peripherals. This project wants to show how to use the Cube Ecosystem for a Forth system (or vice versa) and can't implement all features and possibilities the STM32WB has. It is a good starting point for your project. |
> > | The board support package for the STM32WB Firefly Development Board is restricted to the Arduino UNO R3 pin header and the onboard LED and switch (button). The STM32 has much more capabilities then 14 digital I/O pins, 5 analog input pins, UART, SPI, and I2C interfaces. But if you want to use the more advanced features you can use the CubeMX to create source code for the internal peripherals. This project wants to show how to use the Cube Ecosystem for a Forth system (or vice versa) and can't implement all features and possibilities the STM32WB has. It is a good starting point for your project. |
|
|
| |
|
< < | Defaults: Digital port pins D0 to D7 are push pull outputs, D8 to D15 are inputs with pull-up resistors. |
> > | Defaults: Digital port pins D0 to D9 are inputs, except D6 and D8 are output for neopixel, D1 for UART Tx. D10, D11, D12, and D13 are for the SD card. You are free to use the GPIO pins for other purposes. |
|
led1! ( n -- ) sets LED1 (blue)
|
|
< < | led2! ( n -- ) sets LED2 (green)
led3! ( n -- ) sets LED3 (red) |
| led1@ ( -- n ) gets LED1 (blue) |
|
< < | led2@ ( -- n ) gets LED2 (green)
led3@ ( -- n ) gets LED3 (red) |
|
switch1? ( -- n ) gets switch1, closed=TRUE |
|
< < | switch2? ( -- n ) gets switch2, closed=TRUE
switch3? ( -- n ) gets switch3, closed=TRUE |
|
dport! ( n -- ) sets the digital output port (D0=bit0 .. D15=bit15).
dport@ ( -- n ) gets the digital input/output port (D0=bit0 .. D15=bit15). |
|
3 0 dmod \ set D0 to Output
3 1 dmod \ set D1 to Output
|
|
> > | 3 2 dmod \ set D2 to Output |
| 3 3 dmod \ set D3 to Output |
|
> > | 3 4 dmod \ set D4 to Output |
| 3 5 dmod \ set D5 to Output
3 6 dmod \ set D6 to Output |
|
> > | 3 7 dmod \ set D7 to Output |
|
|
|
STM32WB Firefly Board |
|
< < |  |
| |