SmartBox JobList
OS 4 - 14.02.00
0 Blank[edit]
Does nothing
| Send |
|
| Returns |
Nothing |
1 Version[edit]
Read the operating system version number
| Send |
|
| Returns |
|
| Commments |
Divide by 1000 to get the version number, eg. version 1.023 would be returned as 1023 |
2 Reset[edit]
Reset Smart Box
| Send |
|
| Returns |
Nothing |
| Commments |
Reset SmartBox from the host micro. Sending a 254 performs a soft reset (same as pressing reset), sending 255 does a reset (clears battery back RAM). Before sending codes create a small delay while SmartBox resets various parts of hardware |
3 NameCode[edit]
To obtain the operating system call number where the name is known
| Send |
|
| Returns |
|
4 CodeName[edit]
To obtain the name associated with an operating system call
| Send |
|
| Returns |
|
5 MultipleSetup[edit]
To set the values that will be returned by MultipleRead
| Send |
|
| Returns |
Nothing |
| Commments |
This sets up the readings which will be returned when the call MultipleRead is made. If a byte = 1 the corresponding port will be returned, 0 = value not returned |
6 MultipleRead[edit]
Returns multiple readings as defined using MultipleSetup
| Send |
|
| Returns |
|
| Commments |
This call returns readings from a number of ports as defined by MultipleSetup |
7 MultipleServer[edit]
Constantly returns multiple readings as defined using MultipleSetup
| Send |
|
| Returns |
|
| Commments |
This call is similar to MultipleRead but continues to return readings until SmartBox receives the byte 123 |
8 IdentSystem[edit]
Read System Information
| Send |
Nothing |
| Returns |
|
| OS Release |
3,4 |
9 Credits[edit]
Returns the copyright string
| Send |
|
| Returns |
|
| Commments |
This call returns the copyright message and OS details |
10 WriteMotors[edit]
Writes a byte to the motor drivers
| Send |
|
| Returns |
Nothing |
| Commments |
Each of the four motor outputs has two bits encoded into this value, bits 0 and 1 are for motor a, bytes 2 and 3 are for motor b, bits 4 and 5 are for motor c and bits 6 and 7 are for motor d, setting both bits to 0 will stop the motor, setting the low bit high and high bit low will make the motor go forward and setting the high bit high and the low bit low will make it go backwards. Using this call automatically stops all pulsing of motors |
11 ReadMotors[edit]
Read the state of the motor drivers
| Send |
|
| Returns |
|
| Commments |
The value returned is the same value as what would be sent to WriteMotors |
12 MotorForward[edit]
Switch a motor on
| Send |
|
| Returns |
Nothing |
| Commments |
This makes the appropriate motor go forward. Using this call automatically cancels the pulsing for the appropriate motor |
13 MotorReverse[edit]
Switch a motor on with reverse polarity
| Send |
|
| Returns |
Nothing |
| Commments |
This makes the appropriate motor go backward. Using this call automatically cancels the pulsing for the appropriate motor |
14 MotorHalt[edit]
Switch a motor off
| Send |
|
| Returns |
Nothing |
| Commments |
This makes the appropriate motor stop. Using this call automatically cancels the pulsing for the appropriate motor |
15 MotorPower[edit]
Pulse a motor outputs to vary speed
| Send |
|
| Returns |
Nothing |
| Commments |
This pulses the appropriate motor at a rate determined by the on/off time (in centiseconds) specified, alternating the motor between the state at which it was last defined (Forward or Reverse) and Halt |
16 PatchMF[edit]
Same as MotorForward
| OS Release |
3,4 |
17 MotorVoltage[edit]
Set voltage for motor outputs
| Send |
|
| Returns |
Nothing |
| Notes |
Voltage values are 0 (0v), 1 (6v), 2 (9v), 3 (12v). |
| Commments |
This sets the actual voltage supplied to the motor outputs |
| OS Release |
4 |
20 WriteOutputs[edit]
Write a 8 bit value to the digital output port
| Send |
|
| Returns |
Nothing |
| Commments |
Using this call automatically cancels all pulsing on the output port |
21 OutputPower[edit]
Vary the power by pulsing individual output lines
| Send |
|
| Commments |
This pulses the appropriate output line at a rate determined by the on/off time (in centiseconds) specified, alternating the output line between on and off |
22 GetSensors[edit]
To read the type of sensors connected to the analogue sensors
| Send |
|
| Returns |
|
| Commments |
This returns the sensor types connected to the analogue sensors that were returned from the last time they were checked. A sensor type of 0 means no sensor |
23 CheckSensors[edit]
To check the type of sensors connected to the analogue sensors
| Send |
|
| Returns |
|
| Commments |
This does an immediate check of the sensor types connected to the analogue sensors. A sensor type of 0 means no sensor |
24 WriteSensorTable[edit]
Write sensor table entry
| Notes |
Not Implemented |
| OS Release |
3 |
25 ReadSensorTable[edit]
Read sensor table entry
| Send |
|
| Returns |
|
| Notes |
If byte 0 is &FF then sensor is unknown |
| OS Release |
3,4 |
28 SetBitHigh[edit]
Set individual output line(s) high
| Send |
|
| Returns |
Nothing |
| Commments |
A bit set in the byte sent will set the corresponding output line high |
29 SetBitLow[edit]
Set individual output line(s) low
| Send |
|
| Returns |
Nothing |
| Commments |
A bit set in the byte sent will set the corresponding output line low |
30 ReadADCReg[edit]
To read a ADC register
| Send |
|
| Returns |
|
| OS Release |
2 |
31 WriteADCReg[edit]
To write to a ADC register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
32 ReadACIAReg[edit]
To read a ACIA register
| Send |
|
| Returns |
|
| OS Release |
2 |
33 WriteACIAReg[edit]
To write to a ACIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
34 ReadVIAReg[edit]
To read a VIA register
| Send |
|
| Returns |
|
| OS Release |
2 |
35 WriteVIAReg[edit]
To write to a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
36 SetVIAHigh[edit]
To set bits in a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
37 SetVIALow[edit]
To unset bits in a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
40 ReadADC[edit]
Take a reading from a specific ADC channel
| Send |
|
| Returns |
|
| Commments |
The value returned will be at the resolution specified by OS calls HighResADC and LowResADC |
41 ReadADCs[edit]
Read all the ADC channels
| Send |
|
| Returns |
|
42 ForcedADCRead[edit]
Force the A to D convertor to make a conversion and return the result
| Send |
|
| Returns |
|
44 HighResADC[edit]
Sets the resolution of ADC readings to 16 bit Subsequent readings will return 2 byte values
| Send |
|
| Returns |
Nothing |
| Commments |
For OS 2 readings returned will be only accurate to 10 bits. OS 3,4 provides support for 16 bit readings, but only to an accuracy of 8 bits. |
45 LowResADC[edit]
Sets the resolution of ADC readings to 8 bit Subsequent readings will return single byte values
| Send |
|
| Returns |
Nothing |
47 ReadResolution[edit]
Reads the current ADC resolution setting
| Send |
|
| Returns |
|
50 DownloadData (OS 2), DownloadData740 (OS 3), DownloadData375 (OS 4)[edit]
Download data into the SmartBox's memory
| Send |
|
| Returns |
Nothing |
52 UploadData (OS 2), UploadData740 (OS 3), UploadData (OS 4)[edit]
Upload data from the SmartBox's memory
| Send |
|
| Returns |
|
54 ExecuteCode (OS 2), ExecuteCode740 (OS 3), ExecuteCode375 (OS 4)[edit]
Execute machine code held at a specified address
| Send |
|
| Returns |
Nothing |
55 StoreByte (OS 2), StoreByte740 (OS 3), StoreByte375 (OS 4)[edit]
Store a byte in the SmartBox's RAM
| Send |
|
| Returns |
Nothing |
56 ReadByte (OS 2), ReadByte740 (OS 3), ReadByte (OS 4)[edit]
Read a byte from the SmartBox's RAM
| Send |
|
| Returns |
|
57 ReadRAMSize[edit]
Read the amount of RAM with which the SmartBox is fitted
| Send |
|
| Returns |
|
| OS Release |
2,3 |
59 ExtendCall[edit]
Call the extended call vector
| Send |
|
| Returns |
|
| Commments |
This call provides the user with the possibility of adding extra calls to SmartBox easily |
| OS Release |
2,3 |
60 SetClock[edit]
Set the internal clock in SmartBox. This clock only runs while the power in maintained
| Send |
|
| Returns |
Nothing |
| Commments |
The day value is set to 0 |
61 ReadClock[edit]
Read the internal clock. On reset the clock will be set to zero
| Send |
|
| Returns |
|
62 ReadTopmem[edit]
Read the current value of TOPMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
63 WriteTopmem[edit]
Write the value of TOPMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
64 ReadLomem[edit]
Read the current value of LOMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
65 WriteLomem[edit]
Write the value of LOMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
66 ReadHimem[edit]
Read the current value of HIMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
67 WriteHimem[edit]
Write the value of HIMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
70 WritePrinter[edit]
Write printer port (no handshaking)
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
71 ReadPrinter[edit]
Read printer port
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |
72 PrintChar[edit]
Send a character to printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
73 PrintStreamZ[edit]
Send a stream of characters to the printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
74 PrintStream[edit]
Send a stream of characters to the printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
75 PrintServer[edit]
Echo all characters to printer port
| Notes |
No exit |
| OS Release |
3 |
80 WriteRTCReg[edit]
Write a RTC register
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
81 ReadRTCReg[edit]
Read a RTC register
| Send |
|
| Returns |
|
| OS Release |
3 |
82 WriteRTC[edit]
Writes RTC as a string
| Send |
|
| Returns |
Nothing |
| Notes |
Not currently implemented
|
| OS Release |
3 |
83 ReadRTC[edit]
Reads RTC as a string
| Send |
Nothing |
| Returns |
|
| Notes |
Time is represented as DDD,dd mmm yyyy.hh:mm:ss
|
| OS Release |
3 |
84 WriteRTCbcd[edit]
Writes all 7 RTC time registers
| Send |
|
| Returns |
Nothing |
| Notes |
All values are represented in BCD
|
| OS Release |
3 |
85 ReadRTCbcd[edit]
Reads all 7 RTC time registers
| Send |
Nothing |
| Returns |
|
| Notes |
All values are represented in BCD
|
| OS Release |
3 |
90 ReadInputs[edit]
Reads a byte from the digital inputs port
| Send |
|
| Returns |
|
91 ReadBit[edit]
Reads a bit from the digital inputs port
| Send |
|
| Returns |
|
| Commments |
Reads an individual sensor from the digital inputs port |
92 ReadOutputs[edit]
Reads a byte from the digital outputs port
| Send |
|
| Returns |
|
| Notes |
This reads the soft copy of the last written byte |
| OS Release |
3,4 |
93 CountReset[edit]
Resets input port counter(s)
| Send |
|
| OS Release |
4 |
94 CountRead[edit]
Reads input port counter(s)
| Send |
|
| Returns |
|
| Notes |
Counter values return 65535 (-1) from box reset, or max count |
| OS Release |
4 |
98 InsightDriver[edit]
Starts the internal Insight software
| OS Release |
3 |
99 DataApp[edit]
Starts the internal DataApp software
| OS Release |
3 |
100 WriteLCDReg[edit]
Write LCD Register
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
101 ReadLCDReg[edit]
Read LCD Register
| Send |
|
| Returns |
|
| OS Release |
3 |
102 LCDChar[edit]
Send a character to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
103 LCDStreamZ[edit]
Send a stream of characters to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
104 LCDStream[edit]
Send a stream of characters to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
110 ReadKeypad[edit]
Reads the raw state of the keypad
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |
111 ReadKeypadPress[edit]
Reads the processed state of the keypad
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |