My PIC can't do the math! Can yours?


Results 1 to 6 of 6

Threaded View

  1. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Thumbs up

    Thanks Paul. I fixed the problem considering your catch.
    I make the loop value the end number so it exits the loop.


    Code:
    XB=303
    for XA=0 to 150
    
       XB=XB-2
       if xf=XA then 
         xf=XB
         XA=150    'once we have the match, lets exit immediately as Paul mentioned above.
       endif
     
    next XA

    Also, Thanks to you Jumper. I see what you are saying about ADCON1 but I have no issue with that register. I am now getting the correct results;

    I found the bug :-)


    ------------
    Last edited by sayzer; - 11th May 2006 at 13:30.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. PIC Math - the need for speed
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 14th October 2005, 08:45
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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