gnupic: [sdcc] SDCC with HID for a USB programmer


Previous by date: 19 Nov 2005 01:10:12 +0000 Re: [gnupic] Building of gputils using MinGW/MSys under Windows, Peter
Next by date: 19 Nov 2005 01:10:12 +0000 Re: [gnupic] Building of gputils using MinGW/MSys under Windows, Craig Franklin
Previous in thread:
Next in thread:

Subject: [sdcc] SDCC with HID for a USB programmer
From: Xiaofan Chen ####@####.####
Date: 19 Nov 2005 01:10:12 +0000
Message-Id: <a276da400511181710o3231594wa957413171b820a1@mail.gmail.com>

I just read this in the Microchip Forum USB section. Quite interesting.

Regards,
Xiaofan

[quote]ORIGINAL:  xander

I've been using SDCC (available from sourceforge) for several months
now with 2455 and friends.  You will want one of the recent nightly
builds to get everything working right.  Total cost is $0, even if you
throw in GPUtils for assembler and linker for complicated makefiles.

A plus with the SDCC compiler versus C18 is that it (mostly) takes
care of pointers.  You can use them for code, data, or ram without an
extra declaration.  OTOH, the Microchip samples will NOT compile right
out of the box.

Code is bulkier than C18 (20-50%) so you should take that into
consideration if you are pushing the code memory available on the
chip.  The C18 compiler has a much better optimizer.

I'm close to complete on a PIC programmer that works over USB (or
serial if that's to your liking, but then you need an external power
supply).  All the basic USB code is in C with some asm for the low
level bit manipulations when programming the target.

I'm using the HID class.  Easiest on Windows - no drivers needed, just
plug in and go.  I gave CDC a some consideration, but it really didn't
offer any benefits over just using GET_FEATURE/SET_FEATURE on endpoint
0.  The time to manipulate the target chip tends to dominate over
communications lags from using a control pipe.

It's a hobby project, "prototype programmer", but I'm considering
putting a PCB up for sale.  Might submit description to magazine for
an article.  The most expensive parts of this project are the PIC
($8), ZIF ($12), and PCB ($60 for 3 of them, should be below $10 each
if I get fifty or so made).

I plan to GPL the code, both firmware and driver application. 
Attached is a picture of the first rev of the board.  The chips next
to the board are the ones I've successfully programmed.  A decent
variety of 12F, 16F, and 18F parts.

There are a couple of fixes needed, note tape under crystal -
otherwise there would be a short on some traces.  There are a couple
of cut traces and wires on the bottom of the board too.  I also need
to figure out why the 5V regulator gets hot w/o a heatsink - for a
board that happily runs on USB power alone (measured around 80 mA on
breadboard) this just shouldn't be happening when I plug it in.

Next step is to get hold of a VID/PID pair.  Don't want to spend big
$'s.  I think I read that Microchip has some sort of deal for using
their VID as long as you are below a particular sales threshold - need
to look into it.

Xander
[/quote]

Previous by date: 19 Nov 2005 01:10:12 +0000 Re: [gnupic] Building of gputils using MinGW/MSys under Windows, Peter
Next by date: 19 Nov 2005 01:10:12 +0000 Re: [gnupic] Building of gputils using MinGW/MSys under Windows, Craig Franklin
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.