Stuck on porting code to 18F4520


Results 1 to 40 of 43

Threaded View

  1. #24
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Stuck on porting code to 18F4520

    Is your variable a byte or word?

    60 x 60 = 3600

    Not sure things will go as expected before dividing by 255 if using a byte (guessing here).

    Robert



    Edit: That's not it: 59 minutes x 60 = 3540 seconds and that works...


    Edit some more: Got it, your brackets are screwed up.


    Code:
    (((fadeoutHR[1]*60)+fadeoutMN[1])*60)/255
    
    |
    |
    V
    
    ((fadeoutHR[1]*60)+(fadeoutMN[1]*60))/255
    Last edited by Demon; - 16th December 2013 at 03:35.

Similar Threads

  1. Porting code to new PIC
    By malc-c in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 31st December 2010, 23:20
  2. Kind of stuck
    By gti_uk in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 31st May 2009, 20:45
  3. Getting Stuck in loop
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 19th November 2008, 15:46
  4. Any idea's on porting this to PBP?
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th October 2008, 19:21
  5. Replies: 1
    Last Post: - 8th May 2008, 00:52

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