• 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


    MidPoint High Number, Low Number


    Returns the mid point between the two numbers.


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

    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

    Download module

    Download: MidPoint
  • Recent Activity


    Mysterious PORTB problem

    Thread Starter: xldaedalus

    I'm using Proton+ to develop firmware for a product with switches. The MCU is an 18F26K22. Most of the switches reside on PORTB. I am NOT using a...

    See_Mos Today, 10:14 Go to last post
    Stephen Moss-711

    Watchdog timer

    Thread Starter: joesaliba

    I have a code that basically looks for four input and four outputs, depends on various timing and input conditions. I use interrupt and some delays...

    Stephen Moss Today, 10:15 Go to last post