Andres Rodriguez
New Member
Prior to executing the following code I need to press F8 to display the terminal window. I wonder if there is a way to have the software display the window with an instruction in the program.
Code:
if pinC.7 = 0 then INIT 'Initiate data transfer to PC
'..........................
'REST OF THE PROGRAM STORES DATA ON AN EEPROM AND IS NOT RELEVANT TO THIS QUESTION......................
'.............................
'DATALINK to PC
INIT:
HSerOut 0, ("?f","?y0?x00")
HSerOut 0, (" PRESS THE BUTTON","?n") 'SEND GUIDANCE INSTRUCTIONS TO LCD
HSerOut 0, (" TO SEND DATA","?n")
HSerOut 0, (" TO THE COMPUTER","?n"," AT 9600 BPS")
Looper1:
button C.6,1,255,100,M,0,Looper1
L=0
' ***************************
high C.1 'Write protect eeprom
high C.2 'LED On
sertxd (" I AM READY TYPE G AND CLICK SEND",RET,LF,LF)
let Addr = 0
serrxd (G) 'Wait for GO signal
sertxd ("Sample",COM,"TORQUE",COM,"RPM",COM,"POWER",COM,RET,LF)'Titles
HSerOut 0, ("TRANSFERING DATA","?n")
Read_data: 'Now read the data
readi2c Addr , (b2,b3,b4,b5,b6,b7)
If b4=0 and b5=0 then ALL_done
low C.2
TX_data:
sertxd (#Addr,COM,#Read_tork,COM,#RPM,COM,#Power_out,#L,COM,RET,LF)
Inc_Addr:
L=L+1
If RPM=0 then ALL_done
let Addr = Addr + 6
high C.2
goto Read_data
ALL_done:
high C.2
L=0
sertxd (0) 'finished so send NULL
HSerOut 0, ("?f","?y0?x00"," DATA TRANSFER","?n") 'clear screen
HSerOut 0, (" IS COMPLETE","?n")
HSerOut 0, (" GO RACING AND KICK","?n")
HSerOut 0, (" SOME CULO ")
END