PDA

View Full Version : Getting started... again...



Neosec
- 26th May 2008, 00:00
Hello all,
I'm new to the forum and new to PICs. I haven't bought anything (new) yet, but I'm getting ready to start a project after being away from electronics xx years. I recently resurrected my old Basic Stamp 2 from a bread board it was sitting in since ~1999, started with making a 16x2 LCD babble, then did some RCTIME with Cds photosensors, and finely made a thermometer with a DS1620 direct to digital temperature chip. I am looking for advice on what to purchase. I don't know any programming languages other than the Basic from the basic stamp, which is what led me here to a PicBasic forum.

I figure Picbasic pro and a U2 Programmer will get me started?

At first I was thinking of doing a wireless temperature monitoring system with multiple transceivers sending to a base but after reading through the wireless related threads here I figure I better start smaller. So I think I'll build a thermostat instead (wired). Any thoughts?

b1arrk5
- 26th May 2008, 00:25
I own two LABX-USB boards, and a number of the proto-boards from MELabs, and I highly recommend them. You could save some money by just starting with the PicBasic compiler, and wait until you need the Pro features. MELabs will let you upgrade from the basic compiler to the Pro version at a later date, you just pay the difference. This is a great way to get started without a great expense. I keep one of the Proto-18 boards with a ZIF socket and a 20MHz crystal with a 16F88 powered by a 9 volt battery that I use a lot for quickie hardware tests, I put SIP sockets on all the port pins, so I can plug in a serial LCD and use one of those Radio Shack push in prototype boards.

Some of the folks here also like the mikroElectronika boards, worth a look.


Good Luck!
Jerry

skimask
- 26th May 2008, 00:34
Echoing what was said above...
Start (again :) ) small, blinky LED, a few buttons, blah blah blah...
PBP and PICs are a bit of a leap from Stamps. Pick a PIC and get used to it. My choice would be an 18F4550. Sure, it's got a lot of bells and whistles, but you don't need any of that to start out with. And by the time you want to start using all those bells and whistles, you're all used to the ins-and-outs.
PBC vs. PBP - I'd go PBP right out of the gate. There's a lot more there to worry about, but then again, there's a lot more there to keep you from worrying about other things.
PBC is closer to the Stamp than PBP...but you're probably going to end up with PBP anyways right? The extra $$$ are WELL worth it.
Programmers - I'd go straight for the PICKIT2 direct from Microchip. $50-ish, and very well supported. And, with the new firmware, there's a 'LOGIC ANALYZER' built into it, along with a few other features which you can find at the website. And if you get the right package, you'll get a demo board with it. Mine came with a small board with a 16F887, 8 LEDs, potentiometer, push button, and a small prototyping area to tap into.
And agree 100% with the MikroElectronika boards. I don't have one myself, but if I ever wanted a prototyping board, one of those would be it.

Neosec
- 26th May 2008, 14:47
I see that the mikroElektronika boards have an on-board USB programmer, does PBP work with that programmer or would I still need a Pickit 2? As for the pickit 2 I see two available, a starter kit and Debug Express debugger which of those should I be looking at? I looked at the 18F4550 PIC and it is overkill for the project I want to do, I'm looking at the 16F series for now. Concerning the Leap form Basic Stamp to PIC I don't see much difference so I figure I'm missing something. If I use PBP and a PIC what's so different from the Stamp? The biggest differences I see are: no on-board voltage regulator, no direct RS232 com. Doesn't a programmer and debugger do what the RS232 did on the stamp?
Thanks for the Input!

Edit: Oh BTW, I'm more interested in making everything work properly and easily than in saving a few bucks. I figure I'll spend $500 - $1000 by the time I'm done getting parts and equipment and custom PCBs and membrane switches.

Bruce
- 26th May 2008, 15:54
I see that the mikroElektronika boards have an on-board USB programmer, does PBP work with that programmer or would I still need a Pickit 2?
PBP generates standard Intel .HEX files that work with pretty much any decent PIC programmer out there.


