|
|
@@ -1,4 +1,4 @@ |
|
|
|
( AVR Programmer, load range 160-162. doc/avr.txt ) |
|
|
|
( AVR Programmer, load range 160-163. doc/avr.txt ) |
|
|
|
( page size in words, 64 is default on atmega328P ) |
|
|
|
CREATE aspfpgsz 64 , |
|
|
|
VARIABLE aspprevx |
|
|
@@ -6,7 +6,7 @@ VARIABLE aspprevx |
|
|
|
: _xc ( a -- b ) DUP (spix) ( a b ) |
|
|
|
DUP aspprevx @ = NOT IF ABORT" AVR err" THEN ( a b ) |
|
|
|
SWAP aspprevx ! ( b ) ; |
|
|
|
: _cmd ( b4 b3 b2 b1 -- r4 ) _xc DROP _x DROP _xc DROP _x ; |
|
|
|
: _cmd ( b4 b3 b2 b1 -- r4 ) _xc DROP _xc DROP _xc DROP _x ; |
|
|
|
: asprdy ( -- ) BEGIN 0 0 0 0xf0 _cmd 1 AND NOT UNTIL ; |
|
|
|
: asp$ ( spidevid -- ) |
|
|
|
( RESET pulse ) DUP (spie) 0 (spie) (spie) |
|
|
|