Need help in code


Results 1 to 23 of 23

Threaded View

  1. #12
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Camolas

    1) some contradiction ...

    " text " tells :

    if input1 = 1 THEN


    WAIT for INPUT2 = 0 == WHILE INPUT2 = 1 : WEND ( loop if INPUT2 = 1 )

    WAIT 40s == PAUSE 40000 ... not 200 !
    LED ON for 3 s
    LED Off
    LOOP


    the program shows input levels inverted ... ( may be active low pushbuttons ??? did you think to the pullup ? )

    I think the first thing for you is to look at the different states ... and write succession of operations in order, more than write lines and try to make them work together.
    That's called an ORGANIGRAM ... ( joined an example )

    Now, I've almost written your program ... just translate it into PbP commands ( I gave you the "difficult part" command ... )

    Alain
    Attached Images Attached Images
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 22:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 22:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 18:23

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