As for the pickit 2 I see two available, a starter kit and Debug Express debugger which of those should I be looking at?
The Debug Express version comes with a 44-pin surface mount 16F887 on a demo board that allows in-circuit debug. The starter kit comes with a DIP socket allowing 8/14/20-pin mid-range PICs to be used on the demo board.

If you're just getting started, the starter kit is probably your best option. Note: You will still want to grab a good PIC programmer like an MeLabs U2 for programming in-circuit, and the 840Z ZIF adapter which lets you program PICs from 8 to 40-pin packages.

I've had to re-flash my PICkit2 twice since I started using it. It uses a USB boot-loader, and is relatively easy to corrupt, so you'll want a device programmer to re-flash the PICkit2. Just in case. Once you corrupt the boot-loader on a PICkit2, it's worthless until you can re-program it.


Concerning the Leap form Basic Stamp to PIC I don't see much difference so I figure I'm missing something. If I use PBP and a PIC what's so different from the Stamp? The biggest differences I see are: no on-board voltage regulator, no direct RS232 com.
The BIG differences are speed of code execution, tons of built-in hardware peripherals like A/D, hardware PWM, comparators, hardware USART, timers, counters, etc. PICs have these built-in, a Stamp doesn't.

The Stamp compiler creates tokens, then downloads your tokenized code to an external EEPROM. This really slows things down. PBP creates a .HEX file, which is programmed directly into the PIC. This speeds things up. A PIC running at only 4MHz can execute 4 million single-cycle instructions per second. There's a BIG difference.

PicBasic Pro syntax is similar to the BS2. PBC is similar to the older BS1 syntax. I recommend you get PBP from the start.


Doesn't a programmer and debugger do what the RS232 did on the stamp?
Most PIC programmers do nothing but program your code into the PIC. The PICkit2 offers a few extra bells & whistles for serial communications, in-circuit debug, etc, but you'll still want to have a good device programmer handy that can do in-circuit programming and has a ZIF (zero insertion force) socket.

The MeLabs U2 USB programmer is excellent. They normally have support for new PICs ready & tested before you can even get engineering samples from Microchip.

mister_e
- 26th May 2008, 16:08
I've had to re-flash my PICkit2 twice since I started using it.

I had that problem too in the begining... never happen since awhile. Maybe because it's no longer plugged into a USB hub... who knows...

Out of curiosity, do you have the Red or Black Button version? In case you have the Black Button, here's a well documented step by step PICKIT 2 update.

http://www.seniordesignlab.com/sd_docs/PICkit%202%20Updates.pdf

Bruce
- 26th May 2008, 16:12
Hi Steve,

Mine has the red button. It's directly connected to a USB port. Not a hub. I've had to reload the boot-loader twice.

It is a nifty gadget, and it's 'really' nice having the source code.

mister_e
- 26th May 2008, 19:10
I know they worked a lot on that recently. I haven't compare the original Bootloader with the actual to see if they already changed it.

Fortunately we have 3rd party programmer huh? JDM wouldn't work anyways :D

Neosec
- 26th May 2008, 21:47
OK, so If I got this right I should get...
PicBasic Pro
A U2 Programmer w/ ZIF adapter
Pickit2 Starter kit
mikroElektronika EZPic5 board

Seems like a lot of programmers but I suppose they each have their purpose.

Bruce
- 26th May 2008, 21:58
If you can afford all that, it would for sure be one nice package to have, but the minimum would be just PBP and a U2 programmer.

I have an EasyPIC3 board I'll give you if you order it from us. I've used it once. It's nice, but I just have no need for it. I use in-circuit programming, and prefer to build the circuit I'm working with VS using a dev board.

Neosec
- 31st May 2008, 02:09
Thanks all for the input... I ordered the items on tuesday and they showed up today. Picbasic Pro, U2 Programmer w/ Zif socket, and EasyPIC proto board (Thanks Bruce!) Had the Blinky LED going in less time than It took to install the software! You guys Rock! Thanks again.