Der Autor hat mich daran erinnert, dass der Zugriff auf USB nicht jedem
gestattet ist. Leider habe ich auch als root nicht unbedingt Erfolg:
Ubuntu 8.10, 2.6.27-14-generic.
dmesg
... new full speed USB device using ehci_hcd ...
lsusb
... ID 04d8:0033 Microchip Technology, Inc.
PICkit firmware: PK2V023200.hex
sudo groupadd microchip
sudo usermod -a -G microchip USER
id USER
...,xxxx(microchip)
# /etc/udev/rules.d/026_microchip.rules
#PICkit2
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0033",
MODE="0666", GROUP="microchip", SYMLINK+="pickit2-%k"
Habe einige Varianten ausprobiert, bei Ubuntu ist wohl kürzlich ein
neues udev eingesetzt worden und die Syntax hat sich geändert.
sudo /etc/init.d/udev reload
Aus-/Einstecken vom PICkit
ls /dev/pi*
/dev/pickit2-8-2.1.3
(mit BUS or SUBSYSTEMS gibt es 3 andere symlinks).
./pk2serial
Can't set vendor config.
Mit sudo bekomme ich keinen Fehler:
sudo ./pk2serial
_
aber auch nur das, was ich eintippe. Der Autor schreibt "serial console
on stdio"
TX (pin 5) verbunden mit RX (pin 4) bringt nichts.
Fragen:
Warum funktionieren die udev rules nicht?
Warum ergibt ein loopback mit sudo "./pk2serial -p" kein Echo?
"PICkit 2 Microcontroller Programmer User's Guide":
http://www.microchip.com/Microchip.WWW.SecureSoftwareList/secsoftwaredownload.aspx?device=en023805&lang=en&ReturnURL=http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805&redirects=pickit2#
Hier die wichtigsten Infos:
Pin Description*
> 1 = No Connect
2 = VDD Target
3 = VSS (ground)
4 = RX (PICkit 2 In)
5 = TX (PICkit 2 Out)
6 = No Connect
150 to 38400 baud, including custom non-standard baud rates.
The PICkit 2 UART Tool will work with target VDD voltages from 2.5 Volts
to 5.0 Volts.
The format of the serial signals on pins 4 and 5 is inverted such that a
Start Bit = logic low (VSS), and a Stop Bit = logic high (VDD). The
serial data format is always 8 data bits, no parity, with one stop bit.
Even though PICkit 2 may not supply the target VDD, the PICkit 2 VDD pin
must be connected to the target VDD voltage or it will not be able to
communicate.
http://de.wikipedia.org/wiki/EIA-232