PICkit2

View: New views
14 Messages — Rating Filter:   Alert me  

PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I recently switched to PICkit2 (from ICD2) after discovering the v2.x
firmware is actually quite neat.

The PICkit2 seems like an interesting hw platform to build a universal
device programmer.  Is there anyone working on this?  Are there problems
that make it still too PIC-specific?

Cheers
Tom


<bait>

I have some software in Scheme that builds a scheme wrapper around the
PICkit2 v2.x programmer firmware command and script languages:
http://zwizwa.be/ramblings/staapl-blog/20080827-142443

It's an example about how simple it is to write a domain specific language
in Scheme.  Also, the code tree contains some code to read the Microchip
device description file into a Scheme datastructure.  All this is part
of the Staapl 'interactive debugger' layer.
http://zwizwa.be/staapl

</bait>



---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by seventh guardian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 28, 2008 at 10:09 AM, Tom Schouten <tom@...> wrote:
> Hello,
>
> I recently switched to PICkit2 (from ICD2) after discovering the v2.x
> firmware is actually quite neat.
>
> The PICkit2 seems like an interesting hw platform to build a universal
> device programmer.  Is there anyone working on this?  Are there problems
> that make it still too PIC-specific?

From what I can tell, you can "wiggle" the output lines as you wish,
so it should be possible. They use it to implement a digital scope and
a usb/serial adapter.

