Countermodules - Can somebody explain the four letter acronyms FRQA and PHSA
StefanL38
Posts: 2,292
Hello,
I'm diving into the countermodules.
Why the heck are the two accessregisters named FRQA and PHSA ?
the acronym FRQ remembers me to "frequency" and PHS to "phase"
But this makes no sense to me. The FRQA-register holds the value that is added to the PHSA-register.
Frequencies added to phase does not make any sense to me.
So can somebody explain what the meaning of these two acronyms are?
best regards
Stefan
I'm diving into the countermodules.
Why the heck are the two accessregisters named FRQA and PHSA ?
the acronym FRQ remembers me to "frequency" and PHS to "phase"
But this makes no sense to me. The FRQA-register holds the value that is added to the PHSA-register.
Frequencies added to phase does not make any sense to me.
So can somebody explain what the meaning of these two acronyms are?
best regards
Stefan
Comments
For each counter A and B within each cog, PHSA or PHSB is the accumulator register;
FRQA or FRQB is the value to be added when an accumulator condition is true;
T o n y
FRQA is a phase increment that is added (conditionally) to the phase accumulator. Phase advance per unit time is frequency. True it is not directly in units of cycles per second. But with a value of, say, FRQA=536_870, you might think of it as 1/8000 cycle per 12.5 nanoseconds. Higher values of FRQA give higher frequency, a higher rate of accumulation of phase. It is twos complement--Negative values of FRQA move the accumulator backwards.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
A phase can only be defined to a zero-relation. (As every angle needs to lines to be defined. A starting line and a endline.
So where is the "zero-line" in this case?
I know phases from AC-circuits which include capacitors and inductives for a chosen set of values for R, C, and L you get a certain phase between current and voltage.
Coming from that picture it is hard for me to understand what it means exactly in this case.
I would call the PHSx the SR-register (Summarized Result). And the FRQx the VTA-register (Value To Add)
So a short description of the function would be:
Every clockcycle the value of the VTA-register is added to the SR-register. The value of the MSB (=Bit31) of the SR-register is copied to the IO-Pin specified in the Output-A-register (APIN)
If the SR-Register starts with a value greater than zero. The rollover from max-value to zero happens earlier. This has the effect of a positive phase-shifting.
The register still counts up from 0 to $FFFF_FFFF but the set and clear be of the MSB will be in front of a counter that starts at zero. (= with a positive phase)
So as we are in the binary world - does phase mean in this case value 0 or value 1 (as the specified Output-pin can only be 0 or 1) ?
If multiple counters start at the same time but start with different values in the SR-Register this results in a phase-shifted set and clear of the MSB of the SR-registers.
Depending on the start-value this phase-shift is bigger or smaller.
But accumulating phases like a phase of 10 degrees added to a phase of 25 degrees is NOT what is happening and for this my opinion is the name phase-accumulator is badly chosen.
Of course the value in the VTA-register determines the frequency with wich the MSB of the SR-register is set to 1 and cleared to 0.
best regards
Stefan
A 2 bit binary counter has 4 "phases" ... you can choose the starting phase at any time with limits. A pulse (another mode for counters) also has a phase, but that's another story.
Stefan
Ich nehme an du kennst den Zusammenhang von Sinussignal und Kreisbewegung. Der Sinus ist die Y-Differenz zur Nulllinie aufgezeichnet f
Now I got the right picture.
best regards
Stefan
=================================
CH takes on you knows the connection of sine signal and circulation. The sine is noted the Y-difference to the zero-line for a full revolution. Therefore one divides one period of a sinus oscillation in 360°.
The phase angle runs thus from 0..360° and begins again with 0. Now one uses in addition, for all other periodic oscillations, not only sine. Two square waves extinguish themselves are e.g. 180° out of phase.
A propeller Counter is nothing else as an oscillator. The PHSx register runs from 0 to the maximum and begins again with 0 etc. corresponds exactly to the process of the phase angle with the sine. One a sine table continuously would come out a sine, one became the PHSx register notes gets one a saw tooth, and takes one only the highest bit, like with the propeller Counter receives one a rectangle (0..179°=Low, 180..359°=High).
Whether FRQx is the correct designation, about it one can argue. PHASE_STEP or like that it would be perhaps more accurate but the trick of this principle is exact that the frequency of the rectangle (or saw tooth, sine) is directly proportional to the value of this register, therefore is the designation already OK ONE. The whole calls itself by the way DirectDigitalSynthese DDS, just thereafter googles.
That is naturally stimmig only if the Counter in the NCO mode is operated. But one cannot rename the registers well for each mode of operation. And the other modes of operation are actually only sophistiated modifications of the DDS of principle, with which increase that the phase register one makes dependant on logic functions.
Those computerized translators are just not up to the job in most cases.....ok...they do a reasonable job with
small simple paragraphs....and...they do help in giving one a modicum of a hint of an inkling·of what the gist
of the text is .... ...but....beyond that they are really not suitable for a REAL translation.
I guess Douglass Adam's Babble Fish is·still needed.....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Samuel
www.RobotBASIC.com
·
Phase may vary with time and/or distance depending on the case (travelling waves vary in both, electrical signals in time and spatial waves (like some lines drawn on paper) in space only). Phase would normally be measured in radians.
Frequency is essentially the rate of change of phase with time, that would be omega (rad/s) in scientific circles where w=2pi.f (because there are 2pi radians in a cycle).
Of course this is not a sine and it does not use radians but the ideas are just the same, PHSA is the current argument to the function (which is just an overflow) and FRQA affects the rate of change of that argument. Normally it does so with time but using the conditional modes could do so for any quantity if you can produce the right signal to drive it.
Graham