aboutsummaryrefslogtreecommitdiff
path: root/forth/forth/avr/task2-test.fs
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-09-21 21:59:17 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-09-21 21:59:17 +0200
commit2f83a0bea9da444e3d70569eba3d6847ca02be03 (patch)
tree20163bbd478f40679d22f5e964aef94c688639f0 /forth/forth/avr/task2-test.fs
parent125127ee67891e1813164e20aa848a80b9d2f2a0 (diff)
...
Diffstat (limited to 'forth/forth/avr/task2-test.fs')
-rw-r--r--forth/forth/avr/task2-test.fs47
1 files changed, 47 insertions, 0 deletions
diff --git a/forth/forth/avr/task2-test.fs b/forth/forth/avr/task2-test.fs
new file mode 100644
index 0000000..2897fe1
--- /dev/null
+++ b/forth/forth/avr/task2-test.fs
@@ -0,0 +1,47 @@
+\ *******************************************************************
+\ *
+\ Filename: task2-test.txt *
+\ Date: 01.03.2014 *
+\ FF Version: 5.0 *
+\ MCU: Atmega 328(Olimex AVR-P28) *
+\ Copyright: Mikael Nordman *
+\ Author: Mikael Nordman *
+\ *******************************************************************
+\ FlashForth is licensed according to the GNU General Public License*
+\ *******************************************************************
+\ Demo for the Olimex AVR-P28 with Atmega328P. Blinks led in
+\ background task.
+single
+-task2
+marker -task2
+ram hex
+\ Registers for Atmega 328P. Change if needed
+$0028 constant portc
+$0027 constant ddrc
+$20 constant pin5
+
+ram variable delay
+
+: ledoff pin5 portc mset ;
+: ledon pin5 portc mclr ;
+
+0 18 20 0 task: task2
+: task2loop
+ 100 delay !
+ pin5 ddrc mset \ Output
+ begin
+ delay @ ms
+ pin5 portc mtst
+ if
+ ledon
+ else
+ ledoff
+ then
+ again
+;
+
+: t2go ['] task2loop task2 tinit task2 run ;
+
+' t2go is turnkey
+warm
+