Proton Correction Proton and Proton24 Additions Proton ...

74
Additions made in version 3.7.1.6 of the Proton Compiler. (24th May 2019) Proton Correction Corrected an assembler error when the Hserin_Parity declare is used in a program. Proton and Proton24 Additions Added a median filter library to perform a bubble sort then return the value of the middle array element. The procedures use indirect access so the array to be used is passed to the procedure as well as its size. The library can be found, as with other libraries, in the user includes directory: “C:\Users \Users Name\PDS\Includes\”. The name of the median filter library is “Median_Filters.inc” Additions made in version 3.7.1.5 of the Proton Compiler. (20th May 2019) Proton Additions Added SDec, SHex and SBin modifiers to the Rsin, HrsinX and HserinX commands, and the Val function. This allows signed values to be received from serial peripherals, and converted with Val. An important addition is that procedure parameters can now be an alias to another global variable or SFR, and so can a parameter's return be an alias to another global variable or SFR. For Example: Dim Global_wFSR0 As FSR0L.Word ' Create a 16-bit SFR from two 8-bit SFRs Proc MyProc(ByRef pParam1 As Global_wFSR0), WREG EndProc The above procedure will use the FSR0L and FSR0H SFRs as a 16-bit parameter. This will be very useful for indirect operations. It will then use the WREG as its return variable, which again, can produce very optimised code. Fix made in version 3.7.1.2 of the Proton Compiler. (9th May 2019) Proton Correction Corrected passing an Array Element to a Word parameter. The array's element value was being passed, but also the array's address. Fixes and additions made in version 3.7.1.1 of the Proton Compiler. (1st May 2019)

Transcript of Proton Correction Proton and Proton24 Additions Proton ...

Page 1: Proton Correction Proton and Proton24 Additions Proton ...

Additions made in version 3.7.1.6 of the Proton Compiler. (24th May 2019)

Proton CorrectionCorrected an assembler error when the Hserin_Parity declare is used in a program.

Proton and Proton24 AdditionsAdded a median filter library to perform a bubble sort then return the value of the middle array element. The procedures use indirect access so thearray to be used is passed to the procedure as well as its size. The library can be found, as with other libraries, in the user includes directory: “C:\Users\Users Name\PDS\Includes\”. The name of the median filter library is “Median_Filters.inc”

Additions made in version 3.7.1.5 of the Proton Compiler. (20th May 2019)

Proton AdditionsAdded SDec, SHex and SBin modifiers to the Rsin, HrsinX and HserinX commands, and the Val function. This allows signed values to be receivedfrom serial peripherals, and converted with Val.An important addition is that procedure parameters can now be an alias to another global variable or SFR, and so can a parameter's return be an aliasto another global variable or SFR. For Example:

Dim Global_wFSR0 As FSR0L.Word ' Create a 16-bit SFR from two 8-bit SFRsProc MyProc(ByRef pParam1 As Global_wFSR0), WREG

EndProc

The above procedure will use the FSR0L and FSR0H SFRs as a 16-bit parameter. This will be very useful for indirect operations. It will then use theWREG as its return variable, which again, can produce very optimised code.

Fix made in version 3.7.1.2 of the Proton Compiler. (9th May 2019)

Proton CorrectionCorrected passing an Array Element to a Word parameter. The array's element value was being passed, but also the array's address.

Fixes and additions made in version 3.7.1.1 of the Proton Compiler. (1st May 2019)

Page 2: Proton Correction Proton and Proton24 Additions Proton ...

Proton CorrectionCorrected passing a quoted text string to a procedure using BycRef.

Proton AdditionsAdded free support for procedures with devices:16F628, 16F628A, 16LF628, 16LF628A, 16F877, 16F877A18F25K20, 18LF25K20, 18F25K22, 18LF25K2218F45K20, 18LF45K20, 18F45K22, 18LF45K2218F452, 18LF452, 18F4550

Fixes made in version 3.7.1.0 of the Proton Compiler and version 1.0.5.8 of the Proton24 Compiler. (24th April 2019)

Proton CorrectionCorrected 16-bit modulus not finding the library subroutine.

Fixes made in version 3.7.0.9 of the Proton Compiler and version 1.0.5.7 of the Proton24 Compiler. (6th April 2019)

Proton CorrectionCorrected the use of the Str$ function in a String assignment when the parameter of Str$ was an array. The access of the array was overwriting theaddress SFRs used for the assignment String.

Proton24 CorrectionCorrected the LookUp and LookUpL commands. The anomaly was caused by the asm code not containing the correct length of the data table. It had1 too few in the count, so when the last of the data table was read it actually came back with the count value.

Fixes made in version 3.7.0.8 of the Proton Compiler and version 1.0.5.6 of the Proton24 Compiler. (29th March 2019)

Proton CorrectionCorrected Quoted Character Strings being passed to a String parameter.Corrected the error message for the use of End Proc instead of EndProc.

Proton24 Correction

Page 3: Proton Correction Proton and Proton24 Additions Proton ...

Corrected the Str modifier in the Serout command.

Fixes made in version 3.7.0.6 of the Proton Compiler and version 1.0.5.5 of the Proton24 Compiler. (5th March 2019)

Proton CorrectionCorrected signed comparisons where the negative constant is created with a Symbol.

Proton24 CorrectionCorrected signed comparisons with some variables.

Fixes made in version 3.7.0.5 of the Proton Compiler. (1st March 2019)

Proton CorrectionCorrected a serious anomaly in the compiler's expression parser. It is highly recommended that version 3.7.0.6 is installed.Corrected Macro recognition within an If...Then comparison.

Fixes made in version 3.7.0.4 of the Proton Compiler. (28th February 2019)

Proton CorrectionCorrected Array using an index within a triple operand expression not producing stack system variable PP8H .Important Correction is the Word arrays that did not align in the Asm listing. This has now been corrected.

Additions and Fixes made in version 3.7.0.3 of the Proton Compiler and version 1.0.5.4 of the Proton24 Compiler. (23rdFebruary 2019)

Proton AdditionsAdded procedures to the 8-bit Proton compiler. These can be activated by donating for an upgrade file via a Paypal account. Please [email protected] for details of the upgrade donation. The purchase of the procedures upgrade will help maintain the compilers so that newfeatures can be added and new devices added.

Proton CorrectionCorrected RAM bank selection.

Page 4: Proton Correction Proton and Proton24 Additions Proton ...

Proton24 CorrectionCorrected LookUp and LookUpL commands.

Fixes made in version 3.6.1.7 of the Proton Compiler and version 1.0.5.1 of the Proton24 Compiler. (4th July 2018)

Proton CorrectionCorrected Rsin timeout with enhanced 14-bit core devices.Corrected the CF_ADPort_Mask declare.

Proton24 CorrectionCorrected Cread8 command.

Fixes made in update version 3.6.1.6 of the 8-bit Proton Compiler. (6th June 2018)

Proton CorrectionsCorrected the compiler's vector routine for pointing different commands to the modifiers, Dec, Hex, or Bin.

Fixes made in update version 3.6.1.5 of the 8-bit Proton Compiler. (31st May 2018)

Proton CorrectionsCorrected String handling routines with 18FxxK42 devices.Corrected Estr with 18FxxK42 devices.Created new internal macros for the 18FxxK42 devices that now use the Movffl mnemonic. i.e. Byte_Word, Byte_Wreg etc...Corrected further problems with the 18FxxK42 devices, with their SFRs in standard, high, RAM.

Additions and Fixes made in update version 3.6.1.2 of the 8-bit Proton Compiler. (20th May 2018)

Proton CorrectionsCorrected RAM bank switching anomaly with PIC18FxxK42 devices.

Proton AdditionsAdded Sub-EndSub directives to also create subroutines.A String without a following asterisk and length value, will create a 32-element String variable. i.e. Dim MyString as String

Page 5: Proton Correction Proton and Proton24 Additions Proton ...

Additions and Fixes made in update version 3.6.0.7 of the 8-bit Proton Compiler. (26th April 2018)

Proton CorrectionsCorrected several anomalies with the latest devices.

Proton AdditionsAdded more devices to the compiler:12F752, 12HV752, 12LF1840T39A, 16F15313, 16F15323, 16F15324, 16F15325, 16F15344, 16F15345, 16F1535416F15355, 16F15356, 16F15375, 16F15376, 16F15385, 16F15386, 16F1574, 16F1575, 16F1578, 16F157916F1614, 16F1615, 16F1618, 16F1619, 16F1703, 16F1704, 16F1705, 16F1707, 16F1708, 16F1709, 16F171716F1718, 16F1719, 16F1764, 16F1765, 16F1768, 16F1769, 16F1773, 16F1776, 16F1777, 16F1778, 16F177916F18313, 16F18323, 16F18324, 16F18325, 16F18326, 16F18344, 16F18345, 16F18346, 16F18426, 16F1844616F18854, 16F18855, 16F18856, 16F18857, 16F18875, 16F18876, 16F18877, 16F19155, 16F19156, 16F1917516F19176, 16F19185, 16F19186, 16F19195, 16F19196, 16F19197, 16F707, 16F720, 16F721, 16F722A, 16F723A16F753, 16HV753, 16LF15313, 16LF15323, 16LF15324, 16LF15325, 16LF15344, 16LF15345, 16LF15354, 16LF1535516LF15356, 16LF15375, 16LF15376, 16LF15385, 16LF15386, 16LF1554, 16LF1559, 16LF1574, 16LF1575, 16LF157816LF1579, 16LF1614, 16LF1615, 16LF1618, 16LF1619, 16LF1703, 16LF1704, 16LF1705, 16LF1707, 16LF170816LF1709, 16LF1717, 16LF1718, 16LF1719, 16LF1764, 16LF1765, 16LF1768, 16LF1769, 16LF1773, 16LF177616LF1777, 16LF1778, 16LF1779, 16LF18313, 16LF18323, 16LF18324, 16LF18325, 16LF18326, 16LF18344, 16LF1834516LF18346, 16LF18426, 16LF18446, 16LF18854, 16LF18855, 16LF18856, 16LF18857, 16LF18875, 16LF18876, 16LF1887716LF19155, 16LF19156, 16LF19175, 16LF19176, 16LF19185, 16LF19186, 16LF19195, 16LF19196, 16LF19197, 16LF70716LF720, 16LF721, 16LF722A, 16LF723A, 18F24K40, 18F24K42, 18F25K40, 18F25K42, 18F25K83, 18F26K40, 18F26K4218F26K83, 18F27K40, 18F27K42, 18F45K40, 18F45K42, 18F46K40, 18F46K42, 18F47K40, 18F47K42, 18F55K42, 18F56K4218F57K42, 18F65K40, 18F66K40, 18F67K40, 18LF24K42, 18LF25K42, 18LF25K83, 18LF26K42, 18LF26K83, 18LF27K4218LF45K42, 18LF46K42, 18LF47K42, 18LF55K42, 18LF56K42, 18LF57K42

The devices that have PPS (Peripheral Pin Select), will automatically setup the PPS for the commands that require a peripheral.The compiler also uses the new Movffl mnemonic, but only if required, because it takes more flash memory to operate because it can access higherRAM addresses.

Additions and Fixes made in version 3.6.0.2 of the 8-bit Proton Compiler. (19th August 2017)

Page 6: Proton Correction Proton and Proton24 Additions Proton ...

Proton CorrectionsCorrected the Heap directive that creates variables to the end of the Dim list, regardless where they are listed in the BASIC code. i.e. higher up inRAM. This allows variable types that are not as susceptible to RAM bank switching overheads to be moved out of the way of more commonly usedvariables, and allows the program to operate more efficiently, and faster.Corrected Pin aliasing for PORTJ. This was because PORTI does not exist on any device, and some of the compiler's code was counting PORTI as anintermediate between PORTH and PORTJ.

Proton AdditionsAdded more free! devices that require no USB key and operate fully:

Free 12-bit core Devices:10F200, 10F202, 10F204, 10F206, 10F222, 12F508, 12F508A, 12F509, 12F509A

Free Standard 14-bit core Devices:12F675, 12F683, 16F627, 16LF627, 16F627A, 16LF627A, 16F628, 16LF628, 16F628A, 16LF628A, 16F684,16LF684, 16F685, 16LF685, 16F687, 16LF687, 16F688, 16LF688, 16F689, 16LF689, 16F84, 16F84A,16F87, 16LF87, 16F88, 16LF88, 16F876, 16F876A, 16F877, 16F877A, 16F882, 16F883, 16F884, 16F886, 16F887

Free Enhanced 14-bit core Devices:12F1552, 12F1572, 12LF1552, 12LF1572, 16F1614, 16LF1614, 16F1826, 16LF1826, 16F1829, 16LF1829, 16F18323, 16LF18323, 16F1937,16LF1937

Free 18F devices:18F13K50, 18LF13K50, 18F14K50, 18LF14K50, 18F252, 18LF252, 18F2550, 18LF2550, 18F25K20, 18LF25K20, 18F25K22, 18LF25K22,18F26K20, 18LF26K20,18F26K22, 18LF26K22, 18F452, 18LF452, 18F4550, 18LF4550, 18F45K20, 18LF45K20, 18F45K22, 18LF45K22, 18F46K20, 18LF46K20,18F46K22, 18LF46K22

Additions and Fixes made in version 3.6.0.0 of the Proton Compiler. (9th August 2017)

Proton AdditionsAdded support for devices 18F45K42, 18LF45K42, 18F26K42, 18LF26K42, 18F46K42, and 18LF46K42.Altered the compiler's library routines to take into account the huge difference in the above devices USART peripherals.

Page 7: Proton Correction Proton and Proton24 Additions Proton ...

Proton CorrectionsCorrected creation of variables using Dim with the At directive.Corrected Larger Array access with standard 14-bit core devices.Corrected an anomaly in the optimiser for 18F devices and Enhanced 14-bit core devices, so the code size now will be slightly larger, but safer tooperate.

Additions and Fixes made in version 3.5.9.9 of the Proton Compiler and version 1.0.4.3 of the Proton24 Compiler. (17th June2017)

Proton AdditionsAdded .Bit0 to .Bit31 following a variable or constant value to select the bit of the value. This is because adding a numeric digit after a constantmade the compiler see it as a floating point constant.

Proton CorrectionCorrected creation of variables using Dim with the At directive..

Proton24 AdditionsAdded a Dec0 modifier for floating point. This will remove any fractional values when transmitted or printed etc.Added .Bit0 to .Bit31 following a variable or constant value to select the bit of the value.Added a library that replicates the HBusin and HBusout commands, but it is written in Proton24 BASIC, so it can be modified at will.

Proton24 CorrectionAdjusted the HBusin and Hbusout library routines to ensure they work as expected on all PIC24 and dsPIC device families.

Additions and Fixes made in version 3.5.9.6 of the Proton Compiler and version 1.0.4.2 of the Proton24 Compiler. (10th May2017)

Proton AdditionsAdded Floating Point arrays.Added a Dec0 modifier for floating point. This will remove any fractional values when transmitted or printed etc.

Proton CorrectionCorrected some .def files that had been corrupted, stopping compilation without an error message, as it is so low down in the compilation process.

Page 8: Proton Correction Proton and Proton24 Additions Proton ...

Proton24 CorrectionCorrected the GetBit command, when the index is a constant value of 1.

Fixes made in version 3.5.9.5 of the Proton Compiler and version 1.0.4.1 of the Proton24 Compiler. (26th April 2017)

Proton24 CorrectionsCorrected Input and Output commands.Corrected RAM not on even boundary errors sometimes happening when interrupts are enabled.

IDE CorrectionAdded the syntax highlighting of the Do...Loop commands.

Additions made in version 3.5.9.4 of the Proton Compiler and version 1.0.4.0 of the Proton24 Compiler. (12h April 2017)

Proton and Proton24 AdditionsAdded Port pin manipulation using variables. Each pin has a relevant number, where 0 is PORTA.0, 1 is PORTA.1, up to PORTL.New commands have been added to manipulate and read pins of a port using a variable as the pin's number. SetPin, ClearPin, and GetPin. Thecompiler's original commands can also use this method.Updated both compiler manuals, and added extra information to them.Added devices 16F1764, 16LF1764, 16F1765, 16LF1765, 16F1768, 16LF1768, 16F1769, 16LF1769, 16F15325, 16F15345, 16F15354, 16F15355,16F15356,16F15375, 16F15376, 16F15385, 16F15386 for Proton.Added new routines for the Print command with alphanumeric Hitachi LCDs, where any pin of any port can be used for the data lines.

New declares have been added to assign the Port.Pin of each data line. For example:

Declare LCD_Data0_Pin = PORTA.0Declare LCD_Data1_Pin = PORTA.1Declare LCD_Data2_Pin = PORTB.2Declare LCD_Data3_Pin = PORTB.3Declare LCD_Data4_Pin = PORTC.4Declare LCD_Data5_Pin = PORTC.5Declare LCD_Data6_Pin = PORTD.6

Page 9: Proton Correction Proton and Proton24 Additions Proton ...

Declare LCD_Data7_Pin = PORTD.7

Declare LCD_RSPin = PORTA.0Declare LCD_ENPin = PORTA.1

The standard declare for the data line is still present, but will be ignored if the new declares are used.Added a Do-Loop condition that allows an infinite loop or a conditional loop:

Do' Code hereLoop, or Loop Until condition, or Loop While condition

Altered the Repeat-Until loop. Now, if no condition is placed after the Until directive, it will loop forever:

