Stuck on porting code to 18F4520


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,721


    Did you find this post helpful? Yes | No

    Default Re: Stuck on porting code to 18F4520

    why not use
    if seconds//7= 0 then
    B_PWM=B_PWM+1
    endif

  2. #2
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Stuck on porting code to 18F4520

    Hi Richard,

    That gives me something similar to

    If SS = 7 or SS=14 or SS=21

    Which results in the value reaching 255 in around 4 segments. The code converts 0 - 255 into percentage (0 - 100%) on the LCD. Running your suggestion, whilst the seconds are displayed the B_PWM=B_PWM+1 runs, so when it starts it reads 29%, then at 7 seconds 59% 89% at 14 and 100% by 22 seconds, pausing between each multiple of seven, if that makes sense ?

    Malcolm

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