Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:pickle [2020/08/05 15:04] darron [ICSP interfaces] |
projects:pickle [2023/11/05 18:07] (current) darron [ICSP interfaces] |
||
---|---|---|---|
Line 15: | Line 15: | ||
Currently supported PICMicros range from the PIC10 to the PIC32. Predominantly PICMicros available in DIP packages are tested and supported. | Currently supported PICMicros range from the PIC10 to the PIC32. Predominantly PICMicros available in DIP packages are tested and supported. | ||
- | 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 [[:boards: | + | 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 > | ||
Line 58: | Line 58: | ||
^Device^Description^Speed^Data^ | ^Device^Description^Speed^Data^ | ||
- | |BPI/OPI| Linux AllWinner Banana Pi (A20) and Orange Pi (H2+/H3) GPIO.|Fast|[[: | + | |[[projects: |
- | |GPIO-BB| Linux GPIO bit-bang version 1.3.|Fast|[[projects: | + | |[[projects: |
- | |CP2104| Linux CP2104 GPIO.|Slow|CP210x_VCP_Linux_3.13| | + | |[[projects: |
- | |FTDI| Linux FTDI USB bit-bang.|Slow|libftdi or libftdi1| | + | |[[projects: |
- | |MCP2221| Linux MCP2221 GPIO.|Slow|Wire as PI/O below | | + | |[[projects: |
- | |MCP23016| Linux MCP23016 I2C.|Slow|Wire as PI/O below| | + | |[[projects: |
- | |MCP230XX| Linux MCP23008/17 I2C.|Slow|[[: | + | |[[projects: |
- | |MCP23SXX| Linux MCP23S08/17 SPI.|Slow|Wire as PI/O above| | + | |[[projects: |
- | |PCF8574| Linux PCF8574 I2C.|Slow|Single data I/O| | + | |[[projects: |
- | |RPI| Linux Raspberry Pi GPIO (Pi0/ | + | |SYSFSGPIO|Linux SYSFS|Slow|Single data I/O| |
- | |TTY| POSIX Serial bit-bang.|Variable|8250/ | + | |[[projects: |
+ | |[[projects: | ||
+ | |||
+ | (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. | ||
<wrap right> | <wrap right> | ||
Line 265: | Line 269: | ||
=== Installation === | === Installation === | ||
- | Download the latest archive file [[http:// | + | Download the latest archive file [[https:// |
Decompress and extract the application source code from the archive. Perform `sudo make && sudo make install', | Decompress and extract the application source code from the archive. Perform `sudo make && sudo make install', | ||
Line 271: | Line 275: | ||
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. | 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 [[http:// | + | A binary build is available for the RPi [[https:// |
Here are some sample sessions obtaining the source of the application and then compiling and installing it. | Here are some sample sessions obtaining the source of the application and then compiling and installing it. | ||
Line 285: | Line 289: | ||
rehash | rehash | ||
cd /root | cd /root | ||
- | fetch "http:// | + | fetch "https:// |
- | tar zxf pickle-5.0.tgz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
gmake k8048 | gmake k8048 | ||
Line 295: | Line 299: | ||
< | < | ||
- | wget "http:// | + | wget "https:// |
- | tar zxf pickle-5.0.tgz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
make linux | make linux | ||
Line 305: | Line 309: | ||
< | < | ||
- | wget "http:// | + | wget "https:// |
- | tar zxf pickle-5.0.tgz | + | tar zxf pickle-5.01.tgz |
cd pickle | cd pickle | ||
- | make k8048 | + | make cygwin |
- | make k8048-install | + | make cygwin-install |
cd ~ | cd ~ | ||
vi .pickle | vi .pickle | ||
Line 336: | Line 340: | ||
=== Configuration === | === Configuration === | ||
+ | |||
+ | <wrap right> | ||
+ | {{: | ||
+ | </ | ||
There are two ways to configure pickle; either use a dot file named `.pickle' | There are two ways to configure pickle; either use a dot file named `.pickle' | ||
Line 442: | Line 450: | ||
#BUSY=0 | #BUSY=0 | ||
- | # RPI VELLEMAN K8048 (https:// | + | # RPI VELLEMAN K8048 (https:// |
# | # | ||
# TX/ | # TX/ | ||
Line 526: | Line 534: | ||
=== Example configuration === | === Example configuration === | ||
- | == RPi version 1 == | + | < |
+ | == Linux AllWinner Banana Pi (A20) == | ||
< | < | ||
- | DEVICE=RPI | + | DEVICE=BPI |
SLEEP=1 | SLEEP=1 | ||
BITRULES=0x1000 | BITRULES=0x1000 | ||
- | VPP=9 | + | VPP=270 |
PGM=-1 | PGM=-1 | ||
- | PGC=10 | + | PGC=266 |
- | PGD=11 | + | PGD=272 |
</ | </ | ||
- | == RPi version 4 == | + | < |
+ | == Linux AllWinner Orange Pi 0 (H2+) == | ||
< | < | ||
- | DEVICE=RPI4 | + | DEVICE=OPI0 |
+ | BITRULES=0x1000 | ||
SLEEP=1 | SLEEP=1 | ||
- | BITRULES=0x1000 | + | VPP=12 |
- | VPP=9 | + | PGC=11 |
+ | PGD=6 | ||
PGM=-1 | PGM=-1 | ||
- | PGC=10 | ||
- | PGD=11 | ||
</ | </ | ||
- | == Velleman K8048 == | + | <BOOKMARK: |
- | + | == Linux CP2104 GPIO == | |
- | <code> | + | |
- | DEVICE=TTY | + | |
- | IFACE=/ | + | |
- | SLEEP=1 | + | |
- | BITRULES=0x001F | + | |
- | </ | + | |
- | + | ||
- | == Linux MCP23008 I2C == | + | |
< | < | ||
+ | # | ||
+ | # IO0 ---------> | ||
+ | # IO1 ---------> | ||
+ | # IO2 ---390R--> | ||
+ | # IO3 < | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | DEVICE=CP2104 | ||
+ | IFACE=/ | ||
+ | BITRULES=0x1000 | ||
VPP=0 | VPP=0 | ||
PGC=1 | PGC=1 | ||
PGDO=2 | PGDO=2 | ||
PGDI=3 | PGDI=3 | ||
- | PGM=-1 | ||
- | DEVICE=MCP230XX | ||
- | IFACE=/ | ||
- | ADDR=0x20 | ||
- | SLEEP=0 | ||
- | #VPP_RUN + PGD_IN_PULLUP | ||
- | BITRULES=0x1010 | ||
</ | </ | ||
- | == Linux FTDI == | + | < |
+ | == Linux FTDI USB bit-bang | ||
< | < | ||
Line 595: | Line 602: | ||
PGM=-1 # DISABLED | PGM=-1 # DISABLED | ||
DEBUG=0 | DEBUG=0 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux GPIO bit-bang == | ||
+ | |||
+ | < | ||
+ | DEVICE=GPIO-BB | ||
+ | IFACE=/ | ||
+ | SLEEP=1 | ||
+ | BITRULES=0x1000 | ||
+ | VPP=9 | ||
+ | PGM=22 | ||
+ | PGC=10 | ||
+ | PGD=11 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux MCP2221 GPIO == | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # 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 | ||
+ | BITRULES=0x1000 | ||
+ | VPP=9 | ||
+ | PGM=-1 | ||
+ | PGC=10 | ||
+ | PGD=11 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == Linux RPi 4 GPIO == | ||
+ | |||
+ | < | ||
+ | DEVICE=RPI # AUTO-DETECT | ||
+ | SLEEP=1 | ||
+ | BITRULES=0x1000 | ||
+ | VPP=9 | ||
+ | PGM=-1 | ||
+ | PGC=10 | ||
+ | PGD=11 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | == POSIX Serial bit-bang === | ||
+ | |||
+ | Velleman K8048 | ||
+ | |||
+ | < | ||
+ | DEVICE=TTY | ||
+ | IFACE=/ | ||
+ | SLEEP=1 | ||
+ | BITRULES=0x001F | ||
</ | </ | ||
Line 697: | Line 845: | ||
| | ||
Linux AllWinner Banana Pi (A20) and Orange Pi (H2+/H3) GPIO. | Linux AllWinner Banana Pi (A20) and Orange Pi (H2+/H3) GPIO. | ||
- | | ||
- | Linux GPIO bit-bang version 1.3. | ||
| | ||
Linux CP2104 GPIO. | Linux CP2104 GPIO. | ||
FTDI | FTDI | ||
Linux FTDI USB bit-bang. | Linux FTDI USB bit-bang. | ||
+ | | ||
+ | Linux GPIO bit-bang version 1.3. | ||
| | ||
Linux MCP2221 GPIO. | Linux MCP2221 GPIO. | ||
Line 743: | Line 891: | ||
VERSION: | VERSION: | ||
- | 5.0 | + | 5.01 |
</ | </ | ||
Line 1257: | Line 1405: | ||
ptest VPP|PGC|PGD|PGM 5 | ptest VPP|PGC|PGD|PGM 5 | ||
VPP, PGC, PGD or PGM LOW-> | VPP, PGC, PGD or PGM LOW-> | ||
- | | + | |
PGD input test with 10 iterations of 1 second per step. | PGD input test with 10 iterations of 1 second per step. | ||
- | | + | |
D-SUB-9 test with 10 seconds per step. | D-SUB-9 test with 10 seconds per step. | ||
- | | + | |
ICSP test with 10 seconds per step. | ICSP test with 10 seconds per step. | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | ptest 3 100 | + | |
- | D-SUB-9 RTS 7 (PGC) DTR 4 (PGD) test with 100 microseconds | + | |
- | | + | |
- | | + | ICSPIO test with 100us clock mark time. |
- | | + | |
- | ICSPIO test with 100 microseconds | + | |
- | | + | |
RPI GPIO test with 10 seconds mark time. | RPI GPIO test with 10 seconds mark time. | ||
+ | ptest ALLWINNER 10 | ||
+ | BPI/OPI GPIO test with 10 seconds mark time. | ||
VERSION: | VERSION: | ||
- | 5.0 | + | 5.01 |
</ | </ | ||
Line 1316: | 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 . |