I got a demo C program to work
The demo PIC Assembly programs are straight forward. I understood them. They work.
I was happy to discover that the HI-TECH PICC lite integrates into MPLAB IDE easily. It offers a demo program that is much more complicated than the assembly shots. It worked here in sunny scenic Fitchburg Mass.
The MPLAB IDE contains another free C compiler. We'll see what it offers.
Ken
Getting a bit frustrated.
I ordered five DPDT relay switches early last week from Newark. They have not arrived yet. I have not prototyped a digital/analog circuit is over thirty years. We used wire wrap in the day. Yesterday I bought from Radio Shack solder, a low power iron, some small tools, and three different kinds of proto boards. It is not obvious how we physically attach capacitors, resistors, transistors, to these boards. I gather the inline chips get plugged into sockets that have pins which fit into these proto boards. Their back sides are designed for some kind of wire attachment. Wire wrap?
Can you guys point me to some revealing photographs?
Ken
To get acquainted I purchased a PICkit 2
Steve,
I had hoped that I could prototype with Microchip's PICkit 2 Debug Express. That may not be practical.
First off FEDEX or whatever has to deliver my PICBASIC PRO software package. Then I need the DPDT switches I'm getting from Newark. Then I need to master the programming. I want to use the DPDT switches to toggle the signals into the rear wheels electronic speed control (ESC) and the steering servo between the radio receiver and the PIC.
I also may need two battery packs. The ESC uses a 7.2 volt Ni-Cd pack. The PIC needs a 5 volt arrangement. I could put a 5 volt regulator in front of the PIC. Trouble is the 7.2 volt batteries do not last very long when at the track. Two voltage sources would be preferable but more difficult to physically install.
I need to be able to draw a schematic. The PIC will control the DPDT switches guided by a binary (PWM?) signal from the third channel in the RC system. The PIC will also have to react to whatever sensor interrupts (light for one and maybe touch in front) as well as generate steering and ESC signals when autonomous.
The RC racing will as original. Its speed and flexibility will not be compromised. Autonomous mobility can be slower. It is still part of the race, but speed will be less important than good programming.
It would be nice to program the autonomous actions with a simple language like LOGO or ROBOlab or whatever is used for VEX. I have not the faintest idea how to accomplish that without direct help from one of those organizations.
Little by little with you guys help==>
Ken
My problem is not PICkit software it is PICBASIC
Guys,
Last week I had PICkit Assembly code and HI-TECH C code working.
I plucked down $250 for PICBASIC. This is what is not working. It compiles but refuses program. It says that it can not find the programmer. I think its programs are duplicates of what came with the Debug Express package. Some how they are getting confused.
I have a second RC car. It is toy level. Both drive wheels and steering are driven by motors. It is easy to control such a car by PIC. All it needs to do is ON and OFF forward, ON and OFF reverse, ON and OFF steer left, ON and OFF steer right. OFF + OFF makes it steer straight. The steering mechanism has a physical limit mechanism. Controlling the above can be done with four DPDT switches. The car carries 7.5 volts worth of AA batteries.
Back to getting PIC BASIC working..
Thanks,
Ken
I just read what your last note.
Thank you,
I was looking for that include file, but could not find it.
The printed documentation gave me the details about the board wiring.
Onward and upward to bigger and better things. :rolleyes:
Ken
Where do I find the definitions of all those aliases?
You used many previously defined aliases in the two INCLUDE segments as well as inside our Blink'n code;
'16F887 BLINK
@ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF
Where are these listed? On what page of which .pdf file?
Ken
It worked as would be expected. However
The compiler did not like your @ line.
It felt that three of the aliases were unknown.
I commented out the whole line and the program compiled, programmed and worked exactly as I imagined it would.
I guess I have to investigate the items in the @ line.
Meanwhile I need to pick a light sensor chip for an incandescent light bulb. Got any suggestions? I have to purchase this on line. Our local Radio Shack has no such items.
Ken