PBP IF,THEN help


Results 1 to 11 of 11

Threaded View

  1. #10


    Did you find this post helpful? Yes | No

    Default

    I can't help but think your solution is overly complecated...

    if i got you right you've got POT's setup (6 i believe?) to measure some sort of angles ( ) and feed these into a comparator which i'm assuming has some sort of reference pot so that you can tune it to the angle you want.
    Your then reading the output from your comparators from your pic and controlling a set of motors...

    Far too complecated...

    if i may, can i surgest a more acurite way...

    Something like a pic16F877A has 8 analogue ports that can read a POT directly...
    So, use 10K or 100K pots, connect one end of pot to +5V the other to ground and the middle pin goes to your ADC port (acts as a voltage devider)...
    In the program you read the ADC, if it's anything other than 2.5volts (50% of the ADC max value) then it's off center and you can take action directly with the pic...
    You will find this method much more precise as it will measure less than 1 deg off center...

    Also, if you are measuring say pitch and roll, you therefor only need two pots and 4 outputs (2 per motor)...

    I'f i've got what your trying to do completely wrong then tell me...

    :edit
    Actually, the pic your using has 4 analogue lines...
    Last edited by comwarrior; - 25th September 2009 at 23:01.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 05:21
  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. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16

Members who have read this thread : 0

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