[<<][staapl][>>][..]
Mon Aug 18 16:58:46 CEST 2008

PicKit2 arrived


> piklab-prog -p pickit2 -d 18f1220 -c connect
piklab-prog: version 0.15.2 (rev. distribution)
programmer: pickit2
device: 18F1220
Using port from configuration file.
Connecting PICkit2 Firmware 1.x on USB Port with device 18F1220...
Error: USB Port: Could not find USB device (vendor=0x04D8 product=0x0033).

> sudo piklab-prog -p pickit2 -d 18f1220 -c connect
piklab-prog: version 0.15.2 (rev. distribution)
programmer: pickit2
device: 18F1220
Using port from configuration file.
Connecting PICkit2 Firmware 1.x on USB Port with device 18F1220...
Firmware version is 2.1.0
Warning: The firmware version (2.1.0) is higher than the version tested with piklab (1.20.0).
You may experience problems.
  set Vdd = 5 V and Vpp = 12 V
Error: USB Port: Error receiving data (ep=0x81 res=-110) (err=could not get bound driver: No data available).


Starting over:

From the PICkit 2 Interface guide Kit
PICkit2SourceGuidePCv2-52FWv2-32.pdf available in
http://ww1.microchip.com/downloads/en/DeviceDoc/FirmwareV2-32-00.zip

Looks like that's what I need.  The proper way is to integrate this
into Staapl, instead of using an external programmer.  Mostly because
the serial patch-through is what is most useful.

What is interesting about v2 firmware is that it is essentially an
interpreter for a script language.  This allows quite direct
manipulation of the interface, so it might be used for all kinds of
things!  It gives access to serial port emulation, I2C, SPI and the
normal clocked protocol.


Note: instead of adding the directory where the .dat file resides to
the run-time path, just copy that .dat file to /usr/local/bin together
with pk2cmd

Do i need to start digging in the .dat file?  Programming can probably
be outsourced to 'pk2cmd'.  The only interaction necessary is access
to the port directly.  The code in pk2cmd can be snarfed if reading
the .dat file should be necessary, but it's not priority it seems.

Next: libusb in PLT Scheme.  This looks like the excuse I need to dig
into FFI.  PICkit2 uses HID, which should be quite straightforward.
Does the FFI have a reader for C structs?

Hmm.. Just using emacs to edit the struct into an s-expression was
easy enough.

OK, got the reader to work... Why do people create such ad-hoc
formats?

The rest is for later.. Maybe the dsPIC compiler has a similar way of
reading in meta-data?


[Reply][About]
[<<][staapl][>>][..]