Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
projects:pickle [2017/01/11 17:30] darron [News] |
projects:pickle [2023/11/05 18:06] darron [ICSP interfaces] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Pickle Microchip PIC ICSP==== | + | ==== Pickle Microchip PIC ICSP ==== |
<wrap right> | <wrap right> | ||
- | {{: | + | {{: |
</ | </ | ||
- | Pickle | + | Pickle |
- | All systems support high voltage programming (HVP) of PICMicros with the Velleman K8048 or K8076 kits, however, | + | All operating |
- | Support is also available to program low voltage programming (LVP) compatible PICMicros directly from a Raspberry Pi version 1 or 2, OpenWRT enabled router or a USB UART adapter. Look for devices | + | Support is also available to program low voltage programming (LVP) compatible PICMicros directly from a Raspberry Pi, OpenWRT enabled router or an USB UART adapter. Look for PICMicros |
- | Please refer to the Microchip documentation for your device | + | Refer to the Microchip documentation for your PICMicro |
- | Currently supported | + | Currently supported |
- | In order to use the program in Windows | + | In order to use the program in Windows you must first install and setup Cygwin including the necessary development tools for building the application. See [[tools: |
Darron M Broad < darron at kewl dot org > | Darron M Broad < darron at kewl dot org > | ||
- | ~~UP~~ | + | <wrap right> |
=== News === | === News === | ||
+ | |||
<wrap right> | <wrap right> | ||
{{: | {{: | ||
</ | </ | ||
+ | |||
+ | Pickle version 5.0 has been released. This version changes how ICSP interfaces are configured in the configuration file. The changes do not affect the RPi but do affect the legagy Velleman K8048. | ||
- | Support | + | Programming executive support |
- | The repository also has support for programming the new PIC32MM 32-bit PICMicros. Currently the programming method used is slow and high speed programming with the programming executive is not available at this time. | + | <wrap right> |
- | + | ||
- | ~~UP~~ | + | |
=== Licence === | === Licence === | ||
+ | |||
Before you download and use the application you should read the [[: | Before you download and use the application you should read the [[: | ||
- | ~~UP~~ | + | <wrap right> |
- | === Credits and thanks | + | === History |
- | + | ||
- | + | ||
- | Pickle was originally written by Darron M Broad in 2005 as `k8048' | + | |
- | + | ||
- | Thanks go to Ian Stoyle who supplied a patch which added support for the 16F84 device which does not have a device id within its configuration. | + | |
- | + | ||
- | Kristoffer Myskja reported that he had great success with the Velleman K8048 on a laptop without serial I/O by using a cardbus serial interface. This is probably the best option for a laptop without a UART. | + | |
- | + | ||
- | Johan Ahlander notified me that the application worked fine in NetBSD. | + | |
- | + | ||
- | Working with keen linux user and PIC coder Paul Van Gelder I added support for the Velleman K8076 kit and 16F84A PICMicro. Thanks Paul! | + | |
- | + | ||
- | Many thanks to Chaitanya Rogers who donated money toward development and to acquire new PICmicros. All the PICMicros acquired with that donation are now supported, thank you. | + | |
- | + | ||
- | Thank you Josef Larsson for reporting that the 16F690 is compatible with this application using ICSP. This device may also be used in the Velleman K8048 14P socket with pins 8 to 13 unconnected. | + | |
- | + | ||
- | Thanks go to David Braithwaite as I now have a PIC18LF27J53 to investigate. This was sent free of charge with a RKP28sb PICMicro kit. This PICMicro isn't compatible with the Velleman K8048 but is usable in a direct connection to a Raspberry Pi with 3V3 low voltage programming. | + | |
- | + | ||
- | Thank you Gerhard Bertelsmann for adding erase support for the PIC18F26K80 and for development and testing of OpenWRT GPIO support with the Linux GPIO bit- bang driver kernel module. The PIC18F26K80 is one of a number of devices which are available to program using the LVP(KEY) | + | |
- | + | ||
- | I recently bought a PIC16F84 on Ebay for testing purposes. The seller | + | |
- | + | ||
- | Dustin Hoffman has reported that he has been using the PIC16F1503 device | + | |
- | + | ||
- | Thanks go to Manoj Mokashi for submitting a patch to add a clocked output mode on TxD for UARTS which cannot send a continuous break condition. This solution requires a T flip flop connected to TxD. | + | |
- | + | ||
- | Simon Casey added support for various high pin count PIC24 devices, see the supported list for more information. Thank you very much for your hard work and good luck with your various projects! | + | |
- | + | ||
- | Special thanks go to Steve Marchant who made a contribution which has been used to acquire an Orange Pi computer. Future development with the Orange Pi should occur whenever it arrives in 2017 and good luck Steve. | + | |
- | + | ||
- | Jim Gregory has reported great success with this program using [[projects: | + | |
- | + | ||
- | Lastly, thank you to Microchip for creating these versatile micro-controllers and also for their sample program which has supplied a third of the available and tested devices. | + | |
- | + | ||
- | ~~UP~~ | + | |
<wrap right> | <wrap right> | ||
{{: | {{: | ||
</ | </ | ||
- | === Supported interfaces === | ||
- | A number of back-end methods are built-in to program PICMicros. | + | Pickle was originally written by Darron M Broad in 2005 as `k8048' |
- | - The POSIX RS-232 serial protocol for the Velleman kits or USB UART adapter. | + | === Thanks === |
- | - The Raspberry Pi GPIO interface for the Velleman kits, direct to breadboard or the ChipKITPi. | + | |
- | - Linux MCP23017 I2C direct to breadboard. | + | |
- | - GPIO bit-bang driver for Linux direct to breadboard. | + | |
- | - The Banana Pi A20 GPIO interface direct to breadboard. | + | |
- | - FTDI bit-bang driver for Linux. | + | |
- | == POSIX RS-232 == | + | Special [[projects: |
- | This is available on every platform with a UART but due to the bit-bang | + | <wrap right> |
- | Testing with a standard UART has been done on FreeBSD and Linux, and for USB, a Prolific PL-2303 serial adapter has been tested on Linux by both myself an Fred Marquis. The PL-2303 has also been tested on MACOS/X by Tobias Braun who reported success (Thank you Tobias). | + | === ICSP interfaces === |
- | Although the Prolific PL-2303 device works, it is very slow in operation | + | Hardware with ICSP support. |
- | USB devices, such as the cp2102 serial interface in Linux can be used in the low voltage programming mode, see [[: | + | ^Device^Description^Speed^Data^ |
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
+ | |SYSFSGPIO|Linux SYSFS|Slow|Single data I/O| | ||
+ | |[[projects: | ||
+ | |[[projects: | ||
- | == Raspberry Pi GPIO == | + | (1) Memory mapped I/O on BPI can cause a lock-up on latest kernels. Use GPIO-BB instead. |
+ | (2) Board auto-detect does not work with newer Kernels. | ||
- | RPi GPIO requires voltage level shifters when connected to the Velleman | + | <wrap right>[[projects:pickle# |
- | For the [[: | + | === PICMicros === |
- | + | ||
- | For the PIC32 on the [[: | + | |
- | + | ||
- | == Linux MCP23017 I2C == | + | |
- | + | ||
- | Linux MCP23017 I2C is demonstrated on a RPi with a [[: | + | |
- | + | ||
- | == GPIO bit-bang driver for Linux == | + | |
- | + | ||
- | The GPIO bit-bang driver for Linux kernel module installation is documented [[projects: | + | |
- | + | ||
- | == Banana Pi A20 GPIO == | + | |
- | + | ||
- | See [[: | + | |
- | + | ||
- | == FTDI bit-bang == | + | |
- | + | ||
- | This utilises the FTDI library in Linux to bit bang the pins on a FTDI break out board. This uses an accelerated I/O mode and has only been tested to work with 8-bit PICMicros | + | |
- | + | ||
- | == Interface status == | + | |
- | + | ||
- | ^Hardware interface ^Status ^Device name | | + | |
- | |Motherboard 8250/16550 UART |Works well |Generic | | + | |
- | |PCI LGS GM16C550 UART |Works well (tested in Cygwin) |Intek21 PCI IO 2S-550 Board | | + | |
- | |MCT U232 USB serial converter |Not working |Targus PA088 | | + | |
- | |pl2303 USB serial converter |Works slowly |Best Connectivity (Dabs Value) | | + | |
- | |FTDI USB serial converter |Not working |ECS i-Buddie USB Dock | | + | |
- | |Raspberry Pi GPIO Velleman K8048 |Works well |74HC03 (voltage level shifting) | | + | |
- | |Raspberry Pi GPIO |Works well |Breadboard at 3V3 | | + | |
- | |Linux (R-PI) MCP23017 I2C |Works slowly |Slice of PI/O | | + | |
- | |Linux GPIO bit-bang driver |Works well |Breadboard at 3V3 | | + | |
- | |cp2102 USB serial converter (LVP) |Works slowly |BAITE betemcu.cn | | + | |
- | |Generic CH341 USB serial converter |Works slowly |QinHeng Electronics HL-340 USB-Serial adapter | | + | |
- | |Banana Pi A20 GPIO |Works well |Breadboard at 3V3 | | + | |
- | |FTDI bit-bang (LVP) |Works well |FTDI USB | | + | |
- | + | ||
- | ~~UP~~ | + | |
- | + | ||
- | === Supported PICMicro devices | + | |
<wrap right> | <wrap right> | ||
Line 146: | Line 82: | ||
</ | </ | ||
- | The following tables list all the supported | + | The following tables list all the supported |
[[: | [[: | ||
Line 162: | Line 98: | ||
[[: | [[: | ||
- | ~~UP~~ | + | <wrap right> |
- | === Tested | + | === Tested |
<wrap right> | <wrap right> | ||
Line 170: | Line 106: | ||
</ | </ | ||
- | The devices | + | The PICMicros |
+ | |||
+ | Code Y/N indicates whether an [[: | ||
- | The modes are as follows: | + | The three modes are as follows: |
* HVP. High voltage programming at 9 or 13V. | * HVP. High voltage programming at 9 or 13V. | ||
Line 178: | Line 116: | ||
* LVP(KEY). Low voltage programming with VPP at VDD and entry using a 32-bit key. | * LVP(KEY). Low voltage programming with VPP at VDD and entry using a 32-bit key. | ||
- | Test code indicates whether [[: | + | The legacy Velleman K8048/K8076 is incompatible with many modern devices and any advice is noted. |
- | New algorithm noted in the last column refers to the new PIC16F/18F programming algorithm incompatible | + | New algorithm noted in the comment |
with the older ICSP programming method. | with the older ICSP programming method. | ||
- | ^Test code ^Device name ^Added by ^Tested by ^HVP ^LVP(PGM) ^LVP(KEY) ^Velleman K8048 ^Comments | + | ^ Code ^ PICMicro |
|Y |PIC16F84A |Darron Broad |Paul Van Gelder |13 |N |N | | | | |Y |PIC16F84A |Darron Broad |Paul Van Gelder |13 |N |N | | | | ||
|Y |PIC16F627 |Darron Broad | |13 |5 |N | | | | |Y |PIC16F627 |Darron Broad | |13 |5 |N | | | | ||
Line 231: | Line 169: | ||
|Y |PIC16F1936 |Darron Broad | |9 |N |5 |VPP 9V. | | | |Y |PIC16F1936 |Darron Broad | |9 |N |5 |VPP 9V. | | | ||
|Y |PIC16F1847 |Darron Broad | |9 |N |5 |VPP 9V. | | | |Y |PIC16F1847 |Darron Broad | |9 |N |5 |VPP 9V. | | | ||
- | |Y |PIC18F25K50 |Darron Broad | |9 |N |5 |VPP 9V. | | | + | |Y |PIC18F25K50 |Darron Broad | |9 |N |5 | | | |
|Y |PIC18F14K50 |Darron Broad | |9 |5 |N |Incompatible (PGC/PGD 3V3 limit). | | | |Y |PIC18F14K50 |Darron Broad | |9 |5 |N |Incompatible (PGC/PGD 3V3 limit). | | | ||
|Y |PIC18LF27J53 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | |Y |PIC18LF27J53 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
Line 291: | Line 229: | ||
|Y |dsPIC33EV256GM102 |Darron Broad | |N |N |5 |VPP 5V. ICSP only. | | | |Y |dsPIC33EV256GM102 |Darron Broad | |N |N |5 |VPP 5V. ICSP only. | | | ||
|Y |PIC16F18346 |Darron Broad | |9 |N |5 |VPP 9V. not tested. | | | |Y |PIC16F18346 |Darron Broad | |9 |N |5 |VPP 9V. not tested. | | | ||
- | |Y |PIC16F15355 |Darron Broad | |9 |N |5 |VPP 9V. not tested. |New algorithm.| | + | |Y |PIC16F15355 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| |
- | |Y |PIC18F26K40 |Darron Broad | |9 |N |5 |VPP 9V. not tested. |New algorithm.| | + | |Y |PIC18F26K40 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| |
|Y |PIC16F18875 |Darron Broad | |9 |N |5 |VPP 9V. not tested. |New algorithm.| | |Y |PIC16F18875 |Darron Broad | |9 |N |5 |VPP 9V. not tested. |New algorithm.| | ||
+ | |Y |dsPIC33EP64GS502 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
+ | |Y |PIC24FJ256GA702 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
+ | |Y |PIC32MM0032GPL028 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
+ | |Y |dsPIC33EP512MC502 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
+ | |Y |dsPIC33EP128GS702 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
|N |PIC16F873A |Chris Williams | |13 |5 |N | | | | |N |PIC16F873A |Chris Williams | |13 |5 |N | | | | ||
|N |PIC16F1503 |Darron Broad |Dustin Hoffman |9 |N |5 |VPP 9V. | | | |N |PIC16F1503 |Darron Broad |Dustin Hoffman |9 |N |5 |VPP 9V. | | | ||
Line 304: | Line 247: | ||
|N |PIC24FJ1024GB610 |Simon Casey | |N |N |3V3 |Incompatible (architecture). | | | |N |PIC24FJ1024GB610 |Simon Casey | |N |N |3V3 |Incompatible (architecture). | | | ||
|N |PIC24FJ128GA410 |Simon Casey | |N |N |3V3 |Incompatible (architecture). | | | |N |PIC24FJ128GA410 |Simon Casey | |N |N |3V3 |Incompatible (architecture). | | | ||
- | |N |PIC32MM0032GPL028 | + | |N |PIC16F18313 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | |
- | ^Test code ^Device name ^Added by ^Tested by ^HVP ^LVP(PGM) ^LVP(KEY) ^Velleman K8048 ^Comments | + | |N |PIC16F1822 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | |
+ | |N |PIC16F1840 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | | ||
+ | |N |PIC16F1501 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | | ||
+ | |N |PIC16F1571 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | | ||
+ | |N |PIC16F1572 |Darron Broad | |9 |N |5V |VPP 9V. not tested. | | | ||
+ | |N |PIC18F25K42 |Darron Broad | |9 |N |5V |VPP 9V.|New algorithm.| | ||
+ | |N |PIC18F26J50 | ||
+ | |N |PIC16F19156 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| | ||
+ | |N |PIC18F26K42 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| | ||
+ | |N |PIC16F18446 |Darron Broad | |9 |N |5 |VPP 9V. Use 14P socket. |New algorithm.| | ||
+ | |N |PIC18F25Q10 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| | ||
+ | |N |dsPIC33EP32GS202 |Darron Broad | |N |N |3V3 |Incompatible (architecture). | | | ||
+ | |N |PIC32MM0256GPM028 |Pete Restall| | ||
+ | |N |PIC18F26K83 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| | ||
+ | |N |PIC18F27Q43 |Darron Broad | |9 |N |5 |VPP 9V. |New algorithm.| | ||
+ | ^ Code ^ PICMicro | ||
- | ~~UP~~ | + | <wrap right> |
=== Installation === | === Installation === | ||
- | Download the latest archive file [[http:// | + | Download the latest archive file [[https:// |
- | This has been tested on FreeBSD 5 and 6 yet should work on all FreeBSD | + | Decompress |
- | Here are some sample sessions obtaining the application and then installing it. | + | This has been tested on FreeBSD 5 and 6 yet should work on all FreeBSD variants and other BSD derived systems. It has also been test to work in Linux 2.6 but only compiled for 2.4. |
+ | |||
+ | A binary build is available for the RPi [[https:// | ||
+ | |||
+ | Here are some sample sessions obtaining | ||
== FreeBSD == | == FreeBSD == | ||
+ | |||
+ | As root. | ||
< | < | ||
Line 325: | Line 289: | ||
rehash | rehash | ||
cd /root | cd /root | ||
- | fetch "http:// | + | fetch "https:// |
- | tar zxf pickle-4.0e.tar.gz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
- | gmake | + | gmake k8048 |
- | gmake install | + | gmake k8048-install |
</ | </ | ||
- | == Generic | + | == Linux == |
< | < | ||
- | wget "http:// | + | wget "https:// |
- | tar zxf pickle-4.0e.tar.gz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
- | gnumake | + | make linux |
- | sudo gnumake | + | sudo make linux-install |
</ | </ | ||
Line 345: | Line 309: | ||
< | < | ||
- | wget "http:// | + | wget "https:// |
- | tar zxf pickle-4.0e.tar.gz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
- | make | + | make cygwin |
- | make install | + | make cygwin-install |
cd ~ | cd ~ | ||
vi .pickle | vi .pickle | ||
Line 359: | Line 323: | ||
</ | </ | ||
- | == Debian | + | Below is an example where we build the latest version of pickle from the code repository (use at your own risk). |
+ | |||
+ | == Debian == | ||
< | < | ||
Line 367: | Line 333: | ||
hg clone http:// | hg clone http:// | ||
cd pickle | cd pickle | ||
- | make | + | make linux |
- | make install | + | make linux-install |
</ | </ | ||
- | ~~UP~~ | + | <wrap right> |
=== Configuration === | === Configuration === | ||
- | A dot file in your home directory | + | <wrap right> |
+ | {{: | ||
+ | </ | ||
+ | |||
+ | There are two ways to configure pickle; either use a dot file named `.pickle' | ||
+ | |||
+ | The second option | ||
The options are as follows. | The options are as follows. | ||
< | < | ||
- | # I/O device: tty, ttyUSB, RPI, I2C (MCP23017) or GPIO BIT-BANG | ||
# | # | ||
- | #DEVICE=/dev/ttyu0 | + | # I/O device |
- | #DEVICE=/dev/ttyS0 | + | # |
- | #DEVICE=/dev/ttyUSB0 | + | #DEVICE=BPI # Banana Pi SBC |
- | DEVICE=RPI | + | # |
- | #DEVICE=RPI2 | + | # |
- | # | + | # |
- | #DEVICE=/ | + | # |
+ | # | ||
+ | #DEVICE=MCP230XX | ||
+ | #DEVICE=MCP23SXX | ||
+ | #DEVICE=PCF8574 | ||
+ | #DEVICE=RPI # Raspberry Pi/0/2/3/4 SBCs | ||
+ | #DEVICE=TTY # POSIX RS-232 UART | ||
+ | |||
+ | # I/O interface | ||
+ | #IFACE=/dev/ttyUSB0 | ||
+ | #IFACE=0 | ||
+ | #IFACE=/ | ||
+ | # | ||
+ | # | ||
+ | # | ||
# I/O 1/2-bit delay/sleep time | # I/O 1/2-bit delay/sleep time | ||
# | # | ||
- | # For ttyS 1 is fine | + | # For ttyS use 1 |
- | # For ttyUSB | + | # For ttyUSB |
+ | # For RPI use 1 | ||
# | # | ||
# When SLEEP is set to zero no delay is taken | # When SLEEP is set to zero no delay is taken | ||
- | # When SLEEP is less than 10, then SLEEP x I/O bit time is taken for R-PI and tty | + | # When SLEEP is less than 10, then SLEEP x I/O bit time is taken for RPI and tty |
# When SLEEP is less than 100 a busy loop is utilised | # When SLEEP is less than 100 a busy loop is utilised | ||
- | # When SLEEP is>=100 then system usleep is used. | + | # When SLEEP is >=100 then system usleep is used. |
# | # | ||
# For GPIO BIT-BANG SLEEP configures the low and high clock durations in the driver | # For GPIO BIT-BANG SLEEP configures the low and high clock durations in the driver | ||
# | # | ||
- | # ttyu/ttyS | + | # TTY ttyS |
#SLEEP=1 | #SLEEP=1 | ||
- | # ttyUSB | + | # TTY ttyUSB |
#SLEEP=600 | #SLEEP=600 | ||
- | # RASPBERRY PI VELLEMAN K8048 | + | # RPI VELLEMAN K8048 |
#SLEEP=10 | #SLEEP=10 | ||
- | # RASPBERRY PI GPIO | + | # RPI GPIO |
- | SLEEP=1 | + | #SLEEP=1 |
- | # MCP23017 | + | # I2C/SPI |
#SLEEP=0 | #SLEEP=0 | ||
- | # GPIO BIT-BANG | + | # GPIO-BB |
#SLEEP=1 | #SLEEP=1 | ||
# I/O bit rules. | # I/O bit rules. | ||
# These rules determine the polarity of the control lines and whether | # These rules determine the polarity of the control lines and whether | ||
- | # data input requires data output pulled high. | + | # data input requires data output pulled high or low. |
# 0x0001 PGD_OUT_FLIP | # 0x0001 PGD_OUT_FLIP | ||
# 0x0002 PGC_OUT_FLIP | # 0x0002 PGC_OUT_FLIP | ||
Line 425: | Line 411: | ||
# 0x0020 PGM_OUT_FLIP | # 0x0020 PGM_OUT_FLIP | ||
# 0x0040 VPP_OUT_CLOCK | # 0x0040 VPP_OUT_CLOCK | ||
- | # These rules are for GPIOs on program exit. | + | # 0x0080 PGD_IN_PULLDOWN |
+ | # These rules release | ||
# 0x0100 PGD_RELEASE | # 0x0100 PGD_RELEASE | ||
# 0x0200 PGC_RELEASE | # 0x0200 PGC_RELEASE | ||
Line 431: | Line 418: | ||
# 0x0800 VPP_RELEASE | # 0x0800 VPP_RELEASE | ||
# 0x1000 VPP_RUN | # 0x1000 VPP_RUN | ||
- | # This rule enables shift with irq lock for GPIO BIT-BANG. | + | # This rule enables shift with irq lock for GPIO BIT-BANG |
# 0x2000 BB_LOCK | # 0x2000 BB_LOCK | ||
- | # This rule re-enables the ALT0 function when an R-PI GPIO is released. | + | # This rule resets any released |
# 0x4000 ALT_RELEASE | # 0x4000 ALT_RELEASE | ||
- | # | + | # This rule is for Winklepicker reset |
+ | # 0x8000 TX_BREAK | ||
# TTY VELLEMAN K8048 = PGD_IN_PULLUP + PGD_OUT_FLIP + PGC_OUT_FLIP + VPP_OUT_FLIP + PGD_IN_FLIP | # TTY VELLEMAN K8048 = PGD_IN_PULLUP + PGD_OUT_FLIP + PGC_OUT_FLIP + VPP_OUT_FLIP + PGD_IN_FLIP | ||
# TTY VELLEMAN K8076 = PGD_IN_PULLUP | # TTY VELLEMAN K8076 = PGD_IN_PULLUP | ||
Line 444: | Line 433: | ||
# TTY VELLEMAN K8076 | # TTY VELLEMAN K8076 | ||
# | # | ||
- | # RASPBERRY PI VELLEMAN K8048 | + | # RPI VELLEMAN K8048 |
# | # | ||
- | # RASPBERRY PI GPIO | + | # RPI GPIO |
- | BITRULES=0x1000 | + | #BITRULES=0x1000 |
# MCP23017 I2C | # MCP23017 I2C | ||
# | # | ||
- | # GPIO BIT-BANG | + | # GPIO-BB |
# | # | ||
- | # CHIPKIT PI PIC32 ICSP | + | # RPI CHIPKIT PI PIC32 ICSP |
# | # | ||
- | # HUMBLE CAN PROTOTYPE | + | # TTY T-TYPE FLIP FLOP ON TXD FOR VPP |
- | #BITRULES=0x5700 | + | #BITRULES=0x004F |
- | # I/O busy cursor (0=DISABLED) | + | # I/O busy cursor |
# | # | ||
- | BUSY=0 | + | #BUSY=0 |
- | # RASPBERRY PI VELLEMAN K8048 (README.raspi) | + | # RPI VELLEMAN K8048 (https:// |
# | # | ||
# TX/ | # TX/ | ||
#VPP=14 | #VPP=14 | ||
# PGM - NOT SUPPORTED ON VELLEMAN K8048 | # PGM - NOT SUPPORTED ON VELLEMAN K8048 | ||
- | #PGM=22 | + | #PGM=-1 |
- | # RTS/PGC CLOCK | + | |
- | #PGC=15 | + | |
- | # DTR/PGD DATA_OUT - DSUB9(4) | + | |
- | #PGDO=23 | + | |
- | # CTS/PGD DATA_IN | + | |
- | #PGDI=24 | + | |
- | + | ||
- | # RASPBERRY PI VELLEMAN K8048 (http:// | + | |
- | # | + | |
- | # TX/ | + | |
- | #VPP=14 | + | |
- | # PGM - NOT SUPPORTED ON VELLEMAN K8048 | + | |
- | #PGM=22 | + | |
# RTS/PGC CLOCK - DSUB9(7) | # RTS/PGC CLOCK - DSUB9(7) | ||
#PGC=18 | #PGC=18 | ||
Line 487: | Line 463: | ||
#PGDI=25 | #PGDI=25 | ||
- | # RASPBERRY PI GPIO (separate PGD DATA I/O) | + | # RPI GPIO (separate PGD DATA I/O) |
# = SLICE OF PI/O = | # = SLICE OF PI/O = | ||
# !MCLR/ | # !MCLR/ | ||
Line 500: | Line 476: | ||
#PGDI=23 | #PGDI=23 | ||
- | # R-PI OR GPIO BIT-BANG (single PGD DATA I/O) | + | # RPI OR GPIO-BB (single PGD DATA I/O) |
# = SLICE OF PI/O = | # = SLICE OF PI/O = | ||
# !MCLR/ | # !MCLR/ | ||
Line 511: | Line 487: | ||
#PGD=24 | #PGD=24 | ||
- | # R-PI OR GPIO BIT-BANG (single PGD DATA I/O) | + | # RPI OR GPIO-BB (single PGD DATA I/O) |
- | # = CHIPKIT PI = | + | # = CHIPKIT PI I/O = |
- | # !MCLR/ | + | # !MCLR/ |
- | VPP=9 | + | #VPP=9 |
- | # PGM - RPi-Connect 12 | + | # PGM - RPI-Connect 12 |
- | PGM=22 | + | #PGM=22 |
- | # PGC CLOCK - RPi-Connect 16 | + | # PGC CLOCK - RPI-Connect 16 |
- | PGC=10 | + | #PGC=10 |
- | # PGD DATA_I/ | + | # PGD DATA_I/ |
- | PGD=11 | + | #PGD=11 |
- | # R-PI OR GPIO BIT-BANG (single PGD DATA I/O) | + | # RPI OR GPIO-BB (single PGD DATA I/O) |
# = CHIPKIT PI PIC32 ICSP = | # = CHIPKIT PI PIC32 ICSP = | ||
# !MCLR/ | # !MCLR/ | ||
#VPP=4 | #VPP=4 | ||
# PGM - N/A | # PGM - N/A | ||
- | #PGM=65535 | + | #PGM=-1 |
# PGC CLOCK - PGC1 RX2 | # PGC CLOCK - PGC1 RX2 | ||
#PGC=14 | #PGC=14 | ||
Line 533: | Line 509: | ||
#PGD=15 | #PGD=15 | ||
- | # R-PI OR GPIO BIT-BANG (single PGD DATA I/O) | + | # I2C/SPI ADDRESS |
- | # = HUMBLE CAN PROTOTYPE = | + | |
- | # !MCLR/ | + | |
- | #VPP=18 | + | |
- | # PGM - N/A | + | |
- | # | + | |
- | # PGD TXD - PGD RX2 | + | |
- | #PGD=14 | + | |
- | # PGC RXD - PGC TX2 | + | |
- | #PGC=15 | + | |
- | + | ||
- | # MCP23017 I2C ADDRESS | + | |
# | # | ||
- | MCP=0x20 | + | #ADDR=0x20 |
- | # ICSP I/O 1/2-bit sleep time for `kio'. | + | # ICSP I/O 1/2-bit sleep time for `pio'. |
- | SLEEP=30 | + | #FWSLEEP=30 |
# Debug level (0=NONE, 1=ERROR, 10=INFO) | # Debug level (0=NONE, 1=ERROR, 10=INFO) | ||
- | DEBUG=1 | + | #DEBUG=1 |
+ | |||
+ | # PIC14-NEW, PIC16, and PIC16-NEW CONFIG MASK | ||
+ | # | ||
+ | # 1 CONFIGVER | ||
+ | # 2 CONFIGAND | ||
+ | # 4 CONFIGSET | ||
+ | # | ||
+ | # DOES NOT APPLY TO PIC18J SERIES | ||
+ | # | ||
+ | #CONFIG=0 # DISABLED | ||
</ | </ | ||
- | == FreeBSD using a Velleman K8048 with a serial UART == | + | <wrap right> |
+ | |||
+ | === Example configuration === | ||
+ | |||
+ | < | ||
+ | == Linux AllWinner Banana Pi (A20) == | ||
< | < | ||
- | DEVICE=/dev/ttyu0 | + | DEVICE=BPI |
- | SLEEP=0 | + | SLEEP=1 |
- | BITRULES=0x001F | + | BITRULES=0x1000 |
- | BUSY=0 | + | VPP=270 |
+ | PGM=-1 | ||
+ | PGC=266 | ||
+ | PGD=272 | ||
</ | </ | ||
- | == RPi version 1 using a Velleman K8048 with a 74HC03 | + | < |
+ | == Linux AllWinner Orange Pi 0 (H2+) == | ||
< | < | ||
- | DEVICE=RPI | + | DEVICE=OPI0 |
- | SLEEP=10 | + | BITRULES=0x1000 |
- | BITRULES=0x0010 | + | SLEEP=1 |
- | VPP=14 | + | VPP=12 |
- | PGC=18 | + | PGC=11 |
- | PGDO=24 | + | PGD=6 |
- | PGDI=2 | + | PGM=-1 |
</ | </ | ||
- | == Cygwin for Windows using a Velleman K8048 with an Intek21 PCI IO 2S-550 Board == | + | < |
+ | == Linux CP2104 GPIO == | ||
< | < | ||
- | DEVICE=/ | + | # |
+ | # IO0 ---------> | ||
+ | # IO1 ---------> | ||
+ | # IO2 ---390R--> | ||
+ | # IO3 < | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | DEVICE=CP2104 | ||
+ | IFACE=/dev/ttyUSB0 | ||
+ | BITRULES=0x1000 | ||
+ | VPP=0 | ||
+ | PGC=1 | ||
+ | PGDO=2 | ||
+ | PGDI=3 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux FTDI USB bit-bang == | ||
+ | |||
+ | < | ||
+ | # DB0 TXD | ||
+ | # DB1 RXD | ||
+ | # DB2 RTS# | ||
+ | # DB3 CTS# | ||
+ | # DB4 DTR# | ||
+ | # DB5 DSR# | ||
+ | # DB6 DCD# | ||
+ | # DB7 RI# | ||
+ | DEVICE=FTDI | ||
+ | IFACE=0 | ||
+ | BITRULES=0x1000 | ||
SLEEP=0 | SLEEP=0 | ||
- | BITRULES=0x001F | + | VPP=0 |
- | BUSY=0 | + | PGC=1 |
+ | PGD=3 | ||
+ | PGM=-1 # DISABLED | ||
+ | DEBUG=0 | ||
</ | </ | ||
- | == RPi version 1 GPIO Low Voltage Programming (LVP) with PGM == | + | < |
+ | == Linux GPIO bit-bang | ||
< | < | ||
- | DEVICE=RPI | + | DEVICE=GPIO-BB |
+ | IFACE=/ | ||
SLEEP=1 | SLEEP=1 | ||
- | BITRULES=0x0000 | + | BITRULES=0x1000 |
- | VPP=4 | + | VPP=9 |
PGM=22 | PGM=22 | ||
- | PGC=25 | + | PGC=10 |
- | PGDO=24 | + | PGD=11 |
- | PGDI=23 | + | |
</ | </ | ||
- | == RPi version 2 GPIO Low Voltage Programming (LVP) without PGM == | + | < |
+ | == Linux MCP2221 | ||
< | < | ||
- | DEVICE=RPI2 | + | # |
+ | # GP3 PGDI < | ||
+ | # GP2 VPP ----------> | ||
+ | # GP1 PGC ----------> | ||
+ | # GP0 PGDO ----1K----> | ||
+ | # | ||
+ | DEVICE=MCP2221 | ||
+ | BITRULES=0x1000 | ||
+ | SLEEP=0 | ||
+ | PGDI=3 | ||
+ | VPP=2 | ||
+ | PGC=1 | ||
+ | PGDO=0 | ||
+ | PGM=-1 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux MCP23016 I2C == | ||
+ | |||
+ | < | ||
+ | VPP=0 | ||
+ | PGC=1 | ||
+ | PGDO=2 | ||
+ | PGDI=3 | ||
+ | PGM=-1 | ||
+ | DEVICE=MCP23016 | ||
+ | IFACE=/ | ||
+ | ADDR=0x20 | ||
+ | SLEEP=0 | ||
+ | #VPP_RUN + PGD_IN_PULLUP | ||
+ | BITRULES=0x1010 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux MCP23008/17 I2C == | ||
+ | |||
+ | < | ||
+ | VPP=0 | ||
+ | PGC=1 | ||
+ | PGDO=2 | ||
+ | PGDI=3 | ||
+ | PGM=-1 | ||
+ | DEVICE=MCP230XX | ||
+ | IFACE=/ | ||
+ | ADDR=0x20 | ||
+ | SLEEP=0 | ||
+ | #VPP_RUN + PGD_IN_PULLUP | ||
+ | BITRULES=0x1010 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux MCP23S08/17 SPI == | ||
+ | |||
+ | < | ||
+ | VPP=0 | ||
+ | PGC=1 | ||
+ | PGDO=2 | ||
+ | PGDI=3 | ||
+ | PGM=-1 | ||
+ | DEVICE=MCP23SXX | ||
+ | IFACE=/ | ||
+ | ADDR=0x20 | ||
+ | SLEEP=0 | ||
+ | #VPP_RUN + PGD_IN_PULLUP | ||
+ | BITRULES=0x1010 | ||
+ | BAUDRATE=1000000 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux PCF8574 I2C == | ||
+ | |||
+ | < | ||
+ | VPP=0 | ||
+ | PGDI=1 | ||
+ | PGDO=1 | ||
+ | PGC=2 | ||
+ | PGM=-1 | ||
+ | DEVICE=PCF8574 | ||
+ | IFACE=/ | ||
+ | ADDR=0x20 | ||
+ | SLEEP=0 | ||
+ | #VPP_RUN + PGC_RELEASE + PGD_RELEASE + PGD_IN_PULLUP | ||
+ | BITRULES=0x1310 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux RPi 1 GPIO == | ||
+ | |||
+ | < | ||
+ | DEVICE=RPI1 | ||
SLEEP=1 | SLEEP=1 | ||
- | BITRULES=0x4F00 | + | BITRULES=0x1000 |
VPP=9 | VPP=9 | ||
- | PGM=65535 | + | PGM=-1 |
PGC=10 | PGC=10 | ||
PGD=11 | PGD=11 | ||
</ | </ | ||
- | == Linux MCP23017 I2C LVP == | + | < |
+ | == Linux RPi 4 GPIO == | ||
< | < | ||
- | DEVICE=I2C | + | DEVICE=RPI # AUTO-DETECT |
SLEEP=1 | SLEEP=1 | ||
- | BITRULES=0x0010 | + | BITRULES=0x1000 |
- | MCP=0x20 | + | VPP=9 |
+ | PGM=-1 | ||
+ | PGC=10 | ||
+ | PGD=11 | ||
</ | </ | ||
- | == Linux FTDI bit-bang | + | < |
+ | == POSIX Serial | ||
- | < | + | Velleman K8048 |
- | # RX 1 | + | |
- | # RTS 2 | + | < |
- | # CTS 3 | + | DEVICE=TTY |
- | # DTR 4 | + | IFACE=/dev/ttyS0 |
- | # DSR 5 | + | |
- | # DCD 6 | + | |
- | # RI 7 | + | |
- | DEVICE=FTDI | + | |
- | BITRULES=0x1000 | + | |
SLEEP=1 | SLEEP=1 | ||
- | VPP=0 | + | BITRULES=0x001F |
- | PGC=1 | + | |
- | PGD=3 | + | |
- | PGM=-1 | + | |
</ | </ | ||
- | ~~UP~~ | + | <wrap right> |
+ | |||
+ | === Programming Executive === | ||
- | === Advanced configuration === | ||
<wrap right> | <wrap right> | ||
{{: | {{: | ||
Line 649: | Line 757: | ||
This software is loaded into the chip to speed up ICSP. | This software is loaded into the chip to speed up ICSP. | ||
- | Pickle supports ICSP with the programming executive (PE) on the PIC32 but not | + | Pickle supports ICSP with the programming executive (PE) on the PIC32 but not the dsPIC/PIC24 devices. Currently there are no plans to add PE support for the dsPIC/ |
- | the dsPIC/PIC24 devices. Currently there are no plans to add PE support for the | + | |
- | dsPIC/ | + | |
By default, PIC32 PE mode is not enabled and a few steps must be completed to activate this mode of operation. | By default, PIC32 PE mode is not enabled and a few steps must be completed to activate this mode of operation. | ||
Line 677: | Line 783: | ||
</ | </ | ||
- | A file named RIPE_11_000301.hex will now exist in the .pickle directory. When | + | A file named RIPE_11_000301.hex will now exist in the .pickle directory. When we use p32, and it finds this file, it will automatically load it into the chip. |
- | we use p32, and it finds this file, it will automatically load it into the chip. | + | |
- | The following PE files are all that's required for the PIC32MX | + | The following PE files are all that's required for the PIC32 range of PICMicros. |
- | ^ md5sum ^filename | + | ^ md5sum ^filename |
|2662befb94584d40b905a9040a9ed2f4 |RIPE_06_000201.hex| | |2662befb94584d40b905a9040a9ed2f4 |RIPE_06_000201.hex| | ||
|4cb8f6492b1234a45c92979a36d91587 |RIPE_11_000301.hex| | |4cb8f6492b1234a45c92979a36d91587 |RIPE_11_000301.hex| | ||
|aea1a950b72471e54b82852b93105d6a |RIPE_15_000502.hex| | |aea1a950b72471e54b82852b93105d6a |RIPE_15_000502.hex| | ||
+ | |bb462553082999b4bd8b4e94154fd0d7 |RIPE_20a_000510.hex| | ||
+ | |903282c9b4966817b7d7ee961c60cff4 |RIPE_20b_000510.hex| | ||
To test that the PE has been registered correctly, we can issue the id command, | To test that the PE has been registered correctly, we can issue the id command, | ||
Line 692: | Line 799: | ||
< | < | ||
- | p32 id | + | $ p32 id |
[1D000000] [PROGRAM] | [1D000000] [PROGRAM] | ||
[1F80F220] [DEVICEID] 14D06053 PIC32MX150F128B | [1F80F220] [DEVICEID] 14D06053 PIC32MX150F128B | ||
Line 708: | Line 815: | ||
and 5.5 seconds with it. | and 5.5 seconds with it. | ||
- | ~~UP~~ | + | <wrap right> |
=== Running the application === | === Running the application === | ||
Line 722: | Line 829: | ||
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
+ | |||
+ | ENVIRONMENT: | ||
+ | | ||
+ | Configuration file. | ||
FRONTENDS: | FRONTENDS: | ||
- | FILE | + | INHX32 |
- | File input (INHX32 format). | + | File or standard |
- | STDIN | + | STK500 |
- | Standard input (INHX32 format). | + | POSIX serial |
- | TTY | + | |
- | POSIX serial | + | |
BACKENDS: | BACKENDS: | ||
- | BIT-BANG | + | BPI/OPI |
+ | Linux AllWinner Banana Pi (A20) and Orange Pi (H2+/H3) GPIO. | ||
+ | | ||
+ | Linux CP2104 GPIO. | ||
+ | | ||
+ | Linux FTDI USB bit-bang. | ||
+ | | ||
Linux GPIO bit-bang version 1.3. | Linux GPIO bit-bang version 1.3. | ||
- | FTDI BIT-BANG | + | MCP2221 |
- | Linux FTDI bit-bang. | + | Linux MCP2221 GPIO. |
- | MCP23017 | + | MCP23016 |
- | Linux MCP23017 | + | Linux MCP23016 I2C. |
+ | | ||
+ | Linux MCP23008/17 I2C. | ||
+ | | ||
+ | Linux MCP23S08/17 SPI. | ||
+ | | ||
+ | Linux PCF8574 | ||
RPI | RPI | ||
- | Raspberry Pi GPIO. | + | |
TTY | TTY | ||
- | POSIX serial I/O. | + | POSIX Serial bit-bang. |
- | + | ||
- | ENVIRONMENT: | + | |
- | | + | |
- | Configuration file. | + | |
EXAMPLES: | EXAMPLES: | ||
Line 760: | Line 877: | ||
n16 [LVP] OPERATION [ARG] | n16 [LVP] OPERATION [ARG] | ||
16-bit word PIC18F operations. | 16-bit word PIC18F operations. | ||
- | p24 [SELECT DEVICE] [LVP|HVP] OPERATION [ARG] | + | p24 [SELECT|PARTITION |
24-bit word PIC24/dsPIC operations. | 24-bit word PIC24/dsPIC operations. | ||
p32 OPERATION [ARG] | p32 OPERATION [ARG] | ||
Line 766: | Line 883: | ||
pctrl RUN|STOP|RESTORE | pctrl RUN|STOP|RESTORE | ||
Control master clear. | Control master clear. | ||
- | pload PROGRAM|VERIFY TTY|IP FILE [16] | + | pio COMMAND [ARG] |
+ | ICSPIO operations. | ||
+ | pload PROGRAM|VERIFY TTY|IP FILE [16|24|32] | ||
Program or verify file on TTY or network. | Program or verify file on TTY or network. | ||
ptest TEST [ARG] | ptest TEST [ARG] | ||
Line 772: | Line 891: | ||
VERSION: | VERSION: | ||
- | 4.0f | + | 5.01 |
</ | </ | ||
Line 785: | Line 904: | ||
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
ENVIRONMENT: | ENVIRONMENT: | ||
Line 794: | Line 913: | ||
EXAMPLES: | EXAMPLES: | ||
p12 select | p12 select | ||
- | | + | |
p12 select PIC1XFXXX blank | p12 select PIC1XFXXX blank | ||
Blank device (disable protection and bulk erase). | Blank device (disable protection and bulk erase). | ||
Line 815: | Line 934: | ||
p12 select PIC1XFXXX verify [file.hex] | p12 select PIC1XFXXX verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | p12 select PIC1XFXXX view [file.hex] | + | p12 select PIC1XFXXX view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
p12 select PIC1XFXXX / | p12 select PIC1XFXXX / | ||
Line 821: | Line 940: | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
Line 834: | Line 953: | ||
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
ENVIRONMENT: | ENVIRONMENT: | ||
Line 843: | Line 962: | ||
EXAMPLES: | EXAMPLES: | ||
p14 select | p14 select | ||
- | | + | |
p14 select 16F84 OPERATION [ARG] | p14 select 16F84 OPERATION [ARG] | ||
Select device PIC16F84. | Select device PIC16F84. | ||
Line 864: | Line 983: | ||
p14 id | p14 id | ||
Display device identification. | Display device identification. | ||
+ | p14 loader | ||
+ | Output boot loader configuration. | ||
p14 osccal | p14 osccal | ||
Display oscillator calibration. | Display oscillator calibration. | ||
Line 872: | Line 993: | ||
p14 verify [file.hex] | p14 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | p14 view [file.hex] | + | p14 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
p14 / | p14 / | ||
Line 878: | Line 999: | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
Line 900: | Line 1021: | ||
EXAMPLES: | EXAMPLES: | ||
n14 select | n14 select | ||
- | | + | |
n14 lvp OPERATION [ARG] | n14 lvp OPERATION [ARG] | ||
LVP 32-bit key entry. | LVP 32-bit key entry. | ||
Line 915: | Line 1036: | ||
n14 id | n14 id | ||
Display device identification. | Display device identification. | ||
+ | n14 loader | ||
+ | Output boot loader configuration. | ||
n14 program [file.hex] [noblank] | n14 program [file.hex] [noblank] | ||
Blank and program file.hex or stdin to flash (INHX32 format). | Blank and program file.hex or stdin to flash (INHX32 format). | ||
n14 verify [file.hex] | n14 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | n14 view [file.hex] | + | n14 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
n14 / | n14 / | ||
Line 925: | Line 1048: | ||
VERSION: | VERSION: | ||
- | 4.0f | + | 5.0 |
</ | </ | ||
Line 938: | Line 1061: | ||
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
ENVIRONMENT: | ENVIRONMENT: | ||
Line 947: | Line 1070: | ||
EXAMPLES: | EXAMPLES: | ||
p16 select | p16 select | ||
- | | + | |
p16 select 18LF2539 OPERATION [ARG] | p16 select 18LF2539 OPERATION [ARG] | ||
Select device PIC18LF2539. | Select device PIC18LF2539. | ||
Line 968: | Line 1091: | ||
p16 id | p16 id | ||
Display device identification. | Display device identification. | ||
+ | p16 loader | ||
+ | Output boot loader configuration. | ||
p16 program [file.hex] [noblank] | p16 program [file.hex] [noblank] | ||
Blank and program file.hex or stdin to flash (INHX32 format). | Blank and program file.hex or stdin to flash (INHX32 format). | ||
p16 verify [file.hex] | p16 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | p16 view [file.hex] | + | p16 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
p16 / | p16 / | ||
Line 978: | Line 1103: | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
Line 1000: | Line 1125: | ||
EXAMPLES: | EXAMPLES: | ||
n16 select | n16 select | ||
- | | + | |
n16 lvp OPERATION [ARG] | n16 lvp OPERATION [ARG] | ||
LVP 32-bit key entry. | LVP 32-bit key entry. | ||
Line 1015: | Line 1140: | ||
n16 id | n16 id | ||
Display device identification. | Display device identification. | ||
+ | n16 loader | ||
+ | Output boot loader configuration. | ||
n16 program [file.hex] [noblank] | n16 program [file.hex] [noblank] | ||
Blank and program file.hex or stdin to flash (INHX32 format). | Blank and program file.hex or stdin to flash (INHX32 format). | ||
n16 verify [file.hex] | n16 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | n16 view [file.hex] | + | n16 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
n16 / | n16 / | ||
Line 1025: | Line 1152: | ||
VERSION: | VERSION: | ||
- | 4.0f | + | 5.0 |
</ | </ | ||
Line 1032: | Line 1159: | ||
< | < | ||
$ p24 | $ p24 | ||
- | USAGE: p24 [SELECT DEVICE] [LVP|HVP] OPERATION [ARG] | + | USAGE: p24 [SELECT|PARTITION |
24-bit word PIC24/dsPIC operations. | 24-bit word PIC24/dsPIC operations. | ||
Line 1038: | Line 1165: | ||
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
ENVIRONMENT: | ENVIRONMENT: | ||
Line 1047: | Line 1174: | ||
EXAMPLES: | EXAMPLES: | ||
p24 select | p24 select | ||
- | | + | |
p24 select 33EP128GP502 OPERATION [ARG] | p24 select 33EP128GP502 OPERATION [ARG] | ||
Select device dsPIC33EP128GP502. | Select device dsPIC33EP128GP502. | ||
p24 select 24FJ128GB202 OPERATION [ARG] | p24 select 24FJ128GB202 OPERATION [ARG] | ||
Select device PIC24FJ128GB202. | Select device PIC24FJ128GB202. | ||
+ | p24 partition 33EP64GS502 OPERATION [ARG] | ||
+ | Select and partition device dsPIC33EP64GS502. | ||
p24 lvp OPERATION [ARG] | p24 lvp OPERATION [ARG] | ||
LVP 32-bit key entry. | LVP 32-bit key entry. | ||
Line 1070: | Line 1199: | ||
p24 id | p24 id | ||
Display device identification. | Display device identification. | ||
+ | p24 loader | ||
+ | Output boot loader configuration. | ||
p24 program [file.hex] [noblank] | p24 program [file.hex] [noblank] | ||
Blank and program file.hex or stdin to flash (INHX32 format). | Blank and program file.hex or stdin to flash (INHX32 format). | ||
p24 verify [file.hex] | p24 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | p24 view [file.hex] | + | p24 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
p24 / | p24 / | ||
Line 1080: | Line 1211: | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
Line 1093: | Line 1224: | ||
FILES: | FILES: | ||
- | / | + | / |
Configuration file. | Configuration file. | ||
Line 1102: | Line 1233: | ||
EXAMPLES: | EXAMPLES: | ||
p32 select | p32 select | ||
- | | + | |
p32 boot [n] [address] | p32 boot [n] [address] | ||
Display all or n words of boot flash content from address. | Display all or n words of boot flash content from address. | ||
Line 1119: | Line 1250: | ||
p32 verify [file.hex] | p32 verify [file.hex] | ||
Verify file.hex or stdin in flash (INHX32 format). | Verify file.hex or stdin in flash (INHX32 format). | ||
- | p32 view [file.hex] | + | p32 view [file.hex] [raw] |
View file.hex or stdin (INHX32 format). | View file.hex or stdin (INHX32 format). | ||
p32 / | p32 / | ||
Line 1125: | Line 1256: | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
- | == ptest: Perform various hardware and communication tests == | + | == pctrl: Control master clear on GPIO == |
< | < | ||
- | $ ptest | + | $ pctrl |
- | USAGE: | + | USAGE: |
- | Hardware tests. | + | Control master clear. |
- | Error: Missing | + | Error: Missing |
FILES: | FILES: | ||
- | / | + | / |
- | Configuration. | + | Configuration |
ENVIRONMENT: | ENVIRONMENT: | ||
| | ||
Configuration file. | Configuration file. | ||
+ | |||
+ | COMMANDS: | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | ARGUMENTS: | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | DEFAULTS: | ||
+ | | ||
+ | | ||
+ | | ||
EXAMPLES: | EXAMPLES: | ||
- | ptest VPP|PGC|PGD|PGM 5 | + | pctrl RUN 10 |
- | VPP, PGC, PGD or PGM LOW-> | + | |
- | ptest 0 10 | + | pctrl STOP 0 10 |
- | | + | |
- | ptest 1 10 | + | pctrl RESTORE 0 0 100 |
- | | + | |
- | ptest 2 10 | + | |
- | ICSP test with 10 seconds per step. | + | |
- | ptest 3 0 | + | |
- | D-SUB-9 RTS 7 (PGC) DTR 4 (PGD) test with no mark time. | + | |
- | ptest 3 1 | + | |
- | D-SUB-9 RTS 7 (PGC) DTR 4 (PGD) test with SLEEP mark time. | + | |
- | ptest 3 100 | + | |
- | | + | |
- | ptest 4 100 | + | |
- | 16F627 debug test with 100 microseconds clock mark time. | + | |
- | ptest 5 100 | + | |
- | ICSPIO test with 100 microseconds clock mark time. | + | |
- | ptest 6 10 | + | |
- | RPi GPIO test with 10 seconds mark time. | + | |
VERSION: | VERSION: | ||
- | 4.0f | + | 5.0 |
</ | </ | ||
- | == pctrl: Control master clear on GPIO (R-PI or OpenWRT) | + | == pio: Perform ICSPIO operations |
< | < | ||
- | $ pctrl | + | $ pio |
- | USAGE: | + | USAGE: |
- | Control master clear. | + | ICSPIO operations. |
- | Error: Missing arg. | + | Error: Missing arg(s). |
FILES: | FILES: | ||
- | / | + | / |
Configuration. | Configuration. | ||
Line 1187: | Line 1319: | ||
| | ||
Configuration file. | Configuration file. | ||
+ | |||
+ | COMMANDS: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
EXAMPLES: | EXAMPLES: | ||
- | pctrl RUN | + | pio WATCHDOG D |
- | | + | |
- | pctrl STOP | + | pio DIRECTION C 0xF0 |
- | | + | |
- | pctrl RESTORE | + | pio OUTPUT C 0x0A |
- | | + | |
VERSION: | VERSION: | ||
- | 4.0 | + | 5.0 |
</ | </ | ||
Line 1225: | Line 1379: | ||
Program stdin (INHX32 format) on 192.168.1.100 port 8048. | Program stdin (INHX32 format) on 192.168.1.100 port 8048. | ||
pload program / | pload program / | ||
- | Program led.hex (INHX32 format) on / | + | Program led.hex (INHX32 format) on / |
+ | |||
+ | VERSION: | ||
+ | 5.0 | ||
+ | </ | ||
+ | |||
+ | == ptest: Perform various hardware and communication tests == | ||
+ | |||
+ | < | ||
+ | $ ptest | ||
+ | USAGE: ptest TEST ARG | ||
+ | Hardware tests. | ||
+ | |||
+ | Error: Missing args. | ||
+ | |||
+ | FILES: | ||
+ | / | ||
+ | Configuration file. | ||
+ | |||
+ | ENVIRONMENT: | ||
+ | | ||
+ | Configuration file. | ||
+ | |||
+ | EXAMPLES: | ||
+ | ptest VPP|PGC|PGD|PGM 5 | ||
+ | VPP, PGC, PGD or PGM LOW-> | ||
+ | ptest INPUT 10 | ||
+ | PGD input test with 10 iterations of 1 second per step. | ||
+ | ptest DSUB9 10 | ||
+ | D-SUB-9 test with 10 seconds per step. | ||
+ | ptest ICSP 10 | ||
+ | ICSP test with 10 seconds per step. | ||
+ | ptest CLOCK 0 | ||
+ | PGC/RTS(7) clock test with no mark time. | ||
+ | ptest CLOCK 10 | ||
+ | PGC/RTS(7) clock test with 10us mark time. | ||
+ | ptest 16F627 100 | ||
+ | PIC16F627 debug test with 100us clock mark time. | ||
+ | ptest ICSPIO 100 | ||
+ | ICSPIO test with 100us clock mark time. | ||
+ | ptest RPI 10 | ||
+ | RPI GPIO test with 10 seconds mark time. | ||
+ | ptest ALLWINNER 10 | ||
+ | BPI/OPI GPIO test with 10 seconds mark time. | ||
VERSION: | VERSION: | ||
- | 4.0 | + | 5.01 |
</ | </ | ||
- | ~~UP~~ | + | <wrap right> |
=== Using the Application === | === Using the Application === | ||
Line 1267: | Line 1464: | ||
== PIC16F627 debug assembly test mode == | == PIC16F627 debug assembly test mode == | ||
< | < | ||
- | ptest 4 100 | + | ptest 16f627 |
- | TEST MODE 4 [16F627 debug.asm] CTRL-C TO STOP | + | TEST 16F627 debug.asm |
io_test4: read byte: 02 . | io_test4: read byte: 02 . | ||
Line 1379: | Line 1576: | ||
I hope you enjoy using this application, | I hope you enjoy using this application, | ||
- | ~~UP~~ | + | <wrap right> |