PICkit 2 UART tool

238 views
Skip to first unread message

Jeff Post

unread,
Jan 15, 2009, 5:05:49 PM1/15/09
to pickit...@googlegroups.com, Walter....@microchip.com
Ok, I've looked over the specs and it should be easy to write an application
to use the PICkit 2 UART.

The first step in writing good software is *not* to write the software spec,
but to write the user's guide. I'd like to know what kind of functionality
anyone would want in such a tool. What features would you like to see?

Jeff

Steven Bell

unread,
Jan 16, 2009, 11:37:24 PM1/16/09
to pickit...@googlegroups.com, j_p...@pacbell.net

One approach would just be a command-line program that prints output from the UART to the terminal window.  It would need basic parameters for baud rate and perhaps other serial port parameters.  This would be sufficient, perhaps best, for what I intend to do.

Ultimately, I would like to write a GUI (probably in Java for easy portability between Linux and OSX) similar to the Windows UART tool.  Somehow, the GUI code would need an interface to continuously update the character stream.
I don't have a good idea of how this interface would work or how it should be implemented, but here's my attempt to describe it based on what I know.
There is a buffer which holds characters received from the PICkit2.
At a minimum, there are methods to check if the buffer is empty and to grab a character, which can be called from external programs.
Similarly, there would be a buffer for output to be sent to the PIC, with corresponding methods to fill it with characters and to check if it is empty (ready for more).

Steven
 

Daniel Turner

unread,
Jan 17, 2009, 2:04:39 AM1/17/09
to pickit...@googlegroups.com
I like your development philosophy. I've never heard it put that way,
but the last few simple projects I've worked on I've taken that
approach.

Why not write a serial port emulator? Something that would allow
existing software to interface to the UART HID device? A simple config
file in /etc could specify baud, etc as well as 'device' name. Then a
simple GUI or otherwise app to modify the config file.
--
-Daniel
KD5UZZ
www.w5yj.org

dsc

unread,
Jan 24, 2009, 11:18:37 PM1/24/09
to pickit-devel
Hi!
I think a good way to support most of the existing tools is
interfacing to a
pseudo-terminal (PTS). A PTS look exactly like a serial port in Linux,
so
standard serial programs (like gtkterm or minicom) can be used.

See this example program, using a PTS is easy:
http://daniel.serpell.googlepages.com/testpts.c

Daniel.
Reply all
Reply to author
Forward
0 new messages