Benutzer-Werkzeuge

Webseiten-Werkzeuge


projects:4e4th:4e4th:start:forthprogramm_fuer_den_d_a_wandler
\ Digital-Analog Wandlung
DECIMAL
: WARTE    10 0 do loop ;

BIN
: INIT  
  11110000 p1 1+ cset \ p1 upper nibble is output
  00000100 p2 1+ cset \ P2.2 is ouput
  11110000 p1 cclr ;  \ uper nibble is "0" ;
HEX
: N+  
  p1 c@ \ get p1 
  dup 10 + \ increment upper nibble
  swap F and or  \ do not change lower nibble.  
  p1 c!  ( p1 c@ . ) \ put back result
  ;  
BIN
: PULS   00000100 p2 ctoggle ; \ puls for oscilloscope
DECIMAL
: WARTE  117 0 do loop ;
: DA init BEGIN puls n+ warte KEY? UNTIL ;
HEX
( finis)
projects/4e4th/4e4th/start/forthprogramm_fuer_den_d_a_wandler.txt · Zuletzt geändert: 2013-06-06 21:26 von 127.0.0.1