How to start - PIC / Microcontroller

Electronics Computer Programming Q&A
nbrucew
Posts: 7
Joined: Tue Jul 17, 2007 1:34 pm
Location: Fort Collins, Colorado
Contact:

How to start - PIC / Microcontroller

Post by nbrucew » Tue Jul 17, 2007 1:53 pm

Brand new so be gentle. I would like to begin learning pic/microcontroller for basic fun project stuff. Need suggestions on how to start ... BasicStamp, Atombasic, Atmel microcontrollers, ... is there a project kit ? or equivalent that provides software, compiler, microprocessor .. took course while back using 4051 and assembly language and had fun but kind of out date I think ? Just tinker and what like to try my luck without spending bundles. So looking for suggestions. Thanks Is there a forum outhere on this ...again just new to Nuts & Volts

SETEC_Astronomy
Posts: 582
Joined: Tue May 09, 2006 12:44 am
Contact:

Post by SETEC_Astronomy » Tue Jul 17, 2007 4:02 pm

If you're looking to get started in micro controllers I highly recommend the PIC series of chips manufactured by Microchip. They're cheap (for the most part) and well featured. Also there are many, many sites out there with source code, tutorials, walk throughs, etc... for the PIC series. I got my start by downloading PICC lite http://www.htsoft.com/products/compilers/PICClite.php and icprog http://www.ic-prog.com/ both programs are free and easy to use. The programmer I use for the chips is the JDM programmer and it can be easily made for free using junkbox parts. The schematic and pics can be found here http://www.jdm.homepage.dk/newpic.htm.

I would shy away from the BASIC series of chips. I know they serve their purpose but they are/can be extremely expensive and provide little gains over cheaper alternatives, in my opinion. I've never tried my hand with Atmel chips and I don't know that I will unless a certain project comes along that requires me to.

It seems to me that Atmel is like the Mac version of micocontrollers and PIC is the PC version. Where Atmel has a some huge fans with great websites there just seems to be more info and finished projects on the web that use PIC so finding info and picking up where others left off is fairly easy.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Fri Jul 20, 2007 12:54 pm

Hi there,

Microchip also sells a cheap 'starter' program board that programs
a variety of chips from the PC via a USB port.
The starter board is about 30 dollars and wth shipping comes up to
about 40 dollars US. It does a variety of chips, but not every chip.
It will get you started though, as the chips it does support have
10 bit a/d converter and UART and stuff like that.

The interface is quite good too and there is a very fancy one and
a very cheap one. The cheap one can be used to program a chip
if you want to design your own language and interface, or just
want to read the chip bytes and save them or some small tasks like
that. The fancy interface allows you to program in assembler and
C too, but you probably need a C compiler first. I use asm because
i like to know what every byte of my program is doing at every
usec of time from the time the chip first boots until it shuts down.
Both types of interface are free and downloadable at Microchip site.
LEDs vs Bulbs, LEDs are winning.

nbrucew
Posts: 7
Joined: Tue Jul 17, 2007 1:34 pm
Location: Fort Collins, Colorado
Contact:

PICkit2 Starter Kit

Post by nbrucew » Fri Jul 27, 2007 5:36 pm

Thanks for information on getting started with Pic Microcontrollers ... am deciding on purchasing Microchip PICkit2 starter kit for $49.95 direct from Microchip to speed things up .. any comments on this decision, better way to go ????

bwts
Posts: 229
Joined: Tue Jun 11, 2002 1:01 am
Location: britain
Contact:

Post by bwts » Wed Aug 22, 2007 3:06 am

Definitly the way to go. PICs are very versitile and easy to understand.
"Nothing is true, all is permitted" - Hassan i Sabbah

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Sat Sep 01, 2007 12:02 pm

Actually, the cheapest way to get into microcontrollers is to go with the TI MSP430. They have a complete set up for $20 including programmer, debugger, tools and target. Thereis also a GCC (open source C compiler) for the 430. http://www.ti.com/corp/docs/landing/ez430tool/index.htm
Image

they sell a 3-pack of target boards for $10, iirc. The targets have holes for header pins and you can easily install it onto a board of your design. I've even kludged up one so it plugs into a solderless breadboard for more general prototyping.

If you go to their one day lecture, you get a free one. I've gotten 3 that way so far. I think its called 430 Day.

And the nice thing about the 430 is that it's a 16 bit architecture.

I'm not denigrating the PIC - it's a decent choice but writing code for that chip is a bit daunting, especially assembly language.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Sun Sep 02, 2007 5:32 am

Hi Philba,


Hey they look interesting. Do you know what programmer we would
have to get in order to program the 14 pin DIP package devices they
have available instead of the SM packages?
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Sun Sep 02, 2007 11:48 am

it depends on the chip line. The ez430 will program any of the MSP2xxx chips. You need the jtag programmer for the other lines (1xxx and 4xxx). It appears that the 2xxx line is where the focus is. To use the ez430, you need to get a mating connector for the usb emulator part. Pull the target board off and plut the emulator into the new connector. They give the part number some where in the literature.

