Could I have some advice on Which Pic Please?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    Define	LOADER_USED	1
    If you don't need it in the end product, would save some space here...

    Code:
    IF PORTC.0 = 0 AND PORTC.3 = 0 then lcdout $FE,1,"     Diesel", $FE,$C0,"Outside ", $fe, $C9, dec (temp >> 1), ".", dec (temp.0 * 5), $DF, "C":  LOW PORTE.0: LOW PORTE.1 
           IF PORTC.0 = 1 AND PORTC.3 = 0 then gosub Tempcheck
           IF PORTC.0 = 0 AND PORTC.3 = 1 then gosub Tempcheck
           If PORTC.0 = 1 AND PORTC.3 = 1 then gosub Oil
    The If/AND/Then takes up more space than consecutive If/Then's...
    Code:
    IF PORTC.0 = 0 then
       If PORTC.3 = 0 then
              lcdout $FE,1,"     Diesel", $FE,$C0,"Outside ", $fe, $C9, dec (temp >> 1), ".", dec (temp.0 * 5), $DF, "C":  LOW PORTE.0: LOW PORTE.1
    endif
    endif
    Code:
    For i = 1 to 8          ' 8 bits to a byte
    For i = 0 to 7 would save a few more bytes

    Code:
    For i = 1 to 16         ' 16 bits to a word[/B]
    Same thing here.... For i = 0 to 15

    Just some tips for future use...

  2. #2
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Many thanks Gents
    You're all stars (in my eyes)
    and yes subject closed.
    Thanks again

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. newbe looking for PIC advice
    By Mad Professor in forum General
    Replies: 3
    Last Post: - 27th May 2009, 07:56
  3. Midi, Interrupts and Pic better than SX28?
    By Lajko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th September 2008, 00:26
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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