f. Super speed microcontroller programmer software development kit (SDK)

There are many different Microchip microcontrollers. Now, the first 64-bit microcontroller programming application PIC Programmer v2.9.9 (x64) with source code is available from Downloads section. Super speed microcontroller programmer software development kit (SDK) only works with PIC18F2xJ50 firmware v2.5 or later and PIC18F26J50 firmware v2.7.8 or later for additional user functions support. The firmware is now available for PIC18F24J50 and PIC18F26J50 microcontrollers. Also available from Downloads section: PIC Programmer v2.9.9 x64 with source code which works with PIC18F2xJ50 firmware v2.5 or later.

SDK is based on previously undocumented SVLIB_PIC18F24J50 v2.1.NETn.dll and SVLIB_PIC18F24J50 v2.7c.st.NET4(x64).dll and functions. Please see subsection “5.A How to start programming” for the description of the basic DLL functions and programming techniques. Here are descriptions of EEPROM and flash RAM programming functions:

Function EnterICSPEEPROM(ICSP_entry_code as UInt64) as Integer

This function enables ICSP mode entry for Microchip PIC18FxxJxx family microcontrollers. These microcontrollers do not use the high voltage programming instead they enter program/verify mode while operating on normal power supply voltage. They use a special 32-bit code to prevent accidental entry into ICSP mode. PIC18FxxJ50 family ICSP entry code is: 4D434850 (hex).

Function CommandEEPROM(cmd as Byte, data as Uint16, delay as Byte) as Integer

This function contains all the necessary logic to send a command to a Microchip PIC microcontroller. Please, see Microchip programming documentation (www.microchip.com) for further information on programming the Microchip microcontrollers.

Function CommandResultEEPROM(cmd as Byte, delay as Byte) as Integer

This function contains a standard procedure enables reading data from a microcontroller flash RAM location. It is used for the verification purpose after the programming or to read a microcontroller configuration word that identifies the microcontroller.

Function WriteEEPROM(cmd as Byte, offset as Byte, cnt as Byte, delay as Byte) as Integer

Data is written to the microcontroller flash RAM in blocks. The length of the blocks depends on the length of a microcontroller write buffer (ex. PIC18F2xJ50 microcontrollers have 64 bytes of buffer, while PIC18F14K50 microcontroller has only 16 bytes). There is also a post write delay parameter that is used to initiate the write buffer to flash RAM programming sequence. The PIC18Fxxxxx write buffer is accessed through the USB control and status report operations. Each operation had a limited data space and two or more USB operations are needed to transfer 64 bytes to the microcontroller. Therefore offsetand cnt parameters are used to send a specified number of byte from the PC memory buffer to the PIC write buffer. The offset parameter enables correct positioning in the PC memory buffer.

Function ReadEEPROM(cmd as Byte, cnt as Byte) as Integer

This contains all the necessary logic to read one byte from a previously defined address in PIC flash RAM. The address is set using CommandEEPROM commands. See the sample PIC Programmer application in Downloads section for the details.

Function ReadBuffer(adr as Byte) as Integer

This function is used to read data from the PC buffer that is located in the DLL memory space to the user application buffer. See the sample PIC Programmer application in Downloads section for the details.

Function WriteBuffer(adr as Byte, data as Byte) as Integer

This function is used to write data to the PC buffer that is located in the DLL memory space to the user application buffer. See the sample PIC Programmer application in Downloads section for the details.

ALSO READ: User functions support