Hey, good you made it back!
I'm afraid I try and avoid .ASM as much as possible, but if I was looking for the document where PIC ASM is defined.... I'd start with the data sheet for your PIC, in the section titled "Instruction set summary".
steve
Hey, good you made it back!
I'm afraid I try and avoid .ASM as much as possible, but if I was looking for the document where PIC ASM is defined.... I'd start with the data sheet for your PIC, in the section titled "Instruction set summary".
steve
I have printed 300 (ran out of paper) of 384 pages of the PIC16F88x Data Sheet 41291D. On page 231 I found "15.0 INSTRUCTION SET SUMMARY". This document has no Table of Contents.
I need help getting onto hardware prototyping. I am fifty miles from the nearest well stocked electronics components store. What I need is a list of items to purchase when I make the trip. If anyone has a photo I would greatly appreciate it.
I imagine soldering onto my PICKIT 2 connection wires with plugs or sockets. (male or female depending on which wire is 'hot') One or some for A/D converters, PWM input, PWM output, various sensors (sonic range finder and visual spectrum light sensor) and whatever else I might need (suggestions please).
I imagine attaching these various items to my inline proto boards again with wire and matching plugs or sockets.
What off the shelf items would make this 100 mile round trip fruitful.
Ken
Hmmm. You have a 16F887, right?
The data sheet I have for it (41291F) is 328 pages and definitely has a table of contents....
It looks like pages 233 - 241 deal with the instruction set.
http://ww1.microchip.com/downloads/e...Doc/41291F.pdf
But you've got PICBASIC PRO, right? I don't think there's too much need for you to learn ASM unless it's just for educational experience. Why make things harder for a "first project"?
Before you go on a shopping spree, you should figure out what it takes to drive your motors and servos, etc and come up with a schematic or at least a block diagram of some kind.
I assume your car has a DC motor for drive, and a servo for steering position? How much current does the motor draw? You'll probably want one or more logic level MOSFET's to drive it.
I'd get a slab of punchboard to build your circuit on. You'll want a good selection of resistors and caps... If you use CDS cells to "see" light, then you'll want resistors to form voltage dividers with the CDS cells so you can easily measure with an ADC. Of course what values you need depends on many things... including which CDS cells you get. You'll probably want some fairly high value (100K) for gate to source resistors on your MOSFETS. You'll need some caps (maybe some .01 or .1 uF ceramic) for supply bypassing at your PIC and other chips.
Errr... who knows what else you'll need! I think you need more of a game plan, and at least a rough schematic before you drive 50 miles to shop....
steve
Or you could use something like this during the learning/development phase (<$150 and should last you a lifetime) EasyPIC6 PIC® development system:
![]()
I have the car. It uses a Tomahawk Reverse Electronic Speed Controller(http://www.nosram.com). I want to use that system directly from the RC receiver for racing. It is proven and its response is sure. It would be nice if I could get the same three wire sockets that this device is accustomed to plug into, but that seems more than I can expect.
I plan to use DPDT switches to toggle between RC receiver control and PIC control. I plan to use the third channel on the RC system to tell the PIC to flip the DPDT switches.
The attached pictures of the car show that it is four wheel drive (there is a drive belt down the middle). This limits my ability to attach the PIC and attendant devices. Once the PIC control works I will be able to get more appropriate 1/10 scale cars or trucks.
I hope the pictures came out OKAY.
Ken
Hey Ken, thanks for the photos! I always love to SEE peoples projects.
So the original control circuitry is clearly all sealed up, so it looks you can't hack into it and use any of it's electronics when yer buggy is under PIC control. No problem, I was just curious.
FWIW, here's a simple circuit that uses a MOSFET to drive a motor and a DPDT relay for direction control. You would need one PIC pin to PWM a signal to the MOSFET for speed control, and one pin to drive the relay coil. Of course, depending on how much current your relay draws, you may need another MOSFET or bipolar transistor to drive the relay coil. And a protection diode across the coil always...
Anyway, that would give you speed and direction control on your motor.
steve
Well, I see it's already too late to edit my original post (sigh), but I didn't want to give the wrong impression when I said I hated EagleCAD..
I'm sure it's a fine program, and I know a LOT of folks use it and love it.
I just found it to be rather... unfamiliar.. compared to other programs I've used, and I found it difficult and non-intuitive (to my brain) to learn.
I stumbled across DipTrace one day and found it to be much more to my liking.
Anyway, I didn't want to sound like I was bashing EagleCAD. I used it long enough to realize it's a good program... I just didn't like the way it felt. It's just a personal preference thing.. like what's yer favorite color.
steve
First things first.
I can try to make myself a circuit diagram with a pencil. Better yet I can learn how to use CAPTURE. Then I can share it. I'll give that a shot.
Microchip seems to make many products that interface directly with the 16F887. I have a problem picking out which are appropriate.
Thanks.
Ken
I don't think you're gonna need all that much stuff.
You've got the ultrasonic sensors already. A handful of cheap CDS and some resistors takes care of seeing a visible light source.
You'll need to build whatever it takes to drive your motors. Or figure out how to adapt whatever the car has already.
Maybe it would be fun if you posted some pictures of the car you are using, all opened up so we can see what drive motors and control electronics it's got in it already?
Yes, definitely come up with a way to draw and share schematics... even if it's just a pencil and paper and a scanner...
steve
Hey Ken,
I dunno if this is any good, but the price is right... Maybe worth a try for drawing schematics?
http://tinycad.sourceforge.net/
steve
Or do it right the first time around with EagleCad Free Version
I tried EagleCAD a couple years ago and hated it. I found it to be rather difficult and non-intuitive to use.
I use DipTrace now and I like it a lot. It has a freeware version also
http://www.diptrace.com/
steve
Bookmarks