32bit Controller Enhancements
Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs. These controllers add several enhancements to the SPLat VM as described below.
The SPLat/PC simulator does not support any of these enhancements. We recommend you only use the simulator as a learning tool or to test small routines. Full application debugging can only be performed on the controller using SPLatlink or instructions like iiPrintText to output debug information via the serial port.
Enhanced MultiTrack implementation
32 bit controllers benefit from having much more memory in the processor chip than our classic 8-bit controllers. This has allowed us to enhance MultiTrack:
- Each task has its own register stack (
X, Y, Z, T),
I, R, its own NVEM registers and its own floating point registers W & Q. That means you can hold temporary results in registers during yielding instruction like
WaitOn, etc and it will still be there when you resume. In other words, your registers won't be changed when other tasks run. Only U & V are shared by all tasks.
- When a task is launched, its registers (except
R) are set to the same values as in the task that launches it. This provides a good way of launching tasks with initial parameters. At start-up the default task is deemed to be running (before any
- Each task has its own subroutine return stack. That means you can execute a yielding instruction inside subroutines, like YieldTask, Pause, WaitOn, etc.
Pauseuse separate timers, so they can be active at the same time. Whence you can Pause in a LoopIfTiming loop.
LoopIfTimingare available even if you're not using MultiTrack, ie, you can use them even if you're single tasking.
- Each task has its own SuperTimer scaling (more details below)
- 64 tasks (up from 32)
PWM base frequency
Please refer to this page.
Modify SuperTimer 10mS clock interval per task
You can change the basic 10mS SuperTimer clock interval to some other value. Set U0 to the required value in mS and then execute a
The default interval is 10mS. Example, set the SuperTimer clock interval to 3mS:
This change will affect only the timing of the MultiTrack task that executes it. Other tasks will continue to run at 10ms or whatever you have changed each of them to.
The flash memory architecture of the processor used in 32 bit controllers is not conducive to having a SPLatWare program writing to NVEM. Many of these controllers will have NVEM1, so check the documentation for your specific controller.
Serial Expansion via XwIre (SEXI)
32 bit controllers support SEXI when running as an Xwire Master. This means any 8 bit or 32 bit Xwire slave can have it's I/O mapped into the master's I/O space. All the usual instructions will work, including Blink, Input, Off, GoIfInK, fAnIn, fAnOut, etc. SPLat/PC will also show the additional I/O in the digital and analogue windows.