mmi202
1. Download SPLat Firmware
Download this firmware file for your controller. More information about the upgrade process can be found in the Knowledge Base.
************************ MMi202 Revision History ***********************************
*
* V3-00 8/12/2006 Initial release
*
* V3-10 16/1/2007 Bug fixed in PERMSTORE module.
*
* V3-11 22/1/2007 OBCB multi channel software counter module added, 8 channels
* implemented on inputs 0 - 7.
*
* V3-12 31/1/2007 Bug fixed in the STSCALE mechanism which would prevent the
* correct functioning of this instruction with certain numbers. Not released.
*
* V3-13 1/2/2007 Handling of expansion I/O altered to spread the processor interrupt
* loading over several timer interrupt cycles.
*
* V3-14 20/2/2007 LCD port pins drive strength increased to high output drive to allow
* a particular customer to use a long LCD cable. His product stopped working when
* he tried to use the MMi202 having successfully used MMi20x products with no problem
* in the past.
*
* V3-15 17/7/2007 fPulse0 instruction fixed - output was not actually being updated by fPulse0.
* CPU peripheral instruction added to change PWM frequency:
* SPxCmd1, Cmd=0 U(0) Set PWM frequency:
* 0 16000 Hz
* 1 8000 Hz
* 2 4000 Hz
* 3 2000 Hz
* 4 1000 Hz
* 5 500 Hz
* 6 250 Hz
* 7 125 Hz
*
* Xwire V1-1 expansion protocol added. Task que timer base can be set between 1 - 255ms by an
* SPxCmd1, Cmd=1 U(0) command (default is 10ms). TSP interface has been removed.
*
* V3-16 8/10/2007 V3-15 seems to have been released in two versions, one as dialect 19 and the other as dialect 20.
* To stem confusion and to make sure that the documentation matches the chip features, the firmware is being
* re-released as V3-16, dialect 20.
*
* V3-17 19/10/2007 A bug has been fixed in the task que timer code which would cause improper operation for time
* delays using the "fStTimeSince" instruction if the delay time exceeded 8,388,607d. New CPU commands have been
* added to allow the RTC clock to be trimmed. A new RTC instruction allows the user to check if the RTC has been
* initialised (RTCFailFlag).
*
* V3-18 15/2/2008 A bug has been fixed in the "GetXwireJmprs" command which would return corrupted jumper information.
* The memory structure has been altered so that when the DEMO assembly time switch is set, the demo program is
* compiled into memory previously at the top of user memory. This of course means that there is less program
* memory available for users in a demo board. It is reduced from 26,112 bytes to 22,016 bytes. A new CPU call
* SPxPoll1 (Argument=7) returns the number of tasks running in the SPLat task que. "Reason for reset" byte now
* has bit 0 implemented which is set when the SPLat interpreter encounters the new "WarmBoot" instruction.
* The OBCB peripheral now has the ability to have the number of channels specified and an offset added to allow
* the OBCB inputs to be positioned anywhere in the controllers memory map, including expansion I/O. The form of the
* instruction is "$F5 $2C NumberOfChannels StartingInput". The number of channels is limited by the compilation
* variable "OBCB_channels".
*
* V3-19 20/3/2008 A bug in the RTC module which would not correctly Jindexed the RTCwriteEvent instruction. A bug has
* been fixed in the MemToUV and UVtoMem instructions which would not allow the last byte to be accessed. The FixtoU
* instruction now preserves W.
*
* V3-20 16/6/2008 A vulnerability has been fixed in the Xwire protocol sequencer that could cause the Xwire module
* to stream TX characters if a timing error occured in the received message (ie: message not arriving within
* Xwire time parameters). The Xwire comms receive structure now uses an interrupt and small circular buffer
* to eliminate comms errors when the receive baud rate is slightly higher than that of the MMi202. A bug has
* been fixed in the MemToUV and UVtoMem instructions which would not allow the last byte to be accessed. The
* FixtoU instruction now preserves W. Timing issue fixed when using the SPxTxfrU instruction, the symptom of
* which was that input data would be corrupted when using this instruction. Bug fixed in Xwire protocol which
* would cause long corrupted messages to be sent if the data length was set to zero in either slave or master mode.
*
* V3-21 11/03/2009 High drive strength enabled on all PWM pins used in this design to improve the accuracy of the generated
* analogue voltages. Xwire protocol modified so that transmit messages and received data is only tranfered to and from
* SPLat memory between the execution of SPLat instructions. This has been done to make it easier for the user
* to transfer multibyte variables (ie: floating point) without corruption. LCD driver now loads more of the user
* character RAM cells to allow the displaying of large 7 segment data on 4 line LCDs (3 lines used for displaying
* characters. MODBUS master implemented. Bootloader bug fixed which could prevent successful reflashing of a board
* if NVEM alters memory to something other than $FF after the end of the SPLat program. Demo program feature removed
* to free up space and resources. User program space reduced by 4096 bytes to allow for future code expansion. User
* now has 22,016 bytes for program and NVEM storage (previously 26,112 bytes). LCD back light can now be PWM controlled
* allowing the LCD to be dimmed or turned off after a programmed amount of time (0-255 minutes). The LCD must be modified
* to have a TTL gate level MOSFET able to switch the back light with the gate connected to LCD data line 6. New CPU
* calls allow the operating brightness, dimmed brightness and time to dimmed setting to be set by the user.
*
* V3-22 28/05/2009 Firmware modified to detect whether the board is an MMi202 or an MMi202a (separate Xwire connector). This
* has been done to allow the firmware to be used with either board. MMi202a MUST use this version of software. IEEE
* floating point format <--> SPLat floating point format conversion routines added to make the use of touch screens
* easier. 16 bit signed and unsigned <--> SPLat floating point routines added to make working with touch screens easier.
* MODBUS Slave Function Type = 3, "Read Memory" using address 2001 --> 2040 returns the contents of the SPLat LCD buffer
* to allow existing "oblcd" instructions to display text on the touch screen under program control. MODBUS memory
* referencing instructions in WORD mode now have the starting address multiplied by 2 when processed. BYTE mode is
* unaffected. The ensures correct behaviour when using SPLat products with touch screens and other MODBUS devices.
* Function Types 6 (preset single register) and 16 (preset multiple registers) are affected in MASTER mode. SLAVE
* functions 3 (Read memory), 6 (preset single register) and 16 (preset multiple registers) are affected. This has the
* potential to upset user programs and this version of firmware must carry a warning about the changes to MODBUS.
* Bug fixed in the RTC code which would allow the user to set the day number to invalid values. It is now forced to the
* maximum value for the selected year and month. Reduced the number of low speed counter channels from 8 to 7 s that
* inputs 0 --> 6 now have the feature. Input 7 has the high speed counter and so it makes no sense to have a low speed
* counter on this input as well. An SPxPoll4 0,!CPU returns the floating point temperature of the CPU chip in
* �C at locations U(0) --> U(3). An SPxPoll4 1,!CPU returns the floating point temperature of the CPU chip in
* �F at locations U(0) --> U(3).
*
* V3-23 21/12/2009 MODBUS functionality restored to that of V3-21 to maintain compatibility with existing software applications.
* In order to still have SPLat MODBUS work with touch screens, a new address range 3000 - 3999 has been introduced which
* is accessed in word mode with the acutal address multiplies by 2 to get the actual word address of the SPLat register
* memory. The LCD read buffer read back function is unchanged from version 3-22.
*
* V3-24 22/12/2009 Modified SPLat comms to allow much faster download speeds (up to 30 times faster). This firmware is
* fully backward compatible with older versions of SPLatPC in terms of downloads, but to get the benefit of the faster
* downloads, the user will need SPLatPC Version 10.21.1 or higher.
*
* V3-25 10/5/2010 Fixed a bug in the comms RX interrupt handler which would cause the board to reset if being used in any UART
* profile with parity enabled. MODBUS RX handler modified to be active all the time rather than only after the UART
* transmitter has finished sending. This has been done because several MODBUS devices we have used ignore the MODBUS
* specification and reply immediately rather than waiting 3.5 character times before replying. MODBUS master mode is now
* capable of sending the LCD buffer using function 16 (preset muliple registers) if the address range is set to 2000 - 2079.
* The CommRunScript and CommHaltScr commands will now wait for the MODBUS master script parser to be actually stopped
* before HALTing or changing the script to be executed, respectively.
*
* Jindexing has been applied to the instructions "FixToMem16S", "FixToMem16U", "FloatMem16U" and "FloatMem16S".
* A Bug has been fixed in the signed versions of these instructions. New instruction added "fSTSinceMark" which loads W
* with the time since the tasks private timer was set using a "marktime" instruction. This instruction only works in the
* task que. Board reports SPLat dialect 22.
*
* Added counter which is incremented whenever a successful transaction is completed (Xwire slave mode)
* or whenever the end of script table is encountered (Xwire master mode). A new instruction is able to
* read the value of this counter and clears the counter to zero. Two new instructions have been added
* which facillitate the changing of Xwire modes and scripts while a program is running. XwireStop will
* command the Xwire communication module to stop after the current transaction and return to an idle
* state. XwirePollIdle will return X=true if the Xwire comms module is idle. The current Xwire slave
* and Xwire master configuration instructions work as previous but will stop the Xwire comms module and
* stall the SPLat interpreter until the Xwire comms module is actually idle (has completed current
* transaction). For applications where the SPLat interpreter must not be stalled, the user should stop
* Xwire comms, poll until it is idle then run the configuration instruction. If stalling the program
* is not important, the configuration instruction can be used by itself. If Xwire is not currently
* running when an Xwire configuration instruction is executed, there is no stalling of the users program.
*
* V3-26 18/6/2010 Abitrary string communications protocol added. This protocol allows the user to create and send ASCII
* and binary strings and receive and parse same. Simple 8 bit addition and subtraction, both with and without carry
* instructions have been added. The carry/borrow bit for these instruction is held in the R register. Non destructive
* floating bit compare and go instructions have been added. Bug fixed which prevented the BranchM instruction from
* being jindexed.
*
* V3-27 7/7/2010 Bug fixed in arbitary string protocol where the buffer pointers were not re-initialised if there
* was a program error and the program re-started. RtoX instruction added.
*
* V3-28 27/7/2010 String protocol buffer pointers were not being re-initialised. This became evident when a program error
* occurred and the protocol was re-started. Bug fixed in the COMTX_Space instruction which would return the number
* of bytes in the buffer rather that the number of free bytes. Bug fixed in Xwire slave sequencer, other minor Xwire
* improvements to improve robustness in the slave mode when there are inadvertantly two Xwire masters on the bus.
*
* V3-29 11/8/2010 Xwire TX and RX state machines now re-initialise themselves immediately that they are disabled. This
* has been done to prevent unwanted beaviour when there are multiple slaves with the same address on the Xwire bus (PKS).
* A bug has been fixed in the SPI module which may cause expansion I/O to be ignored depending on the power up data contents
* of the shift registers.
*
* V3-30 1/10/2010 Xwire modified to include a new comms error counter which is incremented to a maximum of 255 on UART
* errors or parsing errors to allow communications errors, specifically collisions, to be detectable in addition
* to the existing "no response" error counter (GetXwireErrCount). A new instruction called "GetXwireComErr" returns
* the number of UART and parsing errors in X and clears the counter to zero. The OpCode for this new instruction is
* $F5 $38. Dialect is now reported as dialect 24. Polling for expansion I/O has been changed to re-scan for expansion
* I/O when ever the SPLat interpreter is re-started or the board is connected to by SPLatPC. This means that if a program
* references an I/O which is not registered, the board will try to re-establish what, if any, expansion I/O is connected.
* If external I/O is added when the board is connected to SPLaPC, the user should disconnect and then connect (using the
* module button) to see the expansion I/O as SPLatPC only dimensions the I/O window on connection. Note that in general,
* plugging and unplugging expasnion I/O when power is applied should always be avoided. This change is specifically for
* those cases where separate power supplies are used to power the controller and I/O. These power supplies may not establish
* power at the same time and the controller may miss the presence of the expansion I/O if it is powered up first. With
* this modification, the board will re-try if the program references I/O that has not been registered yet.
*
** THIS FIRMWARE IS NOT TO BE RELEASED. IT DOES NOT FIX THE PROBLEM OF I/O BOARDS BEING POWERED UP AFTER THE CONTROLLER. THIS
** IS BECAUSE THE STROBE LINE IS HELD LOW AT POWER UP BY THE CONNECTED, BUT NOT POWERED UP, I/O BOARD WHICH CAUSES THE CONTROLLER
** TO ENTER AND STAY IN BOOTLOADER MODE. USERS MUST MAKE SURE THAT IF USING SEPARATE POWER SUPPLIES, THE POWER TO THE CONTROLLER
** AND THE I/O BOARD ARE ESTABLISHED AT THE SAME TIME, OR THAT THE I/O BOARD POWER IS ESTABLISHED FIRST.
*
* V3-31 4/10/2010 Xwire modified to include a new comms error counter which is incremented to a maximum of 255 on UART
* errors or parsing errors to allow communications errors, specifically collisions, to be detectable in addition
* to the existing "no response" error counter (GetXwireErrCount). A new instruction called "GetXwireComErr" returns
* the number of UART and parsing errors in X and clears the counter to zero. The OpCode for this new instruction is
* $F5 $38. This is different to the existing "XwireGetErrCount" instruction which is incremented only on missed polls
* but provides no information about collisions and corruptions being the reason for the lost poll response. Dialect
* is now reported as dialect 24. This is version 3.30 minus the I/O extra scanning.
*
* V3-32 15/11/2010 MODBUS/SPLat/String protocol UART RX interrupt routine and UART interrupt vectors modified to recover
* correctly from UART overrun errors. Bug fixed in MODBUS which would cause the 3.5 character delay timer not to be
* initialised if the selected baud rate was the same as the current baud rate. Xwire RX interrupt routine and UART
* interrupt vectors also modified to recover from overrun errors. MODBUS code modified to always return idle status
* when re-initialised.
*
* V3-33 12/1/2011 Added 4 new RTC instructions, RTCDecHH, RTCDecMM, RTCDecSS and RTCDecDN. Added 10 new floating point
* compare instructions which set X either true of false depending on the floating point comparison. They are non
* destructive to W and Q. Bug fixed in the SPICE configuration which would cause an error to be flagged if an attempt to
* configure Spice pin 1 to anything other than an input was made on an MMi202A. This error should only have occurred on
* MMi202 (not MMi202A) boards as the Xwire port is shared with one of the SPICE pins. The MMi202A has the SPICE pin and
* Xwire separated. Reports dialect 25.
*
* V3-34 3/3/2011 Added "COMRX_fGetNum" instruction to string comms protocol to allow the extraction of numbers from the ASCII
* string contained in the receive buffer. The routine will parse both signed integer and signed decimal numbers and return
* with the result in W. The SPLat result register R will be zero if a number was successfully parsed or 1 if a valid number
* could not be parsed. Reports dialect 26.
*
* V3-35 11/5/2011 Added COMRX_StrFind and iiPrintNVText instructions. Bugs fixed in iiPrintFill and COMRX_peek instructions.
*
* V3-36 19/5/2011 Changed buffer arrangements for the LCD driver and string comms protocol so that the string comms protocol
* can send strings of up to 255 characters from a single string comms instruction. Previously, a limit of 40 characters
* applied to the iiPrintText, iiPrintFill and iiPrintNVText instructions. Also, if the TX buffer was full when any String
* protocol instruction which resulted in characters being appended to the TX buffer, an error would be generated and the
* SPLat program reset. The user was expected to use the COMTX_Space instruction to ensure this did not happen. Now, the
* TX buffer can be written at any time with the caveat that if the buffer becomes full during the execution of the string
* comms instruction, the entire SPLat program will be stalled until the currently executing instruction can deposit all of
* its characters into the TX buffer. The TX buffer is 128 characters in length. When the destination is the user RAM, the
* instructions still execute atomically providing the string fits within the user RAM. If not, an error is generated and
* the SPLat program is reset. Reports dialect 27.
*
* V3-37 30/5/2011 Added iifGetNum, iiFindXinBuf, iiGetHex and iiStrFind instructions to allow string processing from user
* RAM. This allows string processing of data which may come from an Xwire peripheral, particularly the SX10509 internet
* interface, where the server may provide data in ASCII format. iiPrintNVtext instruction now uses record length and
* record number as well as the NVEM pointer to index the string to be sent. New TestXY instructions added.
*
* V3-38 14/10/2011 Bug fixed in COMRX_Peek instruction which would cause it to return a result when peeking at the first character
* in the buffer when no characters where in the RX buffer. Also fixed in the same instruction, was a bug which caused it to
* return the byte after the one referenced by X.
*
2. Download SPLat reFlash
Download then run SPLat reFlash on your PC. This tool will upload the firmware to your SPLat controller. You will need a serial port or USB to serial adaptor and may also need a PC232 programming cable.
Windows 8.x Users
The first time you run reFlash, you will need to do so as the Administrator, otherwise you will see an error about HIRESTIMER.OCX not being registered. After you’ve done this once, you can run it normally in future.
If you’re not sure what you want, give us a call: +61 3 9773 5082