Log in

View Full Version : Robot Programming Education


phrontist
22-04-2004, 18:09
So I've got a PIC, my faithful breadboard, a binary display modules (aka LEDs ;)), a bit of money, and a mighty urge to learn. But where to start?

This year, my team's rookie year, I found our basic programming more or less painless, and was able to muddle through what was required. I am very fond of C and have done quite a bit of programming for normal (by which I mean x86) systems.

This whole microprocessor thing is really very cool, but I don't know where to start in learning more about it. I am looking for books/websites aimed toward someone who is familiar with C programming but totally new to microprocessors/embedded systems.

I'm particularly interested in PIC programming for next year, and I've already obtained what is essentially a NOPP programmer.

I am the lead programmer for my mentorless team, which I don't see as a disadvatage. I'm also interested in hearing what CDers have to say about teaching freshman members to program, which I see as a very high priority.

Well, thanks in advance for your help.

NOTE:
I'm a bit of a militant linux zealot, so any resources on PIC programming from linux are greatly appreciated!

Jay Lundy
22-04-2004, 19:03
Up to this year I had been mostly a high level programmer like yourself. I had done a lot of programming with languages like C++, Java, and PHP in web and windows environments. I had always been interested in the low level side but I never really did much with it.

Then in winter 2003 when I found out about the new controller I decided I needed to learn more about it. I was already a pro at C++ and had done a lot with C as well, so the programming wasn't hard, I just needed to learn about the actual PIC itself and basic EE concepts. I got a jumpstart from Ken Krieger, who taught me a bunch of the basics, and from there I learned most of what I needed from the PIC18F8520 manual. It may seem a little heavy at times, but it's actually a great learning tool, not just about the specific chip but about microprocessors in general. I followed that up with some EE theory from Radio Shack books and physics class, and some example circuits online, and that knowledge let me do quite a lot with this year's control system.

I also found it a lot of fun and a great learning experience working with character LCD displays. My first "major" electronics project was interfacing an LCD to the computer parallel port. It let me program in a familiar environment, but in an unfamiliar way (bit twiddling). It also didn't take very much wiring, but enough to make it fun. Once I got that working I interfaced the LCD to the robot controller, and my next big project (if I ever get a chance to start) is to use a PIC to capture data from the dashboard port and display it on an LCD.

phrontist
22-04-2004, 21:26
Up to this year I had been mostly a high level programmer like yourself. I had done a lot of programming with languages like C++, Java, and PHP in web and windows environments. I had always been interested in the low level side but I never really did much with it.

Then in winter 2003 when I found out about the new controller I decided I needed to learn more about it. I was already a pro at C++ and had done a lot with C as well, so the programming wasn't hard, I just needed to learn about the actual PIC itself and basic EE concepts. I got a jumpstart from Ken Krieger, who taught me a bunch of the basics, and from there I learned most of what I needed from the PIC18F8520 manual. It may seem a little heavy at times, but it's actually a great learning tool, not just about the specific chip but about microprocessors in general. I followed that up with some EE theory from Radio Shack books and physics class, and some example circuits online, and that knowledge let me do quite a lot with this year's control system.

I also found it a lot of fun and a great learning experience working with character LCD displays. My first "major" electronics project was interfacing an LCD to the computer parallel port. It let me program in a familiar environment, but in an unfamiliar way (bit twiddling). It also didn't take very much wiring, but enough to make it fun. Once I got that working I interfaced the LCD to the robot controller, and my next big project (if I ever get a chance to start) is to use a PIC to capture data from the dashboard port and display it on an LCD.

Neat project! Thanks for the tip on the manual, I didn't realize Microchip had such good docs
:cool:

FotoPlasma
22-04-2004, 21:34
If you're interested in Linux PIC stuff, check out GPUTILS (http://gputils.sourceforge.net/) and GNUPIC (www.gnupic.org). There's a lot of other such good pages with information out there.

Most of the free software associated with PIC microcontrollers is geared toward the 16F84, which is one of the more popular hobbiest controllers out there.

Astronouth7303
23-04-2004, 13:38
www.beyondlogic.org is a good place for info on interfaces, also includes some 16F- examples.

On the freshmen thing, look for people who already program something and see if they will go through a tutorial. Most of my pre-C expieriance came from NQC, which doesn't have any of the funky overhead and has nearly immediate results on a simple device (or devices). Or just look for freshmen like myself who just need a week with the EDU, but I don't think there are many.

phrontist
29-04-2004, 21:08
www.beyondlogic.org is a good place for info on interfaces, also includes some 16F- examples.

On the freshmen thing, look for people who already program something and see if they will go through a tutorial. Most of my pre-C expieriance came from NQC, which doesn't have any of the funky overhead and has nearly immediate results on a simple device (or devices). Or just look for freshmen like myself who just need a week with the EDU, but I don't think there are many.

I used NQC once. That was a horrible. horrible, conception. Sadly, it was the best thing Mindstorms supported.

Astronouth7303
30-04-2004, 14:23
That's why it's called NQC: NOT QUITE C! But it gets you used to semi-colons, braces, etc. Basic lexial stuff, gets you away from, say, BASIC.

Ryan M.
30-04-2004, 15:00
I used NQC once. That was a horrible. horrible, conception. Sadly, it was the best thing Mindstorms supported.If you're refering to the hardware, you can get alternate firmwares for it. Some of them are: BrickOS (former LegOS), LeJOS, and PB-FORTH.

LEGO doesn't support those though, although I've used all without problems. (other than installation. BrickOS is a pain to install. <if you're not lucky :)>)

Tom Bottiglieri
30-04-2004, 15:00
This is kind of off topic, but does anyone know a good online resource for learning the assembly language? I've always wanted to learn it, but never came across anyone who could point me in the right direction.

Ryan M.
30-04-2004, 15:02
This is kind of off topic, but does anyone know a good online resource for learning the assembly language? I've always wanted to learn it, but never came across anyone who could point me in the right direction.What platform/processor? It varies between them.

Ryan M.
02-05-2004, 07:33
What platform/processor? It varies between them.Wait... You mean the RCX. Don't know. Maybe "RCX internals"? (Look it up on Google.)

Astronouth7303
03-05-2004, 07:32
If you download the mindstorms SDK, it includes some asm stuff (primarily a few editors)