LAB-XUSB Experimenter Board help


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    It IS confusing. As I said, I made the change to the LCD program that just says Hello World over and over again, but it doesn't work on the keypad program.

    I'm still learning this type of code, so the error could be right in front of me and I won't see it. That's why I'm asking for help deciphering this type of coding.

    Thanks,
    Tony

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    Demon hit on an issue that comes up here repeatedly. Writing define osc 20 doesn't do the job but define OSC 20 will. I use his method and write the whole define statement in caps like DEFINE OSC 20. That needs to be addressed first.

  3. #3
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    Absolutely.

    From the PBP manual in the "DEFINEs Defined" section.
    For the practical PBP user, there are a couple of fundamental points to consider:
    1) DEFINEs are CASE SENSITIVE!

    All PBP DEFINE parameters are UPPERCASE.

    So when you use "osc"' "Osc" "oSc" "osC" "OSc" "oSC" "OsC", PBP will not recognize these as OSC defines and will use the default OSC setting.

    ONLY "OSC" will actually tell PBP you are setting the OSC speed.

    The correct statement for your program is:
    "DEFINE OSC 20"

    The Microcode Studio UI will change the "DEFINE" keyword to lower case when it is displayed I.e. "define" but that is only what is displayed in the UI. It does not actually change the text in the file to lowercase. More importantly it does not change the "OSC" parameter. It will leave it as you typed it.
    Regards,
    TABSoft

  4. #4
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    Quote Originally Posted by Tabsoft View Post
    Absolutely.

    From the PBP manual in the "DEFINEs Defined" section.
    For the practical PBP user, there are a couple of fundamental points to consider:
    1) DEFINEs are CASE SENSITIVE!

    All PBP DEFINE parameters are UPPERCASE.

    So when you use "osc"' "Osc" "oSc" "osC" "OSc" "oSC" "OsC", PBP will not recognize these as OSC defines and will use the default OSC setting.

    ONLY "OSC" will actually tell PBP you are setting the OSC speed.

    The correct statement for your program is:
    "DEFINE OSC 20"

    The Microcode Studio UI will change the "DEFINE" keyword to lower case when it is displayed I.e. "define" but that is only what is displayed in the UI. It does not actually change the text in the file to lowercase. More importantly it does not change the "OSC" parameter. It will leave it as you typed it.
    Well, that was it. I tried changing the case of define to uppercase, but PBP kept changing it back to lowercase. Never did anything with the OSC. Not sure if it's a programming flaw or done intentionally, but that makes no sense to auto-correct some things that don't matter, but not auto-correct the things that do matter.

    Two days I've been working on this, and all for something as simple as case size. I thought it was the other code as I am not familiar with it and was trying to decipher it.

    Thanks for everyone's input. Much appreciated.

    Tony

  5. #5
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    ERMEGM,

    Glad that got you going.
    Yes, the MCS (MicroCode Studio) editor does have a few things that are undesirable, including the one you pointed out about case changing. However, you can configure this behavior in MCS. Go to View-> Editor Options-> Highlighter tab.
    At the bottom you will see Reserved Word Formatting.
    There you can change the option from "Lowercase All" (default setting) to "Default" which will leave the text as it was entered by the user.
    Regards,
    TABSoft

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: LAB-XUSB Experimenter Board help

    Just to reiterate, possibly for future reference:
    The reserved word DEFINE can be written any way you like, lower case, upper case, mixed case, whatever. It's WHAT you define (OSC on this case) that's case sensitive. It doesn't automatically mean everything should be UPPER CASE, it means it must match the case of the assembly code constant you're trying to "set". Thankfully all PBP assemnly code constants ARE all upper case.

    /Henrik.

Similar Threads

  1. Lab X USB
    By jimbostlawrence in forum USB
    Replies: 6
    Last Post: - 25th January 2012, 00:32
  2. LAB-X1 Timer2 Clock
    By Bruce in forum Code Examples
    Replies: 0
    Last Post: - 25th July 2010, 02:03
  3. Making the Lab X1 communicate with the Lab X2
    By MatthewM in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th June 2008, 22:26
  4. HELP with LAB-X1 board
    By manwolf in forum Off Topic
    Replies: 1
    Last Post: - 11th June 2008, 19:52
  5. Replies: 2
    Last Post: - 20th December 2007, 06:32

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