Private bot - which PIC microcontroller?

Hi there.
as you all know… the season is over :mad:
and if you can’t get a job… summer vacation can be boring :slight_smile:

SO => ME => BUILD ROBOT! :smiley:
I’m quite new to microcontrollers…
but I think I have enough experience for what I wan to do:
a simple robot… operated using onboard-buttons.
but I’m not so sure which PIC microcontroller is best for the job.

so… from your experience… what fits best?
requierments:
the ability to provide 4 small DC motors (I’ll get those later)
EEPROM - important!
and that’s about it…

thanks again…
Ran.

I suggest getitng a VEX controller instead, lots less frustrating for a first project. PICs are a summer project in themselves, without a robot.

Don

thanks for your reply,
actually, my plans are to play with regular pics this summer,
but as I’m a bit limited, I would like to know what are your recommendations.

:slight_smile:

cheers,
Ran.

P.S do you have experience with PICs?

I suggest if your going to get started with PICs is to play around for a couple weeks with a 16f628a and a programmer,and a bunch of leds. Try finding a copy of Picbasic Pro, it basically allows you to program a PIC like a basic stamp, so you don’t have to worry about all the C syntax.

If you know C then you can probably start with 18F series and use MPLAB and the C18 compiler to get started. Get a cheap programmer from sparkfun.com.

You can use the 2004+ RC code as a guide for developing your own. All 18F series have the same core structure, just different hardware peripherals.

www.machinescience.org has a great set of tools for PIC programming based on the PIC 16F877. I think you can still get free FIRST accounts for their web-based IDE. They’ve streamlined a lot of the programming by having a bootloader and serial programmer, similar to how the FRC controller works, but the microcontroller is fully-functional and you write code for it just like you would in any other development environment.

What are you using to drive the DC motors?

Edit: http://www.machinescience.org/firstoffer.html

I believe the 16f84 and 16f877 are the 2 good begginer PICs. But why a PIC? Why not an AVR? or a BASIC Stamp?

I know from expirience it is much much easier to start with an AVR. it is the same thing as a PIC but made by atmel and not microchip. You can go get a programmer for 50 - 80$ if you want the best cheap board. if you wanna go cheap you can easily go to 20$ for the programmer. the compilers are free, ad there is even a huge underground world for AVRs…www.avrfreaks.net

-John

hi, thanks a lot for your replies.

(sorry it took me so long to respond)…

so, I got my hand on a cheap Microchip PICKIT2.

  • a bunch of 16f690s.

played a lot with it, and currently learning the basics of PWM signals.

ZZII, I had no idea that there are offers like this,

what does this offer actually provide?
forwarded it to me “superiors” :smiley:

John,
thank you, looks cool, but too late for me.

thanks a lot!!
Ran.

i’m working on avrs (specifically the 169, as found in the butterfly) for my summer project. butterfly is a nice $22 board with a screen, speaker, etc., plus open-source starter code for all of the built-in functions. you don’t need an expensive programmer, just solder up a three-pin connector to serial (i can send you in the right direction if you decide to go this route). AVRs are more powerful and built for C, while PICs are generally built for Assembly, which is a pain and not really relevant to FIRST at all (I hope).

Hope this helps!

I really wouldn’t recommend using a serial cable. Just get one of their cheap programmers (Dragon/STK500) and you won’t have to deal with any problems with the home built ones. They will help you get started much faster.

I would recommend an Arduino, It is a little board with an ATmega8 or 168 and a built in programmer, so you get it and its ready to work. There are USB and serial versions. All of the code open source and you program it in C. It supports everything you need it to do.

yeah, i know that feeling. BUT if you have some pins lying around and you know how to use a soldering iron, it isn’t really THAT bad.

Yeah but it’s so much more useful because of the number of different ways you can program the Atmegas. Also, you might accidentally program the fuses in the chip in ways that you can only fix by using a commercial programmer.

The butterfly has a built in boot loader and already pre-assembled. Which means you can’t take the uC off. Soooo…the serial cable si the only way to program it. Check it out.

http://smileymicros.com/

The arduino is nice. It is basically the BASIC Stamp of the AVR world. I looks like you can only program it using the “arduino language” which to me is not good. It is better to learn how to do it right the first time. I also can’t find a price for it.

The stk and dragon are nice, but they are nor rally made to be put onto a robot. They are good to use as a ISP programmer if you have a seperate board with ISP headers, or if you have a chip that needs to be flashed then put into a socket somewhere. But I have found that with my STK since it has no holes and no other good way to mount it anwhere that I use it strictly for a dev. board.

-John

Soooo…the serial cable si the only way to program it. Check it out.

No it isn’t the only way. Look at the documentation again for the Butterfly. You can either program it using an ISP or a JTAG programmer. High voltage parallel programing is also supported but I have no idea why anyone would want to go that route unless somehow you screw up the fuse settings. Some assembly is required though because all of the ports are missing the header pins. I’ve used JTAG to program microcontrollers before. It’s so nice seeing the program run and watching the registers change on the computer.

The stk and dragon are nice, but they are nor rally made to be put onto a robot. They are good to use as a ISP programmer if you have a seperate board with ISP headers, or if you have a chip that needs to be flashed then put into a socket somewhere. But I have found that with my STK since it has no holes and no other good way to mount it anwhere that I use it strictly for a dev. board.

I didn’t actually say it should be placed on a robot. The dragon is just a bare bone pcboard with no way of mounting anything to it without some more assembly.

The arduino is nice. It is basically the BASIC Stamp of the AVR world. I looks like you can only program it using the “arduino language” which to me is not good. It is better to learn how to do it right the first time. I also can’t find a price for it.
http://www.sparkfun.com/commerce/product_info.php?products_id=8164

I never said you did say to mount it on the robot. I am just that that is one down side. I know what the dragon and STK are. I have used them both and own an STK.

I didn’t know about the JTAG because I have never used it. From the stuff I hear about it I should start using it to at least debug programs. From my understanding you can run the program on the uC step by step from the computer?

-John

But Im really confused. The fact that you can’t mount the STK500 and the Dragon onto a circuit board isn’t really a disadvantage. I can’t even think of a reason why you would want to.

I didn’t know about the JTAG because I have never used it. From the stuff I hear about it I should start using it to at least debug programs. From my understanding you can run the program on the uC step by step from the computer?

Yeah. I remember using the JTAG port in that regard on a DSP. It’s really quite nice because you can see the actually ports on the microcontroller change in response to external stimuli.

Well there are many reasons. Me an everyone I know that uses them wishes they could. It is a development board. which means it is used to develop there have been more then a few project where we have needed to just mount it to a robot really quick so we can have a PWM pulse gen on the bot. But it was harder to mount this. Now don’t just go and say create a PCB because we needed the serial port for the USART, etc. It isn’t something that is permanent. But it certainly would have helped.

-John

The Arduino is has a bootloader that emulates an STK500, and a standard 6 pin ISP header. The “Arduino Language” is just some functions that they include to make it easier to program, you can add in standard avr code, or not use the arduino stuff at all. I like the arduino because it is pretty good for prototyping things, I recently purchased a STK500 and dragonfly bundle from digikey and i still use the arduino more.

That solution sounds a bit expensive. If the Arduino’s source code is open source might as well turn any of the Avrs that it supports into a a boot loadable device because essentially that is what you are paying for.

Well there are many reasons. Me an everyone I know that uses them wishes they could. It is a development board. which means it is used to develop there have been more then a few project where we have needed to just mount it to a robot really quick so we can have a PWM pulse gen on the bot. But it was harder to mount this. Now don’t just go and say create a PCB because we needed the serial port for the USART, etc. It isn’t something that is permanent. But it certainly would have helped.

That really wouldn’t be the way I would do it though. Namely because it’s $80.00 which is cheap for what it does but not cheap enough that Im willing to stick it on a robot. The Dragon has no use on a robot because of it’s limited prototyping area.