Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: cooldog on November 09, 2007, 12:00:01 PM

Title: microcontrolers
Post by: cooldog on November 09, 2007, 12:00:01 PM
how do i program a microconroller ???
Title: Re: microcontrolers
Post by: bulkhead on November 09, 2007, 02:15:37 PM
Take a look at this reading: http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf

In general, you connect the microcontroller to a computer through the serial or USB port, and 'download' the program you wrote on your computer to the microcontroller using the software (usually) provided by the microcontroller's manufacturer.
Title: Re: microcontrolers
Post by: Half Shell on November 09, 2007, 05:29:57 PM
If you are a complete newbie to microcontrollers I highly recommend Arduino (www.arduino.cc and http://www.adafruit.com) or the parallax Basic Stamp. I myself cut my teeth on the Texas Instruments MSP430 - the only easy ot access one of those is the MSP430F2013 and even then I would recommend waiting before you used it.
Title: Re: microcontrolers
Post by: Admin on November 09, 2007, 07:41:19 PM
Here is one method . . .
http://www.societyofrobots.com/step_by_step_robot_step4.shtml


Feel free to take a look at other microcontrollers you can buy:
http://www.societyofrobots.com/robot_parts_list_microcontrollers.shtml


Its a bit overwhelming at first, but after awhile it will start to make sense.
Title: Re: microcontrolers
Post by: cooldog on November 10, 2007, 07:42:40 PM
how do i hook dc motors to my microcontroller?
Title: Re: microcontrolers
Post by: Admin on November 10, 2007, 08:52:33 PM
Do a search for motor drivers and motor controllers in this site and google.

The microcontroller sends signals to the motor controller, and the motor controller controls the motors.
Title: Re: microcontrolers
Post by: Spoil9 on November 14, 2007, 09:14:39 PM
So I went to SparkFun's website (www.sparkfun.com) and I was looking at their Arduino USB Board and Gainer PSoC Development Board, each for $35. They both look like good intro MCU's with augmented boards and free compilers. (I learned something new!)
So where is the down side? MCU's are very over whelming to me and I know I need to do more research, (but I also need sleep now).
But looking at this board, http://www.sparkfun.com/commerce/product_info.php?products_id=666 I should be able to buy this, download the compiler, hookup the USB cable and be good to go right? Am I missing something here?
I understand that they use their own language and that really does not bother me.
Thanks.
- Bill
Title: Re: microcontrolers
Post by: Admin on November 14, 2007, 10:11:37 PM
It uses the same microcontroller as my $50 robot (the upgraded 168 version (http://www.societyofrobots.com/step_by_step_atmega168_swapout.shtml)).

. . . meaning you can program it with my code if you wanted . . . and yea just use a usb cable to program it.

My biggest complaint about the Arduino is that it does not have a powerbus - meaning if you want to hook up servos you need to do more wiring for ground/power. Same for sensors.

It doesn't have a place to attach a battery either . . .
Title: Re: microcontrolers
Post by: Spoil9 on November 16, 2007, 08:03:45 PM
Admin-
So you have experience in programming the Arduino? I have not downloaded the program yet, how user friendly is it?
(I have zero programming experence outside very simple QBASIC, and that was a decade ago.)
- Bill
Title: Re: microcontrolers
Post by: Steve Joblin on November 16, 2007, 08:57:42 PM
Spoil9 - If all you know is a bit of QBASIC, I strongly suggest the Parallax Stamp to get you introduced to the world of microcontrollers.  See references above in this thread for links.
Title: Re: microcontrolers
Post by: Ro-Bot-X on November 17, 2007, 01:58:20 AM
You can program the Arduino board with Bascom-AVR demo version, if all you know is basic. But I strongly advise you to use their free software, since is C based. That will allow you to replicate Admin projects without the need of translating code. And for engineers C is a must.
Title: Re: microcontrolers
Post by: Spoil9 on November 17, 2007, 07:35:28 AM
Steve,
Love the idea of that stamp as an industry standard. Almost everyone i know has atleast heard of it of not knows what it it. But the price tag is a bit much for multible projects. (which I do as I have a short attention span)

I mainly chose the Arduino based on price. If I have to learn C to use it, then that just makes me a better person in the long run.
Guess I need to start studying.
Thanks all.
Title: Re: microcontrolers
Post by: Admin on November 17, 2007, 08:52:52 AM
Quote
So you have experience in programming the Arduino?
I havn't used the Arduino before, but I've programmed the very same ATmega8.

Programming in C is required knowledge if you want to be serious with robotics, so its a good investment ;D