I want to send a stream of bytes (numbers stored in 28X2 scratchpad) to a PC for later analysis in Excel. I've made it work slowly using the program listed below, based on the example program "AXE110-Datalogger Upload.bas" which uses the "Datalink" terminal.
I can only get this to upload successfully with the long 500ms pause between sertxd sends.
Curiously the window at top right of the Datalink terminal shows all the bytes sent even without any pause, but only the first few points get onto the plot in the graph window and only those are exported to .csv file.
Can anybody suggest a better way to get the data across?
' Load test data into scratchapad
for b0=0 to 127
b3=b0+100
put b0,b3
next b0
'Define useful ASCII characters
symbol COM = 44 'comma
' CR and LF are already defined within compiler
' The PICaxe "datalink" monitor misses the first data sent
sertxd(COM,99,CR,LF) 'dummy
main:
; Start of proper data upload
for b0 = 0 to 127 'Start a for..next loop.
get b0,b2
pause 500 ; this delay seems to be necessary for reliable uploading
sertxd(COM,#b2,CR,LF)
next counter 'Next loop.
serout C.7,N2400,(0) 'Send null to end.
end
I can only get this to upload successfully with the long 500ms pause between sertxd sends.
Curiously the window at top right of the Datalink terminal shows all the bytes sent even without any pause, but only the first few points get onto the plot in the graph window and only those are exported to .csv file.
Can anybody suggest a better way to get the data across?
' Load test data into scratchapad
for b0=0 to 127
b3=b0+100
put b0,b3
next b0
'Define useful ASCII characters
symbol COM = 44 'comma
' CR and LF are already defined within compiler
' The PICaxe "datalink" monitor misses the first data sent
sertxd(COM,99,CR,LF) 'dummy
main:
; Start of proper data upload
for b0 = 0 to 127 'Start a for..next loop.
get b0,b2
pause 500 ; this delay seems to be necessary for reliable uploading
sertxd(COM,#b2,CR,LF)
next counter 'Next loop.
serout C.7,N2400,(0) 'Send null to end.
end
