Serial Relays


Results 1 to 4 of 4

Thread: Serial Relays

Threaded View

  1. #4
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post Few Down-to-earth examples

    As Ski pointed out, i is a variable. It's called a variable because, unlike fixed constants it changes. If i is a byte sized variable it can take on any form between (0-255) Whilst if it's a word sized it can be assigned with anything up to 65,536.

    When we see something like this:
    Code:
    i = i + 1
    It's basically just adding 1 to the existing contents of i. This is referred to as incrementing. So, if i = 100 and we encounter i = i + 1, the new value of i will be 101.

    For Next Loops:
    Code:
    FOR i = 1 TO 10
        j = j + 20
    NEXT
    Strangely enough, more than often we encounter i as a variable within these loops. It could be anything actually. J, K - doesn't matter. FOR NEXT loops will execute the contents between FOR and NEXT a predefined number of times which is set by the numbers after TO minus the numbers after FOR. In the example above, j will have 20 added to it 10 times. The final result of j will be 200 when the loop has finished. However, this assumes that the initial starting value of j was 0.
    <br/>
    Last edited by T.Jackson; - 17th May 2007 at 17:51.

Similar Threads

  1. Replies: 33
    Last Post: - 19th March 2010, 03:02
  2. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 17:03
  3. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  4. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35
  5. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46

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