Another interesting thing is that the chipcon transceivers are getting integrated (though much slower than I'd like) with the msp line. There will be an inexpensive kit out this fall. (iirc $25) Pretty cool. Free zigbee stack. You could build some pretty cool things with that.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Sun Sep 02, 2007 12:33 pm

Hi again Philba,

I didnt see any mating connector/adapter, where on the site does
it say this? Thanks.

I also noted that although the are selling the programmer for a 2013
chip and include one 2013 chip and board, they are selling only 2012
chips on board for 3 for 10 dollars, not the 2013 type!
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Sun Sep 02, 2007 10:58 pm

the programmer will program any of the 2xxx chips. the main difference between the 2012 and 2013 is the 13 has a single sigma/delta 16 bit ADC and the 12 has an 8 channel 10 bit ADC. same flash. ram and eeprom. I think the 12 is actually a little more desirable.

the connector is a mill-max part. it's a 4 pin 50 mil pitch connector. The numbers are in the faq section of the ez430 user's guide.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Mon Sep 03, 2007 5:18 am

philba wrote:the programmer will program any of the 2xxx chips. the main difference between the 2012 and 2013 is the 13 has a single sigma/delta 16 bit ADC and the 12 has an 8 channel 10 bit ADC. same flash. ram and eeprom. I think the 12 is actually a little more desirable.

the connector is a mill-max part. it's a 4 pin 50 mil pitch connector. The numbers are in the faq section of the ez430 user's guide.

Well, take one guess at why i stressed the difference between getting
three 2012's and three 2013's ?
Also, i cant even find a place on the site where i can buy 3 x 2013
boards for 10 dollars or even 20 dollars.

About the connector, so you are saying that the programmer for
20 dollars will program ANY chip with the right adapter? I would
need to see this on their site somewhere mainly because i also see
links that take me to a $149 programmer that does 14 pin chips
(and not DIPs either). If you could find a link that would be nice.

I looked all over their site and could not find a 14 pin adapter either.

The technology does look good. Many people would want dip packages
too though. I know they make the chips in dip packages, so now to
find out how to get the programmer to work with them...this would
help a lot, but i need links or something like that.
I'd even be willing to construct my own adapter, but i need to know
for sure that the programmer works with the 14 pin dip packages too.
Maybe the 149 dollar programmer is outdated now?
LEDs vs Bulbs, LEDs are winning.

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Post by rshayes » Mon Sep 03, 2007 11:53 pm

Hello Al,

The User's Manual for the programmer shows the schematic for the programmer and the plug in boards. The only connection between them appears to be the 4 pin connector. Two pins carry power and ground and the other two appear to be a bidirectional data line and a clock line.

The data sheets do not discuss the programming method very clearly. These chips are probably capable of ISP (In System Programming) since competitive devices, such as the Atmel product line have this capability. In this case, all you would need is a four pin connector on a board that you design that connects to the same pins and a cable that connects your connector to the four pin connector on the programmer.

Both Atmel and Zilinx use a six pin interface (power, ground, clock, reset, data in, and data out). Texas Instruments may be using a simplified form where one pin transmits data in both directions and the reset signal is transmitted in some other way than a separate pin.

Using separate data in and data out pins allows the devices to be "daisy chained" so that several devices on the same board can be programmed through the same interface. The Texas Instruments parts may not have this capability. For single chip applications it would not be useful, and it requires a separate pin.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Tue Sep 04, 2007 9:35 am

The ez430 is a full in circuit programmer and debugger. It is the equivalent of the ICD2 for the 2xxx chips. the ez430 uses a 2 pin "jtag" interface (plus power and gnd) while the the other 430 programmers use a 4 wire jtag interface.

My bad on the 3 pack of 2013. I guess I hadn't looked close enough. the 2012 is still a pretty good chip and, except for the adc, should program the same as the 13.

The millmax part numbers are in the user manual but not on the schematic. Some where I saw a BOM that also had the part numbers and, iirc, a digikey order number.

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Wed Sep 05, 2007 6:21 am

Hi again,

rshayes:
The 4 pin in circuit programming thing sounds very good. I guess
what i am after is some good documentation that tells me about
this stuff. If all it takes is a 4 pin connector that would be
nice...i wouldnt even need a special programming board. I'd
build the 4 pin connector into the circuit.

philba:
Well at least i know they sell the 2013 in single units, that's
better than nothing i guess. Now all i need is the documentation
that tells me how to program units in circuit as Robert was talking
about. If you find some documentation on that please let me know.
What attracted me to these chips in the first place was the 16
bit DS converter, that's why im a bit concerned about having it
on chip. Without that, i dont really need these chips as i already
have others that will do the 10 bit thing. Perhaps they also
have standard 12 bit direct AD uC chips too, which would be welcome.
LEDs vs Bulbs, LEDs are winning.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Wed Sep 05, 2007 7:16 am

Al, perhaps you didn't understand what I was saying - the ez430 emulator is set up for In Circuit Programming. If you look at the schematic in the user guide, it shows how the 4 pins hook up on the target board. Basically, there is nothing other than the connector which runs directly into the chip. I've done this with the 2013 target plugged into a proto board. It's very simple.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests