pic16F84A

I got a pic 16F84A as a free sample. so far i’ve just hooked it up to a 7 segment display and it counts up to 9 and back down to 0 and repeats. I’ve also hooke it up to some leds and flashed some basic patterns. I think i’m ready to try something else now. I ordered some tracks and motors to play with. hopefully i can figure out how to get a range finder working too.

Man, I gotta give you high marks…

I swear, I have answered a million posts from people saying "I want to build a robot that will wash my dishes and do my homework". These same people have not even wired a flashlight bulb to a 9v in thier life. Everytime the answer is buy a picaxe or adruino and just get a LED to blink… I think you are the very first person who actualy started with a blinking LED and is only after that asking what to do next. A big fat gold star to you, sir --Everyone here kicks you mad respect.

I would say you are certainly on the right path. You will need to get some sorta rangefinder (sonar or IR) and a motor driver chip -these are all described in great detail in the "start here" post. From there, just play around, dude. You already seem like the type who just wants to figure things out. So do it! :slight_smile:

If you are coding 7-segments you should have no problem at all putting something together. Browse the website for a while, everyone has done something cool --borrow an idea and run with it.

Godspeed, yo.

ASM
Are you using RISC assembler? Tell me you’re using RISC assembler.

I’m getting a vibe…
He feels like that kinda guy… You might just have a buddy here, BOA!

I’m using mplab from
I’m using mplab from microchip. There are only about 30 instructions so i’d assume that it is RISC.

programming the 7 segment
programming the 7 segment wasn’t hard since i used a74LS47 7segment driver chip. It takes 4 inputs and gives the correct 7 outputs. I just had to have the pic increment/decrement and test if i got to 9 or zero respectively. a simple little delay function and we see the 7 segment count up then down.

I’d really like to do all my
I’d really like to do all my work in linux since mplab works nearly flawlessly under wine but I made the mistake of buying a cheep programmer for the pic from ebay. the programmer works well but only in windows. the software appears to work in wine but the driver it needs doesn’t seem to do anything installed in wine. I suppose I could try to make my own programmer but i’d rather not spend my time on that.

some suggestions

Let me first say I second Chris the Carpenter in congradulating you on gertting the 7 Segment LED to work. It sounds like you are well on your way to bigger and better things now. This is definately the place to get your questions answered.

You might want to spend some time looking into the bootloaders. If you get an 18F device, or even a 16F88, you only need your programmer once to install the bootloader. Then you can simply program your device from the serial port. Microchip will send you free samples, so have a look on their website and pick the device you like the best. I would recommend the 18F1320 or 18F4620 since they are loaded with extras and you can put a bootloader in them.

If your using Linux, you could also check out gputils. This is a free group of programs that was written for Linux, but you can get Windows versions as well. There is no IDE, it’s all command line, but that’s what Linux is anyways. You get an assembler, linker, debugger, simulator, and some other goodies too.

thanks
thanks for the suggestions on what pic to try next. I orgiginally got the 18f84A because there appeared to be a lot of projects people have used them for. this pic is a good basic pic but i’d really like something a little better. I’m looking at the pic 18F4620. it seems to have a lot of features. I’m not sure if i’ll load a bootloader since I don’t have any serial ports.

How about USB ports

I don’t ‘really’ have any serial ports either. I bought a USB to RS232 converter from Pololu.

http://www.pololu.com/catalog/product/391

It says it has drivers for Linux. I don’t have much Linux experience, but this has worked well for me on Windows XP. Usually you will want to communicate to your robot somehow, and most of the time it’s through some kind of RS232 serial port.

I am using the 18F4620 on my own project and at work, so if you run into any problems, just ask.

eventually I’ll probably
eventually I’ll probably look into that but for now i’m content with using the usb programmer i bought since i’m still developing my circuits on a breadboard. If I ever decided to solder it all toghether i’d probably look into the bootloader and programming it that way.


The other chip I got as a sample is a 18F1220. I was reading abotu pwm and thought it would something to try out wile i’m waiting on some parts.

Lesson Learned

Let this guy be a shining beacon to you all. Microchip RISC is so easy he didn’t even know he was using it!

Much more versatile than girly basic.

eBay
YOu can buy a PicKit2 clone on eBay for around $25. Money well spent. I dunno if it works under Linux, though.

Start Small
Like you’ve already done, I suggest start small and try to control the brightnes of an LED under PWM!

Bootloaders
These converters will probably work well for bootloaders. Just bear in mind that if you DO decide to build your own serial port programmer, the USB / RS232 thingies WILL NOT drive a LUDIPIPO type programmer such as the JDM.