Proton BASIC Compiler - MidPoint


  • Pic® Basic


  • MidPoint

    A library module for use with Library Manager by JohnGB. This module has been written by Tim Box (Tim on PDS forum). The library module is offered on an as-is basis with no warranty as to its effectiveness, operation or reliability. Users use it at their own risk.

    Adds a new command called MidPoint

    Syntax

    MidPoint High Number, Low Number

    Overview

    Returns the mid point between the two numbers.

    Operators

    High Number – a number, byte or word variable Low Number – a number, byte or word variable

    Code:
    Include "PROTON_4.INC"
    Dim A As Word
    Dim B As Word
    
        A = 500
        B = MidPoint A,200
        HRSOut "The mid point of ", Dec A,", 200 is ", Dec B
        Stop


    Download module

    Download: MidPoint
  • Recent Activity

    david-48000

    Valid time in NMEA sentance

    Thread Starter: SimonJA

    Is there any way to know that a GPS nmea sentence has the correct time? I use a module to keep a pic rtc accurate but have noticed that when...

    david Yesterday, 20:40 Go to last post
    towlerg-21522

    I'm over the moon with joy. :-)

    Thread Starter: Les

    I just had to show you this, because I am over the moon with it. LOL I've just about finished procedures on the Proton 8-bit compiler so I am busy...

    towlerg Yesterday, 16:13 Go to last post
    david-48000

    GPS speed logger for RC planes.

    Thread Starter: david

    Hi All, This is a simple project to allow the logging of RC plane speeds to help determine battery, motor and prop variables. The code is crude and...

    david Yesterday, 21:01 Go to last post