$regfile = "m128def.dat" ' STK 500 / 501 board
'-------------------------------------------------------------------------------
$sim
$crystal = 14745600 ' External Xtal, full swing mode
$baud = 115200 ' use baud rate
$hwstack = 200
$swstack = 250
$framesize = 1000
$programmer=9 ' Define programmer as stk500 extended
'$prog $fc,$c6,$df,$ff ' Lock Bits, Fuse Bits Low, Fuse Bits High, Fuse Bits Extended
'
' Variable Space
Dim dwdStart as dword
Dim dwdStop as dword
Dim intStepValue as integer
Dim dwdCount as dword
'-----[Serial Port(s)]--------------------------------------------------------
Config Com1 = 115200, Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Open "com1:" For Binary As #1
'
' counting up, works
' counting down, stops on first
'
'dwdStart = 0 : dwdStop = 99999 :intStepValue = 1 ' we will count up
dwdStart = 99999 : dwdStop = 0 :intStepValue = -1 ' we will count down
for dwdCount = dwdStart to dwdStop step intStepValue
'for dwdCount = 99999 to 0 step -1 ' this works when uncommentted
print #1, "Count=";dwdcount
next
Print #1, "Scan completed."
do:loop
|