Announcement

Collapse
No announcement yet.

Trouble Writing Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lawrence
    replied
    This code works well the RPM read out gives flawless RPM reading to my max speed that I require 6,150 RPM I would like to trim off some of the code that is addressing the ignition portion of the code as I have
    limited skills in assembly code & using Interrupts.Trimming should give more time to do other stuff in PBP. If someone could help out of the goodness of there heart or alternately send me a quote for cost required
    to make the changes..

    Leave a comment:


  • Lawrence
    replied
    B_L_Dyno_Apr_24_2021.pbp
    Attached Files

    Leave a comment:


  • DavidP
    replied
    I have to ask, Why are you defining Adjust_up as a byte and then re declaring it as a single bit?

    Adjust_Up Var Byte
    Adjust_Dn Var Byte

    and then later....

    '******* Button
    Adjust_Up Var PortB.1
    ;******* Button
    Adjust_Dn Var PortB.2

    Leave a comment:


  • Henrik Olsson
    replied
    Code:
    Torque = Torque - Adjust    'Torque is result from external 18Bit  ADC
    The above line won't work the way I believe you intend it to when Torque is a LONG and Adjust is a BYTE. BYTE variables are unsigned so when you set it to -1 the above line executes as Torque=Torque-255.

    Unsigned math like that works fine as with BYTEs and WORDS as long as both variables involved are of the same type.

    Leave a comment:


  • mpgmike
    replied
    You need to tell us what you are trying to accomplish and what is actually happening. As of this post, nobody has even taken the time to download your code because we have no idea what we might be looking for. We're here to HELP, not do it for you.

    Leave a comment:


  • Lawrence
    started a topic Trouble Writing Code

    Trouble Writing Code

    I have a problem with the writing of some code can someone help please
    Attached Files
    Starts
    05-03-2021
    Ends
    05-03-2021
Working...
X