Repeat' Code HereUntil ' Loop forever

Additions and Fixes made in version 3.5.8.6 of the Proton Compiler and version 1.0.3.5 of the Proton24 Compiler. (29th June2016)

Proton FixesCorrected loading a complemented or signed byte into a byte array.Corrected Declare Optimiser_Level = 3 with 18F devices.Corrected Declare Proton_Start_Address.

Proton AdditionsAdded 4 new commands that will change the baud rate of UART1, UART2, UART3, or UART4 when used with Hserin, Hserin2, Hserin3, Hserin4 orHserout, Hserout2, Hserout3 or Hserout4and Hrsin, Hrsin2, Hrsin3, Hrsin4 or Hrsout, Hrsout2, Hrsout3 or Hrsout4.These are Herial1_ChangeBaud Baud Rate Value, Herial2_ChangeBaud Baud Rate Value, Herial3_ChangeBaud Baud Rate Value,and Herial4_ChangeBaud Baud Rate Value.

For some 8-bit device bootloaders, they apparently insist that there is a Goto mnemonic at address 0, instead of somewhere within the first fouraddresses of code memory.

Page 10: Proton Correction Proton and Proton24 Additions Proton ...

Adding the declare:Declare Bootloader = On or Off, 1 or 0, True or FalseWill re-arrange the beginning of code memory and place a Goto there, or for some 14-bit core devices, code memory page manipulation, then theGoto mnemonic.

Proton24 AdditionsAdded 4 new commands that will change the baud rate of UART1, UART2, UART3, or UART4 when used with Hserin, Hserin2, Hserin3, Hserin4 orHserout, Hserout2, Hserout3 or Hserout4and Hrsin, Hrsin2, Hrsin3, Hrsin4 or Hrsout, Hrsout2, Hrsout3 or Hrsout4.These are Herial1_ChangeBaud Baud Rate Value, Herial2_ChangeBaud Baud Rate Value, Herial3_ChangeBaud Baud Rate Value,and Herial4_ChangeBaud Baud Rate Value.

Additions and Fixes made in version 3.5.8.1 of the Proton Compiler and version 1.0.3.3 of the Proton24 Compiler. (10th April2016)

Proton FixesAdjusted unsigned variable assignment into a signed variable. i.e. SWord = Byte. It no longer sign extends the operand.Corrected Signed > comparison with a signed word variable and a constant.Corrected, and optimised, Right Shift of a word variable and dword variable with a constant shift amount value.

Proton AdditionsAdded support for devices 16F1574, 16F1575, 16F1578, 16F1579, 16LF1574, 16LF1575, 16LF1578, 16LF1579.Also added support for these unusual 8-bit devices: MCP19110, MCP19111, MCP19114, MCP19115, MCP19117, MCP19118 and MCP19119. Theseare standard 14-bit PICs but have dedicated high current PWM capabilities.Added several devices that do not require the USB key. All the free 8-bit devices are now: 18F25K20, 18F25K22, 18F45K20, 18F45K22, 18F26K20,18F26K22, 18F46K20, 18F46K22, 18F452, 16F877, and 16F877AAdded the text Hints as well as Reminders in the declare: Declare Hints = On or Off. to remove hint texts after a compile.

Proton24 AdditionsAdded an extra device that does not require the USB key. The free 16-bit devices are now: PIC24EP128MC202, PIC24FJ64GA002,PIC24FJ64GA004, PIC24HJ128GP502, and dsPIC33FJ128GP802Added the text Hints as well as Reminders in the declare: Declare Hints = On or Off. to remove hint texts after a compile.

Additions and Fixes made in version 3.5.7.7 of the Proton Compiler and version 1.0.3.1 of the Proton24 Compiler. (15th

Page 11: Proton Correction Proton and Proton24 Additions Proton ...

January 2016)

Proton FixesCorrected Dword = Dword | Constant expression.Corrected Oread and Owrite when applying the No_Device label. It was not loading the WREG before calling the subroutine if the value was 0

Proton AdditionsAdded support for frequencies 80MHz, 88MHz, 96MHz and 100MHz on 18F and enhanced 14-bit core devices so that devices can be overclocked.Updated Oread and Owrite so that they can send and receive Word, Dword, Float or other variables greater than a byte.Before the update, it only transmitted or received a byte.Added the declare Declare MemWrite_Int_Control = 1 or 0 or True or False to disable or enable the interrupt control for Ewrite, Cwrite andCerase

Additions and Fixes made in version 3.5.7.4 of the Proton Compiler and version 1.0.2.9 of the Proton24 Compiler. (6thNovember 2015)

Proton FixesCorrected Word = Word * Word expression, where all variables are the same on 18F devices.Corrected signed comparisons within the Select-EndSelect command.Corrected adding an element of a Byte Array to a String.Corrected Stack overflow when using Shiftout on an enhanced 14-bit core device.Corrected the use of 48MHz on enhanced 14-bit core devices.Corrected the use of BusAck and HBusAck without the assembler reporting that it is not in the asm listing.

Proton AdditionsAdded Hrsin3, Hrsin4, Hrsout3, Hrsout4, Herin3, Hserin4, Hserout3, and Hserout4 for devices that have 4 USARTs, such as the18F65J94.Added intuitive interrupt disable for the Ewrite, Cwrite, and Cerase commands. These will disable an interrupt if it is enabled in the programbefore the compiler's library asm routines are run and re-enable an interrupt when finished.This requires some more testing by the users, but will not stop the Ewrite or Cwrite or Cerase routines from working. Thanks to Alberto for thisidea.Added devices: 16F18313, 16F18323, 16F18325, 16F18345, 16LF18313, 16LF18323, 16LF18325, 16LF18345. More devices to follow.

Proton24 Fixes

Page 12: Proton Correction Proton and Proton24 Additions Proton ...

Corrected Ptr32.Extra devices supported to follow ASAP.

Additions and Fixes made in version 3.5.7.1 of the Proton Compiler and version 1.0.2.8 of the Proton24 Compiler. (1stJanuary 2015)

Proton FixCorrected the obscure use of b' ', d' ', and h' ' in Mpasm assember code. Avoid their use wherever possible because the correction may not be robust forall occurances.

Proton AdditionsAdded devices; 12F752, 12HV752, 12LF1840T39A, 16F1614, 16F1615, 16F1618, 16F1619, 16F1703,16F1705, 16F1707, 16F1709, 16F1717, 16F1718, 16F1719, 16F1829LIN, 16F707,16F720, 16F721, 16F722A, 16F723A, 16F753, 16HV753,18F24J50, 18F25J50, 18F26J50, 18F26J53, 18F27J53, 18F44J50, 18F45J50,18F46J53, 18F47J53, 18F65J94, 18F65K90, 18F66J90, 18F66J93, 18F66J94,18F66J99, 18F66K90, 18F67J90, 18F67J93, 18F67J94, 18F67K90, 18F85J94,18F85K90, 18F86J72, 18F86J90, 18F86J93, 18F86J94, 18F86J99, 18F86K90,18F87J72, 18F87J90, 18F87J93, 18F87J94, 18F87K90, 18F95J94, 18F96J94,18F96J99, 18F97J94

Proton24 AdditionRight shifts will now preserve the sign of a variable. i.e. Signed right shifts.

Fixes made in version 3.5.7.0 of the Proton Compiler and version 1.0.2.7 of the Proton24 Compiler. (15th November 2014)

Proton FixCorrected Signed Word subtraction where the second operand is the same variable as the assignment.Corrected line continuation when a String variable is used.Corrected MPLAB coff parsing that created an offset of one with 14-bit core devices when the ICD was invoked.

Proton24 FixesCorrected Dword less than Constant comparison, where the constant is a value less than 32.

Page 13: Proton Correction Proton and Proton24 Additions Proton ...

Fixes, Additions and amendments made in version 3.5.6.8 of the Proton Compiler and version 1.0.2.5 of the Proton24Compiler. (20th July 2014)

Proton FixCorrected Signed Dword >= comparison.

Proton24 FixesCorrected recognition of Declare Hserial4_Baud.Corrected high level use of the Bra mnemonic where the destinaton parameter is $ - n or $ + n.

Fixes, Additions and amendments made in version 3.5.6.7 of the Proton Compiler and version 1.0.2.3 of the Proton24Compiler. (7th May 2014)

Proton24 FixesNone.

Proton24 AdditionAdded a PSV code table entry to add code memory addressable in PSV space.Added YRAM and DMA extensions to variable declarations.Updated the PDF manual for the RAM changes required for dsPIC devices.Added some DSP libraries for FFT, Q1:5 fixed point, and Vectors.Added some FFT example programs for dsPIC33F.Added the whole of the PIC24E, F, and H devices to the standard Proton USB key. Along with the dsPIC33F and E devices.Note that the devices PIC24EP128MC202, PIC24FJ64GA002, PIC24FJ64GA004, and PIC24HJ128GP502 are still free and do not require a USBkey.A complete 24-bit device list is shown below:

dsPIC33EdsPIC33EP128GP502, dsPIC33EP128GP504, dsPIC33EP128GP506, dsPIC33EP128MC202, dsPIC33EP128MC204, dsPIC33EP128MC206,dsPIC33EP128MC502,dsPIC33EP128MC504, dsPIC33EP128MC506, dsPIC33EP256GP502, dsPIC33EP256GP504, dsPIC33EP256GP506, dsPIC33EP256MC202,dsPIC33EP256MC204,dsPIC33EP256MC206, dsPIC33EP256MC502, dsPIC33EP256MC504, dsPIC33EP256MC506, dsPIC33EP256MU806, dsPIC33EP256MU810,dsPIC33EP256MU814,

Page 14: Proton Correction Proton and Proton24 Additions Proton ...

dsPIC33EP32GP502, dsPIC33EP32GP503, dsPIC33EP32GP504, dsPIC33EP32MC202, dsPIC33EP32MC203, dsPIC33EP32MC204,dsPIC33EP32MC502, dsPIC33EP32MC503,dsPIC33EP32MC504, dsPIC33EP512GP806, dsPIC33EP512MC806, dsPIC33EP512MU810, dsPIC33EP512MU814, dsPIC33EP64GP502,dsPIC33EP64GP503, dsPIC33EP64GP504,dsPIC33EP64GP506, dsPIC33EP64MC202, dsPIC33EP64MC203, dsPIC33EP64MC204, dsPIC33EP64MC206, dsPIC33EP64MC502,dsPIC33EP64MC503, dsPIC33EP64MC504,dsPIC33EP64MC506

dsPIC33FdsPIC33FJ06GS001, dsPIC33FJ06GS101, dsPIC33FJ06GS101A, dsPIC33FJ06GS102, dsPIC33FJ06GS102A, dsPIC33FJ06GS202,dsPIC33FJ06GS202A,dsPIC33FJ09GS302, dsPIC33FJ128GP202, dsPIC33FJ128GP204, dsPIC33FJ128GP206, dsPIC33FJ128GP206A, dsPIC33FJ128GP306,dsPIC33FJ128GP306A, dsPIC33FJ128GP310,dsPIC33FJ128GP310A, dsPIC33FJ128GP706, dsPIC33FJ128GP706A, dsPIC33FJ128GP708, dsPIC33FJ128GP708A, dsPIC33FJ128GP710,dsPIC33FJ128GP710A, dsPIC33FJ128GP802,dsPIC33FJ128GP804, dsPIC33FJ128MC202, dsPIC33FJ128MC204, dsPIC33FJ128MC506, dsPIC33FJ128MC506A, dsPIC33FJ128MC510,dsPIC33FJ128MC510A, dsPIC33FJ128MC706,dsPIC33FJ128MC706A, dsPIC33FJ128MC708, dsPIC33FJ128MC708A, dsPIC33FJ128MC710, dsPIC33FJ128MC710A, dsPIC33FJ128MC802,dsPIC33FJ128MC804, dsPIC33FJ12GP201,dsPIC33FJ12GP202, dsPIC33FJ12MC201, dsPIC33FJ12MC202, dsPIC33FJ16GP101, dsPIC33FJ16GP102, dsPIC33FJ16GP304,dsPIC33FJ16GS402, dsPIC33FJ16GS404, dsPIC33FJ16GS502,dsPIC33FJ16GS504, dsPIC33FJ16MC101, dsPIC33FJ16MC102, dsPIC33FJ16MC304, dsPIC33FJ256GP506, dsPIC33FJ256GP506A,dsPIC33FJ256GP510, dsPIC33FJ256GP510A,dsPIC33FJ256GP710, dsPIC33FJ256GP710A, dsPIC33FJ256MC510, dsPIC33FJ256MC510A, dsPIC33FJ256MC710, dsPIC33FJ256MC710A,dsPIC33FJ32GP202, dsPIC33FJ32GP204,dsPIC33FJ32GP302, dsPIC33FJ32GP304, dsPIC33FJ32GS406, dsPIC33FJ32GS606, dsPIC33FJ32GS608, dsPIC33FJ32GS610,dsPIC33FJ32MC202, dsPIC33FJ32MC204, dsPIC33FJ32MC302,dsPIC33FJ32MC304, dsPIC33FJ64GP202, dsPIC33FJ64GP204, dsPIC33FJ64GP206, dsPIC33FJ64GP206A, dsPIC33FJ64GP306,dsPIC33FJ64GP306A, dsPIC33FJ64GP310, dsPIC33FJ64GP310A,dsPIC33FJ64GP706, dsPIC33FJ64GP706A, dsPIC33FJ64GP708, dsPIC33FJ64GP708A, dsPIC33FJ64GP710, dsPIC33FJ64GP710A,dsPIC33FJ64GP802, dsPIC33FJ64GP804, dsPIC33FJ64GS406,dsPIC33FJ64GS606, dsPIC33FJ64GS608, dsPIC33FJ64GS610, dsPIC33FJ64MC202, dsPIC33FJ64MC204, dsPIC33FJ64MC506,dsPIC33FJ64MC506A, dsPIC33FJ64MC508, dsPIC33FJ64MC508A,dsPIC33FJ64MC510, dsPIC33FJ64MC510A, dsPIC33FJ64MC706, dsPIC33FJ64MC706A, dsPIC33FJ64MC710, dsPIC33FJ64MC710A,dsPIC33FJ64MC802, dsPIC33FJ64MC804

Page 15: Proton Correction Proton and Proton24 Additions Proton ...

FYI. The highlighted dsPIC33F devices above are highly recommended because thay are available in a 28-pin DIP package, have a 12-bit ADC andstereo 16-bit DACs, and also operate at 40MIPS (Million Instructions Per Second) from an internal oscillator.

PIC24EPIC24EP128GP202, PIC24EP128GP204, PIC24EP128GP206, PIC24EP128MC202, PIC24EP128MC204, PIC24EP128MC206, PIC24EP256GP202,PIC24EP256GP204, PIC24EP256GP206, PIC24EP256GU810,PIC24EP256GU814, PIC24EP256MC202, PIC24EP256MC204, PIC24EP256MC206, PIC24EP32GP202, PIC24EP32GP203, PIC24EP32GP204,PIC24EP32MC202, PIC24EP32MC203, PIC24EP32MC204,PIC24EP512GP806, PIC24EP512GU810, PIC24EP512GU814, PIC24EP64GP202, PIC24EP64GP203, PIC24EP64GP204, PIC24EP64GP206,PIC24EP64MC202, PIC24EP64MC203, PIC24EP64MC204,PIC24EP64MC206

PIC24FPIC24F04KA200, PIC24F04KA201, PIC24F04KL100, PIC24F04KL101, PIC24F08KA101, PIC24F08KA102, PIC24F08KL200, PIC24F08KL201,PIC24F08KL301, PIC24F08KL302,PIC24F08KL401, PIC24F08KL402, PIC24F16KA101, PIC24F16KA102, PIC24F16KA301, PIC24F16KA302, PIC24F16KA304, PIC24F16KL401,PIC24F16KL402, PIC24F32KA301,PIC24F32KA302, PIC24F32KA304, PIC24FJ128DA106, PIC24FJ128DA110, PIC24FJ128DA206, PIC24FJ128DA210, PIC24FJ128GA006,PIC24FJ128GA008, PIC24FJ128GA010,PIC24FJ128GA106, PIC24FJ128GA108, PIC24FJ128GA110, PIC24FJ128GA306, PIC24FJ128GA308, PIC24FJ128GA310, PIC24FJ128GB106,PIC24FJ128GB108, PIC24FJ128GB110,PIC24FJ128GB206, PIC24FJ128GB210, PIC24FJ16GA002, PIC24FJ16GA004, PIC24FJ16MC101, PIC24FJ16MC102,PIC24FJ192GAPIC24FJ192GA108, PIC24FJ192GA110,PIC24FJ192GB106, PIC24FJ192GB108, PIC24FJ192GB110, PIC24FJ256DA106, PIC24FJ256DA110, PIC24FJ256DA206, PIC24FJ256DA210,PIC24FJ256GA106, PIC24FJ256GA108,PIC24FJ256GA110, PIC24FJ256GB106, PIC24FJ256GB108, PIC24FJ256GB110, PIC24FJ256GB206, PIC24FJ256GB210, PIC24FJ32GA002,PIC24FJ32GA004, PIC24FJ32GA102,PIC24FJ32GA104, PIC24FJ32GB002, PIC24FJ32GB004, PIC24FJ48GA002, PIC24FJ48GA004, PIC24FJ64GA002, PIC24FJ64GA004,PIC24FJ64GA006, PIC24FJ64GA008,PIC24FJ64GA010, PIC24FJ64GA102, PIC24FJ64GA104, PIC24FJ64GA106, PIC24FJ64GA108, PIC24FJ64GA110, PIC24FJ64GA306,PIC24FJ64GA308, PIC24FJ64GA310,PIC24FJ64GB002, PIC24FJ64GB004, PIC24FJ64GB106, PIC24FJ64GB108, PIC24FJ64GB110, PIC24FJ96GA006, PIC24FJ96GA008,PIC24FJ96GA010, PIC24FV16KA301,PIC24FV16KA302, PIC24FV16KA304, PIC24FV32KA301, PIC24FV32KA302, PIC24FV32KA304

