PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default I think I am on my way.

    The computer architecture part of

    http://www.mikroe.com/en/books/picmcubook/ch0/

    reminded me of the lectures I received in 1957 when I was hired as a computer programmer by Lincoln Labs to work on the SAGE Air Defense computer. If you want to read what preceeded the picmcubook (above) look at:

    http://history.sandiego.edu/GEN/20th/sage.html

    I started my career coding for SAGE. I graduated from CISCO Systems as a Senior Software Engineer in 2003. Since that time my mind has not been focused on technology.

    I feel that my problem with PBP and the 16F887 is lack of access to the 'common knowledge'. How did scalerobotics know about darreltaylor?

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


    Did you find this post helpful? Yes | No

    Default

    How did scalerobotics know about darreltaylor?
    Darrel is one of the moderators of this forum and one of the largest contributors.
    Hands down he is the one with all of the "interesting" stuff.

    Hang around and you will meet him.

    Ken,
    You are doing fine for starting work on a new system. We talk about "basics". Just work on things one piece at a time, not the whole project. When all of the pieces work then put it all together.

    I get a laugh from the "Object Oriented" folks from other languages. And I even hear about "extreme programming".

    Us working with MCUs have been doing the above sort of thing for.... ever.
    Write your code in pieces, make sure each piece works, then combine the pieces.

    So in your case, reading the PWM is one part, get that working.
    Move on to running a motor with PWM, a separate little project and code.
    Work on the sensors, another separate project.
    And so on...

    Pretty soon you will have the whole thing finished and understand it all.

    Architecture... Princeton or Harvard?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    You can get a lot of "common knowledge" here Microchip Technology User Forums as well as quite a few other places.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Just curious .. rmteo ... do you use PBP?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default I am getting confuseder and confuseder

    The PICBASIC PRO compiler book that comes (for $250) with MIcroEngineering Labs product does not mention built in routines. I found a chapter in a MikroElektrnonika "Programming PIC MCUs in BASIC"on line book devoted to these. I assume they work with my system. True? I don't think so.....sigh

    http://www.mikroe.com/en/books/picbasicbook/05.htm


    The above book says,

    -------start snip---------------
    Prototype sub procedure EEprom_Write(dim Address as byte, dim Data as byte)
    Description

    Function writes byte to [Address]. [Address] is of byte type, which means it can address only 256 locations. For PIC18 MCU models with more EEPROM data locations, it is programmer's responsibility to set SFR EEADRH register appropriately.

    All interrupts will be disabled during execution of EEPROM_Write routine (GIE bit of INTCON register will be cleared). Routine will set this bit on exit

    Ensure minimum 20ms delay between successive use of routines EEPROM_Write and EEPROM_Read. Although EEPROM will write the correct value, EEPROM_Read might return undefined result.
    Example

    for i = 0 to 20
    EEPROM_Write(i, i + 6)
    next i
    -------------------end snip----------------

    I tried the following bit in my PBP compiler.

    i VAR BYTE
    for i = 0 to 20
    EEPROM_Write (i, i + 6)
    next i

    It complained that the EEPROM line has a syntax error.

    What am I just not grasping.....??? I assume the two BASIC packages differ. The question is where do I find the built in routines that come with MY PBP?

    Ken

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Ken,

    If you're working with PBP, you need to forget about anything you read for the Mikroe BASIC compiler. These are two totally different compilers.

    Everything you need to know about PBP is in the PBP manual. What you don't understand, just ask about here.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    Ken,

    Have you been to this page?
    http://www.melabs.com/resources/samples.htm

    As for routines. I would say that just about every "command" listed in the PBP manual is a routine. ADCIN for example. The routine for reading the chip's ADC is built into that command.

    Keep asking questions
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Smile Success - the wheels go round

    This PWM exercise is designed just for what I have done.

    http://www.melabs.com/resources/samples/pbp/hardpwm.bas

    After loading the .hex into the RC car (carrying my PICkit2), hooking up another battery and connecting CCP1 to the electronic speed control, The wheels spin!!

    Ain't technology grande!

    Ken

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


    Did you find this post helpful? Yes | No

    Default

    COOL!!!
    Another piece down!

    Did you get Walter's PWM reading code to work?
    If so then maybe now you can combine the two.

    If incoming PWM is X then wheels turn sort of thing?
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default How does PICkit 2 Logic Tool work?

    As I said, the wheels go round, but...

    The wheels are not going round and round in the pattern I expected. In particular they only go backwards. The code claims to sweep from 20% to 80% cuty cycle.

    SOOO, can I use my USB connection and PICkit 2 Logic and Analyze Tool to see what is actually happening?

    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 : 2

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