PBP - are DEFINE command(s) mandatory?


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default PBP - are DEFINE command(s) mandatory?

    Hello,

    I just had a hard time to make some LCD displays work on my 16F88...

    I was having a doubt about the use of DEFINE commands. I didn't put them originally in the code because I read this in the help file, under the LCDOUT command: "PICBasic asumes the LCD is connected to specific pins unless told otherwise."

    Since my circuit was not working, someone told me to add all DEFINEs related to the LCDOUT command. So I did.

    Once the display was functionning, I started to have a deeper look in my code and, as I do usually, I removed or modified one-by-one each command to evaluate and understand each command's action.

    What a surprise when I finally deleted all DEFINEs. The circuit is still working fine.

    Is it correct to say that DEFINE commands must only be used when our setting differ from the defaults?
    Roger

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    No, it's not mandatory... but without cross-referencing with the PICBasic manual you don't immediately know what signal is falling out of what pin.

    You might know today, but in a years time after you've written a couple of dozen different programs, you then come back and look at this one to make some modifications, and it's not apparent what goes where.

    Define everything. Comment everything. Document everything.

Similar Threads

  1. RF Modules
    By tonyfelloni in forum mel PIC BASIC Pro
    Replies: 44
    Last Post: - 26th June 2010, 17:42
  2. PIC16F877A analog problem
    By DeViLa_Q8 in forum mel PIC BASIC
    Replies: 0
    Last Post: - 30th July 2009, 20:19
  3. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00:13
  4. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 11:08
  5. Replies: 8
    Last Post: - 17th September 2006, 17:46

Members who have read this thread : 1

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