Multiple if then optimization


Results 1 to 36 of 36

Threaded View

  1. #17
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    @      __config _XT_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    Include "modedefs.bas"
    nbpatterns var byte:uin var word:cmcon=7:trisa=0:trisb=1
    main: serin portb.0,n2400,uin:uin=(uin*100)/207:lcdout $fe,1,"TOO ":if uin<10 then lcdout "LOW":goto show
    IF Uin > 110 THEN LCDOUT "HIGH": GOTO Show
    lookdown2 uin,<[11,16,20,25,30,35,44,54,63],nbpatterns:lcdout $fe,1,rep 255\nbpatterns
    if uin > 62 then
    lookdown2 uin,<[ 63,73,82,87,92,97,101,106,111], NbPatterns
    lcdout $fe,1,rep 255\ 8,$fe, $c0, rep 255\ nbpatterns
    ENDIF
    Show:     Pause 5:goto main
    END ' End of program
    13 LINES!
    Last edited by skimask; - 3rd March 2008 at 16:29.

Similar Threads

  1. Multiple PICS from Same Crystal?
    By WOZZY-2010 in forum General
    Replies: 2
    Last Post: - 6th February 2010, 15:18
  2. Multiple analog inputs ?
    By rngd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th February 2008, 15:13
  3. Multiple PIC programming
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th May 2007, 23:47
  4. Multiple PIC's with 1 crystal
    By puma in forum Schematics
    Replies: 11
    Last Post: - 20th March 2007, 17:02
  5. Multiple IR LEDs from 1 port using transistor
    By belpe123 in forum General
    Replies: 3
    Last Post: - 20th May 2005, 22:07

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