How do I give a radio control car autonomous control


Closed Thread
Results 1 to 40 of 191

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default 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

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    If the code is compiling look in your project directory for a HEX file. If one is there then MCS and PBP are working. I would not bother with trying to get MCS to run the PicKit2. Use the PicKit2 software for putting the code in the chip.

    Make sure each project has a directory of it's own.

    So let us know if you have a HEX file after you hit F9 in MCS.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    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.
    Hmmm. Just off the top of my head, I should think you'd only need 2 DPDT relays (1 for forward/reverse, 1 for left/right) and 2 SPST relays, one to turn power on and off to each motor.

    Actually, since your 16F887 has 2 HPWM channels, all you need are the 2 DPDT relays for forward/reverse and left/right, and 2 MOSFETS, one on the "low side" of each motor. Now you can use your HPWM channels for ON/OFF control with the added benefit of having SPEED CONTROL on both motors!

    Change your motor speed with a single line of code!

    Just a thought....

    steve

  4. #4
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default I am upset!!

    I was doing fine with Assembly and HI-TECH C code.

    I thought it would be best to go for PICBASIC. I could not find on the Microcode WEB site the $100 PICBASIC product. The only thing available is the $250 PICBASIC PRO package.

    It does not work at all!!

    The paper manual is useless regarding installation. For example one of the installation windows asks me if I want the compiler in my "environmental path". I have not used DOS since the 1990's. Frankly I forgot what my environmental path is, er was... No comment on this in the Copyright @2009 microEngineering Labs, Inc. manual

    I installed everything. It could not find the compiler.

    I uninstalled everything Microchip. MPLAB ide V9.30 refused to uninstall per my XP "remove program" feature. I finally deleted the whole C:\Programs Files\microcode directory.

    Then, with only the PICBASIC disk in my CD reader I installed PBP again.

    All seemed OKAY until I tried the simplest of tests - write, compile and build BLINK.BAS.

    I succeeded in moving BLINK.BAS into my workspace. The COMPILE and BUILD said,

    "Could not spawn language tool. Check command line options (5)"

    What th' ?? The free software has been easier to install and understand and better documented than the $250 package.

    Any idea in my computer where there is a file that will explain that compiler comment?

    Ken

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Can you tell us exactly what does not work? Do not take this the wrong way. Ut it could be a number of things.

    For starters you said in another post that the code compiled. Now it does not work at all???

    Are you using Micro Code Studio for the code editor?

    And who is "Microcode WEB" ? I hope you did not buy from someone that is not authorized.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Ken,
    I did not mean to sound harsh in the above post.

    I will pit together some screen shots tonight to help you get started.
    Make sure you have Pic Basic Pro, Micro Code Studio and MPLAB installed in the default directories and we will get you going. They should all be on the Pic Basic CD.

    What operating system are you running ?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Here's what is happening

    First I loaded the MPLAB code that came with PICkit 2 Debug Express. This was version 80. I also loaded Hi-Tech's C lite (free) C compiler.

    Every thing worked beautifully. I got an Assembly language bit to work and I got some C working. Both were examples that came with the package.

    Then I purchased PICBASIC PRO. Unbeknown to me this CD also had a MPLAB. It is version 83. I did the SETEUP.EXE from the PBP CD. Everything seemed hunky dorry until I tried to do a BASIC program per the manual. No good.

    I noticed that now two MPLAB's were installed on my machine. I tried but could not get the WINDOWS XP program remove tool to uninstall MPLAB version 80. Since then nothing has worked correctly.

    I have just done a complete new install with everything in their default directories. Let me see what is what.

    Ken

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Ok, I am not home yet but maybe we can go ahead.

    Do you have Micro Code Studio installed? If not install it. Leave MPLAB alone and installed for now. You will need a part of it.

    Use for now MCS for your code editor.

    When you start MCS under the view button on the toolbar there will be compiler options. On the first tab tell it to find PBP if it has not already done so. On the second tab tell it to find MPASM there is a check box. Do not worry about the third tab.

    Now when you want to compile hit the F9 key. If no errors are found it will generate a HEX file.

    More later.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 19:41
  2. Remote Car Starter Safety
    By CocaColaKid in forum General
    Replies: 8
    Last Post: - 22nd November 2005, 09:10

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts