Random in PIC12F683


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Location
    East Coast USA
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: Random in PIC12F683

    To the best of my knowledge, PB does not expect a colon after 'then'.


    >> if spacet = 0 then: random pulset1'Randomize value in pulset1

    Also, is one of those consecutive gotos supposed to be a gosub?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Random in PIC12F683

    From the manual
    4.13. Multi-statement Lines

    In order to allow more compact programs and logical grouping of related commands, PBP supports the use of the colon ( : ) to separate statements placed on the same line. Thus, the following two examples are equivalent:

    W2 = W0
    W0 = W1
    W1 = W2

    is the same as:

    W2 = W0 : W0 = W1 : W1 = W2
    This does not, however, change the size of the generated code.

    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. RPM of CPU fan PIC12f683
    By mrmodest in forum General
    Replies: 3
    Last Post: - 3rd September 2012, 04:12
  2. Help with PICBasic and PIC12F683
    By plyrathrt in forum General
    Replies: 4
    Last Post: - 8th July 2008, 00:23
  3. pic12f683 setup
    By erice1984 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th July 2007, 11:48
  4. Pic12f683 Mclre
    By jmbanales21485 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th March 2007, 23:37
  5. Using the pic12F683
    By TonyA in forum General
    Replies: 2
    Last Post: - 6th April 2006, 12:46

Members who have read this thread : 1

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