Music notes and DIG, DCD, and NCD ?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    Cape Town SA
    Posts
    23

    Smile Music notes and DIG, DCD, and NCD ?

    Hi, I am a VB and C# programmer and now getting 'into' PBP. I have 2questions:

    1) On reading through the PBP manual, I see DIG, DCD, and NCD operators. I'm sure the designers had some cunning ideas in mind when they created them, can anyone give me some examples where/why they might be useful to me?

    2) Does anyone have a link to a table/app note linkinh SOUND to actual musical notes or frequencies? - why not just use FREQOUT?

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Let me take DIG.
    I had posted this example somewhere before..Here it is again.

    Say we have a byte and it is set to Decimal 245.

    - - - - - - - - - - - -
    ex:
    Test VAR BYTE
    Apple VAR BYTE

    Test = 245

    In this case, from right to left,
    Test Dig 0 is 5
    Test Dig 1 is 4
    Test Dig 2 is 2

    to extract any of these numbers and use in somewhere else, we use;

    Apple = Test Dig 1

    Apple is now 4.


    - - - - - - - - - -

    As you can see and know, DIG addresses to an individual digit of a variable.
    You can also use DIG with LCDOUT, SEROUT commands etc...


    ------------------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Oct 2006
    Location
    Cape Town SA
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Thanks
    So it would seem it's design purpose was to enable serializing variables etc for sequential streaming

Similar Threads

  1. Use of DIG, DCD, NCD
    By websmith in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th November 2006, 06: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