Help with pic16f690 -max232cpe


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    yeah but still.
    One more question tough. why cant i run a for loop?

    for count = 1 to 40
    pulsout PORTC.1,200
    pause 20
    next count

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


    Did you find this post helpful? Yes | No

    Default

    COUNT is a reserved word, a command actually.
    Change it to CNT ot something and it should work.
    Code:
    for CNT = 1 to 40
    pulsout PORTC.1,200
    pause 20
    next CNT
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Apr 2010
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    i ended up with a while loop, but il try the for loop.

    Thx for the help. Il be coming back, waiting for a gps module it should be here in a couple of days
    Code:
        i = 1
        while i<40
            pulsout PORTC.1,pos
            i=i+1
            pause 20
        wend
    the for loop gave me and syntax error

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by krise86 View Post

    the for loop gave me and syntax error
    Did you try CNT? Did you declare CNT as a variable?
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts