PDA

View Full Version : Music notes and DIG, DCD, and NCD ?



websmith
- 9th November 2006, 06:02
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?

sayzer
- 9th November 2006, 07:06
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...


------------------------------------------

websmith
- 9th November 2006, 14:28
Thanks
So it would seem it's design purpose was to enable serializing variables etc for sequential streaming