Main

March 5, 2006

PIC MCUs Supported in my Mac OS X Environment

There are limitations on the PIC Micro-controller Units (MCUs) I can develop with in my Mac OS X systems. This comes from 3 sources: the Microchip PICKit2 programmer, the pk2 utility that communicates with the programmer, and the HI-TIDE C-language environment I'm using to produce PIC assembly.

I've come up with an intersection of the MCUs supported by the 3 tools so that I don't make the mistake of buying an incompatible MCU in the future. Here they are:

  • 12F629
  • 12F675
  • 16F627A
  • 16F684
  • 16F877
  • 16F877A

March 4, 2006

Electronics Stores in the Bay Area

I purchased the Microchip PICKit 2 PIC programmer not long ago with the hopes of programming some PICs to do fancy tricks with LEDs and stuff. But I've yet to acquire a PIC that I can program with my Mac OS X computers or the PICKit 2. This has been bugging me for a while, so I decided to take a trip to the Hobby Engineering store in Milbrae this afternoon in order to buy the components I've been hankering for. Unfortunately, it isn't open on Saturdays...or Sundays...or any day that someone who actually does this stuff as a hobby would be able to make their way to Milbrae (near South San Francisco). This got me down.

I think that hobby electronics has always had the potential to draw people into a friendly setting where they can exchange project ideas and advice. The Internet has a number of message boards and mailing lists, but none of them really appeal to me. I'd love to be able to drive to a nearby electronics store and be able to exchange conversation with someone who shares a similar interest in the field. Bookstores are a good analogy: you can buy a book online if you're concerned about price and raw data, but it's hard to compete with the environments afforded by brick-and-mortar bookstores.

So, in the interest of time, I'm going to order my parts on-line. Mooo....

February 8, 2006

Puh-Programming on Puh-PICs

My Microchip PICKit2 microcontroller programmer arrived yesterday, much to my glee. Actually, it arrived in Oakland via FedEx on Monday, but for some reason Microchip requested that the recipient (me) sign for the $50 package. As if I'd actually be at home at 1:30P on a Monday. So, last night I drove to the Oakland FedEx hub through the slightly scary 98th Avenue neighborhood. Shipping hubs are not always in the best neighborhoods, in my experience. Well, except for the Monterey hub located in the sunny and welcoming Ryan Ranch business park. Ahh...

So, I connected the programmer and demonstration board to the USB port on the Mac Mini and attempted to power the device and see some magic happen. Nothing. The ‘pik2’ program reported that the device could not be found or something. After consulting the documentation I learned that this is commonly associated with the older firmware (mine was 1.0.1). Oh, and you need a PC to upgrade the firmware.

This morning I used my corporate Dell laptop to upgrade the firmware and, yes, lights did flash. Magic happened. I can't wait to experiment with the demo board this weekend. There are a lot of fun microcontroller projects on the Make blog that I'd like to try out. A good beginner project would be the oh-so-80's chasing LEDs made famous by the television show "Night Rider". Maybe Natalie and I can do a little collabo where she designs a garment using her new sewing machine and I deck it out with LEDs. For Phig.

January 29, 2006

Proto-Boards Resurrected

Since learning of the PIC2 Micocontroller Programming Kit, I began wondering if I still had my prototyping breadboards from my Electrical Engineering classes at UC Davis. After 10 minutes of going through boxes, I found my two breadboards: the Jameco JE26 (left), and the "Global Specialties" proto-board 10 (right).

JE26 and proto-board 10

The JE26 was purchased late in the quarter of my Circuits 2 (EEC100) class to accomodate my larger projects. It is three-times as large as the proto-board 10. I found some Integrated Circuits (ICs) left on the JE26 from my last project. They include some Operational Amplifiers (Op-Amps) and Multi-Input NAND gates. I'm sure I'll find a use for them in a future project.

I showed the protoboards to Natalie, and she remarked that I must have looked like a total geek while carrying the protoboards around campus. She's certainly right, but I thought of it more as a source of pride at the time. It isn't often that computer scientists can put their hands on a physical representation of their work.

January 25, 2006

PIC Microcontroller Programming

I read a great article in the latest copy of Make magazine about using PIC microcontrollers in hobby electronics projects. I used PICs in a couple of Electrical Engineering courses at UC Davis, and found a lot of joy in having a program written in C and assembly language take on a physical representation through a combination of integrated circuits (ICs), resistors, LEDs and such. Upon graduating, I became very software-oriented and left my EE work behind.

Microcontrollers are general-purpose, low-power, programmable computers that can be found in any number of household devices. Any time you use an electrical device requiring some degree of logic (i.e. microwave, VCR, etc) but not a full-fledged computer, it's likely that you're interacting with a microcontroller. The potential for creating fun embedded-programming projects is huge!

It's amazing how inexpensive the hardware has become: the industry-leading company Microchip produces microntroller starter kits ranging from $36-$50. They feature microcontroller programmers with USB interfaces, and can be used with a broad range of computing platforms (including Mac OS X). I'm probably going to buy the PICkit 2 product, which supports 8-,14-, and 20-pin microcontrollers. The additional pins typically provide more input/output lines. The only additional tools required are electrical components (resistors, capacitors, switches, LEDs, etc) and a regulated power supply. The later might be the most expensive component, but I should be able to get a low-end model since PIC projects usually require just a fixed 5-volt power supply.