The only problem so far has been the really ugly and cryptic code of
pk2cmd. I really can't understand it, and it seems to be like that on
purpose..... :(

Cheers,
  Renato

> Cheers
> Tom
>
>
> <bait>
>
> I have some software in Scheme that builds a scheme wrapper around the
> PICkit2 v2.x programmer firmware command and script languages:
> http://zwizwa.be/ramblings/staapl-blog/20080827-142443
>
> It's an example about how simple it is to write a domain specific language
> in Scheme.  Also, the code tree contains some code to read the Microchip
> device description file into a Scheme datastructure.  All this is part
> of the Staapl 'interactive debugger' layer.
> http://zwizwa.be/staapl
>
> </bait>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@...
> For additional commands, e-mail: gnupic-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Xiaofan Chen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 28, 2008 at 5:09 PM, Tom Schouten <tom@...> wrote:
> Hello,
>
> I recently switched to PICkit2 (from ICD2) after discovering the v2.x
> firmware is actually quite neat.
>
> The PICkit2 seems like an interesting hw platform to build a universal
> device programmer.  Is there anyone working on this?  Are there problems
> that make it still too PIC-specific?

The Microchip licenses (for the firmware and pk2cmd source) only allow
PICkit 2 to be used with Microchip product (PIC, EEProms, etc).

Xiaofan

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Jean-Daniel Nicoud :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Xiaofan
 >> The Microchip licenses (for the firmware and pk2cmd source) only
allow PICkit 2 to be used with Microchip product (PIC, EEProms, etc).

As I read the Readme of Pickit2, I have the feeling the soft could be
completely rewritten and downloaded for different processors. Did you
saw a sentence that restricts the use of the hardware?

>> The PICkit2 seems like an interesting hw platform to build a universal
>> device programmer.  Is there anyone working on this?  Are there problems
>> that make it still too PIC-specific?
There is a good processor inside the Pickit2. They added the UART
interface and Logic analyser. Doing the AVR and other's microcontroller
programming is I guess only a software problem.

I like the Pickit2 USB programmer, cheap and it can be used as an
UART-USB interface when it has finished its work of programming your Hex
file. It encouraged me to develop a set of boards that makes both
learning and development more easy. Have a look to http://www.didel.com/

All the best.  JD
--
DIDEL Jean-Daniel Nicoud nicoud@...  Tel +41 21 728-6156 Fax -6157
http://www.didel.com   DIDEL SA  Mouette 5 CH-1092 Belmont   Switzerland

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Ralph Corderoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Tom,

Xiaofan wrote:
> On Thu, Aug 28, 2008 at 5:09 PM, Tom Schouten <tom@...> wrote:
> > The PICkit2 seems like an interesting hw platform to build a
> > universal device programmer.  Is there anyone working on this?  Are
> > there problems that make it still too PIC-specific?
>
> The Microchip licenses (for the firmware and pk2cmd source) only allow
> PICkit 2 to be used with Microchip product (PIC, EEProms, etc).

To avoid this restriction, you may want to consider the USBprog.

    http://www.embedded-projects.net/index.php?page_id=165
    http://shop.embedded-projects.net/product_info.php?info=p6_usbprog-v3-0--adaptor-preassembled-.html

The firmware and hardware design is all open source IIRC.  The idea is
that different firmware downloads give the hardware different
functionality.  Here's a list.

    http://www.embedded-projects.net/index.php?page_id=168

If it's up to date, it looks like they may welcome contributions on the
PIC programming side.

Cheers,


Ralph.


---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Xiaofan Chen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 29, 2008 at 3:01 PM, Jean-Daniel Nicoud <nicoud@...> wrote:

>>> The Microchip licenses (for the firmware and pk2cmd source) only allow
>>> PICkit 2 to be used with Microchip product (PIC, EEProms, etc).
>
> As I read the Readme of Pickit2, I have the feeling the soft could be
> completely rewritten and downloaded for different processors. Did you saw a
> sentence that restricts the use of the hardware?

I do not know of any restricts on the hardware side. However, it would
be a lot of work to rewrite the firmware and host software.

Xiaofan

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 29, 2008 at 08:10:51AM +0100, Ralph Corderoy wrote:

>
> Hi Tom,
>
> Xiaofan wrote:
> > On Thu, Aug 28, 2008 at 5:09 PM, Tom Schouten <tom@...> wrote:
> > > The PICkit2 seems like an interesting hw platform to build a
> > > universal device programmer.  Is there anyone working on this?  Are
> > > there problems that make it still too PIC-specific?
> >
> > The Microchip licenses (for the firmware and pk2cmd source) only allow
> > PICkit 2 to be used with Microchip product (PIC, EEProms, etc).
>
> To avoid this restriction, you may want to consider the USBprog.
>
>     http://www.embedded-projects.net/index.php?page_id=165
>     http://shop.embedded-projects.net/product_info.php?info=p6_usbprog-v3-0--adaptor-preassembled-.html
>
> The firmware and hardware design is all open source IIRC.  The idea is
> that different firmware downloads give the hardware different
> functionality.  Here's a list.
>
>     http://www.embedded-projects.net/index.php?page_id=168
>
> If it's up to date, it looks like they may welcome contributions on the
> PIC programming side.
>

interesting.

I wonder.. If one makes a PICkit firmware clone, porting it to the AVR on
the USBprog, can the microchip .dat file (which contains software in the
form of uploadable scripts) and pk2cmd still be used?  I don't see a problem
since it would still only be used to program Microchip devices.. Any lawyers
on this list?

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 28, 2008 at 11:24:47AM +0100, Renato Caldas wrote:

> On Thu, Aug 28, 2008 at 10:09 AM, Tom Schouten <tom@...> wrote:
> > Hello,
> >
> > I recently switched to PICkit2 (from ICD2) after discovering the v2.x
> > firmware is actually quite neat.
> >
> > The PICkit2 seems like an interesting hw platform to build a universal
> > device programmer.  Is there anyone working on this?  Are there problems
> > that make it still too PIC-specific?
>
> From what I can tell, you can "wiggle" the output lines as you wish,
> so it should be possible. They use it to implement a digital scope and
> a usb/serial adapter.

The logic analyzer and serial passthrough seem to be implemented on-chip
though, not with scripts.  Makes sense since they require fast response.

>
> The only problem so far has been the really ugly and cryptic code of
> pk2cmd. I really can't understand it, and it seems to be like that on
> purpose..... :(
>

It is a bit verbose, but otherwise I've found it quite straightforward, at
least the part I've looked at (only initialization and a few simple
scripts).  Most of the beef seems to be in the .dat file, and using
that is mostly figuring out in which order to run the standard set of
scripts. (Just an impression, I haven't got it working yet..)

Jeff, Xiaofan, any comments on the source of pk2cmd?  What did you add?

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 29, 2008 at 03:49:24PM +0800, Xiaofan Chen wrote:

> On Fri, Aug 29, 2008 at 3:01 PM, Jean-Daniel Nicoud <nicoud@...> wrote:
>
> >>> The Microchip licenses (for the firmware and pk2cmd source) only allow
> >>> PICkit 2 to be used with Microchip product (PIC, EEProms, etc).
> >
> > As I read the Readme of Pickit2, I have the feeling the soft could be
> > completely rewritten and downloaded for different processors. Did you saw a
> > sentence that restricts the use of the hardware?
>
> I do not know of any restricts on the hardware side. However, it would
> be a lot of work to rewrite the firmware and host software.

I didn't look at the scripts in the .dat yet, but if they don't use any
hard-to-port opcodes (like direct access to the SFRs on the PK2) it should
not be so incredibly difficult to reuse the scripts and implement just
what is necessary for a certain range of chips. i'm thinking the USBprog
AVR here.. and thinking (dreaming) it might be an interesting excercise for
a portable Staapl application, targeting PIC18 and AVR).

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Xiaofan Chen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 4, 2008 at 6:16 AM, Tom Schouten <tom@...> wrote:
> Jeff, Xiaofan, any comments on the source of pk2cmd?  What did you add?

Jeff did the hard work to port it to Linux. I am basically a non-programmer
myself. I am mainly a hardware engineer with a bit of knowledge of
simple firmware and I have almost next to zero expertise with PC
programming. So my main role is testing and a bit of USB support.

If you want to discuss PICkit 2 in more details, you may want to
post to pickit-devel mailing list.
http://groups.google.com/group/pickit-devel

Xiaofan

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Xiaofan Chen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 4, 2008 at 6:23 AM, Tom Schouten <tom@...> wrote:
>> I do not know of any restricts on the hardware side. However, it would
>> be a lot of work to rewrite the firmware and host software.
>
> I didn't look at the scripts in the .dat yet, but if they don't use any
> hard-to-port opcodes (like direct access to the SFRs on the PK2) it should
> not be so incredibly difficult to reuse the scripts and implement just
> what is necessary for a certain range of chips. i'm thinking the USBprog
> AVR here.. and thinking (dreaming) it might be an interesting excercise for
> a portable Staapl application, targeting PIC18 and AVR).

