Current release as of December 27th, 2012, [DOWNLOAD]
Since Release 1.1 DaddyBASIC implements three new functions for manuipulating the STM32 GPIO pins. Those functions are 'pin()', 'in()', and 'out()'. The following listing is the code that generated these waveforms on GPIO PORT A, bits 0, and 1.
The program produces a square wave on GPIOA (port 0) PIN 0, by sucessively reading the current state, inverting it, and writing it back to the pin. Each time a logic '1' is written, the the same inversion is done on GPIOA PIN 1. Effectively a divide-by-2 function with the derived square wave being closer to % 50/50 duty cycle since it is effectively edged-triggered.
FOR n = ... TO .... <STEP> ...
WHILE ... DO
PRINT expr<;> <...>
Writen at 24. December 2012 by 8bitgeek