Advertisement
Tims125

Bios S1 v1 602 MA

Dec 17th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' {$STAMP BS2P}
  2. ' {$PBASIC 2.5}
  3. ' {$PORT COM4}
  4.  
  5.  
  6. version  CON 1602
  7.  
  8. '**********************
  9. '   Slot 1
  10. '**********************
  11.  
  12. '
  13. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  14. 'XXXXXXXX >>  Start Here to Copy Header entries  <<  XXXXXXXXXXXXXXXXXX
  15. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  16. '
  17.                       'S0 contains the timing loop
  18.                       'S2 contains the event table AND actions.
  19.                       'S1 contains test code placeholder
  20. '
  21. ' 2012
  22. ' 1. added test for payload interface boards
  23. ' 2. clean slot 0, added time 0,1,2 for clock speed
  24. '
  25. '******************  Start of System Global lables *******************
  26. '     Conditional Assemblies
  27. '
  28. #DEFINE FlyConfig = 0              '1=Set to Flight Configuration, 0=Test Configuration
  29. #DEFINE fastclock = 0              '0=Normal Time X1, 1=Medium Time ~X17 2=Fast Time ~X60
  30. #DEFINE testreset = 1              '1=test reset and reset count
  31. #DEFINE SaySlot   = 1              '1=Say Slot with vector
  32. #DEFINE Sayit = 1                  '1=Say what is happening
  33. #DEFINE nodebug = 1                '1= nodebug outputs
  34. #DEFINE MasterEnabled = 1          '1= enable checking for master input
  35. '
  36. '
  37. '***************************************************************************************
  38. '********* EEPROM Data Storage Area ****************************************************
  39. 'Start storage at top of slot6 and work downwards, code can go in slot 4, but be carful
  40. 'not to overwrite the data storage.  Programs go from botton to top, Data storage, and
  41. 'our data storage allocations are from the top down.  MUST BE CHECKED MANUALLY, program
  42. 'does not know any better.
  43. '***************************************************************************************
  44. '
  45. DataStorage    CON 4                'EEROM data is storaged in Slot 4
  46. '
  47. '
  48. 'Data storage is defined at the end of this slot (slot 4), the spaces and address must match up with
  49. 'the lables defined here which will be used across all slots, be careful in defining this
  50. '
  51. Cstatus             CON 0                    '00 See data at data storage area
  52. TestNumber          CON Cstatus+1            'Test Sequence Counter  1112
  53. ResetNumber         CON TestNumber+2         '00 Number of times reset sence downloaded
  54. IDcodefile          CON ResetNumber+1        'MicroLab alpha ID  2 ascii values
  55. LastPhoto           CON IDcodefile+2         '00000 Photo number  5 ascii values
  56. LastBKupload        CON LastPhoto+5          'Number of the last command file uploaded
  57. NextBktoLoad        CON LastBKupload+1       'NextBktoLoad       next bank to load
  58. LastuploadCommand   CON NextBktoLoad+1       'LastuploadCommand   Number of the last command file uploaded
  59. Missionsec          CON LastuploadCommand+2  'Missionsec          clock sec count here 0-59
  60. Missionmin          CON Missionsec+1         'Missionmin          clock min count here 0-59
  61. Missionhour         CON Missionmin+1         'Missionhour         lock hour count here 0-23
  62. Missionday          CON Missionhour+1        'Missionday          lock day count here 0-xx
  63. TempStatus          CON Missionday+1         'Temp storage for test status routines
  64. '
  65. '     'ETC....
  66. '
  67. '**********************************************************************
  68. '******** Scrathpad Ram Defined Ram location across all slots *********
  69. '**********************************************************************
  70. '
  71. ScratchRam     CON 0                  'start of Scratch ram locations bytes
  72. '
  73. '----- Bios and User Scratch pad memory locations -----------------------------
  74. '
  75. Resetverify    CON ScratchRam         'location is 0 on Power on Reset or not Zero for slot return
  76. VectorFromSlot CON Resetverify+1      'Slot to return to - who called the program vector
  77. VectorFromNum  CON VectorFromSlot+1   'From Vector number within slot place to Return to
  78. SlotErrReturn  CON VectorFromNum+1    'Error code return from Slot program run
  79. '
  80. sMissionday     CON SlotErrReturn+1     'BIOS Mission clock day count here 0-xx
  81. sMissionhour    CON sMissionday+1       'BIOS Mission clock hour count here 0-23
  82. sMissionmin     CON sMissionhour+1      'BIOS Mission clock min count here 0-59
  83. sMissionsec     CON sMissionmin+1       'BIOS Mission clock sec count here 0-59
  84. '
  85. '---------- Bios provided data for user -----------------------------------------
  86. '
  87. RTCsec         CON sMissionsec+1      'BIOS Real Time clock sec count here 0-59
  88. RTCmin         CON RTCsec+1           'BIOS Real Time clock min count here 0- 59
  89. RTChour        CON RTCmin+1           'BIOS Real Time Clock hour count here 0-23
  90. RTCday         CON RTChour+1          'BIOS Real Time clock day count here 1-31
  91. RTCmonth       CON RTCday+1           'BIOS Real Time clock month count here 1-12
  92. RTCyear        CON RTCmonth+1         'BIOS Real Time clock year count here 0-99
  93. '
  94. AmbTemperature     CON  RTCyear+1             'BIOS Ambient temperature in celcius (8 low bits of 10 bits)
  95. AmbTemperaturehigh CON  AmbTemperature+1      'BIOS Ambient temperature in celcius (2 high bits of 10 bits)
  96. AmbHumidity        CON  AmbTemperaturehigh+1  'BIOS Ambient Humidity  (8 low bits of 10 bits)
  97. AmbHumidityhigh    CON  AmbHumidity+1         'BIOS Ambient Humidity  (2 high bits of 10 bits)
  98. '
  99. A2Dchannel0        CON  AmbHumidityhigh+1     'BIOS Analog channel 0, (8 bits 0f 0v to 2.5v low-> high)
  100. A2Dchannel0high    CON  A2Dchannel0+1         'BIOS Analog channel 0, (2 bits 0f 0v to 2.5v low-> high)
  101. A2Dchannel1        CON  A2Dchannel0high+1     'BIOS Analog channel 1, (8 bits 0f 0v to 2.5v low-> high)
  102. A2Dchannel1high    CON  A2Dchannel1+1         'BIOS Analog channel 1, (2 bits 0f 0v to 2.5v low-> high)
  103. A2Dchannel2        CON  A2Dchannel1high+1     'BIOS Analog channel 2, (8 bits 0f 0v to 2.5v low-> high)
  104. A2Dchannel2high    CON  A2Dchannel2+1         'BIOS Analog channel 2, (2 bits 0f 0v to 2.5v low-> high)
  105. A2Dchannel3        CON  A2Dchannel2high+1     'BIOS Analog channel 3, (8 bits 0f 0v to 2.5v low-> high)
  106. A2Dchannel3high    CON  A2Dchannel3+1         'BIOS Analog channel 3, (2 bits 0f 0v to 2.5v low-> high)
  107. InternTemp         CON  A2Dchannel3high+1     'Bios internal temp of msp430- Needs Calibration
  108. InternTemphigh     CON  InternTemp+1          'Bios internal temp of msp430- Needs Calibration
  109. VCCby2             CON  InternTemphigh+1      'Bios VCC/2 for calabration - Regulator check
  110. VCCby2high         CON  VCCby2+1              'Bios VCC/2 for calabration - Regulator check
  111. '
  112. '----------- Bios Reserved working registers ----------------------------------------
  113. '
  114. CameraRes       CON  VCCby2high+1     'Name this Bios Register (camera Resolution 320 $05 640 $07)
  115. CameraQua       CON  CameraRes+1      'Name this Bios Register (Camera quality $02 normal, $01 Better, $00 Best)
  116. SlaveErr        CON  CameraQua+1      'slave MSP430 status byte (Local Slave Status)
  117. ActiveBank      CON  SlaveErr+1       'Name this Bios Register (Active bank)
  118. TextPointer     CON ActiveBank+1      'Name 16 bit pointer to text in active bank
  119. '
  120. 'MicroLab Bios Status Byte given to Master on Status Request
  121. '  Location and Bits defined
  122. '
  123. MLabStatus     CON  TextPointer+2     'Current Status of MicroLab
  124. HighPower      CON  $80               '  Bit 7=high power request
  125. ExComplete     CON  $40               '  Bit 6 = execution of upload command completed
  126.                                      '  Bit 5,4,3, don't care
  127. B2ready        CON  $04               '  Bit 2 = bank 2 ready for upload
  128. B1ready        CON  $02               '  Bit 1 = bank 1 ready for upload
  129. B0ready        CON  $01               '  Bit 0 = bank 0 ready for upload
  130. '
  131. 'MicroLab Power Status Registers
  132. '                                      '
  133. PowerStatus    CON  MLabStatus+1      'Power control value
  134. P300ma         CON  $80               'enable high power 300ma mode
  135. P75ma          CON  $40               'set to 75ma power usage
  136. P50ma          CON  $20               'set to low power 50ma
  137. P100ma         CON  $00               'default value of power 100ma
  138. '
  139. 'Reserved Bios Working Registers
  140. '
  141. BiosWord0      CON  PowerStatus+1     'BIOS Reserved Word for Bios operations
  142. BiosWord0h     CON  BiosWord0+1       '
  143. BiosWord1      CON  BiosWord0h+1      'BIOS Reserved Word for Bios operations
  144. BiosWord1h     CON  BiosWord1+1       '
  145. BiosWord2      CON  BiosWord1h+1      'BIOS Reserved Word for Bios operations
  146. BiosWord2h     CON  BiosWord2+1       'BIOS Reserved Word for Bios operations
  147. BiosWord3      CON  BiosWord2h+1      'BIOS Reserved Word for Bios operations
  148. BiosWord3h     CON  BiosWord3+1       'BIOS Reserved Word for Bios operations
  149. '
  150. '-----------General Purpose registers across Slots--------------------------------------
  151. '
  152. scr_Register0  CON BiosWord3h+1       'General use Scratchpad Ram location across all slots
  153. scr_Register1  CON scr_Register0+1    'General use Scratchpad Ram location across all slots
  154. scr_Register2  CON scr_Register1+1    'General use Scratchpad Ram location across all slots
  155. scr_Register3  CON scr_Register2+1    'General use Scratchpad Ram location across all slots
  156. scr_Register4  CON scr_Register3+1    'General use Scratchpad Ram location across all slots
  157. scr_Register5  CON scr_Register4+1    'General use Scratchpad Ram location across all slots
  158. scr_Register6  CON scr_Register5+1    'General use Scratchpad Ram location across all slots
  159. scr_Register7  CON scr_Register6+1    'General use Scratchpad Ram location across all slots
  160. '
  161. '--------- Location for Saved User Variables -----------------------------------------
  162. '
  163. Reg0low    CON       scr_Register7+1   'Storage of user variables during Bios operations
  164. Reg0high   CON       Reg0low+1         'Storage of user variables during Bios operations
  165. Reg1low    CON       Reg0high+1        'Storage of user variables during Bios operations
  166. Reg1high   CON       Reg1low+1         'Storage of user variables during Bios operations
  167. Reg2low    CON       Reg1high+1        'Storage of user variables during Bios operations
  168. Reg2high   CON       Reg2low+1         'Storage of user variables during Bios operations
  169. Reg3low    CON       Reg2high+1        'Storage of user variables during Bios operations
  170. Reg3high   CON       Reg3low+1         'Storage of user variables during Bios operations
  171. Reg4low    CON       Reg3high+1        'Storage of user variables during Bios operations
  172. Reg4high   CON       Reg4low+1         'Storage of user variables during Bios operations
  173. Reg5low    CON       Reg4high+1        'Storage of user variables during Bios operations
  174. Reg5high   CON       Reg5low+1         'Storage of user variables during Bios operations
  175. Reg6low    CON       Reg5high+1        'Storage of user variables during Bios operations
  176. Reg6high   CON       Reg6low+1         'Storage of user variables during Bios operations
  177. Reg7low    CON       Reg6high+1        'Storage of user variables during Bios operations
  178. Reg7high   CON       Reg7low+1         'Storage of user variables during Bios operations
  179. Reg8low    CON       Reg7high+1        'Storage of user variables during Bios operations
  180. Reg8high   CON       Reg8low+1         'Storage of user variables during Bios operations
  181. Reg9low    CON       Reg8high+1        'Storage of user variables during Bios operations
  182. Reg9high   CON       Reg9low+1         'Storage of user variables during Bios operations
  183. Reg10low   CON       Reg9high+1         'Storage of user variables during Bios operations
  184. Reg10high  CON       Reg10low+1         'Storage of user variables during Bios operations
  185. Reg11low   CON       Reg10high+1        'Storage of user variables during Bios operations
  186. Reg11high  CON       Reg11low+1         'Storage of user variables during Bios operations
  187. Reg12low   CON       Reg11high+1        'Storage of user variables during Bios operations
  188. Reg12high  CON       Reg12low+1         'Storage of user variables during Bios operations
  189. '
  190. '
  191. MoprClk0  CON        Reg12high+1        'Mission Operations Clock0, fail safe operations
  192. MoprClk1  CON        MoprClk0+2         'Mission Operations Clock1, fail safe operations
  193. MoprClk2  CON        MoprClk1+2         'Mission Operations Clock1, fail safe operations
  194. MoprClk3  CON        MoprClk2+2         'Mission Operations Clock1, fail safe operations
  195. '
  196. '
  197. NextAvailiable CON MoprClk3+2          'Next Availiable location for scratch pad ram storage
  198. '
  199. '-------   User Scratchpad Locations open for use -------------
  200. '
  201. '
  202. '
  203. '-------   User Scratchpad Locations open for use -------------  '
  204. '
  205. SlotInfo    CON 127                    'contains the current running slot.
  206. '
  207. 'location number 127 contains the number of the currently running program slot
  208. '
  209. '************* End of Scratchpad Ram Space difinations ****************
  210. '
  211. '**********************************************************************
  212. '----- MicroLab Pins and ports on the BS2p24 Defined for BIOS ------------
  213. '**********************************************************************
  214. internalscl       CON 0       'BS2p24 interal I2c buss
  215. internalsda       CON 1       'BS2p24 interal I2c buss
  216. cameraclk         CON 2       'Camera Clock
  217. cameramiso        CON 3       'Camera master in slave out
  218. cameramosi        CON 4       'Camera msater out slave in
  219. camerahold        CON 5       'Camera Hold
  220. masterin          PIN 6       'Serial Input fm master
  221. 'masterin          CON 6       'Serial Input fm master
  222. masterout         CON 7       'Serial Output to master
  223. payloadsda        CON 8       'SDA on payload expansion board
  224. payloadscl        CON 9       'SCL on payload expansion board
  225. internawin        CON 10      'Local slave A to D, watchdog serial in
  226. internawout       CON 11      'Loacl slave A to D, watchdog serial out
  227. camerapower       CON 12      'Camera on and off for recycle
  228. votedead          CON 13      'AMicroLab vote that Master is dead
  229. payloadio14       CON 14      'I/O payload line
  230. cameraCS          CON 15      'camrea chip select pin
  231. '
  232. '
  233. '---------------- Bios System General constants --------------------
  234. '
  235. ' Input terminal constants for test set to
  236. con_in       CON 16          'Pin 16 is BS2P serial in from RS232 connector
  237. con_baud     CON 240         'set to 9600 8bit true
  238. con_tout     CON 250         'time out waiting for terminal input appx 100ms
  239. '
  240. '----------------- Bios General constants ---------------------------
  241. '
  242. InternI2c          CON      0          'Internal I2C buss address control
  243. PLi2c              CON      8          'Payload I2c BUSS address control
  244. PCF8574address     CON      $40        'internal I2C buss address of PFC8574
  245. Ebankaddress       CON      $A0        'Address of 256k eerom memory
  246. Ebank0             CON      $00        'Ebank0 bank address 00000-0FFFF
  247. Ebank1             CON      $02        'Ebank1 bank address 10000-1FFFF
  248. Ebank2             CON      $04        'Ebank2 bank address 20000-2FFFF
  249. Ebank3             CON      $06        'Ebank3 bank address 30000-3FFFF
  250. '
  251. TextBuffer         CON      $C000      'Text buffer in bank 0,1, and 2
  252. '
  253. Camera320          CON      $05        'Camera Resolution 320X240
  254. Camera640          CON      $07        'Camera Resolution 640X480
  255. CameraNormal       CON      $02        'Camera Quality Normal
  256. CameraBetter       CON      $01        'Camera Quality Better
  257. CameraBest         CON      $00        'Camera Quality Best
  258. '
  259. Baud9600T CON $00F0  'Baudrate of 9600 no parity True
  260. Baud2400T CON $03FD  'Baudrate of 2400 no parity true
  261. '
  262. Ack       CON $5A                      'Acknowledge response to McMek
  263. TimeOut   CON 500                      'input command timeout is .5 seconds
  264. Pace      CON 1                        'pace of output from MicroLab to System terminal
  265. ETX       CON $03                      'End of Text command
  266. EOF       CON $FF                      'end of file marker
  267. '
  268. '------------ Bios System Error and event codes for logging --------------------
  269. '
  270. NoError       CON   0       'no error on return, all ok
  271. '
  272. '-----------------  Variables Same for all program Slots  ---------------
  273. '  Used By BIOS
  274. xcounter    VAR Word         'General use 16 bit counter
  275. TempWord    VAR Word         'General use Temp Word Register
  276. TempWord1   VAR Word         'General use Temp Word Register
  277. counter     VAR Byte         'General use 8 bit counter
  278. TempReg0    VAR Byte         'General use location for values during processes
  279. TempReg1    VAR Byte         'General use location for values during processes
  280. TempReg2    VAR Byte         'General use location for values during processes
  281. TempReg3    VAR Byte         'General use location for values during processes
  282. Sdata       VAR Byte         'data to send to uart
  283. text        VAR Byte(8)      'make array for text
  284. '
  285. '  Variables open for use by User (9 Bytes)and not touched by the BIOS
  286. '  Note: above BIOS Variables can/may be used by the user, however
  287. '  the value may be destroyed by a Call to the BIOS or BIOS operation
  288. '
  289. UserVar0    VAR Byte         'user Varible space - Should be same across all slots
  290. UserVar1    VAR Byte         'user Varible space - Should be same across all slots
  291. UserVar2    VAR Byte         'user Varible space - Should be same across all slots
  292. UserVar3    VAR Byte         'user Varible space - Should be same across all slots
  293. UserVar4    VAR Byte         'user Varible space - Should be same across all slots
  294. UserVar5    VAR Byte         'user Varible space - Should be same across all slots
  295.  
  296. '
  297. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  298. ' Calibration values must be calculated and writen through the test system write eeram
  299. ' not automatically done, this is a one time event. Calibrate CPU temp, may be as
  300. ' much as 60 degrees C off from the factory.
  301. '
  302. SysCalBank   CON   Ebank3   'Bank for system calibration
  303. SysCPUcal    CON   $C002    'External E2RAM calibration locations
  304. '
  305. '
  306. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  307. 'XXXXXXXXXXXXXXXXXXXXX  >> End of Header Copy Entries  <<  XXXXXXXXXXXXXXXXXXXXXXX
  308. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  309. '
  310. '*************************************************************************
  311. '   Enter with TempReg1 containing the program index to run in this slot
  312. '*************************************************************************
  313.  '
  314.  #IF SaySlot=1 #THEN
  315.   DEBUG ">S1-V",DEC TempReg1,CR
  316.   #ENDIF
  317.   BRANCH TempReg1,[PayloadTest,        '0 PayloadTest
  318.  HeartBeatReturn,                     '1 vector to this program
  319.  McMekReturn,                         '2 vector to this program
  320.  P3vector]                            '3 vector to this program
  321.  '
  322.  
  323. '*************************************************************************
  324. '   To Run program in another slot Set TempReg1 to the vector index of
  325. '   that program within the target slot then "RUN" that slot,  If a return
  326. '   to originating slot is desired then the return vector index must be stored
  327. '   in the VectorFromNum location in the scratch pad memory,  and the return
  328. '   slot is stored in the VectorFromSlot scratch pad memory.  Then a general
  329. '   routine can be used to return to the originating program.
  330. '*************************************************************************
  331.  '
  332. InSlot  CON    1               'Define this slot, each slot is numbered
  333.  '
  334.  '***********************************************************************
  335.  '       To go to a slot and set a return
  336.  'TempReg0 = Returning vector indes
  337.  'TempReg1 = vector index to run in next slot
  338.  'TempReg3 = the slot number to go to
  339.  '**********************************************************************
  340.  '
  341. GotoSlot:
  342.   PUT VectorFromNum,TempReg0     'this is the vector when returning back to this slot
  343.  PUT VectorFromSlot,InSlot      'To vector back to this Slot
  344.  RUN TempReg3
  345.   '
  346.  '
  347.  '***************************************************************************
  348.  'When returning back, Set TempReg1 to the return vector in the calling slot
  349.  'get the returning slot and RUN that slot
  350.  '***************************************************************************
  351.  '
  352. ReturnBack:
  353.   GET VectorFromNum,TempReg1     'fetch the vector to run when returning to calling slot
  354.  GET VectorFromSlot,TempReg0    'fetch the program slot where the routine was called
  355.  RUN TempReg0                   'RETURNback now....!!!!
  356.  '
  357.  '
  358.  '
  359.  '
  360. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  361. 'XXXXXXXXXXXXXXXXXXXX   Programs in this slot  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  362. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  363. '
  364.    '======================================================================
  365. PayloadTest:  'Payload test procedures and flight preparation utilities (priming, etc)
  366.  PayloadOptionsText:
  367.   DEBUG CR
  368.   DEBUG "Payload Pin 8 On/Off (toggle) = 8",CR
  369.   DEBUG "Payload Pin 9 On/Off (toggle) = 9",CR
  370.   DEBUG "All Payload Pins Off = 0",CR
  371.   DEBUG "Exit Payload Test = e",CR
  372. Ready:
  373.  
  374.  
  375. McMekReturn:
  376. PayloadOptions:
  377.       SERIN con_in,con_baud,con_tout,inputtimeout,[UserVar0] 'get terminal input, timeout at 100ms
  378.      '
  379.      'Heartbeat before Payload command to allow maximum time before a watchdog reset
  380.      '
  381.      DEBUG CR,"doing heartbeat",CR
  382.       TempReg0 = 1    'Return Index - HeartBeatReturn
  383.      TempReg1 = 1    'Destination Index: HeartBeat
  384.      TempReg3 = 7    'Destination Slot
  385.      GOTO GotoSlot
  386. HeartBeatReturn:
  387.     DEBUG CR, "HeatBeat Done. Payload test number? > ",CR
  388.  
  389.     IF UserVar0 = "8" THEN PayloadTestP8              'Payload Board Circuit test 1
  390.    IF UserVar0 = "9" THEN PayloadTestP9              'Payload Board Circuit test 2
  391.    IF UserVar0 = "0" THEN PayloadTestoff            'Payload Board Circuit test 2
  392.    IF UserVar0 =$20 THEN PayloadOptionsText
  393.     IF UserVar0 =CR THEN PayloadOptionsText
  394.     IF UserVar0 = "e" THEN PayloadExit               'Exit Payload Board Test and Load
  395.  
  396.     DEBUG CR,"I/O Error= ",(TempReg0),CR                 'incorrect key pushed
  397.    GOTO PayloadOptionstext:
  398.  
  399. inputtimeout:
  400.     IF masterin = 1 THEN GOTO PayloadOptions 'nothing yet
  401.      '
  402.    DEBUG CR,"Do McMek Check",CR
  403.  
  404.     TempReg0 = 2                   'Return Index to NanoLab Test after McMek service
  405.    TempReg1 = 0                   'Call Index to McMekCommand
  406.    TempReg3 = 6                   'Set to goto Slot 6
  407.    GOTO GotoSlot                  'go to McMek command interpreter ----
  408.  
  409. PayloadTestP8:
  410.      DEBUG CR,"NL Pin 8 is low",CR
  411.      LOW 8 'Output low on Pin 8.
  412.     GOTO PayloadOptionsText
  413. PayloadTestP9:
  414.      DEBUG CR,"NL Pin 9 is low",CR
  415.      LOW 9 'Output low on Pin 9
  416.     GOTO PayloadOptionsText
  417. PayloadTestOff:
  418.      DEBUG CR,"Pins 8 and 9 High",CR
  419.      HIGH 8 : HIGH 9
  420.      GOTO PayloadOptionsText
  421.  
  422. PayloadExit:
  423.      TempReg0=0 'Call Index: SystemInitReturn
  424.     TempReg1=0 'Call Index: SystemInitReturn
  425.     TempReg3=0 'Call Slot: Main
  426.     GOTO GotoSlot
  427.  
  428.  
  429.  
  430.   '
  431.  '======================================================================
  432. P1vector:
  433.         '
  434.        '
  435.  GOTO ReturnBack      'back to calling routine
  436.  
  437.   '
  438.    '======================================================================
  439. P2vector:
  440.         '
  441.        '
  442.  GOTO ReturnBack      'back to calling routine
  443.  '
  444.    '======================================================================
  445. P3vector:
  446.   '
  447.  '
  448.  GOTO ReturnBack      'back to calling routine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement