I'm not sure what you mean by read data from the uart with the PICkit2. Serial
port interface software in Linux is not difficult to write. If you can
communicate directly through a serial port, why would you need the PICkit2 in
between?
Jeff
In the Windows PICkit 2 PC application, there is a UART tool. Basically
PICkit 2 acts as a rudimentary USB to Serial Converter here without the
level shifter to RS232 kind of electrical signal level. Normally USB to
Serial converter uses USB CDC ACM protocol and is supported by
the Linux kernel with usbserial or cdc-acm driver. But in the case of
PICkit 2, it is using a vendor specific USB HID protocol as the underline
protocol. So the idea is to write a tool to use the PICKIT 2 pseudo
UART function. I guess it can still use the low level libusb (linux)
or native HID (Mac OS X) function currently as the base.
Xiaofan
A Unix serial port can be thought of a special file that supports
read(), write() and a few special ioctl() calls (to set baudrate, stop
bits etc). So the easiest way to make a serial port might be to
extend pk2cmd to support these calls, then implement the special file
in userspace using libfuse. Then no kernel hacking or USB trickery is
required.
Regards,
Mark
markrages@gmail
--
Mark Rages, Engineer
Midwest Telecine LLC
mark...@midwesttelecine.com
Jeff
I think you are talking about accessing a serial port, while I'm
talking about providing a serial port for other code to access.
Please privately send me whatever technical documentation you have on PICkit 2
UART emulation, and I'll have a look at it to evaluate how much time would be
needed for the project. Classes start in two weeks (I'm teaching statistics
again, yay!) so I'd like to get a good handle on the project by then.
Jeff