Knowledge Base

SPLat expansion framework generic instructions

The instructions in this category, are the “primitive” instructions that drive the SPLat Expansion Framework. It is extremely unlikely that you will need to use them or worry about them. These instructions are used by the programming software to “synthesize” instructions for SPLat peripherals, for example the LCD (OBLCD_ instructions). They are included here for completeness.

(When we make custom UV peripherals, it is less likely we will create high level instructions to match. In those cases we supply sample SPLat code using these primitives.)

A word or two about the UV registers:

  • There is just one set of UV registers for the entire application.  In other words, it is shared between all tasks.
  • The single register V is usually used as a length field for data in the U array.
  • “U” refers to an array of registers.  For firmware builds up until 10 Jan 2020, there are just 21 U registers.  As of 10 January 2020, there are 251 U registers in new 32-bit versions.
  • The UV registers may be used as VERY temporary storage.  As they’re shared they are likely to be modified by other tasks after a YieldTaskPause or Wait... instruction.  Note that a ClrInstCount instruction does not pass control to other tasks, so won’t cause UV to be modified.
  • UV registers are only ever modified in response to SPLat instructions.  Peripherals that are accessed via the SPx framework usually use internal RAM for buffers and only ever read or load the UV registers when explicitly told to do so by SPx calls.  This means that even for fast asynchronous peripherals such as communications drivers, the UV registers are not likely to be modified spontaneously.