SmartBox JobList
OS 4 - 14.02.00
0 Blank
Does nothing
| Send |
|
| Returns |
Nothing |
1 Version
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
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
To obtain the operating system call number where the name is known
| Send |
|
| Returns |
|
4 CodeName
To obtain the name associated with an operating system call
| Send |
|
| Returns |
|
5 MultipleSetup
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
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
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
Read System Information
| Send |
Nothing |
| Returns |
|
| OS Release |
3,4 |
9 Credits
Returns the copyright string
| Send |
|
| Returns |
|
| Commments |
This call returns the copyright message and OS details |
10 WriteMotors
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
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
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
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
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
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
Same as MotorForward
| OS Release |
3,4 |
17 MotorVoltage
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
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
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
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
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
Write sensor table entry
| Notes |
Not Implemented |
| OS Release |
3 |
25 ReadSensorTable
Read sensor table entry
| Send |
|
| Returns |
|
| Notes |
If byte 0 is &FF then sensor is unknown |
| OS Release |
3,4 |
28 SetBitHigh
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
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
To read a ADC register
| Send |
|
| Returns |
|
| OS Release |
2 |
31 WriteADCReg
To write to a ADC register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
32 ReadACIAReg
To read a ACIA register
| Send |
|
| Returns |
|
| OS Release |
2 |
33 WriteACIAReg
To write to a ACIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
34 ReadVIAReg
To read a VIA register
| Send |
|
| Returns |
|
| OS Release |
2 |
35 WriteVIAReg
To write to a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
36 SetVIAHigh
To set bits in a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
37 SetVIALow
To unset bits in a VIA register
| Send |
|
| Returns |
Nothing |
| OS Release |
2 |
40 ReadADC
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
Read all the ADC channels
| Send |
|
| Returns |
|
42 ForcedADCRead
Force the A to D convertor to make a conversion and return the result
| Send |
|
| Returns |
|
44 HighResADC
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
Sets the resolution of ADC readings to 8 bit Subsequent readings will return single byte values
| Send |
|
| Returns |
Nothing |
47 ReadResolution
Reads the current ADC resolution setting
| Send |
|
| Returns |
|
50 DownloadData (OS 2), DownloadData740 (OS 3), DownloadData375 (OS 4)
Download data into the SmartBox's memory
| Send |
|
| Returns |
Nothing |
52 UploadData (OS 2), UploadData740 (OS 3), UploadData (OS 4)
Upload data from the SmartBox's memory
| Send |
|
| Returns |
|
54 ExecuteCode (OS 2), ExecuteCode740 (OS 3), ExecuteCode375 (OS 4)
Execute machine code held at a specified address
| Send |
|
| Returns |
Nothing |
55 StoreByte (OS 2), StoreByte740 (OS 3), StoreByte375 (OS 4)
Store a byte in the SmartBox's RAM
| Send |
|
| Returns |
Nothing |
56 ReadByte (OS 2), ReadByte740 (OS 3), ReadByte (OS 4)
Read a byte from the SmartBox's RAM
| Send |
|
| Returns |
|
57 ReadRAMSize
Read the amount of RAM with which the SmartBox is fitted
| Send |
|
| Returns |
|
| OS Release |
2,3 |
59 ExtendCall
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
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
Read the internal clock. On reset the clock will be set to zero
| Send |
|
| Returns |
|
62 ReadTopmem
Read the current value of TOPMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
63 WriteTopmem
Write the value of TOPMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
64 ReadLomem
Read the current value of LOMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
65 WriteLomem
Write the value of LOMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
66 ReadHimem
Read the current value of HIMEM
| Send |
|
| Returns |
|
| OS Release |
2,3 |
67 WriteHimem
Write the value of HIMEM
| Send |
|
| Returns |
Nothing |
| OS Release |
2,3 |
70 WritePrinter
Write printer port (no handshaking)
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
71 ReadPrinter
Read printer port
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |
72 PrintChar
Send a character to printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
73 PrintStreamZ
Send a stream of characters to the printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
74 PrintStream
Send a stream of characters to the printer port
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
75 PrintServer
Echo all characters to printer port
| Notes |
No exit |
| OS Release |
3 |
80 WriteRTCReg
Write a RTC register
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
81 ReadRTCReg
Read a RTC register
| Send |
|
| Returns |
|
| OS Release |
3 |
82 WriteRTC
Writes RTC as a string
| Send |
|
| Returns |
Nothing |
| Notes |
Not currently implemented
|
| OS Release |
3 |
83 ReadRTC
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
Writes all 7 RTC time registers
| Send |
|
| Returns |
Nothing |
| Notes |
All values are represented in BCD
|
| OS Release |
3 |
85 ReadRTCbcd
Reads all 7 RTC time registers
| Send |
Nothing |
| Returns |
|
| Notes |
All values are represented in BCD
|
| OS Release |
3 |
90 ReadInputs
Reads a byte from the digital inputs port
| Send |
|
| Returns |
|
91 ReadBit
Reads a bit from the digital inputs port
| Send |
|
| Returns |
|
| Commments |
Reads an individual sensor from the digital inputs port |
92 ReadOutputs
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
Resets input port counter(s)
| Send |
|
| OS Release |
4 |
94 CountRead
Reads input port counter(s)
| Send |
|
| Returns |
|
| Notes |
Counter values return 65535 (-1) from box reset, or max count |
| OS Release |
4 |
98 InsightDriver
Starts the internal Insight software
| OS Release |
3 |
99 DataApp
Starts the internal DataApp software
| OS Release |
3 |
100 WriteLCDReg
Write LCD Register
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
101 ReadLCDReg
Read LCD Register
| Send |
|
| Returns |
|
| OS Release |
3 |
102 LCDChar
Send a character to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
103 LCDStreamZ
Send a stream of characters to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
104 LCDStream
Send a stream of characters to the LCD display driver
| Send |
|
| Returns |
Nothing |
| OS Release |
3 |
110 ReadKeypad
Reads the raw state of the keypad
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |
111 ReadKeypadPress
Reads the processed state of the keypad
| Send |
Nothing |
| Returns |
|
| OS Release |
3 |