Button


Closed Thread
Results 1 to 11 of 11

Thread: Button

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by paul borgmeier
    a) not clear to me what you want??
    b)

    PBP supports integers only...
    try
    F3=125*(F1//16)/2
    or
    F3=(125*(F1//16))>>2

    check your answers to make sure you can live with the roundoff (e.g., if F1=17 then F3 will be 62 not 62,5.)

    Paul Borgmeier
    Salt Lake City, Utah
    USA
    i change the code:

    ' ** CALCULATION OF THE FREQUENCY

    F1=PLL
    F2=F1/16 'give them MHz
    F3=125*(F1//16)/2 'give them kHz

    and it's work.
    Only have one problem . All frecuencies-step show corect(125,250,500,1000), but the 62,5 show only 62
    i.e. for PLL FM ,62,5KHZ is the step.when i choose 62,5 show on LCD 62 ,while i choose 125,250,500,1000 show corect

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    multiply by 10 or get the remainder with R2 predefined variable
    http://www.picbasic.co.uk/forum/show...ight=remainder
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 09:10
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 03:43
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 23:43
  4. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 11:06
  5. Button subfunction 16F628
    By Jųan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th August 2005, 17:44

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