Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

not batman

macrumors newbie
Original poster
Jun 26, 2006
4
0
Toronto, Canada
Sorry since there is already a thread about programming microcontrollers, but I thought it better to make a whole new thread rather than hijack that one.

Basically the most experience I have with programming is a bit of very simple Basic Stamp work. I'm an art student and programming isn't really my forte, but after taking an electronics class at my Uni I have become very interested in integrating electronics into my work.

I am getting pretty comfortable with programming my Basic Stamp (through the program MacBS2 http://www.muratnkonar.com/otherstuff/macbs2/) but I like the idea of how cheap PIC chips are. I don't really like the idea of having to shell our ~ $50 every time I manage to make and sell another electronic piece of art.

SO! Getting to my point (finally :p) I want to learn to program PIC chips, and I want to do it on my Mac. I don't know if there is some way of programming them in some sort of Basic language, since I have no clue at all about programming in C, but I am sure I can learn pretty quickly and pick things up as I need to know them.
If anyone could point me to some resources, tutorials, anything at all. Heck, even just tell me to give up now and stick with the Basic Stamp if you think that would be most appropriate. Really, anything to get me started on the way of programming PIC chips/microcontrollers would be greatly appreciated.

Thanks a lot in advance!
And if there is any more information as to what experience/equipment I have available I would be happy to divulge such details.
 
Sounds like you would really benefit from biting the bullet and learning C or Assembly and working with PICs. My limited PIC experience has been using Windows based tools so I can't be of much direct assistance, except to say look to the linux community for lots of help that could be portable to OS X...

What kind of stuff do you want the PIC to be able to do in your art.

B
 
Yeah, I have been thinking that I will just have to just buckle down and learn C, but kind of hoping there would be some easy way out. :p

Do you have any recommendations for getting started? It would be awesome if you did.

As to what I want to do with the PIC in my art, I mostly want to be able to make mass produceable, interactive art. I'd like to be able to have installations that can respond to user input or work "autonomously." I'm not exactly sure what I want to do quite yet because I don't really know exactly what I can do with PICs.
 
I'd buy the MPLAB ICD 2 and a PICDEM 2 Plus demo board from MicroChip. Then download the demo/student edition of the C-compiler and enjoy.

The combination will set you back ~US$250 and requires Windows :( , but once you have it you have a full featured in-circuit debugger which'll help you figure out what is wrong. Custom boards for specific application can be built and populated extremely cheaply, you can even design online at places like http://www.pad2pad.com/

B
 
balamw said:
I'd buy the MPLAB ICD 2 and a PICDEM 2 Plus demo board from MicroChip. Then download the demo/student edition of the C-compiler and enjoy.

The combination will set you back ~US$250 and requires Windows :( , but once you have it you have a full featured in-circuit debugger which'll help you figure out what is wrong. Custom boards for specific application can be built and populated extremely cheaply, you can even design online at places like http://www.pad2pad.com/

B


If you are going to do pic development then the icd 2 is the way to go. You can get a cheap knock-off here: http://www.olimex.com/dev/index.html

Also, buy a cheap pc. Its way better than try to get virtual pc and the like to work.

I've done a little PIC development, and they are fun little devices. A friend of mine suggested the AVR mircocontrollers. I guess you can cross compile binaries for them using gcc.
 
Thanks for those suggestions, I'll try to determine what will work best for me.

I guess there are no real options for using my Mac? Hmm... I guess I'll have to work harder on getting my girlfriend to give me her IBM Thinkpad and replacing it with a Macbook...

Thanks again!
 
not batman said:
I guess there are no real options for using my Mac? Hmm... I guess I'll have to work harder on getting my girlfriend to give me her IBM Thinkpad and replacing it with a Macbook...
I think that once you have it all working using the Windows tools you can make one of the Mac/unix tools work too, but learning on one of the slightly rougher tools might be a stretch.

B
 
not batman said:
I guess there are no real options for using my Mac?

Don't despair! There are always options.

If you want to use your Mac to do the programming then it's worth considering a PICkit 2. It uses USB so you'll definitely be able to connect it to any Mac. You'll have to use command line tools to operate it but the latest version of PK2 works very well on MacOS and has a native driver.

As far as languages go you might have trouble finding a PIC C compiler for MacOS but you can get a good quality assembler, GPASM, for free.

All of these tools will require a certain amount of effort to setup. Nothing major but if you've never compiled anything before it may frustrate you. If you have any savvy friends they may be able to help.
 
not batman said:
Yeah, I have been thinking that I will just have to just buckle down and learn C, but kind of hoping there would be some easy way out. :p

Do you have any recommendations for getting started? It would be awesome if you did.

As to what I want to do with the PIC in my art, I mostly want to be able to make mass produceable, interactive art. I'd like to be able to have installations that can respond to user input or work "autonomously." I'm not exactly sure what I want to do quite yet because I don't really know exactly what I can do with PICs.

Why PIC? If you are talking about "installations" these are large pieces arn't they? You don't need the PIC for it's small size. Why can't you se a PC. Yes a full up PC. Find one that run with no fan, no monitor or keyboard. Run Linux on the PC. If you value your time ease of programming maers. PCs are close to free. Maybe old Pentium II notebooks? Linux PCs are very much like Macs and ship with much of the same software and you can program them in BASIC, C, Perl or whatever you want.
 
Oscar_Wilde said:
Don't despair! There are always options.

If you want to use your Mac to do the programming then it's worth considering a PICkit 2. It uses USB so you'll definitely be able to connect it to any Mac. You'll have to use command line tools to operate it but the latest version of PK2 works very well on MacOS and has a native driver.

As far as languages go you might have trouble finding a PIC C compiler for MacOS but you can get a good quality assembler, GPASM, for free.

All of these tools will require a certain amount of effort to setup. Nothing major but if you've never compiled anything before it may frustrate you. If you have any savvy friends they may be able to help.

Those sound like great options, thanks for suggesting them!

Why PIC? If you are talking about "installations" these are large pieces arn't they? You don't need the PIC for it's small size. Why can't you se a PC. Yes a full up PC. Find one that run with no fan, no monitor or keyboard. Run Linux on the PC. If you value your time ease of programming maers. PCs are close to free. Maybe old Pentium II notebooks? Linux PCs are very much like Macs and ship with much of the same software and you can program them in BASIC, C, Perl or whatever you want.

I have considered a PC, and while it would be a fine option for larger scale installations I have been working lately on smaller pieces that can be deployed into public places and so I need small and cheap. I wouldn't mind if someone made off with ~ $30 worth of electronics and hardware, but a whole PC is is too much for me to risk putting out in the world.
 
>I wouldn't mind if someone made off with ~ $30 worth of electronics and
>hardware, but a whole PC is is too much for me to risk putting out
>in the world.

don't rule it out. you can get a decent computer for free very easily. i've gotten several right off the sidewalk on trash day, at the recycling center, etc. craigslist is good for free and dirt cheap stuff like that too. i'm also an artist and honestly, i think of a whole PC before a microcontroller anytime possible - the programming is already something i know more about and it makes other things simpler .. troubleshooting on site by bringing a monitor/keyboard along maybe, ease of replacement of something breaks (new free PC with a copy of the boot disk in it), no power issues - you just plug it into a regular outlet.

good luck,
rahji
 
Also, buy a cheap pc. Its way better than try to get virtual pc and the like to work.

MPLAB 8 and an ICD2 or PicKit 2 works fine under Parallels with my MacBook. I'm just beginning to learn C and using the free educational C compilers offered by Microchip or Hi-Tech.

It took no special configuration to get the USB PIC devices to work other than to tell Parallels to port them to the virtual machine.

I'm still holding my breath that Microchip will eventually port MPLAB to OS-X.
 
I think this should be nominated for one of the oldest resuscitated threads. When this thread was started there were only iMacs and MacBook Pros on intel, and parallels wasn't yet available.

I'm not trying to indicate that the information provided was not useful, only that I suspect the OP has come up with some solution by now.

-Lee
 
I'm not trying to indicate that the information provided was not useful, only that I suspect the OP has come up with some solution by now.

-Lee

Entirely my fault! I was searching for programming the PIC with OS-X rather than Windows and failed to notice the date of the post I replied to.

Sorry about that! :)
 
Hi there,

Just wanted to drop in and see if there had been any updates on this over the last few years?
I would really love a way to program my PIC's from Xcode on my macbook.

Thanks

Thom
 
Holy thread re-resurrection Batman! It just won't die. ;)

Paralles/VMware still seems like the best bet. You can still use Xcode as your editor though...

B
 
I've done a little PIC programming with Hitech C and a PicKit programmer. It's a commandline compiler, but I wrote a little cocoa wrapper for it so's I can click buttons rather than type commands to compile and load the hex files.
 
I've done a little PIC programming with Hitech C and a PicKit programmer. It's a commandline compiler, but I wrote a little cocoa wrapper for it so's I can click buttons rather than type commands to compile and load the hex files.

Shows it's been a while since I looked at it, but there was no Hitech C for Mac OS (only Windows and Linux) the last time I checked. (Which doesn't seem that long ago...)

B
 
An alternative approach?

I am running a Microcontroller class for students on an HND course where they are designing and producing an electronic sculpture for the local art gallery. All the work is being done on Macs.

Our platform is Arduino (http://www.arduino.cc) which is available on Windows, Mac and Linux. Boards (complete with USB) can be purchase for around £20 and the components to build a custom board for under £10.

Custom PCBs are being designed using Fritzing (http://fritzing.org).

The development cost is a fraction of using PICs plus programming is done in C using the dedicated IDE.
 
I am running a Microcontroller class for students on an HND course where they are designing and producing an electronic sculpture for the local art gallery. All the work is being done on Macs.

Our platform is Arduino (http://www.arduino.cc) which is available on Windows, Mac and Linux. Boards (complete with USB) can be purchase for around £20 and the components to build a custom board for under £10.

Custom PCBs are being designed using Fritzing (http://fritzing.org).

The development cost is a fraction of using PICs plus programming is done in C using the dedicated IDE.

I do like Arduino quite a lot, but I would argue that PICs are cheaper if you want to do more than just a couple of custom installations.
 
I do like Arduino quite a lot, but I would argue that PICs are cheaper if you want to do more than just a couple of custom installations.

The benefit of Arduino is the massive online support plus complete cross-platform support. I looked a PIC a while back. If anyone can suggest a PIC solution as easy to work with as Arduino I will certainly be taking another look...;)
 
The benefit of Arduino is the massive online support plus complete cross-platform support. I looked a PIC a while back. If anyone can suggest a PIC solution as easy to work with as Arduino I will certainly be taking another look...;)

Welcome to the world of recurring vs. non-recurring costs.
 
Arduinos can be quite cheap too, if all you need is the chip itself. Technically all an "Arduino" is composed of is an Atmel microcontroller with a bootloader.

Look at Sparkfun's website. They sell all manner of arduinos in various stages of completion and size.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.