Getting Started
To those who have already covered off this stuff please forgive me and for those of you reading this with my level of knowledge, please comment if you have any questions about what I have done or want more details.
First things first, you're going to need a guide book to help you along. I can HIGHLY recommend Physical Computing by Dan O'Sullivan and Tom Igoe from ITP at NYU in NYC. These guys run courses focusing on Physical Computing and their book is such good value for money that its totally worth buying. Jump off and over it from Amazon now.......
While you wait for the FedEx man or the good old postie, you might like to check out the ITP Physical Computing site, its full of useful comments, links to resources as well as extracts from the book. You'll probably end up referring to the site numerous times, so jump off an book mark it.
You should also sign up for their Physical Computing mailing list. Its not as useful and is really aimed at their students but bits of useful info do drop by. I haven't posted on the mailing list, but I'd imagine if you had a question they would probably help you out.
The Physical Computing book focuses on BASIC STAMP chips and the PIC 18F452, which is a 40 pin chip, as well as being fairly windows focused for the "tools" that they use.
As a bit of background, you develop for the PIC chip by writing the code on your PC, compiling it into machine code (.hex file) and then sending the .hex code from your PC to the chip using a "programmer", which is a physical circuit with a socket for your PIC chip to be placed into. You then take your PIC chip out of the "programmer" and place it into your circuit that you have built and power it up...all things working your circuit should do what it supposed to do.
Now, this means you need a compiler on your PC and a programmer to attach to your PC. At this time, most of the compilers work on the PC and some of the higher level language ones in PIC Basic Pro cost a couple of hundred $$. And, all the programmers I have seen attach to a windows computer with the software which downloads to the programmer, also only being available on windows.
Instead of a windows focuses development environment, I'm using an OS X oriented one with windows only for the "PIC programming" bit.
I'm writing my code in a language called JAL. JAL is a high level language sort of like Pascal and has many built in libraries for doing some fairly standard stuff such as serial communication, reading temp. chips etc. Best of all you can compile it to run on OS X.
Once I have written and compiled the JAL code, I then jump over my windows machine, grab the .hex file off my OS X machine (using the web server, you could just email or FTP it etc).
Attached to my windows computer is a Talking Electronics JDM style PIC programmer which cost all of 14$ Australian including postage. It comes as a kit which took me about 90 mins to put together (being quite careful as this was the first soldering project I'd done in forever). There were no really tricky bits except for the serial cable which took me a little while cause it was quite finiky.
In order to send the .hex file from the windows computer to the Talking Electronics PIC programmer, you will need an application called IC-Prog. This is linked to from the Talking Electronics page. I have found configuring the IC-Prog application a little difficult to understand at first, not knowing all about the oscillators, and the various settings. I'll post on installing, configuring and getting IC-Prog running later as well as building the Programmer.
The downside of the Talking Electronics programmer is that it is limited to 18 pin PIC chips, which means that the 18F452 used in the Physical Computing book is not able to be used with this programmer. (As a note, it may well be possible to attach a 40pin socket with some hacking but out of the box, it won't support it).
If you want to program a PIC 18F452 or other 40 pin PIC chip you will need to get another programmer which supports that chip size. There are plenty of JDM programmers around as well as kits for serial and parallel programmers available at your local electronics shop, so you should be able to track down something that works for you.
Once you have your programmer connected and the programmer software running, you load the .hex file, set the configuration parameters and then "burn" the .hex file onto the PIC chip. Your programmer's LEDs should flash and if things are working ok, you will get a message saying that the programmer worked.
Finally you disconnect your programmer, take out your PIC chip and put it into your circuit to use.
Of course, you are now asking....what circuit???
Well, you will need to go shopping and buy up a breadboard and a bunch of tools (soldering iron, wire cutters, pliers etc) and components (resistors, capacitors, transistors) etc. The Physical Computing book has a comprehensive shopping list and this is also available on the Physical Computing web site (today the site is screwed with what looks like the entire wiki being overwritten by spammers).
I spent about 120$ AUD (or at least my parents did on an Xmas present for me ;-) ) buying everything I needed. I already had a soldering iron which would have cost another $20 and I bought a KeySpan USB to Serial adaptor of future projects on Amazon for around 30$ USD.
Once you have your gear, the first thing you need to build is the "hello world" of physical computing, a flashing LED. It may not sound very much but it proves your end to end infrastructure and shows you have everything working.
Next post I'll talk about my project plans.


0 Comments:
Post a Comment
<< Home