Hi,
I only wanted a simple (easy and of course cheap) solution to test the
resolver board without µC and software. Somehow I was thinking the data output
is BCD and I thought a 3 digit 360 degree display would be nice. Naturally the
resolution is better and now I must choose between a more complex and easy to
read 4 digit decimal display or a simpler Hex display that's worse to read .
I have no other solution yet. The PIC or CPLD solutions seem interesting but
I've never worked with it. Is it worthwhile?
---
Yes, but there's a learning curve which may be prohibitive if you're
looking for a quick solution. If you want to do it all in hardware
here's an easy way:
First, shift the data out of the 2S90 into a 12 bit serial to parallel
shift register. At this point you don't care about a synchronous output
register, so you could use a couple of '164's. Next, load the 12 bits
into a 12 bit binary down counter (three '193's would work) and count
the counter down with a 113.75 kHz clock. While the counter is counting
down, use a 1.0000 MHz clock to clock a 5 digit BCD up counter (five
'160's, '162's) and connect the outputs of the up counters to your
favorite BCD to seven-segment decoders and those outputs to your LED
displays. That's a total of 15 chips not counting the glue logic, but
that's still a lot easier than learning to write code for, and
programming, a µC.
"OK", you might say, "but how does it work?"
Since the 2S90 has a 12 bit output which represents 360.00 degrees and
it would be nice to display the output in degrees, then we need a 5
digit output with a fixed decimal point (360.00) to be able to do that.
But, the output of the 2S90 is a 12 bit binary number which varies from
0000 0000 0000 (000 hex) for 0° to 1111 1111 1111 (0fff hex) for 360°,
so we need to convert that to read from 000.00 for 0° to 360.00 for 360°
If we use a 5 digit BCD up counter to drive the display and count to
36000 while the down counter counts from 0fff to 000 then that should
work. Now, if we want the up counter to count 36000 clocks when the
down counter counts 4095 clocks, then the up counter's clock must go
36000/4095 = 8.791209 times faster than the down counter's clock, and
the up counter must be enabled while the down counter is counting. It
doesn't really matter what the two clock frequencies are as long as the
ratio between their frequencies is 36000/4095 and you don't violate any
timing rules. Interestingly, if you choose the up counter to run at 4
MHZ, the down counter can run at 455 kHz, which brings to mind another
possibility, that of using a mixer to make the ratio of either the LO or
the RF to the IF equal to 36000/4095 and driving yourself crazy looking
for oscillators!