PIC24H

Page 16: Proton Correction Proton and Proton24 Additions Proton ...

PIC24HJ128GP202, PIC24HJ128GP204, PIC24HJ128GP206A, PIC24HJ128GP210A, PIC24HJ128GP306A, PIC24HJ128GP310A,PIC24HJ128GP502, PIC24HJ128GP504,PIC24HJ128GP506A, PIC24HJ128GP510A, PIC24HJ12GP201, PIC24HJ12GP202, PIC24HJ16GP304, PIC24HJ256GP206A, PIC24HJ256GP210A,PIC24HJ256GP610A,PIC24HJ32GP202, PIC24HJ32GP204, PIC24HJ32GP302, PIC24HJ32GP304, PIC24HJ64GP202, PIC24HJ64GP204, PIC24HJ64GP206A,PIC24HJ64GP210A, PIC24HJ64GP502,PIC24HJ64GP504, PIC24HJ64GP506A, PIC24HJ64GP510A

Proton FixesCorrected Serin with timeout on enhanced 14-bit core devices.Corrected Serout on enhanced 14-bit core devices.Corrected some signed Dword Constant Dword subtraction expressions.

Fixes, Additions and amendments made in version 3.5.6.5 of the Proton Compiler and version 1.0.2.2 of the free Proton24Compiler. (12th March 2014)

Proton24 FixesCorrected Str$ with 32-bit and 64-bit floating point variables.Corrected Byte variable comparisons with negative constants.

Proton24 AdditionAdded device PIC24FJ64GA004 to the free Proton24 compiler.

Proton AdditionsAdded Ptr8, Ptr16 and Ptr32 for indirect RAM access on enhanced 14-bit core devices and 18F devices.Added cPtr8, cPtr16 and cPtr32 for indirect code memory access on enhanced 14-bit core devices and 18F devices.Added devices 12F1571, 12LF1571, 12F1572, 12LF1572, 16F1713, 16LF1713, 16F1716, and 16LF1716.

If the devices PIC18F25K20 or PIC18F25K22 are used, the compiler will not ask for the USB key. This means that the fullcompiler is now the recommended compiler for use with the Amicus18 board.

Proton AmendmentsAltered the manual to take into account the Ptr8, Ptr16, Ptr32, cPtr8, cPtr16 and cPtr32 commands.A new algorithm is used for Declare All_Digital that should cover most supported 8-bit microcontroller's. Giving this declare a new lease of

Page 17: Proton Correction Proton and Proton24 Additions Proton ...

life.A warning is issued if a Gosub or Call command is used within an interrupt handler, because the compiler cannot track system variable or SFRusage in an external subroutine.

Fixes and Amendments made in version 3.5.6.4 of the Proton Compiler and version 1.0.2.0 of the free Proton24 Compiler.(7th February 2014)

Proton24 FixesCorrected floating point constants created using Symbol.Corrected a mixture of integer and floating point constants within a, constants only, expression.Corrected the dRound function.Corrected the concatenation of a Byte variable to a string variable.Corrected Str$ producing an assembler error.Corrected inconsistency with a constant expression and a floating point assignment.

Proton24 Amendments64-bit floating point constants are more accurately passed to the compiler.Tightened syntax checking for expressions containing functions.Altered the mechanism for calling the Assembler and Linker.

Proton FixesCorrected system variable PP5H not being created if Cls is used in a program without Print when interfacing to a KS0108 graphic LCD.Corrected inconsistency with a constant expression and a floating point assignment.

Proton AmendmentsTightened syntax checking for expressions containing functions.

Fixes made in version 3.5.6.3 of the Proton Compiler and version 1.0.1.4 of the free Proton24 Compiler. (5th January 2014)

Proton24 FixesCorrected Expressions containing inline commands. Remember to wrap inline functions in parenthasis for proper recognition within an expression.Corrected DelayUs when using the Repeat mnemonic.Corrected the ADin command.Corrected recognition of the Slow_Bus declare.

Page 18: Proton Correction Proton and Proton24 Additions Proton ...

Proton24 AdditionsAdded 4 new inc files in the user Includes directory. These are:Replacement I2Cin and I2Cout routines written in Proton24 BASIC, and replacement Busin and Busout routines written in Proton24 BASIC.A library for accessing a DS1307 Real Time Clock. Named DS1307.incA library for scaling one value range to another value range. Named Map.incAdded 5 new example programs to demonstrate the above routines.

Proton24 AmendmentsIncreased the amount of commands that accept procedures as a parameter.

Proton FixesCorrected Expressions containing inline commands. Remember to wrap inline functions in parenthasis for proper recognition within an expression.

Fixes and additions made in version 3.5.6.2 of the Proton Compiler and version 1.0.1.2 of the free Proton24 Compiler. (18thDecember 2013)

Proton24 FixesCorrected Procedure calling at the very beginning of a line.Corrected String comparison with a single character quoted string.

Proton24 AdditionsAdded 64-bit floating point Double variables.In addition, trigonometry routines have been added for 64-bit doubles. i.e.dSin, dCos, dTan, dASin, dACos, dAtan, dAtan2, dPow, dLog, dLog2, dExp, dRound, Modd etc...

Proton24 AmendmentsAltered the compiler's manual to take into account the new Double variable type.The COFF generator now removes the preceding [main] text from variable names.The IDE now recognises Double variable types in Code Explorer.

Proton FixesCorrected Array loading with an array larger than 255 elements and a word index.

Page 19: Proton Correction Proton and Proton24 Additions Proton ...

Corrected compiler stack variable creation with a mix of float and integer variables with an integer assignment.Corrected a select few mixed signed integer and floating point expressions that did not observe the sign correctly.Corrected serial capture of a String variable with an enhanced 14-bit core device.

Fixes made in version 3.5.6.1 of the Proton Compiler and version 1.0.1.0 of the free Proton24 Compiler. (23rd November2013)

Proton24 FixesCorrected Local and Global variable access when the same name is used for both.Removed the need for the C30_device.info file in the root of the C: drive.Hopefully, corrected the permissions issues that some people have reported when the assembler or linker is called.Corrected the use of != as a comparator with no spaces between operands.Corrected some unsigned comparisons against 0.

Corrected interrupt names for the linker (version 1.0.0.9).The compiler now traps attempting to use assembler mnemonics as variables or constants (version 1.0.0.9).

Proton FixesCorrected the SonyIn command for an oscillator frequency of 64MHz.Corrected RAM bank switching when using a low-priority interrupt on 18F devices.Corrected the use of != as a comparator with no spaces between operands.

Fixes Additions and Amendments made in version 3.5.6.0 of the Proton Compiler and version 1.0.0.8 of the free Proton24Compiler. (12th November 2013)

Proton24 FixesCorrected String into String library routine.Corrected Dword <= Dword comparison.Corrected a compiler lock up when a procedure was created without a name following it.Corrected (as much as 32-bit floating point will allow) converting a floating point value to ASCII.

Proton24 AmendmentsAltered the Ptr8, Ptr16, Ptr32, cPtr8, cPtr16, and cPtr32 commands so that they can now use a variable as well as a WREG SFR as the

Page 20: Proton Correction Proton and Proton24 Additions Proton ...

address pointer.The compiler now gives a syntax error when End If and End Select are used. The correct syntax is EndIf and EndSelect.Removed the use of the _setup24.inc file. The defines are now individually placed into each device's .def file.

Proton24 AdditionsAdded Modf to split a floating point variable or value into its fractional part and its whole part.Updated the compiler's manual to incorporate the above amendments and addition. Also added to the Proc-EndProc section.Added Ceil and Floor functions descriptions to the manual.

Proton FixesNone

General FixesThe installer now adds the USB key driver files into the appropriate Windows directories.The installer now adds the mcPluginMgr.dll application into the appropriate Windows directory.Removed the use of the $include directive from the preprocessor, when loading the .def files, because it was found to be a little erratic in its operation.

Fixes and Amendments made in version 3.5.5.8 of the Proton Compiler and version 1.0.0.7 of the free Proton24 Compiler.(26th October 2013)

Proton24 FixesCorrected Procedure Bit parameters and return variables.Corrected Procedure Calls in Select-Case constructs.Corrected Aliased Procedure returns.Corrected misleading error messages concerning global variables when a syntax error occurs within a procedure.

Proton24 AmendmentAdded PWMLOCK_OFF fuse to default settings for PIC24EP128MC202 device.

Proton FixesCorrected the DS1820 sample program.

Amendments

Page 21: Proton Correction Proton and Proton24 Additions Proton ...

The IDE now remembers the position of each open file.

Additions and Fixes made in version 3.5.5.8 of the Proton Compiler. (13th October 2013)

FixesCorrected fractional floating point constants within comparisons.Corrected Signed Word less than comparison of the constant value 255.Updated PPI and def files for devices 16F1786, 16F1787, 16LF1786, and 16LF1787 to include the SSP1CON1 SFR.

AdditionsAdded devices 16LF1902, 16LF1903, 16LF1904, 16LF1906 and 16LF1907.Added a free (Beta) version of Proton24 that supports three devices. Namely: PIC24EP128MC202, PIC24FJ64GA002, and the PIC24HJ128GP502.

The free Beta of the Proton24 compiler does not require a USB key to operate and is free to use by anyone. However, the Proton for 8-bit devices isstill protected.

Fixes made in version 3.5.5.6 of the Proton Compiler for 8-bit devices. (24th February 2013)

FixesCorrected COFF creation with code memory stored data on 14-bit core devices.Corrected WREG tracking mechanism when entering and exiting the DelayCs command.Corrected frequency for the HPWM command when used on enhanced 14-bit core devices.Corrected the inline Busin and Hbusin commands when using two parameters. i.e. Control and Address.Corrected error reporting if the assignment String is used as an operand other than the first.Corrected expression Word = Word - Word, where the assignement is the same as the last operand. Affected standard 14-bit core devices only.Corrected expression signed Dword = Dword - Word, where both Dword variables are the same. Affected standard 14-bit core devices only.Added MSSP pin definitions for I2C in PPI files for 16F1503 and 16LF1503.

Fixes and Amendments made in version 3.5.5.5 of the Proton Compiler for 8-bit devices. (26th January 2013)

AmendmentRemoved Movlp mnemonics from enhanced core devices that have less than 1 code page (2048 words).Updated the enhanced 14-bit core optimiser to version 1.0.0.4.Added a trap for missing TRISE when using commands: High. Low, Input or Output.

Page 22: Proton Correction Proton and Proton24 Additions Proton ...

Altered the While-Wend mechanism. If no text follows the While statement, it will implement an infinite loop.Note that this mechanism is only valid for While and Wend on seperate lines.

FixesCorrected an early return of the compiler if an unknown variable is use as the first parameter within a comparison.Corrected fRound within a signed expression.Corrected missing escape characters within quoted strings of text.Corrected asm duplicate label name error with certain For-Next combinations.Corrected some signed Dword subtraction expressions on enhanced 14-bit core devices.Corrected Eread when used with code reading routines in the same program on standard 14-bit core devices.

Fixes and Amendments made in version 3.5.5.4 of the Proton Compiler for 8-bit devices. (25th October 2012)

AmendmentThe Declare text is now mandatory for all except; Xtal and Device.A syntax error will be produced if the Declare is not issued.The prp mechanism is still in place, but will be removed in the next update.Added simple range checks for assignments loaded with constants. i.e. MyByte = -129 or MyByte = 129

FixesCorrected Comparison Float > Constant, where Constant is a negative value.Corrected Timeout delay for Hrsin and Hrsin2 for enhanced 14-bit core devices.Corrected USB device name string and enumeration.Corrected the creation of the system variable PP3 with the SDec modifier on 14-bit core devices.Corrected RAM bank switching with enhanced 14-bit core devices causes by the internal redundant Movlb removal pass.Corrected COFF creation for strings held in code memory. Data was being missed.Corrected StrN being loaded with a single constant of variable. i.e. StrN MyArray = "0".

Fixes and Additions made in version 3.5.5.3 of the Proton Compiler for 8-bit devices. (2nd October 2012)

AdditionsAdded devices 12F1501, 12LF1501, 16F1454, 16LF1454, 16F1455, 16LF1455, 16F1459, 16LF1459, 16F1512, 16LF1512, 16F1513, 16LF1513,18F24K50, 18LF24K50, 18F25K50, 18LF25K50, 18F45K50, 18LF45K50.

Page 23: Proton Correction Proton and Proton24 Additions Proton ...

Note that USB is not implemented as commands with enhanced 14-bit core devies.Added three new sample programs.

FixesCorrected expression SWord = SWord / Constant, where constant is above the value 255 and not a power of 2. For all devices.Corrected RAM bank switching for 12-bit core devices and standard 14-bit core devices.Corrected and amended Adin for enhanced 14-bit core devices (partially broken in version 3.5.5.2). It now also uses the value from the DeclareAdin_Tad to load the ADCON1 SFR (if available on the device).

Additions, Fixes and Amendments made in version 3.5.5.2 of the Proton Compiler for 8-bit devices. (27th September 2012)

AdditionsAdded enhanced 14-bit core devices 16F1782, 16FLF1782, 16F1783, 16LF1783, 16F1784, 16LF1784, 16F1786, 16LF1786, 16F1787, 16LF1787

AmendmentTrapped symbol and variable names starting with a digit. i.e. Dim 10Mice as Byte. It now produces a compiler syntax error instead of anassembler error.Updated the assembler version.

FixCorrected RAM bank switching with some signed variable comparisons on 18F devices.

Fixes and Amendments made in version 3.5.5.1 of the Proton Compiler for 8-bit devices. (23rd September 2012)

AmendmentsReinstated the prp file created for project use with some third party plugins. This was removed in earlier versions because of issues with cof creationUpdated PDF manual to take into account the changes to Dig and Rev.Updated Timer, SPI and ADC macros to use the compiler's Include directive instead of the pre-processor's.

FixesCorrected Floating point Less Than comparison with positive constants.

Page 24: Proton Correction Proton and Proton24 Additions Proton ...

Fixes made in version 3.5.5.0 of the Proton Compiler for 8-bit devices. (17th September 2012)

FixesCorrected fRound when assignment variable is a float. The routine now converts to an integer then to a float.Corrected RAM bank and page boundary switching anomaly with enhanced 14-bit core devices.Corrected obscure RAM bank switching anomaly with 18F devices.Corrected installer file corruption in version 3.5.4.9 and possibly 3.5.4.8.

Fixes and Amendments made in version 3.5.4.8 of the Proton Compiler for 8-bit devices. (9th September 2012)

AmendmentsUpdated relevant PPI files for the CTMUCON SFR.Removed Max and Min routines because of expression parser issues with these, now obsolete, commands.Replaced the Rev function with the character @. Therefore, instead of Var = Var Rev Var, use Var = Var @ Var.Replaced the BASIC stamp version of the Dig function with the character ?. Therefore, instead of Var = Var Dig Var, use Var = Var ?Var.

FixesCorrected Floating point conversion into an integer array that has an expression as an index.Corrected recognition issues of some symbol names by the expression parser.Corrected the use of the incf mnemonic with enhanced 14-bit core devices when using the carry flag as a follow on for a high byte calculaton.Corrected the expression dword = word - constant with enhanced 14-bit core devices.Corrected the Clear command with some 18F devices. It was also clearing SFRs that are outside upper Access RAM.Corrected the Break command when used within a loop that is within a Select-EndSelect construct.Corrected recognition of the Lsrf mnemonic within the enhanced 14-bit core internal optimiser pass.

Fixes, Additions and Amendments made in version 3.5.4.6 of the Proton Compiler for 8-bit devices. (26th July 2012)

AdditionsAdded several new sample programs, some that demonstrate USB.

AmendmentsUpdated USB routines for 18F devices. Unfortunately, because Microchip have made extensive changes to their USB stack, which the compiler's

Page 25: Proton Correction Proton and Proton24 Additions Proton ...

stack is based upon, USB operations have changed slightly.USB declares have now been removed and the descriptor files will now need to be included into the program. All relevant information that waspreviously a declare is now located in the descriptor file itself.Because of the more complex clock settings for newer devices, the compiler will no longer manipulate the configuration fuses for USB operation. It isrequired that Config_Start and Config_End are used to set the fuses appropriately for 48MHz operation.See the PDF manual for details.Removed support for standard 14-bit core USB.Updated the compiler's PDF manual to reflect the changes made to USB operation.Removed the 3 operand limitation with floating point and 32-bit (Dword) expressions.

FixesCorrected RAM banks switching anomalies.Corrected empty parenthasis within a Select-EndSelect causing a syntax error.Corrected some three letter variables or constants being mis-interpreted. i.e. rtc etc...Corrected some Word and Dword shift left operations.

Fix made in version 3.5.4.5 of the Proton Compiler. (30th May 2012)

FixCorrected the new If-Then mechanism when implementing Repeat-Until Loops.

Fixes and Amendment made in version 3.5.4.4 of the Proton Compiler. (29th May 2012)

AdditionsAdded devices 18F26J13, 18F27J13, 18F46J13, 18F47J13, 18LF26J13, 18LF27J13, 18LF46J13, 18LF47J13

AmendmentsOptimised comparisons that contain Goto , Label Name, Break or Continue after the Then directive.The compiler now produces a single branch instead of a branch over a branch. This has the potential to save a lot of code memory.Note that any of the above texts after the Then directive will terminate the line.Re-Worked an internal optimiser pass that removes superfluous Movlb (RAM bank switching) mnemonics on enhanced 14-bit core and 18F devices.

Fixes

Page 26: Proton Correction Proton and Proton24 Additions Proton ...

Corrected LCDRead when used to read Text from a Toshiba graphic LCD.Corrected a RAM bank anomaly that happened when a macro without parameters exited into a RAM bank other than 0.

Fixes made in version 3.5.4.2 of the Proton Compiler. (21st May 2012)

FixesCorrected an obscure RAM bank switching anomaly for all device cores. Unfortunately, this will mean that some code sizes will increase slightly.

Fixes made in version 3.5.4.1 of the Proton Compiler. (19th May 2012)

FixesCorrected ClearBit and SetBit with arrays as the assignment.Corrected Intelligent low priority Context Save/Restore when only a low priority interrupt is used in the program.Corrected "End Quote Missing" error message with certain conditions.Corrected floating point rounding within arithmetic library routines that could effect their outcome.

Additions and Fixes made in version 3.5.3.9 of the Proton Compiler. (2nd May 2012)

AdditionsAdded a cast for an integer constant address parameter for Busout, Busin, Hbusout, Hbusin, I2Cout and I2Cin.This allows interfacing to I2C devices that require 16-bits or more as an address, but a temporary variable is not desired. For example:

Busout $A0, Byte 0, [Var1, Var2] ' Send an 8-bit addressBusout $A0, Word 0, [Var1, Var2] ' Send a 16-bit address, even though it is an 8-bit constantvalueBusout $A0, Dword 0, [Var1, Var2] ' Send a 32-bit address, even though it is an 8-bit constantvalueBusout $A0, Dword 1024, [Var1, Var2] ' Send a 32-bit address, even though it is a 16-bit constantvalue

Added a floating point specific version of Abs, named fAbs. Its use is the same as Abs, however, it will always return a floating point value.Added String support to Busout, Busin, Hbusout, Hbusin, I2Cout and I2Cin. The commands may now transmit and receive a stringvariable. For example:

Page 27: Proton Correction Proton and Proton24 Additions Proton ...

Dim MyString as String * 20

Busout $A0, Word 0, [MyString] ' Send all the characters from a string. Including the nullterminator

Busin $A0, Word 0, [MyString] ' Receive characters from the bus into a string. Stop when nullterminator received

Added a new command to round a floating point value or variable to the nearest integer, named fRound.

MyVar = fRound(MyFloat)

FixesCorrected Signed and Unsigned Dword to Floating Point for 14-bit core devices and 18F devices.Corrected Floating Point to Signed and Unsigned Dword for 14-bit core devices and 18F devices.Corrected a (sometimes) non-returning library subroutine on standard 14-bit core devices, called to make a pin an output by some commands.

Additions, Amendments and Fixes made in version 3.5.3.8 beta of the Proton Compiler. (16th April 2012)

AmendmentsLabel, variable and macro names have been reduces in length back down to a maximum of 32 characters, because of the Mpasm assembler's inabilityto process symbols with more than this amount of characters.

FixesCorrected expression Dword = Byte | Constant (version 3.5.3.7).Created a new library routine for Floating point to Integer conversion that correctly handles unsigned values as well as signed types (version 3.5.3.7).Corrected Hrsin with 18F devices (version 3.5.3.6).Corrected RAM bank switching with 12-bit core devices (version 3.5.3.7).Corrected Unsigned Integer variable to floating point conversion.

Additions, Amendments and Fixes made in version 3.5.3.5 beta of the Proton Compiler. (7th April 2012)

AdditionsAdded a Code memory table assignment that uses a similar method to declaring a variable:

Page 28: Proton Correction Proton and Proton24 Additions Proton ...

Dim MyCode as Code = 1, 2, 3, 4, 5, 6, 7, 8,_9, 10, 11, 12, 13, 14

The above will create a data table in code memory that can be accessed using Cread8, Cread16 or Cread32.The same modifiers that are used with Cdata apply to the table of values. For example:

Dim MyCode as Code = As Word 1, 2, 3, 4, 5, 6, 7, 8orDim MyCode as Code = Word 1, Byte 2, Dword 3, 4, 5, 6, 7, 8

Variables can be assigned a value when they are declared. For example:

Dim MyBit as Bit = 1Dim MyByte as Byte = 1Dim MyWord as Word = 1000Dim MyDword as Dword = 100000Dim MyFloat as Float = 3.14Dim MyByteArray[10] as Byte = 1, 2, 3, 4, 5, 6, 7, 8Dim MyWordArray[10] as Word = 1000, 2000, 3000, 4000, 5000Dim MyDwordArray[10] as Dword = 100000, 200000, 300000, 400000, 500000Dim MyString as String * 20 = "Hello World"

The assignment will take place at the location in the program where the Dim is issued.

The above additions will be added to the manual on its next release.

AmendmentsArrays on 18F and enhanced 14-bit core devices can now be as large as the RAM available. Instead of the limit of 255 elements.Increased the length of BASIC code allowed on a single line to 1000 characters instead of the original 250 characters.Increased the allowed length of Variable and Label names from 32 characters to 90 characters.

FixesCorrected Word sized For-Next loop with a positive step value other than 1 on an 18F or enhanced 14-bit core device.

Page 29: Proton Correction Proton and Proton24 Additions Proton ...

Corrected Cread8, Cread16 and Cread32 on enhanced 14-bit core devices.Corrected the creation of Signed Dword arrays.Corrected PortB_Pullups not being able to decide whether it was a declare or not.Corrected expressions Dword = Byte * 1 and Dword = 1 * Byte.Corrected ppi and def files for the amount of eeprom on a 18F46K20.

Fixes made in version 3.5.3.3 beta of the Proton Compiler. (25th February 2012)

AdditionsAdded an extra 25 sample program for use with the Amicus18 board.

FixesCorrected Increment with Dwords on an enhanced 14-bit core device.Corrected Positive and Negative For-Next with a Word variable as its assignment on a standard 14-bit core device.

Additions, Amendments and Fixes made in version 3.5.3.2 beta of the Proton Compiler. (24th February 2012)

AdditionsAdded support for devices 10F320, 10F322, 10LF320, 10LF322, 18F25K80, 18F26K80, 18F45K80, 18F46K80,18F65K80, 18F66K80, 18LF25K80, 18LF26K80, 18LF45K80, 18LF46K80, 18LF65K80, 18LF66K80.Added the PDF documents "Amicus18 Companion Shield Manual - For Proton" and "Using Amicus18 Hardware with Proton"Added the include files "Amicus18.inc", "Amicus18_ADC.inc", "Amicus18_hpwm8.inc", "Amicus18_hpwm10.inc", "Amicus18_SPI.inc" and"Amicus18_Timers.inc" for use with the Amicus18 board.

AmendmentsRe-enstated the declares High_Int_Sub_Start, High_Int_Sub_End, Int_Sub_Start, Int_Sub_End, Low_Int_Sub_Start andLow_Int_Sub_End.They now work alonside Context Save and Context Restore, in that any additional code that is encompassed by the declares will be treatedas part of the interrupt handling subroutine and its context will be saved/restored.

FixesCorrected Declare Shift_DelayUs not being recognised.Corrected standard 14-bit core expressions: SDword = SWord + SWord and SDword = SWord + SDword.This also impacts on expressions with the same operands, but the assignment is a Float.

Page 30: Proton Correction Proton and Proton24 Additions Proton ...

Corrected RAM bank switching for standard 14-bit core Context Save.

Fixes made in version 3.5.3.1 beta of the Proton Compiler. (10th February 2012)

FixesCorrected colon recognition, with or without white spaces, after and Else statement on a single line.

Additions, Amendments and Fixes made in version 3.5.2.9 beta of the Proton Compiler. (2nd February 2012)

AdditionsAdded signed variables SByte, SWord and SDword:

SByte can hold a value between -128 to 127SWord can hold a value between -32768 to 32767SDword can hold a value between -2147483648 to 2147483647

This is a major change in the compiler's operation and means that existing programs using Dword variables as signed will need to change them toSDword as Dword variables are now unsigned.

Added support for devices: 16F1503, 16F1507, 16F1526, 16F1527, 16F1847 and 12LF1840T48A.

Added a highly user configurable bootloader named UMC. For further information look in the compiler's folder "C:\Program Files\ProtonIDE\MCLoader\umc" or "C:\Program Files (x86)\ProtonIDE\MCLoader\umc" for Windows 7.

AmendmentsAltered the use of the Break command while inside a Select-EndSelect construct. It will now exit a loop instead of simply exiting theSelect-EndSelect.Altered the use of Context Save and Context Restore. They now save all compiler system variables and major SFRs that a compilercommand may use while inside an interrupt handler.This is a major upgrading of the compiler's interrupt handling capabilities and allows a much more flexible and safe method of using interrupts. Seethe revised manual sections: Context and On_Hardware_Interrupt.The use of the directives High_Int_Sub_Start and High_Int_Sub_End etc are now redundant and are ignored by the compiler.Updated the compiler's IDE.

Page 31: Proton Correction Proton and Proton24 Additions Proton ...

FixesCorrected ToUpper command with 18F devices.Corrected RAM bank switching when using the Abs function.Corrected expressions containing two Trigonometry functions.Corrected the Clear command with enhanced 14-bit core devices.Corrected ppi file PORTB definition for 12F615.Corrected TRISE missing from ppi file of device 18F2321.

Fixes made in version 3.5.2.7 of the Proton Compiler. (30th October 2011)

FixesAdded I2C peripheral pins to ppi file for 12F1840.Corrected RAM locations within ppi file for 16LF1938.Corrected the Clear and Set commands for enhanced 14-bit core devices.Corrected no error when an operand was missing in an If-Then condition.Corrected interrupt vector address with standard 14-bit core devices.

Amendments and Fixes made in version 3.5.2.6 of the Proton Compiler. (25th September 2011)

AmendmentsAdded LAT register recognition to High and Low commands for enhanced 14-bit core devices.Optimised commands Lookup, LookupL, Lookdown and LookDownL for enhanced 14-bit core devices.Re-formatted and checked all sample BASIC programs supplied with the compiler.

FixesCorrected LookUpL with a word variable as its index on.Corrected intermittent exception error with the PrPlus.exe file.

Fixes made in version 3.5.2.5 of the Proton Compiler. (11th September 2011)

FixesCorrected Lookup, LookupL, Lookdown and LookDownL last value in table anomaly.Corrected assembler error with Edata and long label names as data items.

Page 32: Proton Correction Proton and Proton24 Additions Proton ...

Fixes made in version 3.5.2.4 of the Proton Compiler. (7th September 2011)

FixesCorrected COF file creation.Corrected high byte recognition of SFRs PDC0L, PDC1L, PDC2L and PTMRL for devices 18F1230 and 18F1330.Corrected preprocessor crashing with non-compiler syntax characters.

Amendments and Fixes made in version 3.5.2.3 of the Proton Compiler. (14th August 2011)

AmendmentsAdded an error message if a variable name exceeds 32 characters in length. This length will be increased in future versions of the compiler.Altered the temporary work location of the compiler's intermediate files and the assembler files.This was originally done within a windows temp folder, however, this is problematic within Win7 so the compiler now uses the the folder where theBASIC file is located.

FixesCorrected RAM bank switching on standard 14-bit core devices.Corrected the 18F optimiser removing a Bra mnemonic if the destination address is within 4 bytes behind.Corrected LoadBit for 18F devices.

Additions, Amendments and Fixes made in version 3.5.2.2 of the Proton Compiler. (1st August 2011)

AdditionsAdded string duplication correction. Quoted Character Strings containing the same texts will now occupy a single data statement.This can, potentially, save hundreds of bytes of code memory.

AmendmentsAltered config fuse names for compatability with the third party fuse configuration plugin created by Johnb.

FixesCorrected and optimised LookUp, LookUpL, LookDown and LookDownL commands.Corrected the USB18_CDC_Class.inc file.Corrected HPWM with 12F and 16F devices.Corrected Hrsin2 and Hrsout2 with 18F devices that have registers not held in Access RAM. i.e. 18F87K22 etc...

Page 33: Proton Correction Proton and Proton24 Additions Proton ...

Fixes made in version 3.5.2.1 of the Proton Compiler. (28th May 2011)

FixesCorrected Managed interrupt context saving with standard 14-bit core devices.Corrected Declare Shift_DelayUs with standard and enhanced 14-bit core devices.

Fixes made in version 3.5.2.0 of the Proton Compiler. (16th May 2011)

FixesCorrected WordOut = WordIn >> Byte on 18F devices.Corrected oscillator frequency calculations with Declare PLL_Req.

Fixes made in version 3.5.1.9 of the Proton Compiler. (14th May 2011)

FixesCorrected page size anomaly with standard 14-bit core devices which produced larger code than was required.Corrected the compiler crashing when a variable was not found within a condition on its second parsing pass.Corrected bit = bit condition and bit <> bit condition where the bit value is not the same, for 14-bit core devices and 18F devices.

Fixes made in version 3.5.1.7 of the Proton Compiler. (24th April 2011)

FixesTightened freqencies for FreqOut and DTMFOut with 18F devices.Corrected bit tests for banked variables testing bits 0 or 7 with standard 14-bit core devices.Corrected complement and sign characters within conditions.

AmendmentsVariables, labels and directives in the .LST and .ASM files now appear as they do in the BASIC listing, instead of being all uppercase.This makes simulation a lot more intuitive. For example a variable named ThisIsMyVar will now not appear as THISISMYVAR.Updated the latest MpasmWin assembler to version 5.40. However, this still has the anomaly of using the wrong fuse setting for FOSC = HSHP withthe latest 18FxxKxx devices.

Fixes made in version 3.5.1.6 of the Proton Compiler. (1st April 2011)

Page 34: Proton Correction Proton and Proton24 Additions Proton ...

AdditionAdded a Continue directive. This moves forward within a loop.

FixesCorrected two consecutive subtraction of Dword with 14-bit core devices.Corrected some bit comparisons on smaller 14-bit core devices.Note that some bit comparisons will alter the WREG on larger multi-RAM bank devices.Corrected HPWM with enhanced 14-bit core devices.Corrected ClearBit and SetBit when using an array as the variable to alter.Corrected binary string conversion of length 25 to 32 characters.

AmendmentsRemoved the user definable SPI, ADC and Timer macros from the installation. These can be downloaded seperately.Updated the IDE to version 2.0.1.0. It now highlights texts following $define.Updated PDF manual.

Fixes made in version 3.5.1.5 Beta of the Proton Compiler. (11th March 2011)

AdditionAdded a SizeOf command. This returns the size of a variable, array, or string. For example:

Var = SizeOf(BitVar) will return a value of 1Var = SizeOf(ByteVar) will return a value of 1Var = SizeOf(WordVar) will return a value of 2Var = SizeOf(DwordVar) will return a value of 4Var = SizeOf(FloatVar) will return a value of 4Var = SizeOf(MyArray) will return the amount of bytes used.Var = SizeOf(MyString) will return the amount of bytes used.

This is ideal for loops encompassing arrays or strings:

Index = 0Repeat

Page 35: Proton Correction Proton and Proton24 Additions Proton ...

MyArray[Index] = MyVarInc Index

Until Index >= SizeOf(MyArray)

FixesCorrected device highlighting within the IDE.Corrected the Str$ command when converting from a decimal integer.Corrected the Tblwt mnemonic in the library building routines, broken in version 3.5.1.4 Beta.Corrected the Cerase command with 18F devices.Corrected the ClearBit command.

AmendmentsAdded more RAM bank awareness to the 18F optimiser.

Fixes made in version 3.5.1.4 Beta of the Proton Compiler. (1st March 2011)

FixesCorrected the warning when code exceeds 64K on an 18F device.

AmendmentsAdded an implicit Access or Banked selection on ASM mnemonics produced by the compiler.This was found necessary because the latest Mpasm assembler does not treat defaults correctly.Added recognition of Access or Banked salection on Mnemonics within the BASIC code. i.e. Movwf Var,1

Fixes made in version 3.5.1.3 Beta of the Proton Compiler. (27th February 2011)

FixesCorrected the Eread command with certain 14-bit core devices.Corrected the enhanced 14-bit core ppi files (CONFIG directive type).Corrected include filenames that contain escape characters. i.e. \t or \n etc.

Fixes made in version 3.5.1.2 Beta of the Proton Compiler. (1st February 2011)

Page 36: Proton Correction Proton and Proton24 Additions Proton ...

FixesCorrected the lack of the multiply library subroutine with the HPWM command.Corrected the 16F946 ppi file.Corrected the 18Fxx22 def files.Corrected LookDownL.

Amendments and fixes made in version 3.5.1.1 Beta of the Proton Compiler. (17th Janauary 2011)

AdditionsAdded support for enhanced 14-bit core devices: 12F1822, 12F1840, 16F1516, 16F1517, 16F1518, 16F1519, 16F1823, 16F1824, 16F1825, 16F1826,16F1827,16F1828, 16F1829, 16F1933, 16F1934, 16F1936, 16F1937, 16F1938, 16F1939, 16F1946, 16F1947.The compiler takes full advantage of the new architecture of these devices and utilises the linear nature of their RAM and code memory whenaccessed indirectly.Added support for devices 16F946, 18F65K22, 18F66K22, 18F67K22, 18F85K22, 18F86K22, 18F87K22.Added String variable with enhanced 14-bit core devices.Added Dword Arrays for 18F and enhanced 14-bit core devices.Added a beta optimiser for enhanced 14-bit core devices.Added the commands Cread8, Cread16 and Cread32 for efficient accessing of Cdata tables.Added the command DelayCs when using 18F or enhanced 14-bit core devices. This will delay x amount of instruction cycles. i.e. Fosc / 4

FixesCorrected internal WREG tracking.Corrected and optimised integer shift right and shift left routines.Corrected ppi files for 18FxxJ60 and 18FxxJ65 devices when using the hardware USART.Corrected String comparison to a single character wrapped in quotes.

AmendmentsBecause enhanced 14-bit cores do not use their 16 bytes of shared RAM in their linear mode, the compiler does not use them and this area is availablefor users within the BASIC code.16 byte sized variables are automatically created named Reg0 to Reg15 and start at address 0x70 and end at address 0x7F.These are bankless variables and as such are excellent as temporary storage.

Amendments and fixes made in version 3.5.0.5 of the Proton Compiler. (20th June 2010)

Page 37: Proton Correction Proton and Proton24 Additions Proton ...

AdditionsAdded HbusNack and BusNak in order to transmit a Not Acknowledge to the I2C bus.Added devices 12F617, 18F23K22, 18F24K22, 18F25K22, 18F26K22, 18F43K22, 18F44K22, 18F45K22, 18F46K22.Added commands ISin, ICos, and ISqr for integer Sine, Cosine, and Square Root.Their use is the same as for floating point, except that iSin and iCos follow the BASIC stamp 2 in results. i.e. a value between 0 - 255.

FixesCorrected RAM bank anomalies for certain 18F conditions.Corrected WREG not found error when using 14-bit core deives.Corrected LookDownL command with < and <= operators.Corrected Constant value into Word variable, where the constant value's high and low bytes are the same. i.e. $5F5FCorrected Freqout and DTMFout frequencies for 18F devices.Various tweaks have been performed, and anomalies were corrected within the math operators of the compiler.Corrected PPI files for 10F devices. Used invalid RAM locations.Corrected PPI file for 18F4420. Showed incorrect code memory size.

AmendmentsRemoved auto update from the IDE. All updates will be announced on the forum and downloadable from www.picbasic.orgRemoved the help file from the IDE. The compiler's manual is now directly accessable from the IDE and is fully searchable.The text "Off" has recently become an Mpasm assembler protected word and cannot be used within an asm script. The compiler now traps this textand produces an error before it reaches the asm stage.Important:Compiler's executable files are now located within the "Program Files\ProtonIDE\PDS" folder, instead of the "Program Files\Crownhill\PDS" folder.

Amendments and fixes made in version 3.4.0.8 Release Candidate of the Proton Compiler. (29th September 2009)

FixesCorrected Floating Point Trig functions Log, Log10, Sin, and Cos.Corrected the creation of system variables PP2\PP2H with 14-bit core devices and certain iterations of the Str$ command.Corrected 32-bit comparison of <= constant 1023 on 18F devices. This also affected certain iterations of For-Next loops.

Amendments and fixes made in version 3.4.0.6 Release Candidate of the Proton Compiler. (5th July 2009)

Page 38: Proton Correction Proton and Proton24 Additions Proton ...

AmendmentsThe Clear command now does not clear the _FP_FLAGS variable when floating point is used within the program.This has a slight code overhead, but is required in order to preserve the floating point Rounding mechanism.Re-Written 14-bit floating point library code, Addition, Subtraction, Division, Multiplication, Integer to Float, Float to Integer.The new routines are generally smaller in size and operate faster than the originals.Altered the way the Declare Float_Rounding works for 14-bit core and 18F devices.It can now be placed anywhere within the code in order to enable or disable floating point rounding to the nearest value:For example:

Dim FloatVar as FloatDim WordVar as Word

' Convert the floating point value to an integer value. Rounding to the nearest valueFloat_Rounding = Off ' Disable rounding to the nearest LSB. Truncate to the lowest integerFloatVar = 3.7WordVar = FloatVar ' Convert the floating point value to an integer value

' The result held in WordVar will be 3

' Convert the floating point value to an integer value. Rounding to the nearest valueFloat_Rounding = On ' Enable rounding to the nearest LSBFloatVar = 3.7WordVar = FloatVar ' Convert the floating point value to an integer value

' The result held in WordVar will be 4

Floating point rounding is enabled by default.Added a rounding mechanism to the standard floating point display routine.Refined Floating Point Exception Flags

The floating point flags are accessible in the application program via the system variable _FP_FLAGS.This must be brought into the BASIC program for the code to recognise it:

Dim _FP_FLAGS as Byte System

The exceptions are:

Page 39: Proton Correction Proton and Proton24 Additions Proton ...

_FP_FLAGS.1 ' Floating point overflow_FP_FLAGS.2 ' Floating point underflow_FP_FLAGS.3 ' Floating point divide by zero_FP_FLAGS.5 ' Domain error exception

Floating point Rounding to the nearest value is also contained within the _FP_FLAGS variable:

_FP_FLAGS.6 ' Floating point rounding ' 0 = Truncation ' 1 = Unbiased rounding to nearest LSB

The exception bits can be aliased for more readability within the program:

Symbol FpOverflow = _FP_FLAGS.1 ' Floating point overflowSymbol FpUnderFlow = _FP_FLAGS.2 ' Floating point underflowSymbol FpDiv0 = _FP_FLAGS.3 ' Floating point divide by zeroSymbol FpDomainError = _FP_FLAGS.5 ' Domain error exceptionSymbol FpRounding = _FP_FLAGS.6 ' Floating point rounding ' Setting FpRounding = 0: Truncation ' Setting FpRounding = 1: Unbiased rounding to nearest LSB

Alteration of the FpRounding bit is what the Declare Float_Rounding does.After an exception is detected and handled in the program, the exception bit should be cleared so that new exceptions can be detected.Exceptions can be ignored. New operations are not affected by old exceptions.

The USB library now works with the 18F13K50 and 18F14K50 devices.Altered the direction of reading and writing a variable. It is now Lowbyte first (LSB). This is more desirable when accessing peripherals such astimers.Managed hardware interrupts for 18F devices now also saves/restores the EECON1 SFR.

FixesCorrected the Cstr function within string concatenation which prevented addition operands being seen.Corrected Pow function with negative parameters.Corrected While-Wend structure on the same line as an If-Then.

Page 40: Proton Correction Proton and Proton24 Additions Proton ...

Additions, amendments and fixes made in version 3.4.0.4 Beta of the PROTON+ Compiler. (7th April 2009)

ADDITIONSAdded a Preprocessor to the compiler. This allows conditional compilation. See latest manual PDF for further details.Added .Def files for all supported PICmicro devices. These can be used in conjuction with the Preprocessor, and can be found within the compiler's"Includes\Defs" folder.Added an unofficial Declare that will keep a HEX file from a previous build, even if the build failed. This is in order to support the PICkit2 Users: -

Keep_Hex_File = On or Off, 1 or 0, True or False

Added support for devices; 12F519, 16F505, 16F526, 16HV540, 12F609, 12HV609, 12HV615, 16F722, 16F723, 16F724, 16F726, 16F727,16LF722, 16LF72316LF724, 16LF726, 16LF727, 18F13K22, 18F13K50, 18F14K22, 18F14K50, 18F23K20, 18F24J11, 18F25J11, 18F26J11, 18F43K20, 18F44J11,18F45J1118F46J11, 18LF13K22, 18LF13K50, 18LF14K22, 18LF14K50, 18LF24J11, 18LF25J11, 18LF26J11Added COF file creation for simulating high level code inside the MPLAB environment, further details in the latest PDF manual.WREG tracking optimisation is now implemented as standard for all devices.This monitors the value held within the WREG and eliminates any unnecessary Movlw mnemonics.For example, a sequence of ASM mnemonics such as:

Movlw 7Movwf Var1Movlw 7Movwf Var2

will be shortened to:

Movlw 7Movwf Var1Movwf Var2

Added oscillator frequency 64MHz for use with the 16 MIPS (Million Instructions Per Second) 18F(K) devices.Added full interrupt Context saving and restoring with 14-Bit core and 18F devices by the use of four new directives: -

High_Int_Sub_Start, High_Int_Sub_End

Page 41: Proton Correction Proton and Proton24 Additions Proton ...

Low_Int_Sub_Start, Low_Int_Sub_End

When each of the above pair of directives surrounds a Hardware Generated Interrupt subroutine, any of the compiler's system variables used will besaved to reserved RAMwhen the commands Context Save and Context Restore are issued.Both high and low priority interrupts are catered for. For example: -

' High Priority Interrupt Subroutine for a 18F deviceHigh_Int_Sub_StartInterruptSubHigh:

Context Save' Interrupt Code goes Here !Context Restore

High_Int_Sub_End

' Low Priority Interrupt Subroutine for a 18F deviceLow_Int_Sub_StartInterruptSubLow:

Context Save' Interrupt Code goes Here !Context Restore

Low_Int_Sub_End

Several of the PICmicro's SFR's (Special Funtion Registers) will also be Context saved along with the compiler's System Variables.This is unavoidable, and essential for the seemless operation of the program.The SFR's in mention are: -

WREG, STATUS, BSR, FSR0L\FSR0H, FSR1L\FSR1H, FSR2L\ FSR2H, PRODL\PRODH, TBLPTRL\TBLPTRH, and TABLAT

When using 14-Bit core devices, the declares Int_Sub_Start, Int_Sub_Endcan be used as well as High_Int_Sub_Start,High_Int_Sub_End.

' Interrupt Subroutine for a 14-Bit core (16F) deviceInt_Sub_StartInterruptSub:

Context Save

Page 42: Proton Correction Proton and Proton24 Additions Proton ...

' Interrupt Code goes Here !Context Restore

Int_Sub_End

All of this takes RAM space, so the compiler reserves just enough RAM at the top of memory to cater for the amount of variables and SFR's used.A hint (reminder) will be issued when this is accomplished, which can be disabled using the Reminders Declare.Added a simple cast for expressions within Conditions.

For example:A comparison that contains an expression will always evaluate the expression with a Dword (32-Bit) product If the left hand variable is a Word(16-Bit).

If WordIn = (100 * WordVar) + 60000 Then

A comparison that contains an expression will always evaluate the expression with a Word (16-Bit) product If the left hand variable is a Bit or Byte(8-Bit).

If ByteIn = (100 * ByteVar) Then

The addition of a Byte, Word, Dword or Float keyword at the start of an expression within a condition will ensure that the expression will have theappropriate result. i.e.

If Dword WordIn = (100 * WordIn) + 60000 Then

or

If Byte ByteIn = Byte (ByteVar - 20) Then

Note: This will not become an official part of the language until it has been extensively tested.

The SizeOf_Table directive has been added that will calculate the size of a table it is within.For example:

Cdata SizeOf_Table, 10, 20, 30, 40

The above table will contain 5 items. i.e. 5, 10, 20, 30, 40.

Page 43: Proton Correction Proton and Proton24 Additions Proton ...

The same applies to Ldata and Edata tables.

The SizeOf_Table directive can be placed anywhere within the table and can be preceded by a casting directive:

Ldata as Word 10, 20, 30, 40, SizeOf_Table

AMENDMENTSThe IDE and the Compiler are now Vista compliant. However, this does mean a change in the location of sample programs, user programs, and plugin.mcp files,because Vista will not allow file writes within the Program Files directory. All changeable data and program files are now located within"C;\Documents and Settings\User's folder\PDS"IDE Plugin .mcp files are located in "C;\Documents and Settings\User's folder\Application Data\PDS".Only 1 instance of the Device directive is allows within the program. This is unfortunate, but necessary because of the Preprocessor.Re-Formatted and added too the PDF manual.The IDE now recognises the RF range of PICmicro devices.The compiler's PPI and Source files are now contained in the folder "Includes" instead of "INC".Implemented The USB Stack version 1.2 for USB 18F devices.Tightened bank switching when using software interrupts.For the third party Library Manager software, the macros NUM_FSR, NUM_FSR0, NUM_FSR1, NUM_FSR2, and LABEL_WORD can now beaccessed fromthe BASIC file without a preceding ampersand. This ensures that they follow the rules of macro generation and usage and will help the optimiser doits job.Added support for long BASIC file names and file paths that exceed 62 characters. However, the full path should be kept less than 230 characterswhen using ISIS.The compiler now produces a single ASM file containing all the information necessary for the PICmicro used.The compiler now implements dead code removal, further tightening the ASM produced by the Declare:

Dead_Code_Remove On-Off or True-False or 1-0

This means that the optimiser now has only three levels (four including 0). Note 14-Bit core devices now only have two levels of optimisation. Seethe "KNOWN ISSUES" sectionThe first two levels optimise the main code. The third optimise pass (18F devices only) tightens loops and branches further, but at a cost of anotherassembler pass.Optimised Boolean conditions.

Page 44: Proton Correction Proton and Proton24 Additions Proton ...

Added preceding 0 to floating point display when using the faster, but larger library routine initiated by the Declare:-

Float_Display_Type = Standard or Fast

Word arrays can now have up to 256 elements when using 18F devices.Support for the, now obsolete, One Time Programmable (OTP) 18C devices has been removed. Chiefly due to the lack of the essential LFSRmnemonic.Altered library ASM code for 32-Bit multiply to use the hardware multiplier with 18F devices. The code produced is slightly larger but the speedincrease is tremendous.The compiler now uses a single configuration file with the extension .PPI instead of the .INF and .LPB files.ImportantThe PPI files are semi-automatically created from Microchip .INC files, however, Microchip have changed some of the fuse configuration names.To view the valid fuse names, open the relevant PPI file, found in the compiler's "Includes\PPI" folder, and scroll down to the bottom of the texts.

The names are in the [CONFIGSTART]/[CONFIGEND] section.For 18F devices, the fuse names for the new Config_Start/Config_End block can be found in the [FUSESTART]/[FUSEEND] section.18F devices containing built-in ethernet hardware such as the 18F97J60 have an SFR (Special Function Register) named EDATA which conflicts withthe compiler's eeprom Data Keyword.The Edata SFR has to be addressed as _EDATA or PP_EDATA

Implemented support using PPI files for devices: -

12-Bit core.10F200, 10F202, 10F204, 10F206, 10F220, 10F222, 12C508, 12C508A, 12C509, 12C509A, 12CE518, 12CE519, 12F51912F508, 12F509, 12F510, 16F54, 16F57, 16C505, 16F505, 16F526, 16HV540, 16C54, 16C54A, 16C54B, 16C54C, 16C55, 16C55416C558, 16C55A, 16C56, 16C56A, 16C57, 16C57C, 16C58A, 16C58B, RF509AF, RF509AG

14-Bit core.12F609, 12HV609, 12HV615, 12C671, 12C672, 12CE673, 12CE674, 12F629, 12F635, 12F675, 12F683, RF675F, RF675H, RF675K16C432, 16C433, 16C61, 16C62, 16C620, 16C620A, 16C621, 16C621A, 16C622, 16C622A, 16C62A, 16C62B, 16C63, 16C63A, 16C64, 16C64216C64A, 16C65, 16C65A, 16C65B, 16C66, 16C662, 16C67, 16C71, 16C710, 16C711, 16C712, 16C715, 16C716, 16C717, 16C72, 16C72A16C73, 16C73A, 16C73B, 16C74, 16C745, 16C74A, 16C74B, 16C76, 16C765, 16C77, 16C770, 16C771, 16C773, 16C774, 16C781, 16C78216C84, 16C923, 16C924, 16CE623, 16CE624, 16CE625, 16CR54, 16CR54A, 16CR57A, 16CR57B, 16CR57C, 16CR58A, 16CR58B, 16CR62,16CR63, 16CR6416CR65, 16CR72, 16CR83, 16CR84, 16F506, 16F610, 16F616, 16F627, 16F627A, 16F628, 16F628A, 16F630, 16F636, 16F639, 16F648A, 16F67616F684, 16F685, 16F687, 16F688, 16F689, 16F690, 16F716, 16F72, 16F73, 16F737, 16F74, 16F747, 16F76, 16F767, 16F77, 16F777

Page 45: Proton Correction Proton and Proton24 Additions Proton ...

16F722, 16F723, 16F724, 16F726, 16F727, 16LF722, 16LF723, 16LF724, 16LF726, 16LF72716F785, 16F818, 16F819, 16F83, 16F84, 16F84A, 16F87, 16F870, 16F871, 16F872, 16F873, 16F873A, 16F874, 16F874A, 16F876, 16F876A16F877, 16F877A, 16F88, 16F882, 16F883, 16F884, 16F886, 16F887, 16F913, 16F914, 16F916, 16F917, 16HV610, 16HV616

16-Bit core.18F1220, 18F1230, 18F1320, 18LF13K22, 18F13K22, 18F1330, 18F13K50, 18LF13K50, 18F14K22, 18LF14K22, 18F14K50, 18LF14K50,18F2220, 18F2320, 18F23K2018F2331, 18F2410, 18F242, 18F2423, 18F2431, 18F2439, 18F2455, 18F24818F24J11, 18LF24J11, 18F24J10, 18F24K20, 18F2510, 18F25J11,18F251518F252, 18F2520, 18F2523, 18F2525, 18F2539, 18F2550, 18F258, 18F2580, 18LF25J11, 18F2585, 18F25K20, 18LF26J1118F2610, 18F26J11, 18F2620, 18F2680, 18F4220, 18F4320, 18F43K20, 18F4331, 18F4410, 18F442, 18F4423, 18F4431, 18F4439, 18F4455,18F448, 18F44J10, 18F44J1118F44K20, 18F4510, 18F45J11, 18F4515, 18F452, 18F4520, 18F4523, 18F4525, 18F4539, 18F4550, 18F458, 18F4580, 18F4585, 18F45J10,18F45K2018F4610, 18F46J11, 18F4620, 18F4680, 18F6310, 18F6390, 18F63J90, 18F6410, 18F6490, 18F64J90, 18F6520, 18F6525, 18F6585, 18F65J10,18F65J1518F65J50, 18F65J90, 18F6620, 18F6621, 18F6622, 18F6627, 18F6680, 18F66J10, 18F66J15, 18F66J50, 18F66J55, 18F66J60, 18F66J65, 18F672018F6722, 18F67J10, 18F67J50, 18F67J60, 18F8310, 18F8390, 18F83J90, 18F8410, 18F8490, 18F84J90, 18F8520, 18F8525, 18F8585, 18F85J1018F85J15, 18F85J50, 18F85J90, 18F8620, 18F8621, 18F8627, 18F8680, 18F86J10, 18F86J15, 18F86J50, 18F86J55, 18F86J60, 18F86J65, 18F872018F8722, 18F87J10, 18F87J50, 18F87J60, 18F96J60, 18F96J65, 18F97J60

For 18LF devices not listed above, use the standard 18F device. This list of devices will be amended when final datasheets for a specific device areavailable from Microchip.

FIXESCorrected managed interrupts with 14-bit core devices containing a single Bank of RAM.Corrected Dword = Constant comparison, where the constant has a low Byte of 0 and is greater than 256 and less than 65535.Corrected Byte = Byte / Constant comparison On 18F devices, where Constant is not divisable by 2.Corrected Adin command for devices 16F88x, 16F677, 16F685, 16F687, 16F689, and 16F690.Corrected complementing and signing of variables and constants within the EWrite command.Corrected the loading of a Word array with a label's address. i.e. MyArray[1] = Label.Corrected Dword = Dword - Dword1 expression where each variable is in a different bank.Corrected the missing system variables when using the stamp compatible SQR routine with a Dword assignment.Corrected some typo's in the PPI files for devices: 16F685, 18F1230, 18F1330, 18F2331, 18F2431, 18F4331, and 18F4431Corrected the floating point Pow command. It now traps the first parameter If 0.

Page 46: Proton Correction Proton and Proton24 Additions Proton ...

Corrected Byte array into Byte array when the index value is a constant. i.e. MyByteArray[1] = MyByteArray[2].Corrected Less-Than condition of a Dword and a Constant less than 65535 and above 256 for 14-Bit core devices. i.e. Dword < 32000Corrected floating point trigonometry negation where a single Constant value is used. i.e. Var = Sin -2.15Corrected Samsung Graphic LCD Print command with internal font for 16F88x devicesCorrected the creation of system loop variable PBL#VARnHHHCorrected expression Float = Float * 2Corrected STR command. It skipped an element in the array after a Quoted String was issued as an item.Corrected All_Digital directive for 16F88x and some 18F devices containing ANSEL0 and ANSEL1 SFRsCorrected the Div32 command.Corrected Pot command with a comment following it.Corrected String slicing. i.e. String1[Index].Corrected Integer Dword = Dword + Word for 14-Bit core devices where any of the variables are not in the same bank and the operator is not thesame as the assignment.Corrected RC5In command with 18F devices.Corrected Complement and Negation within expressions.Corrected Keyboard mapping for countries other than UK and American English when using Floating Point Constants.Corrected BranchL with 18F devices where the list of labels is too long to be jumped over.Slowed down Oread library routine when using an 8MHz crystal.Corrected Serin with timeout, Sometimes not loading a variable with the received Data.Corrected Cread and Cwrite with 14-Bit core devices containing SFR EECON1 in bank1 of RAM.Corrected Adin with devices 16F883, 16F883, 16F886 and 16F887.Corrected Word Array results within expressions when the Array has an expression for its index.Corrected some obscure bank anomalies with certain 18F Dword compares.Corrected the creation of a floating point constant when using an expression containing alias's to floating point constants: -

Symbol X = 2.0Symbol Y = 100.0Symbol Z = X * Y

Z will represent the floating point constant 200.0

If a mix of floating point constants and integer constants are in the expression, the compiler will implement a floating point calculation: -

Symbol X = 2 '(integer)Symbol Y = 100.0

Page 47: Proton Correction Proton and Proton24 Additions Proton ...

Symbol Z = X * Y

Z with represent the floating point constant 200.0

KNOWN ISSUES1).Compiler does not complain with a syntax error If a quoted string of characters is used within an expression and is not the first part. This will produceno code for the expression.

2).Str and StrN accept multiple parameters but do not produce the correct code If Str or StrN are used as parameters before a quoted characterstring, or value.

3).

Important Note: The optimiser for 14-bit core devices is no longer a supported feature of the compiler and is only retained because of userpressure.

4).A deeply nested inline command as a LookupL parameter will cause an internal stack underflow error.

5).String concatenations where the assignment string is also one of the operators after the first operator will produce an incorrect assignment result.For example: -

String1 = "TEXT"String1 = "1234" + String1

will leave String1 holding "12341234TEXT"

The workaround is to assign String1 to a temporary string first: -

String1 = "TEXT"Temp_String = String1String1 = "1234" + Temp_String

Page 48: Proton Correction Proton and Proton24 Additions Proton ...

6).Two triginometry functions within the same expression will produce an incorrect result. For example: -

Var = Sin(X) * Cos(Y)

This will be corrected ASAP.

Additions, amendments and fixes made in version 3.2.5.4 of the PROTON+ Compiler. (12th February 2007)

ADDITIONSAdded support for devices: -12F510, 16F506, 16F616, 16F636, 16F639, 16F883, 16F884, 16F886, 16F887, 18F2423, 18F2523, 18F4423, 18F4523, 18F65J10,18F65J15, 18F66J15, 18F66J60, 18F66J65, 18F67J10, 18F67J60, 18F85J10, 18F86J10, 18F86J60, 18F86J65, 18F87J10, 18F87J60,18F96J60, 18F96J65, 18F97J60.Added Declare to swap the position of the TRIS register manipulation with the HIGH and LOW commands: -

Declare HighLow_Tris_Reverse = On or Off, 1 or 0, True or False

When the HIGH or LOW command is issued, the PICmicro's TRIS (direction) register is altered Then the PORT is altered,however, some users have stipulated that the reverse of this operation is required. i.e. the PORT altered Then the TRIS.

This Declare can be used throughout the program altering the TRIS position at will.

The default If the Declare is not used If the TRIS manipulated Then the PORT.

AMENDMENTSNone

FIXESCorrected Dword < Byte, Dword < Word, Byte > Dword, and Word > Dword Comparisons.Corrected intermittent ASM error "Argument Out of Range" when using Floating Point Trigonometry.Corrected BAUDCON register name in 18F4620 INF and LPB files.Corrected LPB files for: - 18F6310, 18F6390, 18F6410, 18F6490, 18F8310, 18F8410, 18F8490.

Additions, amendments and fixes made in version 3.2.5.2 of the PROTON+ Compiler. (3rd October 2006)

Page 49: Proton Correction Proton and Proton24 Additions Proton ...

ADDITIONSAdded crystal frequency 29.2MHz (7.3MHz * 4) for 14-Bit (16F) and 16-Bit (18F) core devices. Use XTAL = 29.Added commands I2CIN and I2COUT. These communicate with the I2C bus and operate similarly to BUSIN and BUSOUTbut have user configurable SDA and SCL pins.Syntax: -

I2CIN SDA Pin , SCL Pin , Control , { Address }, [ Variable {, Variable…} ]I2COUT SDA Pin , SCL Pin , Control , { Address }, [ Variable {, Variable…} ]

AMENDMENTSNone

FIXESCorrected RAM bank anomaly for 16-Bit core (18F) devices.Corrected Bit to Bit operations when bits are in differing banks and none of the bits are in ACCESS RAM or an SFR with 16-Bit core (18F) devices.Corrected amount of UARTS within INF files for devices 18F2680, 18F2585, 18F4680, and 18F4585.Corrected PPRINT when displaying 32-Bit or floating point values.Corrected CSTR with 16-Bit core (18F) devices and Samsung graphic LCD.Corrected error produced with 32-Bit binary values created with Symbol.

Additions, amendments and fixes made in version 3.2.5.1 of the PROTON+ Compiler. (8th August 2006)

ADDITIONSAdded crystal frequency 19.66MHz for 14-Bit (16F) and 16-Bit (18F) core devices. Use XTAL = 19.Added crystal frequency 7.3MHz for 14-Bit (16F) and 16-Bit (18F) core devices. Use XTAL = 7.Added support for devices; 18F2420, 18F4420, 18F24J10, 18F44J10, 18F25J10, 18F45J10, 10F220, 10F222.

AMENDMENTSCommands HIGH and LOW can now use the Latch registers as a parameter with 16-Bit (18F) devices.Command SET now sets all RAM to 255 If no parameter follows it.Increased accuracy of 32-Bit signed integer divide library subroutine for 14-Bit (16F) and 16-Bit (18F) core devices.Optimised for speed and size, Shift Left and Shift Right for 16-Bit (18F) devices.Optimised for speed and size, 16-Bit integer divide for 18F devices.Optimised accurate floating point display library subroutine for 14-Bit (16F) and 16-Bit (18F) core devices.Optimised Dword comparisons for 14-Bit (16F) and 16-Bit (18F) core devices.

Page 50: Proton Correction Proton and Proton24 Additions Proton ...

FIXESCorrected intermitent code misalignment with LookUp, LOOKUPL, LookDown, and LOOKDOWNL for 14-Bit (16F) devices.Corrected Dword LESS THAN comparison On negative values. i.e. If DWORDIN < -1 Then.Corrected Float to Byte Array conversion.Corrected Sign and Complement of Arrays where the assignment and the operand are both arrays. i.e. ARRAY[INDEX] = -ARRAY[INDEX].Corrected expression Dword = Word + Byte with 16-Bit (18F) devices.Corrected eeprom size for 16F874 and 16F876 devices.Corrected INF files for 18F2510 and 18F4510 to indicate code memory reads only.Corrected INF files for 18F2585, 18F4585, 18F2680 and 18F4680 to indicate the correct end address of ACCESS RAM.Corrected ADC amount with 18F2431 device.Corrected Dword > CONSTANT comparison with 16-Bit (18F) devices.Corrected ESTR modifier with devices containing more than 256 bytes of Data memory. i.e. eeprom.Corrected DIV32 command with 16-Bit (18F) devices.Corrected Bit = Bit operation when Bit variables are in differing RAM banks with 16-Bit (18F) devices.Corrected Dword <= 511 comparison with 16-Bit (18F) devices.Corrected ABS operation of a Byte variable.Corrected Shift Right and Shift Left operations where the amount of shifts is held in the same variable as the result. i.e. BYTEOUT = ByteIn >>BYTEOUT.Corrected inapropriate complementing of constants within comparisons following legitimate negative comparisons.Corrected some code page switching issues with 12-Bit and 14-Bit core devices.Corrected CWRITE block write for 16-Bit core (18F) devices.Corrected HRSIN with some devices containing 2 USARTs.Corrected identification of hardware PWM within P16F864.INF and 16F865.INF files.

KNOWN ISSUESCompiler does not complain with a syntax error If a quoted string of characters is used within an expression and is not the first part. This will produceno code for the expression.STR and STRN accept multiple parameters but do not produce the correct code If STR or STRN are used as parameters before a quoted characterstring, or value.

The Optimiser for 14-Bit (16F) devices still has a few problems when using optimisation levels greater than 1 On some large programs. However, the16-Bit (18F) optimiser works as expected.A deeply nested inline command as a LOOKUPL parameter will cause an internal stack underflow error.

String concatenations where the assignment string is also one of the operators after the first operator will produce an incorrect assignment result.

Page 51: Proton Correction Proton and Proton24 Additions Proton ...

For example: -

String1 = "TEXT"String1 = "1234" + String1will leave String1 holding "12341234TEXT"

The workaround is to assign String1 to a temporary string first: -

String1 = "TEXT"Temp_String = String1String1 = "1234" + Temp_String

Additions, amendments and fixes made in version 3.2.4.5 of the PROTON+ Compiler. (9th February 2006)

ADDITIONSAdded Declare: -

Declare FLoat_Rounding = On or Off, 1 or 0, True or False

This will disable or enable floating point rounding.The default If the Declare is not used in the program is Floating Point Rounding On.

Added statements Config_Start and Config_End to encompass the new CONFIG directives for 18F devices: -

Config_Start OSC = HS ' Oscillator Selection HS OSCS = Off ' Osc. Switch Enable Disabled PWRT = On ' Power-up Timer Enabled BOR = Off ' Brown-out Reset Disabled BORV = 25 ' Brown-out Voltage 2.5V WDT = Off ' Watchdog Timer Disabled WDTPS = 128 ' Watchdog Postscaler 1:128 CCP2MUX = On ' CCP2 MUX Enable (RC1) STVR = Off ' Stack Overflow Reset Disabled LVP = Off ' Low Voltage ICSP Disabled DEBUG = Off ' Background Debugger Enable Disabled CP0 = Off ' Code Protection Block 0 Disabled

Page 52: Proton Correction Proton and Proton24 Additions Proton ...

CP1 = Off ' Code Protection Block 1 Disabled CP2 = Off ' Code Protection Block 2 Disabled CP3 = Off ' Code Protection Block 3 Disabled CPB = Off ' Boot Block Code Protection Disabled CPD = Off ' Data EEPROM Code Protection Disabled WRT0 = Off ' Write Protection Block 0 Disabled WRT1 = Off ' Write Protection Block 1Disabled WRT2 = Off ' Write Protection Block 2 Disabled WRT3 = Off ' Write Protection Block 3 Disabled WRTB = Off ' Boot Block Write Protection Disabled WRTC = Off ' Configuration Register Write Protection Disabled WRTD = Off ' Data EEPROM Write Protection Disabled EBTR0 = Off ' Table Read Protection Block 0 Disabled EBTR1 = Off ' Table Read Protection Block 1 Disabled EBTR2 = Off ' Table Read Protection Block 2 Disabled EBTR3 = Off ' Table Read Protection Block 3 Disabled EBTRB = Off ' Boot Block Table Read Protection DisabledConfig_End

The configs shown above are for the 18F452 device and differ from device to device.An complete list of CONFIG fuse settings can be found in the "PIC18-Config-Settings-Addendum_51537e.pdf" file downloadable fromwww.microchip.com.

The text between Config_Start and Config_End will have the preceding CONFIG text added and is passed directly to the assembler.Any errors in the fuse setting texts will result in Assembler errors being produced.

AMENDMENTSOptimiser now picks up the date and version from the compiler. This saves having to build a new optimiser for every version update.Optimised expression Byte = CONSTANT >> Byte for 18F devices.Optimised expression Word = Byte + CONSTANT for all devices.Optimised expression Word = Byte - CONSTANT for all devices.Optimised Boolean condition Byte = CONSTANT for all devices.Register ADCON1 is not manipulated for All_Digital with 16F676 device.

FIXESCorrected inapropriate use of the mnemonic MOVLW 0 instead of CLRW.Corrected error produced from decimal point placed within a quoted string of characters within a condition. i.e. If String = "HELLO.THERE"

Page 53: Proton Correction Proton and Proton24 Additions Proton ...

Then.Corrected P18F8722.INF and P18F8722.LPB files.Corrected Boolean condition Byte != 0. i.e. when used with AND or OR within an If-Then condition.Corrected code memory access with devices that have registers EEADR and EEDATA in RAM bank 1. i.e. 16F688 etc...Corrected missing or misspelled HLVDCON register from some INF and LPB files. Compiler now recognises HLVDCON or LVDCON.DELAYUS command now creates the correct code for constant expressions as the delay time.Corrected compiler error If an inappropriate keyword is used within a condition.Corrected wrong XTAL frequency error and wrong numeric value translation.Corrected the HBUS commands for use with the 18F4XXX devices, and 18F2XXX devices, and possibly others.This anomaly occurred because Microchip blundered with the MSSP module for the newer 18F devices, and existing code for I2C master did notoperate correctly without their workarounds implemented.See the 18F4520 errata datasheet for other anomalies concerning the MSSP module. downloadable from www.microchip.com

KNOWN ISSUESCompiler does not complain with a syntax error If a quoted string of characters is used within an expression and is not the first part. This will produceno code for the expression.STR and STRN accept multiple parameters but do not produce the correct code If STR or STRN are used as parameters before a quoted characterstring, or value.

The Optimiser for 14-Bit (16F) devices still has a few problems when using optimisation levels greater than 1 On some large programs. However, the16-Bit (18F) optimiser works as expected.A deeply nested inline command as a LOOKUPL parameter will cause an internal stack underflow error.

String concatenations where the assignment string is also one of the operators after the first operator will produce an incorrect assignment result.For example: -

String1 = "TEXT"String1 = "1234" + String1will leave String1 holding "12341234TEXT"

The workaround is to assign String1 to a temporary string first: -

String1 = "TEXT"Temp_String = String1String1 = "1234" + Temp_String

Page 54: Proton Correction Proton and Proton24 Additions Proton ...

Additions, amendments and fixes made in version 3.2.0 of the PROTON+ Compiler. (17th January 2006)

ADDITIONSAdded support for the 18F66J10 device, more J parts to follow.Added error message If Stack_Size is larger than 127 bytes. This is because command POP uses the PLUSW2 mnemonic, which is 2's complement inoperation.

AMENDMENTSNo manipulation of the TBLPTRU register is carried out with 18F devices that don't contain more than 64K bytes of code memory, thus saving codespace.However, the compiler does clear the TBLPTRU register before the main program starts, because some PICmicros cannot guarantee that it is clearedat reset.If a user ASM section alters the TBLPTRU register, remember to clear it before entering back into BASIC code.To access the upper 64K of a larger PICmicro device from BASIC, issue the Declare: -

ACCESS_UPPER_64K = 1 or 0, True or False, On or Off

However, this will increase code size considerably, as the TBPLTRU register will be manipulated at all times.The compiler will give a warning If the 64K code memory barrier is breached.

FIXESCorrected omission of EEADRH register in 18F2525 and 18F4545 INF and LPB files.Corrected and optimised expression Byte = Byte >> Byte, where any of the variables are in differing RAM banks On 18F devices.Corrected and optimised expressions Word = Word * 512, Word = Word * 1024, and Word = Word * 2048 On 18F devices.Corrected and optimised expressions Word = Byte * CONSTANT, where num contains a value other than 1 in its high Byte On 18F devices.Corrected and optimised expression BYTEOUT = CONSTANT << ByteIn, where BYTEOUT and ByteIn are the same variable On 18F devices.Fixed incorrect recognition of compiler keywords wrapped in quotes with a Gosub containing parameters.

Additions, amendments and fixes made in version 3.1.9 of the PROTON+ Compiler. (11th January 2006)

ADDITIONSNone

AMENDMENTSNone

Page 55: Proton Correction Proton and Proton24 Additions Proton ...

FIXESNone

Note. This version has been created in order to overwrite a corrupted file download of version 3.1.8.

Additions, amendments and fixes made in version 3.1.8 of the PROTON+ Compiler. (4th January 2006)

ADDITIONSAdded Crystal frequency 22.1184MHz for 14-Bit (16F) and 16-Bit (18F) devices. Use XTAL = 22.Added a new Declare to indepedently set the baud rate of RSOUT. Declare RSOUT_BAUD = n.

AMENDMENTSOptimised Byte arrays with less than 128 elements when using 16-Bit (18F) devices.Moved the offset size for the Declare PROTON_START_ADDRESS to the amount of code memory contained within the PICmicro.

FIXESFixed recognition of PAUSE, PAUSEUS, DEBUG, DEBUGIN, and LCDOUT for PBP compatability.Fixed String = BYTE_ARRAY[INDEX] construct.Fixed stray negation of expression results within a condition.Fixed Floating point LOG subroutine.

Additions, amendments and fixes made in version 3.1.7 of the PROTON+ Compiler. (12th December 2005)

ADDITIONSAdded support for devices: -18F6310, 18F6390, 18F6410, 18F6490, 18F6520, 18F6525, 18F6621, 18F6622, 18F6627, 18F672218F8310, 18F8390, 18F8410, 18F8490, 18F8520, 18F8525, 18F8621, 18F8627, 18F8722

Added Declare PROTON_START_ADDRESS for 16-Bit core (18F) devices.This offsets the library file to the designated address: -

Declare PROTON_START_ADDRESS = $0800 ' Start at address $0800

This allows bootloaders etc to be located at the bottom of code memory.

Page 56: Proton Correction Proton and Proton24 Additions Proton ...

AMENDMENTSAdded 4_FOSC, 16_FOSC, and 64_FOSC to ADIN_TAD Declare.Removed the IDE bitnames texts from the INF files.

FIXESFixed 18F8720 INF and LPB files.Fixed PORTE definition in 16F737.INF file.Fixed typo in file OPT_LD16.INCFixed address offset error when aliasing a string or an array to another string or array.Fixed ASM code for expression Word = Byte << CONSTANT.Fixed the Then not found error when a Quoted String of Characters contained an inline command's text within an If-Then construct.Fixed analogue channels greater than 7 with Adin command On 14-Bit core devices.Fixed SEROUT with arrays that cross BANK boundaries On 14-Bit core devices.

Additions, amendments and fixes made in version 3.1.6 of the PROTON+ Compiler. (19th September 2005)

ADDITIONSNone

AMENDMENTSAdded an 8x8 division subroutine for programs that only operate On Byte variables.This will be overridden by the 16x16 division subroutine If the later is used, or modulus is used.You must remember that some commands use the 16x16 division subroutine internally such as Print, HPWM etc,so this will override the 8x8 subroutine to Save code memory at the sacrifice of a little speed.Optimised the method used to pass Byte variables to the 16x16 division subroutine.Optimised (for speed) some SHIFT, DIVIDE and MULTIPLY operations with 16-Bit core (18F) devices.

FIXESFixed some warning messages that simply displayed a number instead of a message.Fixed some comparisons for correct bank switching.Fixed Complement and Negation of array assignments. i.e. VARIABLE = ~ARRAY[INDEX].Fixed aliasing to a SYSTEM variable.Fixed Spelling mistake NOLOST instead of NOLIST in file OPT_LD16.INCFixed INF files for 12F629, 12F683, 16F737, 16F747, 16F767, 16F777, 18F2539, 18F2620, 18F4525, 18F4539, 18F4620

Page 57: Proton Correction Proton and Proton24 Additions Proton ...

Additions, amendments and fixes made in version 3.1.5 of the PROTON+ Compiler. (11th August 2005)

ADDITIONSNone

AMENDMENTSNone

FIXESFixed For-Next loop with negative step using Byte variables or 8-Bit constants.Fixed For-Next loop with Byte variables and constant values 0 TO 255.

Additions, amendments and fixes made in version 3.1.2 of the PROTON+ Compiler. (26th July 2005)

ADDITIONSAdded release version of the optimiser with 6 levels. Still rather experimental but seems to work well.Added Declare LCD_COMMANDUS to choose the delay (in microseconds) between commands sent to an alphanumeric LCD.Added Declare LCD_DATAUS to choose the delay (in microseconds) between Data sent to an alphanumeric LCD.Added support for RF12F675, 16F716, 16F785, 16F685, 16F687, 16F689, 16F890, 16F913, 16F914, 16F915, 16F91618F2580, 18F4580

AMENDMENTSPrinting or serial transmission of quoted strings of characters On devices that canaccess their own code memory now places the ASCII text in code memory as a string of text.INCLUDE directive is now able to place the exact path of an INCLUDE file. i.e. INCLUDE "C:\MY_PROGRAMS\TEST.INC"Tightened If-Then-ELSE-ENDIF syntax checking.All_Digital can now be used as an actual Declare or compiler directive.

FIXESFixed error checking for casting a constant value's alias.Fixed OSCCAL address for 16F630 and 16F676.Fixed reference to RE3 with devices: - 18F2220, 18F2320, 18F2331, 18F2431, 18F2439, 18F2455, 18F252018F2525, 18F2539, 18F2550, 18F2585, 18F2620, 18F2680.Fixed Adin command with 12F683.Fixed recognition of the RF12C509 device.

Page 58: Proton Correction Proton and Proton24 Additions Proton ...

Fixed EEADRH register recognition with 18F4620 device.Fixed "Command terminated incorrectly" error when an expression wrapped in parenthasisfollows a quoted string of characters in commands HSEROUT, and RSOUT.Fixed internal alias addressingFixed TOUPPER and TOLOWER functions

Additions, amendments and fixes made in version 3.08 of the PROTON+ Compiler. (11th April 2005)

ADDITIONSAdded an optimising pass in the compiler.The optimiser has 3 levels enabled by the Declare: -

OPTIMISER_LEVEL = 0, 1, or 2

Level 0 Disables the optimiserLevel 1 Re-arranges Page boundary settings with 12 and 14-Bit core devices and chooses appropriate mnemonics for 16-Bit core devices.Level 2 Manipulates the way some conditional jumps are performed On all devices.

The compiler defaults to the optimiser DISABLED.

Note that the optimiser is still a Beta version.

If you experience any difficulties that are a direct result of using the optimiser please contact me at [email protected] please ensure that it is the optimiser at fault before doing so.

AMENDMENTSNone

FIXESNone

Additions, amendments and fixes made in version 3.07 of the PROTON+ Compiler. (29th March 2005)

ADDITIONSAdded support for a Toshiba T6963 graphic LCD of any size up to 256 x 256 pixels.Added TOSHIBA_COMMAND command for the above Toshiba LCD.

Page 59: Proton Correction Proton and Proton24 Additions Proton ...

Added TOSHIBA_UDG command for the above Toshiba LCD. This allows User Defined Graphics to be created.Added TEXT modifier to LCDREAD in order for it to read Text Data from a Toshiba LCD.Added USB 2.0 commands for suitable 18F devices.Added support for 18F2520, 18F4520, 18F2455, 18F2550, 18F4455, 18F4550 devices.

AMENDMENTSAltered the way String variables hold a Byte or a Byte array variable. Now, instead of the Byte variablebeing used as a pointer, the contents of the variable will be placed within the String. However, Word, and Dword variables willstill be used as pointers. This only applies to String loading and concatenation.

When using a String variable within commands SERIN, HSERIN, HSERIN2 and RSIN, either a CR (13) or a NULL (0) will terminate the string.This allows a terminal program to be used to load a String variable, and terminate when the Return key is detected.Note that the CR (Carriage Return) value (13) will NOT be placed within the String, and it will be replaced by a NULL (0).

Altered the mnemonics produced by All_Digital for the 16F87 and 16F88 devices. It does not alter ADCON1 now.Altered the LINE and CIRCLE commands library subroutines for larger resolution graphic LCDs.PUSH and Gosub with parameters can now push a pointer to an array: -

PUSH ARRAY

If an array without an index is used in POP, the contents of the pushed array will be copied into the destination array: -

POP ARRAY

FIXESFixed Float = Float + Byte expression not finding system variable PPZ.Fixed Context Saving\Restoring of FSR1L\H when String variables are declared within a program.Fixed MCLRE_OFF fuse value for devices 18F1220 and 18F1320.Fixed mnemonic NEGF not being recognised.Fixed assembler label PRT@MTL2 not being found when printing a quoted string of characters with an 18F device.Fixed CLEAR Word array when using an 18F device.Fixed wrong variable name error being produced with array variable names over 20 characters used within expressions.Fixed TXSTA and SPBRG bank selection with certain 14-Bit core devices.Fixed bank selection for hardware registers starting at address 0X0F60 with 16-Bit core devices.Fixed EEPROM access using the ESTR modifier when PICmicro has eeprom larger than 256 bytes.Fixed final program Byte count with 16-Bit core devices when eeprom Data is an uneven amount.

Page 60: Proton Correction Proton and Proton24 Additions Proton ...

Amendments and fixes made in version 3.06 of the PROTON+ Compiler.

AMENDMENTSAltered default CONFIG fuses of devices 18F2410, 18F2525, 18F2610, 18F2620, 18F4410, 18F4525, 18F4610, and 18F4620to Enhanced Instruction Set Off, and PORTB 0-4 digital mode On reset.

FIXESFixed Word Arrays when loaded with the value 0.Fixed PPRINT not finding some system variables.

Amendments and fixes made in version 3.05 of the PROTON+ Compiler.

AMENDMENTSAdded C language type formatters to a quoted string of characters: -

\a Bell (alert) character $07\b Backspace character $08\f Form feed character $0C\n New line character $0A\r Carriage Return character $0D\t Horizontal tab character $09\v Vertical tab character $0B\\ Backslash $5C\" Double quote character $22

Example: -

Print "HELLO WORLD\n\r"

Altered the way macros handle quoted strings of characters for 14 and 16-Bit core devices.CLEAR command now clears (resets to 0) all of an array If the array's name is used without the square braces: -

CLEAR ARRAY NAME

Page 61: Proton Correction Proton and Proton24 Additions Proton ...

SET command now fills (sets to 255 or 65535) all of an array If the array's name is used without the square braces: -

SET ARRAY NAME

Compiler now recognises an empty quoted string of characters and will place a NULL in the string where found: -

String1 = "" + "HELLO"

relates to: -

String1 = 0,"H" "E" "L" "L" "O"

The above line would be nonsense as the NULL would terminate the string and any characters after it will be ignored.

When used within a comparison, a value of 0 will be used.

If String1 = "" Then STOP

relates to: -

If String1#0 = 0 Then STOP

Optimised RSIN, HRSIN, HSERIN STR modifier when using a 16-Bit core device.

ADDITIONSAdded SONYIN command to receive Sony SIRC infrared remote control Data.Added RC5IN command to receive Philips RC5 infrared remote control Data.Added special detection of 16F87 and 16F88 config settings. This sets CONFIG1 only.Added support for devices 18F6585, 18F6680, 18F8585, and 18F8680

