View Full Version : Pic/stamp programmers- help
TomM
Feb 19, 2004, 10:10 AM
I've been a microwave/electronic tech for most of my life, working on/modifying/repairing/testing xmitters, rcvrs, twta's, klystrons, LNA,s mmic/smt hardware, basically anything RF from khz to 60 ghz, fcc and ham licensed, AF/NASA certified....
I have NEVER done any chip/microprocessor programming (other than loading firmware updates from different mfgrs.
There seem like a lot of nice projects to build with PIC chips for RC use, and I'm determined to learn.
Just starting to study Libertybasic and qbasic( and got a book on VB- for later). Started reading the on-line lessons on PIC and Basic Stamps, and not sure which road to follow.
Do pics and stamps (since there is a pic on the stamp) use the same codes?
Can Qbasic and Lbasic both be used?
PicBasic? MPLAB? which and what for?
Are there any good 3rd party apps to look into other than from Parallax and Microchip?
Who makes good cheap pic programmers, or are they all the same?
Any good books as in "An idiots guide to pics/stamps" ?
been looking at these universal test boards- any good or limited in use?
http://www.parallax.com/detail.asp?product_id=28103
http://www.microchip.com/1010/pline/tools/picmicro/demo/picdem4/index.htm
Any tips and guidance are welcome-
Tom
Andy W
Feb 19, 2004, 11:02 AM
To the best of my knowledge, Stamps and PIC's use completely different programming languages.
I have used the Stamp, and like it, but it's larger and slower than the PIC, I believe. It is quite "high level", however..
I bought the A-D converter and keep promising to make an in-flight power recorder.. one of these days..
..a
Mr.RC-CAM
Feb 19, 2004, 11:50 AM
Do pics and stamps (since there is a pic on the stamp) use the same codes? Yes and no. Parallax Stamps have a PIC chip onboard that uses their proprietary PBasic. Like most legacy Basic's, it is a tokenized language, which causes "slower" program execution. On the other hand, a raw PIC expects firmware written in Microchip's RISC-like object code. You can use any compiler (Assy, C, Basic, etc.) that supports the PIC. Yes, a PBasic compatible compiler is available too (PICBASIC).
Can Qbasic and Lbasic both be used?If you are referring to the Microsoft compatible programs, then the answer is No. QBasic is what Bill Gate's introduced to us back in the PC stone age.
PicBasic? MPLAB? which and what for? PicBasic is a popular PBasic compatible compilier. It retails for $100 to $250. MPLab is Microchip's integrated development environment. It is free, with third party compiler support at additonal cost. It supports PIC Assy and C code.
I suspect that you would be more interested in PicBasic (fine for casual hobby projects).
Are there any good 3rd party apps to look into other than from Parallax and Microchip? If you google a bit, you will be buried in free app code. Even Microchip's own web site has dozens of white papers and source code for interesting applications.
Who makes good cheap pic programmers, or are they all the same?They are not the same, but most seem to work fine. However, due to their low cost (usually under $35) they do not hold your hand. So, destroying perfectly good chips can happen if you are unfamiliar with your programmer's operation. I don't use the hobby grade stuff so I cannot offer any recommendations.
Any good books as in "An idiots guide to pics/stamps" ?Scott Edwards, Programming and Customizing the Basic Stamp Computer.
been looking at these universal test boards- any good or limited in use?Experimentor's boards can be useful for dorking around and classroom activities. They rarely end up being used in a finished project though. PIC's do not need a lot of glue hardware -- Perfboard or deadbug construction is fine for small projects.
RC-CAM
whanderson
Feb 19, 2004, 04:44 PM
Originally posted by Mr.RC-CAM
Experimentor's boards can be useful for dorking around and classroom activities. They rarely end up being used in a finished project though. PIC's do not need a lot of glue hardware -- Perfboard or deadbug construction is fine for small projects.
RC-CAM
I can only echo RC-CAM's comments. My recommendation is to start with the Stamp. Parallax has a series of work books and project kits specifically oriented to the beginner. I got some of this stuff for my grandson and I recommend it highly. When you are ready for meatier stuff, do not waste your money on non-microchip programmers. They have cost competitive stuff and are fully supported by the MPLAB development tools. This is a key element many people overlook. Full utilization of MPLAB and programmers/ICDs can make programming PICs much easier. Trust me, I learned this lesson the hard way.
Bill A.
pipedope
Feb 19, 2004, 05:12 PM
You can find it at;
http://www.amqrp.org/elmer160/
We do a lesson a week and there are cool hardware kits available to go with the course.
We are 11 lessons into the course but some of them are simple setup and background so it is not to late to get started.
I would (and am) go with the PIC rather than the stamp. More power and choice for a little more time and effort on learning the programming.
michael N6CHV
whanderson
Feb 19, 2004, 11:00 PM
Originally posted by pipedope
You can find it at;
http://www.amqrp.org/elmer160/
We do a lesson a week and there are cool hardware kits available to go with the course.
We are 11 lessons into the course but some of them are simple setup and background so it is not to late to get started.
I would (and am) go with the PIC rather than the stamp. More power and choice for a little more time and effort on learning the programming.
michael N6CHV
The site you reference is very well done. To take the approach you suggest requires eating the elephant in one bite or a couple of large ones. It is better for the uninitiated to eat the elephant 1 bite at a time. There are a number of concepts involved in programming MCUs (real-time programming, register management, direct and indirect addressing, peripheral setup and control, interrupt processing, IDE useage, compilers, linkers, simulators, debuggers, and a whole bunch of stuff I haven't mentioned) and going the Stamp route helps in taking 1 bite at at time. The goal is to eventually go to the PIC's when the basics are well under control. Also, don't sell the Stamps short. Lots of neat stuff has been done with these little guys.
pipedope
Feb 20, 2004, 11:03 AM
Part of the problem is the question of the trade offs.
Stamps are large and expensive (relatively) but are pretty easy to program.
PICs are small, cheap but more work to program.
If you are only going to do one or two projects the Stamps have a major advantage. If you plan to add microprocessor devices to your hobby construction then very quickly the PICs gain the advantage.
They are ALL fun to play with!
Pick one, do them both or even do none of them.
Even while studying to program PICs you can use Stamps. They are not mutually exclusive.
zagisrule!
Feb 20, 2004, 11:17 PM
Go PIC!!!!!!!
I use PicBasicPro language, and program with the P16PRO from www.picallw.com . PBP is easy to use and as powerful as I could ever use (I admit I am only a hobbiest :) )
Anyway, I think that using PBP is intuitive and very simple, although it took me a while to get the hang of, and I still have alot to learn. Some (Many?) do not find PBP powerful enough, but you can always modify the file in asm if you find that PBP will not allow what you want to do.
I think that PIC's are the best option because they are more powerful than the BASIC Stamps, cheaper, and easier to get in many cases. Onboard ADC will take care of your needs on many of the chips available.
The programmer (P16PRO, no doubt in my mind the best "cheap" programmer around) is a $15 kit from www.electronics123.com that follows the PICALLW schematic and uses it's software. You will need to buy the "software upgrade for ~$30 before you can use alot of chips, so the total cost to get your programmer up and running is around $45. I figure this is very reasonable, and the software is excellent and runs 100% perfect, all the time. This is not your tipical "hobby grade" setup, I view it as a professional setup that costs less. Looking at the features, I see no reason to pay $200 for Microchip's programmer, when the $45 counterpart will program faster, and easier. Both come with the ability to program the up-and-coming PIC's, so you won't get left behind no matter which of these two you might get. I have never destroyed a PIC with this kit, and I do use it very frequently on my PIC's...say 5 times a day on average, upwards of 50 times a day on my "coding days" and have NEVER had the slightest hint of a problem with it.
As for which PIC's to use, I have been using the 12F675, which has an onboard ADC channel, 6 I/O ports, and a flash memory all in an 8-pin package. I develop code on those guys, then program 12C509A's with the re-compiled code for the stuff I sell. I also use the 16F62X family extensively, they are cheap and for some reason I have alot of them. They are 18-pin devices with a max of 16 I/O ports, but more like 13 if you use a crystal and MCLR pull-up. The 16F627 has a smaller memory, and the 628 has a larger memory, so for big projects you would use the 628, and for anything else, the 627 because they are cheaper. I have also been using the 16F819 because of it's several ADC ports and good-size memory. All of the PIC's I have mentioned and used can be run with the internal RC oscillator for most applications, and often times without the MCLR pullup. This means the only connections the PIC needs is +5V and ground in many applications. Worst case, the only external parts needed to run the PIC are a resonator and a 1-10K pull-up resistor for the MCLR pin.
-Matt
Hope this helps a bit, I am no expert, but I figure I will share what I know.
MAVA
Feb 21, 2004, 10:46 AM
Tom
I Understand your situation, I am a power guy( move DC and AC) around. I got into electrics in the Late 80s because of the covienence of making my own speed controllers.
About microcontrollers, I understand learning C and assembly is a Journey not Event. This always been my problem.
I know some very important people that write code for a living. There saying is easy to program PICs in C and Assembly. Let me tell you it hard my side of the fence.
Here is a solution to your problem I have discoverd
The best solution is to work with the PIC, but the learning curve is long and very hard.
The Stamp is easy, but lacks power and not cost effective.
There is a BASIC compiler that is about 94 to 97 percent efficient to C and offers the power of C for timming and the flexability of using any micro Microchip makes.
The compiler is not cheap($270 USD out the door). It works like nothing out there. They do have a demo for trial with limit of 50 lines of code. Very much enough to make a brushed controller, servo testers and etc...
The site is http://www.picbasic.org/
Very well supported site has a Forum, examples and etc..
Check it out .
Martin
zagisrule!
Feb 21, 2004, 01:47 PM
I use MicroCode Studio....a free demo is available from www.melabs.com PicBasicPro compiler.
jimsp
Feb 21, 2004, 10:40 PM
I would go with the Basic Stamp 2. It’s going to be plenty powerful enough to do anything you want to do with your RC use. There is an incredible amount free instructional material and application notes specifically for the Stamp readily available. Although I played around with electronics I had never done anything with microprocessor but within a month of buying the Stamp 2 I had built a data logging speedometer for my bicycle. After the ride I could upload the data to the computer to analyze and plot it. Shortly after that I added an altimeter to the data logger. Now I could plot elevation with distance and even look at speed versus grade. This was easy to do because there are application notes on how to write to a serial EEPROM and how to use a A/D converter.
Later on I also used the Stamp 2 to build a data logging heart rate monitor so I could record my heart rate during the ride. Now I’m it might be interesting to use it during the maiden flight of my new planes.
Don’t buy any of the expensive development boards. I would start with the kit version of the OEM Stamp 2 which is only $35. It will plug directly into a standard breadboard that you can use for developing your circuits.
TomM
Feb 22, 2004, 08:07 AM
Everyone-
Thanks for all the replys. I wasn't ignoring you, I was out of town for a funeral.
While visiting my 81 year old dad (retired engineer and inventor- I hope I have his brains in 35 years) he gives me this-
http://www.melabs.com/products/epic.htm
Complete setup with the software, books, compiler, ect...
He bought it last year, but shelved it while he worked on other projects.
Got some reading to do.
I'll get back to post more questions later.
Andy W
Feb 22, 2004, 08:50 AM
Did it come with the ZIF Adapter? That would be the first thing to check..
..a
steve lewin
Feb 22, 2004, 09:01 AM
That will do the job for the most common PICs, just what you need. But bear in mind that a "programmer" in this context is just something to load the compiled program into the device (the equivalent of loading firmware updates). Unfortunately someone still needs to write the programs and that's you ;).
I've not had any trouble using MicroChip's Assembler (but then I used to code microprocessor Assembler for a living years ago). To some extent it depends what you're trying to do. If you're really using the PIC device up to its limits then Assembler is much more efficient than any of the higher level languages but mostly you can get away with Basic or C. If you haven't programmed much before then Basic is much easier to get started with.
Do you have any particular projects in mind ? If any are of general interest it might be good to get a tutorial going. I'm sure we have plenty of experienced PIC programmers around to help out.
Good luck - Steve
Andy W
Feb 22, 2004, 09:06 AM
A programming thread.. cool..
TomM
Feb 22, 2004, 11:29 AM
I'm sure almost everything I could think of can be bought, but the fun is in building and learning.
An onboard glow driver- instead of a servo operated switch.
A low-voltage sensor that would give you a warning of setting the engine to idle .... you should land in the next 30 seconds.
A circuit attached to a thermocouple and servo- monitoring the exhaust temp. If it got too hot, it would richen needle valve.
A forgetful Transmitter-on indicator. A battery drain without any stick movement for 60 seconds- will start beeping.
Voltage peak sensing field charger.
Simple fail-safe circuit to cut off the engine upon loss of signal, for PWM radios.
TomM
Feb 22, 2004, 11:32 AM
AndyW-
No zif socket. But no problem, I've been changing chips since I was a boy-lol.
vintage1
Feb 22, 2004, 07:42 PM
I used to write assembler and C in real time systems for a living too.
I'll help when I can.
I still potter around in C, but the assembler...haven't written that in 15 years :D..and that was mainly 8086 stuff and a load of 6809, and a little itty bit of DSP...
At least with assembler its WYSIWYG...the C compilers used, in my day, to turn out some weird - and very inefficient - code, particularly since C assumes 16 bit operation as a minimum, and I did a lot of work on 8 bit chips.
Andy W
Feb 22, 2004, 08:07 PM
Z80.. yeah!
vintage1
Feb 22, 2004, 08:16 PM
Oh, yes, I DID do some z80 assembler as well. THAT takes me back...
simingx
Feb 23, 2004, 04:53 AM
Does no one experiment with 8051's and AVR's? I got both versions of the BASIC compiler for them, since the software is quite affordable (<$US100 for each version). Granted they need external oscillators (but that is changing with the new AVR chips) but I'm on a budget... :D
vintage1
Feb 23, 2004, 05:44 AM
I think we used to use em in some of the stuff I workd on...for keybaord controllers and the like. Not very powerful, nor small by todays standards.
Suit stuff that stays on the ground - chargers and the like?
jeffs555
Feb 23, 2004, 01:39 PM
If you like the 8051 then you should look into the Cygnal microcontrollers. They are small and very fast, and use the 8051 instruction set. They are more expensive than the pics. I like the AVR's, they are about as cheap as pics, and for every application I looked at they were faster. The one I use most now is the Cypress PSOC because it has a lot of highly configurable analog and pwm hardware built in. I don't know if there is a basic compiler for the Cypress as I do everything in assembler.
Jeff
jeffs555
Feb 23, 2004, 02:20 PM
Here are links to two free basic compilers for the AVR's. I haven't tried them, so I don't know how good they are. I like the AVR a lot better than the pics, and they are comparable in price to the flash based pics.
http://www.invtech.com.au/html/abc_software.html
http://www.reflections.co.nz/micro/GettingStarted/RunAVR/
The reflections site even shows how to build an AVR programmer with just a couple of resistors connected to the printer port on a PC.
Jeff
Ironsides
Feb 24, 2004, 08:08 AM
There are some samples of RC Projects on my web site. I am just learning ProBasic Pro so the examples are pretty simple.
http://www.rc-float-flying.rchomepage.com/RCWeb/PIC/Ironsides.htm
David
TomM
Feb 24, 2004, 09:19 AM
David,
Nice projects on your site. I stole the glo driver code. I want to see if I can muddle my way through and modify it to produce: no voltage @ 0% throttle (trim-off, or throttle cut) and come on at 5% to 25%
simingx
Feb 24, 2004, 11:06 AM
If anyone wants to build an AVR programmer, it's worth building the buffered version (using a HC244 i think) as it'll be compatible with all parallel ports (although it needs power from the host circuit). Laptop parallel ports are notorious for not providing proper voltage levels for "direct" programming.
Anyway, what'll we do when they eventually phase out parallel ports? :(
zagisrule!
Feb 24, 2004, 11:12 AM
Hey Ironsides,
Check your Glow-driver circuit diagram. Where is the PIC getting 5V from???? ;) :)
Ironsides
Feb 24, 2004, 12:14 PM
Oh my goodness :eek:
I was "postive" I had 4.8 volts going to Pin1.
http://www.rc-float-flying.rchomepage.com/RCWeb/PIC/PBP%20Glow%20Driver.htm
David
Jim McPherson
Feb 24, 2004, 07:54 PM
Originally posted by TomM
been looking at these universal test boards- any good or limited in use?
http://www.parallax.com/detail.asp?product_id=28103
http://www.microchip.com/1010/pline/tools/picmicro/demo/picdem4/index.htm
Any tips and guidance are welcome-
Tom
Seems everyone has you going the right direction. One thing I can add is to try this development board: http://www.melabs.com/products/labx1.htm with a PIC16F877 .
I use these with the EPIC programmer for very easy prototyping that can easily be re-compiled for smaller Pics. The Lab-X1 has tons of features, there aren't many projects you can't build with it. Get the kit version, or bare PCB and buy your own parts to fill it (List of parts and jameco numbers comes with the bare PCB). It's a super easy way to get started with PIC's.
-Jim
Ironsides
Feb 25, 2004, 11:11 AM
TomM:
I cooked up a first effort for the 12F629/675 PIC as per:
http://www.rc-float-flying.rchomepage.com/RCWeb/PIC/Fail-Safe.htm
David
TomM
Feb 25, 2004, 01:23 PM
Ya couldn't wait for me to learn picbasic.....ya just HAD to beat me to the glory. I coulda been the one skipping to the patent office whistling a happy tune, going to the post office collecting checks in a wheelbarrel, thinking "I wonder what the poor people are doing today". Futaba and JR should be leaving messages on MY phone! Inside-RC film crew should be at MY door!
But NOOOOOOOOOOooooo
Now I'll still be buying cheap beer and punching da'man's timeclock.
BTW- looks good - I'll have to try it soon.
Tom
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.