You are here » Home » CARIBOU++ RTOS » DaddyBASIC

DaddyBASIC is a BASIC language interpreter that currently runs on the STM32F103

I wrote DaddyBASIC as a means to provide my young boys with a pathway into embedded programming. David Brin has written an excellent article on this topic entitled "Why Johnny Can't Code".

Current release as of December 27th, 2012, [DOWNLOAD]

 STM32F103R Development Board Target

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 waveforms are generated by the following program, illustrating the usage of the PIN(), IN(), and OUT() functions. (Note: since version 1.2 the '#' symbols on integer functions are omitted).

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> ...




PRINT expr<;> <...>







Writen at 24. December 2012 by 8bitgeek


Captcha code: