Increment a Byte


Closed Thread
Results 1 to 9 of 9

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 Acetronics View Post
    Hi, Savnlik

    You just can use :

    Code:
    For I = 1 to 255
    
    PAUSE 50
    HPWM 1,I,1000              ' The reason of your loop ( BTW ...). 1000 is pwm freq.
    
    NEXT I
    or ...

    Code:
    DO
    
    I = I + 1
    
    ....
    
    While I < 255


    For limiting Numbers:


    Code:
    I = J MIN 255  ' I is the smaller ( MIN ) number between J and 255 ...
    Alain
    I change the duty manually with two buton's (up and down)

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    I had test and not work.Because next have count 255 + 1 = 256
    Ouch, yes of course... my mistake, sorry.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Ouch, yes of course... my mistake, sorry.
    No problem.
    aratti code solve my problem.

Similar Threads

  1. LCD freeze
    By harryweb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th October 2009, 08:01
  2. Memory use - how much do you use?
    By keymuu in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 10th June 2009, 22:39
  3. byte compression
    By Norbert in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 16th June 2007, 18:04
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. 16F877 RAM Question
    By Art in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 6th August 2005, 11:47

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