AWOL:
Well, phoneme selection appears to be on bits 2 and 3 of PORTD, inflection on bits 0 and 1 of PORTB, and strobe is on bit 2 of PORTB
I think phoneme is bits 2-7 on PORTD but is stored in p from bit 0 to 5. Thanks for getting started. I thought about replying but was a bit lazy and turned away for a bit to stare on a research paper.
Thanks, makes sense when compared to the connections, ie pins D2-10 are being used, but I am not familiar with the way the pins are being assigned (port manipulation + bit math??).
I do not see p or i being declared as variables, are these general variables available in the Arduino PDE library space?
buchacho:
Thanks, makes sense when compared to the connections, ie pins D2-10 are being used, but I am not familiar with the way the pins are being assigned (port manipulation + bit math??).
I do not see p or i being declared as variables, are these general variables available in the Arduino PDE library space?
Exactly, (port manipulation + bit math??)
No, p and i are, en, I don’t know a name. They’re dummy place holders to be substituted when the compiler processes the define.
Say if you have in your code: setPhoneme(50);, then in your real code to be compiled, after the pre-compiler directives such as #define are processed, it looks like (PORTD = (PORTD & 3) | ((50) << 2));
It is a straight 1:1 substitution relation that even kids can do.