PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default HDD spindle motor controller

    Hi all

    Thought this might be of some interest, the code is in C and there is no schematic , was just thing of 4 well synchronized hard drive spindle motors a an RC chasis , would be quite a fast car.

    Seems like a nice project though!
    http://bradthx.blogspot.com/2010/02/...le-motors.html

    Kind regards
    Dennis

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


    Did you find this post helpful? Yes | No

    Default

    Ken,

    Just to be sure we are all doing the same thing...

    1-- Write and compile the code using MCS.
    2-- Generating the ASM file with MCS set for MPASAM use.
    3-- Open a project in MPLAB.
    4-- Use the ASM file generated by MCS as the source for the MPLAB project.
    5-- Everything is in the same project directory.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default Maybe we are not doing the same thing...

    1-- Write and compile the code using MCS.
    Compile PIC BASIC PRO code using
    MicroCode Studio version 3.0.0.5
    PICBASICPRO 2.6.0

    2-- Generating the ASM file with MCS set for MPASAM use
    Using MPASM per the following picture:


    3-- Open a project in MPLAB.

    Open the project in MPLAB IDE 8.43.00.00
    MPDebugger 3.10

    4-- Use the ASM file generated by MCS as the source for the MPLAB project.
    5-- Everything is in the same project directory.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Looks like the only difference is you are using the latest software, I am still using PBP2.50 and MPLAB v8.00.

    So I am at a loss now.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default Waiting for the parts.

    Progress has been slow. It will be more fun when the SN7407's show up and I can make the car move.

    Ken

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


    Did you find this post helpful? Yes | No

    Default The SN7407's have not arrived - yet

    It's been more than a week. They were supposed to have been shipped via USPS. The vendor is not answering its email. Does not look good.

    Meanwhile I might as well get back to the REAL project. I have not decided on the least intrusive means to generate PWM. Using the toy level car all I have is bang/bang control. Full speed forward, full speed backward, stopped. Full turn left, Full turn right, straight ahead.

    With PWM control I have CONTROL. Thing is, I do not know whether I really need this complication. Probably not. But I do need for the microprocessor to be doing things while the car is moving. PAUSE does not cut it.

    Gotta put back on my thinking cap.

    Ken

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Hey Ken,

    Don't know if you saw it, but some progress was made on the 12F683. It is decoding 5 channels, and encoding 4 channels. You could modify the servo output as you like in the main section, using PBP. The DT interrupts are done in assembly. (No pauses) All you would need is a $2.00 12f683, a capacitor, 3 diodes, and a breadboard.

    http://www.picbasic.co.uk/forum/showthread.php?t=12657

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


    Did you find this post helpful? Yes | No

    Smile I think it will be easy

    The wall racer code contains subroutines that do all the bang/bang controls by switching DC current through relay DPDT switches

    The 16F887 has CCP1 and CCP2 each of which can be controlled by the HPWM Pic Basic Command. I could replace the six subroutines above with six that use HPWM. They would use these two outputs with three pulse widths each.

    If I were to add a parameter to each GOSUB command thereby giving more nuance to the pulse width I could command in between wheel speed and steering angle.

    Sounds like a piece of cake. What do you think?

    Ken

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

Members who have read this thread : 1

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

Posting Permissions

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