Many scripts are specifically for PIC programming. You can get a
much detailed output of the content of the dat file by running
Jeff's software dat2text which outputs text file with info about
all families, devices, and scripts in Microchip's PK2DeviceFile.dat file.
http://home.pacbell.net/theposts/picmicro/

Xiaofan

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The only problem so far has been the really ugly and cryptic code of
> pk2cmd. I really can't understand it, and it seems to be like that on
> purpose..... :(

I wrote down a code walk from pk2cmd's main() to the usb packets sent to
program a device.  It's here:

http://zwizwa.be/ramblings/staapl/20080904-131203

Really, the only problem is to do some family-specific things here and there,
but the rest seems to be just getting scripts out of the device-file and
uploading them to the pk2.


---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 04, 2008 at 05:49:07PM +0800, Xiaofan Chen wrote:

> On Thu, Sep 4, 2008 at 6:23 AM, Tom Schouten <tom@...> wrote:
> >> I do not know of any restricts on the hardware side. However, it would
> >> be a lot of work to rewrite the firmware and host software.
> >
> > I didn't look at the scripts in the .dat yet, but if they don't use any
> > hard-to-port opcodes (like direct access to the SFRs on the PK2) it should
> > not be so incredibly difficult to reuse the scripts and implement just
> > what is necessary for a certain range of chips. i'm thinking the USBprog
> > AVR here.. and thinking (dreaming) it might be an interesting excercise for
> > a portable Staapl application, targeting PIC18 and AVR).
>
> Many scripts are specifically for PIC programming. You can get a
> much detailed output of the content of the dat file by running
> Jeff's software dat2text which outputs text file with info about
> all families, devices, and scripts in Microchip's PK2DeviceFile.dat file.
> http://home.pacbell.net/theposts/picmicro/

I mean more specifically, whether the .dat file contains instructions for the pk2
such as 'PEEK_SFR , which on quick inspection doesn't seem to be the case.  The
essential scripts are really straightforward, and use only a couple of pk2 opcodes.

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: PICkit2

by Tom Schouten-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 29, 2008 at 09:01:25AM +0200, Jean-Daniel Nicoud wrote:

> ... Did you saw a sentence that restricts the use of the hardware?

I'm not sure if it is legally possible to restrict the use of the
hardware to prevent alternative firmware to be written for it..


---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...