FIXESFixed Return parameter from Gosub when the parameter is a Byte array.Fixed POP command when the parameter is a Byte array.Fixed STR modifier when used with BUSIN and HBUSIN (also optimised it's operation On 16-Bit core devices).Fixed compiler lockup when extra characters are used after a "Then label" type If-Then operation.Fixed the AT modifier with certain expressions.Fixed the 16F872.INF file that stated the device had a USART.

Page 62: Proton Correction Proton and Proton24 Additions Proton ...

Fixed the 18F248, 18F448, 18F258, 18F458 INF files that incorrectly assigned ADCON2.

Amendments and fixes made in version 3.0 of PROTON+ Compiler.

AMENDMENTSAdded Compact Flash interfacing commands, CF_INIT, CF_SECTOR, CF_READ, and CF_WRITE.Increased the speed of compilation.Optimised some shift operations.Optimised LREAD command with 16-Bit core devices.Optimised Array operations with 16-Bit core devices.Optimised Integer ORing when using constants.Optimised Integer ANDing when using constants and bits.Optimised Negation of variables.Altered Error message format for For without Next, and MACRO without ENDM.Compiler now shortens the path of the BASIC file If more than 62 characters are detected.It Then tests the shortened path and filename to see If these exceed 62 characters before an error is produced.Added extra info to the .INF files in order to allow conditional syntax highlighting in the new editor.Added DT_MCHP_FLOAT,4 and DT_String to the .LST file for use with the ISIS simulator.Added support for the 10F20x 6-pin PICmicro devices and 12F508, 12F509 8-pin flash PICmicro devices.Added support for the 18F2545, 18F4545, 18F262, and 18F4620 PICmicro devicesAdded three extra commands for efficient reading of Ldata tables. These are: -LREAD8, LREAD16, and LREAD32. See helpfile for details.The compiler now builds the full path and filename internally, in order to compensate for MPLAB only sending the filename.This resulted in an error whenever a BASIC include file was used.The compiler will now automatically use BRANCH instead of BRANCHL when used On PICmicros with only 1 code page.

FIXESFixed LOOKDOWNL.Fixed LOOKUPL when using an array as the index variable.Fixed HSERIN/HRSIN when the assignment is a Byte array.Fixed double ASM label name DIG@LP error when using both Word and Dword DIG operator in the same program.Fixed bank boundary crossing WARNING messages.Fixed Dword expressions within comparisons.Fixed the length of entries for BRANCH, BRANCHL, On GOTO, On GOTOL, On Gosub, LookUp, LOOKUPL, LookDown, and LOOKDOWNL.Fixed SHOUT Data pin set to output.

Page 63: Proton Correction Proton and Proton24 Additions Proton ...

Fixed BUTTON auto repeat with 14-Bit core devices.Fixed 32-Bit multiply library subroutine.Fixed For-Next Word loops with the STEP value as a variable.Fixed FREQOUT with 16-Bit core devices.Fixed Shift Right operations from a Dword into a Byte or Word.Fixed 18F8720 recognition of USART2.Fixed recognition of ports H and J On the larger 18Fxxxx devices.Fixed HSERIN and HRSIN with a timeout label.Fixed Word to Byte multiply where the Assignement Word variable is the same as the Expression Word variable. With 16-Bit core devicesi.e.WordOut = WordOut * ByteIn

and

WordOut = ByteIn * WordOut

Fixed Float into Word or Byte array assignments. i.e. MYARRAY[1] = FloatFixed LookUp, LOOKUPL, LookDown, LOOKDOWNL when using PBP or STAMP syntax.Fixed Variable declaration when using PBP or STAMP syntax.Fixed All_Digital command for 12F675, 12F629, 12F683, 16F630, 16F676.Fixed anomaly with DELAYMS On 16-Bit core devices.Fixed compiler giving PROTECTED COMMAND error when not applicable.Fixed ABS function when used with floating point variables On a 16-Bit core device.Fixed SLEEP command with a parameter following it.Fixed floating point constants used with Symbol. Now accepts a value without a preceding zero for fractional values.Fixed Negation of a floating point variable.Fixed the AT modifier with RSOUT.Fixed Float to Word conversion for 14-Bit core devices.Fixed SEROUT with flow control On 16-Bit core devices.Fixed Dword addition with a Word variable On 16-Bit core devices:- Dword = Dword + WordFixed Floating Point Greater Than, Less Than, Greater or Equal, Less or Equal comparisons in boolean conditions.Fixed REPEAT-UNTIL condition checking when used On a single line.

Changes, fixes and additions made in version 2.2.0 BETA 8 of PROTON+ Compiler.

AMENDMENTS

Page 64: Proton Correction Proton and Proton24 Additions Proton ...

The compiler is now split into two entities. The loader and the compiler.The loader incorporates any include files, sorts variables and labels. Extracts the PICmicro device,checks for valid compiler files, Then sends the resultant parsed code to the compiler's second executable.

This opens the door to having three seperate executables for the 12, 14, and 16-Bit core devices.Which will streamline the operation of the compiler, and also allow newer architecture devices, such as the dsPICs.

Error, Reminder, and Warning messages now contain the full path name of the offending file.

The Loader now produces an error If the BASIC filename's path is deeper than 62 characters.This is an issue with the MPASM assembler and not the compiler.

At long last, the MPASM assembler is able to handle long filenames, so the compiler now passes long filenames to the assembler.This means that any ancillary files produced by the compiler and assembler will also be the same.

When the compiler is used within MPLAB, it will compile for the PICmicro chosen in MPLAB's IDE and ignore anyDEVICE commands within the BASIC program.

FIXESFixed BUTTON auto repeat with 14-Bit core devices.

Changes, fixes and additions made in version 2.2.0 BETA 7 of PROTON+ Compiler.

AMENDMENTSMost General syntax Errors are now reported On pass 3 of the compiler instead of pass 4. With all devices.Added warning of default Byte size If the AS keyword is missing from a DIM statement.

FIXESFixed LookUp and LOOKUPL with 16-Bit core devices.Fixed HSERIN and HRSIN with a timeout label.Fixed Word to Byte multiply where the Assignement Word variable is the same as the Expression Word variable. With 16-Bit core devicesi.e.WordOut = WordOut * ByteIn

and

Page 65: Proton Correction Proton and Proton24 Additions Proton ...

WordOut = ByteIn * WordOut

Fixed Float into Word or Byte array assignments. i.e. MYARRAY[1] = Float

Changes, fixes and additions made in version 2.2.0 BETA 6 of PROTON+ Compiler.

ADDITIONSAdded reminder whenever variable or constant declarations are recognised as PBP or STAMP syntax.Added compatability for device 12F683.

FIXESFixed LookUp, LOOKUPL, LookDown, LOOKDOWNL when using PBP or STAMP syntax.Fixed Variable declaration when using PBP or STAMP syntax.Fixed All_Digital command for 12F675, 12F629, 12F683, 16F630, 16F676.

Changes, fixes and additions made in version 2.2.0 BETA 5 of PROTON+ Compiler.

AMENDMENTSFloating point expressions will now always calculate as floating point whenever a Float type variable is the assignment.Even If the expression variables are not Float types.

FIXESFixed anomaly with DELAYMS On 16-Bit core devices.Fixed compiler giving PROTECTED COMMAND error when not applicable.Fixed ABS function when used with floating point variables On a 16-Bit core device.

Changes, fixes and additions made in version 2.2.0 BETA 4 of PROTON+ Compiler.

ADDITIONSAdded support for 3.58MHz and 14.32MHz (3.58 * 4) crystals. Use XTAL = 3 or XTAL = 14 accordingly.

Changes, fixes and additions made in version 2.2.0 BETA 3 of PROTON+ Compiler.

ADDITIONS

Page 66: Proton Correction Proton and Proton24 Additions Proton ...

Added On GOTO and On GOTOL commands. These have the same funtionality as BRANCH and BRANCHL but aremore in-keeping with standard BASIC syntax.Added On Gosub for 16-Bit core devices. This Calls a subroutine based On an indexed value.Added new devices. 16F684, 16F688, 16F737, 16F747, 16F767, 16F777, 18F2439, 18F4439, 18F2539, 18F4525, 18F4539

AMENDMENTSUpdated the Help File in order to correct some typos.

FIXESFixed string comparisons where the contents of a quoted string of characters contains a keyword's text.

Changes, fixes and additions made in version 2.2.0 BETA 2 of PROTON+ Compiler.

AMENDMENTSThe compiler now recognises empty quotes as a space when used in strings. i.e.

String1 = ""

Altered the way Data memory is presented in the .PBP file. Allowing correct alignment in the HEX file for 16-Bit core devices.

FIXESFixed the access violation anomaly when quoted character strings of approximately 50 characters are used.Fixed an internal error produced when lines of code are extremely long. i.e over 500 characters.

IMPORTANT NOTICEThe compiler is now compiled using Borland Builder C++ version 6.0, in order to increase its speed and allow extra functionality.However, this does mean that the compiler may not work with a 486 microprocessor, a minimum requirement is a Pentium.It also means that it may not be compatible with Windows 95 and Windows 98 (First Edition).This is a necessary change in order to keep up with current technologies.

Changes, fixes and additions made in version 2.2.0 BETA 1 of PROTON+ Compiler.

ADDITIONSAdded PUSH command. For 16-Bit devices only. PUSH can also push multiple parameters: -

PUSH Var1 , Var2 , etc.

Page 67: Proton Correction Proton and Proton24 Additions Proton ...

Added POP command. For 16-Bit devices only.Added parameters to the Gosub command when using a software stack. For 16-Bit devices only: -

Gosub LABEL [Var1 , Var2, etc]

Gosub also returns a variable from the stack: -

Gosub LABEL [Var1 , Var2] , RET_VAR

It can also Return a value without passing any parameters by placing two empty square brackets after the label name: -

Gosub LABEL [] , RET_VAR

Added a parameter to Return in order to push a variable to the stack before returning from a subroutine. For 16-Bit devices only: -

Return RET_VAR

Added Stack_Size Declare in order to reserve memory at the top of RAM to be used by PUSH, POP and Gosub/Return with parameters: -

Stack_Size = Amount of bytes to reserve.

Added String variables. For 16-Bit devices only. Declared using the syntax: -

DIM String's Name AS String * 20

The value after the asterisk determines the length of the string.

Added MID$, LEFT$, RIGHT$. For 16-Bit devices only.Added LEN and STRCMP. For 16-Bit devices only.Added TOUPPER and TOLOWER for Strings with 16-Bit core devices only. They convert uppercase to lowercase and vice-versa.Added SBREAK to use the BRA mnemonic instead of the GOTO mnemonic with 16-Bit core devices.Added a second method of displaying floating point values. This allows more accurate and larger numbers to be displayed but requires more memory.However it does operate much faster than the standard routine.Enabled/Disabled by Declare Float_Display_Type LARGE/STANDARD.If the Declare is not issued within the program, the default is the STANDARD display routine.

Page 68: Proton Correction Proton and Proton24 Additions Proton ...

Added floating point EXP function for 16-Bit core devices.Added floating point POW function for 16-Bit core devices.

Added ESTR modifier to allow character strings to be displayed or transmitted that are stored in Data memory. Same functionality and syntax as theCSTR modifier.

Example: -String1 Edata "HELLO WORLD",0Print ESTR String1

Added the ability for PROTON+ to be integrated into MPLAB IDE, Version 6.40 onwards. More info to follow.

Added support for new PICmicro devices: -

16CE625, 16F87, 16F88

AMENDMENTSAdded extra functionality to WAIT modifier. It can now wait for a series ofvariables or values seperated by commas. i.e. WAIT (65,66,67).

Context Save/Restore now saves/restores the FSR1 register as well as FSR0 If strings are used in the programand also saves/restores FSR2 If a STACK is set up. For 16-Bit devices only.These can be enabled/disabled by using the FSR_SAVE Declare

Ammended P16F870.LPB file with TMRL1LH, ADRESLH and CCPR1LH for combining registers.

Improved floating point accuracy.

Added clock frequencies 25, 32, 40 and 64 for 14-Bit core devices when using the Xilinx FPGA model.This devices is named 16X76.

Added the ability for RSOUT, Print, HRSOUT etc to automatically output a string held in CODE memorywhenever they encounter a LABEL name within their parameters. This is the same functioanlity to using CSTRbut without placing the CSTR text in front of the label. This only applies to devices that canread/modify their own code memory. i.e. 16F87x and 18Fxxx: -

Page 69: Proton Correction Proton and Proton24 Additions Proton ...

Print LABEL

LABEL: Cdata "HELLO WORLD" , 0

Altered the way quoted strings are displayed On an LCD with 16-Bit core devices.The string is now placed in high memory as a Data table, and a subroutine scansand displays the characters. This can Save many hundreds of bytes of code memorywith large programs.

Altered the way SEROUT, RSOUT, HRSOUT, HSEROUT, HRSOUT2 and HSEROUT2 send variables.Instead of simply sending a single Byte, all the elements of the variable are sent.For example, a Word variable will send 2 bytes, the low Byte Then the high Byte.A Dword or a Float variable will send 4 bytes, again, low Byte first.

Also altered the way SERIN, RSIN, HRSIN, HSERIN, HRSIN2 and HSERIN receive variables.Instead of simply receiving a single Byte, all elements of a variable type will be received.For example, a Word variable will expect to receive 2 bytes, the low Byte Then the high Byte.A Dword or a Float variable will expect to receive 4 bytes, again, low Byte first.

Added another formatter for Edata, Cdata and Ldata. If all the values are required to have the same Byte countan AS keyword can be used: -

Cdata AS Word 1,100,100

Formatters are Byte, Word, Dword, and Float.

Improved ICD2 support for the compiler.The Declare, ICD_REQ = True will reserve the correct amount of memory within the PICmicro.

FIXESFixed SLEEP command with a parameter following it.Fixed floating point constants used with Symbol. Now accepts a value without a preceding zero for fractional values.Fixed Negation of a floating point variable.Fixed the AT modifier with RSOUT.Fixed Float to Word conversion for 14-Bit core devices.Fixed SEROUT with flow control On 16-Bit core devices.

Page 70: Proton Correction Proton and Proton24 Additions Proton ...

Fixed Dword addition with a Word variable On 16-Bit core devices:- Dword = Dword + WordFixed Floating Point Greater Than, Less Than, Greater or Equal, Less or Equal comparisons in boolean conditions.Fixed REPEAT-UNTIL condition checking when used On a single line.

KNOWN PROBLEMSCompiler does not complain with a syntax error If a quoted string of characters is usedwithin an expression and is not the first part. This will produce no code for the expression.STR and STRN accept multiple paramters but do not produce the correct code If STR or STRN are used as parameters before a quoted characterstring, or value.

Changes and additions made in revised version 2.1.3 of PROTON+ Compiler.

Fixed HPWM duty cycle anomaly.Fixed 32-Bit subtraction anomaly On 16-Bit core devices.Also optimised both subtraction and addition routines using 16-Bit core specific mnemonics.Fixed expressions in Cdata with 16-Bit core devices.Fixed ABS with 32-Bit expressions and Float expressions.Fixed floating point being enabled when SIN used On a 14-Bit core device.Fixed LookUp, LOOKUPL, LookDown, LOOKDOWNL when using two consecutivecommands with differing array variable types.Fixed All_Digital directive with 12F629 device.Fixed Compiler lock up with a comment On the same line as CALL

Added Identifying names for Edata addressing.Added command RESET_BANK to manually force the RAM bank to zero.Added command SET_BANK to manually set the RAM bank of a variable.Added new Declare to enable/disable RAM bank resets On all BASIC labels.

LABEL_BANK_RESETS = On/Off or True/False or 1/0

Added new Declare to enable/disable compiler reminders.

REMINDERS = On/Off or True/False or 1/0

See the help file for more details.

Page 71: Proton Correction Proton and Proton24 Additions Proton ...

Changes and additions made in revised version 2.1.1 of PROTON+ Compiler.

Fixed BANK switching anomaly when using single page PICmicro devices.Fixed subtraction expression in an array with no white spaces present.Fixed 16-Bit Greater than or Equal expression of constant value 65535.

Added new Declare to choose either ODD or EVEN parity when using SERIN and SEROUT.

SERIAL_PARITY = ODD-EVEN , 1-0

Fixed Code and Data memory windows in Editor. They now correctly show 14 and 16 Bit core device info.Added an ASCII area within Code and Data windows.Updated help file to include SERIAL_PARITY Declare, and fixed BUSIN reference to MSSP typo.

Changes and additions made in Released version 2.1 of PROTON+ Compiler.

Added LINETO command to draw a line starting from a previous LINE command's end position.Added Compile Then Download option to the editor. Pressing F12 initiates it, or use the OPTIONS menu.

Fixed STR modifier with 16-Bit core devices and arrays that cross over BANKA.Fixed intermittent lock-up If label names and variable names duplicated.Fixed aliasing parts of a larger variable. i.e

DIM DWD as DwordDIM Var1 as DWD.BYTE3DIM Var2 as DWD.BYTE2DIM Var1 as DWD.BYTE1DIM VAR0 as DWD.BYTE0

Fixed expressions in For-Next loops.

Optimised For-Next loops that use expressions.Added Graphic LCD Space Invaders game to the samples folder.Also added several macro examples to the samples folder.

Changes and additions made in version 2.1 Beta 6 of PROTON+ Compiler.

Page 72: Proton Correction Proton and Proton24 Additions Proton ...

Fixed Word arrays being loaded with Word arrays.Fixed Stack underflow error when expressions used as array index.Fixed Dword > Dword comparison.Fixed inline CASE constructs.Fixed Dword variable loaded with an array.Fixed floating point subtract by 0 with 14-Bit core devices.Fixed floating point ACOS.Fixed comment directly after certain commands (without spaces). Compiler now traps them succesfully.(but I still think it is bad programming practice).Fixed sign comparison warning message when not applicable.

Added ability to place labels in 14-Bit core Cdata tables.Thanks to Tim, the PPRINT subroutine is now available for 14-Bit core FLASH devices.

Replaced some warnings with reminders. Especially those concerning floating point SIN and COS.Updated help file with some information concerning interrupt Context saving/restoring with 16-Bit core devices.

I would like to take this opportunity to thank Tim Box for his On going support and invaluablehelp in improving the functionality of the compiler. My task would have been a lot harderwithout his insatiable appetite for experimenting, and his patience and eagerness to help others.

And I would like to thank all those who have spotted and reported anomalies.Without your constant vigilance the compiler would not be the programming aid that it is today.

I take my hat Off to you all!!!

PROTON Compiler Version 2.1 Beta 5 Fix's and Optimisations.

Fixed Adin with certain devices.Fixed LookDown for 16-Bit core devices.Fixed LOOKUPL when label names are used in the table.Fixed All_Digital directive with 12F675 device.Fixed expressions in CWRITE for 16-Bit core devices.Fixed CERASE for 16-Bit core devices.

Page 73: Proton Correction Proton and Proton24 Additions Proton ...

Optimised ASM code produced for REPEAT..UNTIL construct.Optimised ASM code produced for BRANCH and BRANCHL with 16-Bit core devices.Optimised graphic LCD library subroutines.Optimised floating point library for 16-Bit core devices.Various tweeks of existing commands and expression calculations.Updated Editor to match new KEYWORDS added.Updated help file to explain the new constructs.

Changes and additions made in version 2.1 Beta 5 of PROTON+ Compiler.

Added SELECT..CASE..ENDSELECT construct (see helpfile).Added ElseIf to If..Then construct (see helpfile).Added BREAK command to prematurely exit For..Next, REPEAT..UNTIL or WHILE..WEND loops.Added LINE command for graphic LCD.Added CIRCLE command for graphic LCD.Added BOX command for graphic LCD.Added HRSIN2, HRSOUT2, HSERIN2 and HSEROUT2 for 16-Bit core devices that contain a second USART.

Added floating point SIN for 16-Bit core devices.Added floating point COS for 16-Bit core devices.Added floating point TAN for 16-Bit core devices.Added floating point ATAN for 16-Bit core devices.Added floating point ACOS for 16-Bit core devices.Added floating point ASIN for 16-Bit core devices.Added floating point LOG for 16-Bit core devices.Added floating point LOG10 for 16-Bit core devices.Added floating point SQR for 16-Bit core devices.

Added VAL command to convert a string into an Integer.Added STR$ command to convert a value into a string.Added STRN command to create a null terminated character array. i.e. A string

Added Formatters for Data, Ldata, Edata, and 16-Bit core device Cdata tables.All the Data tables allow label names as entries.

Page 74: Proton Correction Proton and Proton24 Additions Proton ...

Added support for newer 16F and 18F devices (see helpfile for list).Added support for 16-Bit core PICmicros that contain up to 1K of Data (eeprom) memory.Added auto Context saving/restoring for 16-Bit core device interrupts (If required).

Added WARNINGS Declare to enable/disable compiler warnings (see helpfile).Added a reminder message On some messages that were previously warnings.

Added an error message If PCL, TOSL or TOSH is the destination of mnemonic MOVFF.If the compiler senses this internally, it will use the two part mnemonics: -

MOVFWMOVWF

and issue a warning that it is doing so. This should not be encountered in normal BASICprogamming, but could be If used for more advanced coding.

Added improved MACRO support (more details On this to follow).Incorporated Tim's PPRINT design into compiler's Print command (more details On this to follow).(This really has to be seen to be believed!).