View Full Version : Anyone ever use a PIC Kit 1 or program pic's
daniel
08-21-2008, 04:22 AM
Anyone ever use a PIC Kit 1 or program pic's.
I'm trying to learn to program these pic chips. It seems to be a very useful skill if one can figure it out, there's so much you could potentially do with a shopbot to fabricate parts while armed with the knowledge to incorparate stepper motors and displays into your end product (Or toys
). However its not as easy as learning to run a bot
. I have gone on to some different forums for programming and recieved a little help, and I've gone on others and recieved none. It definitly reminds me of how cool the shopbot forum is and how cool it is that so many people really support it.
Anyway, I'm trying to program a pic chip using a programmer kit and the software MPLAB IDE. The paticular problem is I haven't been able to create a working library(#include) file.
So does anyone do this?
richards
08-21-2008, 08:05 AM
Daniel,
I use microcontrollers, but I have no experience with the PIC; however, the PIC series is very popular. The PIC website lists lots of example software that should help you get started. Keep in mind that learning to program a microcontroller requires that you have a good understanding of what a microcontroller actually is, what it can do, and how to make it do that. The programming is just the steps that you write to make the controller do what you require it to do.
Each machine level microcontroller instruction usually makes the controller do one thing. A program can easily consist of hundreds or even thousands of instructions. The only limit is the amount of flash memory on the controller.
Unfortunately, I'm at a Linux computer, which will not run the Window software that PIC provides, so I can't give you any specific examples.
jseiler
08-21-2008, 08:48 AM
What are you trying to accomplish with your pic? I found I really liked the netmedia bx-24 for rapid prototyping of low speed microcontroller designs. It runs a subset of basic, does floating point, has a large amount of memory for a microcontroller, and programs over rs-232. I found for one-of-a-kind stuff low speed stuff, it was worth the $40 each for the bx-24 because I'd spend significantly less time in development. Just a thought.
Also once you have a bx-24 up and running on a prototype, its relatively easy to convert the basic into c or assembler (as long as you avoid using floating point) for a production priced application on a dedicated pc board. We often used expresspcb.com for our boards. They certainly aren't the cheapest, but they do a good job for small production runs, and they provide good software for pcb generation that's free and has a fairly shallow learning curve.
John
3imoh
08-21-2008, 11:37 AM
I will second John on the bx-24. I did a bunch of work with them for a large-scale electronic art piece at Burning Man a few years ago. They are super easy to use and you will be up and running with it in no time. Perfect for quick prototyping or one-offs.
http://www.basicx.com/
-Howie
daniel
08-21-2008, 04:10 PM
Bummer, The room where my machine is leaked (I'm in Cocoa Beach, we just had a tropical storm). It ruined some templates that I spent a lot of time on, and it made a bunch of stuff rust, including the collets to my router.
Anyway, here is a picture of the electroincs I'm prototyping.
8065
I was able to hook my pic up to the four 7segment displays and make a countdown timer. Now I'm trying to figure out how to take that code and make it into a subroutine and save it as a library file.
If I could do that it would make my main file mush samller and easier to read and follow.
This stuff is all very new to me, and I'm learning to program in C as I go along.
dana_swift
08-21-2008, 04:42 PM
Interesting to find so many micro-controller developers on this site.
Daniel- You will enjoy pic's, and it sounds like you are already set up to program them once you figure out how. I'm personally fond of the Renesas M16 series micro controllers, only a couple dollars more than a PIC and worlds away in capability.
For what its worth, a "#include" file is NOT a library (it might contain the definitions for a library), but I will save a discussion of programming for another forum.
You are in for a lot of fun, and frustration, not necessarily in that order!
Good luck-
D
kivimagi
08-21-2008, 05:49 PM
For you microcontroller experts.
Something I was interested in trying, but became discouraged.
I'd like to build an interface for processing files into the shopbot, without having a computer attached. Similar to a laser engraver.
How possible is it? How useful is it to anyone else?
My thoughts are you'd have a ethernet interface, into a storage device, and then somehow stream out the .sbp via a USB port.
I guess there is some firmware involved, but I'd certainly desire this feature
Anyway interested inyour thoughts.
dana_swift
08-21-2008, 06:49 PM
Ryan, when you add Ethernet with a TCP/IP protocol stack (then add a server or client to handle the protocol) you usually have left the world of micro-controllers. Perhaps you could buy a PC104 "tiny" computer system and use the file runner.
Shopbot does not seem interested in divulging the USB communications protocol. I suspect it's not difficult to reverse engineer, but then you have to re-write it each time you update your controller firmware.
All a laser engraver does is put the computer inside the big box.
The attached computer is needed to zero the axes, so it would take more than just a storage device. You can pick up a Windows 95 machine for almost nothing (or perhaps nothing!) and dedicate it to run the bot. Much less hassle.
D
daniel
08-21-2008, 06:52 PM
Oh Dana, Please dont hold back, I'm sure the rest of the members won't mind if we disscuss a little programing. I think this could be a cool thing for the rest of the community due to the facts that a lot of us could learn to program our machines a little more( I actually almost understand the Zzero program now). And also, As soon as I figure this out, I'm going to learn how to drive the stepper motors. When I've got everything down, I'm going to unleash my "Open Source Cookoo clock" on the shopbot community.
Let me try to restate my problems. Obviously I am confused about terminology and things. I'm not sure how library file and include file are different. So let me restate my goal.
Lets say I need to add two variables together, "j" and "k". Lets also suppose that I have to do this a lot in my program. It seems I should be able to write a sub program and call it whenever I need to add those two together. I would then like to place this sub program in a seperate file(Library?) so that my main file is not as long in my text editor.
Anyway, I have tried other forums. I actually tried the Microchip(Manufacture of pics) forum. Over 60 people read my post, however I didn't recieve even one reply. I love this forum!
dana_swift
08-21-2008, 10:44 PM
Daniel- I tried to email you, got a rejected - 421 message. (Do you use Yahoo as a server? Its terrible about rejecting legitimate email.)
I will try another route..
D
daniel
08-22-2008, 12:05 AM
Wow, Thanks for the info, I'll check into that immediatly. daniel@allaboutthewood.com (mailto:daniel@allaboutthewood.com)
Yep, Yahoo is my server
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.