RE: Spinner Replacement for Omega Race

From: Clay Cowgill <c.cowgill_at_comcast.net>
Date: Fri Aug 01 2008 - 05:14:16 EDT

> I made the board more as an excuse to start learning VHDL for CPLD's.
 
Oh yeah, it's a good project. Enough to be interesting and force you to
learn and useful when you're done. ;-)
 
> The Xilinx components and the very inexpensive CPLD development
> board with download cable and the free ISE software seemed the
> best way to get started.
 
Yeah, they're nice parts to boot. I swear, the number of times that those
extra ~4 macrocells on the Xilinx 36 vs. everyone elses' 32 saved my butt
is astonishing...
 
> It is my experience that Atmel MEGA and Atmel AVR and TinyAVR
> are at least as good as the comparable PICmicro families but it has
> been my habit to use PICmicro's for almost everything.
 
You stick with what you know... I do AVR and ARM mostly. Once you have the
tools and hardware unless there's a real compelling reason it's hard to
justify changes just for fun. The nice thing about the AVR vs. the older
PIC stuff (I'm admittedly out of the loop on the newer PIC18 and other
families) is that most instructions are one clock per cycle, so you could
get a crazy amount of MIPS out of something like a little 20MHz part. IMHO
the AVR instruction set is just a lot nicer/easier. Lots of registers, data
lookup, etc. I'm biased though because I still had my General Instruments
PIC databook from like 1983 (?) on my shelf in my old office so I couldn't
help but think "man, those are old" whenever I saw it. ;-)
 
> I've never been exposed to Golden T or Arcade Legends. I do however
> own a Tron that needs restoration so once that is working again, I will
> probably write new code for my board to work with that game also.
 
Most MCR stuff should be like TRON, IIRC. (Kick, DOT, etc.) Arcade
Legends/Ultimate Arcade was at one point a Pentium 3 system with a USB IO
controller and all the Ultracade software stuff inside. We won the bid to
replace it with an ARM based system that I designed. Neil Bradley (he used
to host this mailing list-- the guy behind the Retrocade emulator) and Larry
Bank (did the High Velocity Emulator back in the day) wrote the software. I
have an XC9572 on there handling IO, trackballs, video stuff, etc. The
Golden Tee Clubhouse was a dedicated hardware/software combo that played
Golden Tee 3D. It sold in Dick's Sporting Goods, Golf Authority, etc. That
was also an ARM board from me (with the CPLD handling the trackballs and
generating the audio output) and Larry did the emulator for it.
 
> 2/ Will the ship turn 1:1 ?
> Yes, the ship will rotate proportionally 1:1 as you turn the knob just
> like it does with the original pot except that there will be no missing
> states (angles) and no dead spot and the linearity will be perfect.
 
Excellent! I need to get my Omegarace going! ;-)
 
> 3/ Use an input buffer?
> You've made very interesting comments regarding input conditioning.
> Using a Schmidt trigger buffer would certainly make operation for
reliable.
> Some micros have such inputs and I think that the Xilinx Coolrunner
> series does also. Still, the old 74hc14 is dirt cheap and so is a good
choice.
 
Yeah. We only discovered the problem towards the end of testing so it made
for an "oh crap" boardspin late in the game for us. (not all trackballs are
created equal ;-) The 'HC14 is rugged too.
 
> Truth be told, I'm now using the same QDC4 board in a custom prototype
> 3-phase brushless motor control application. The board reads the rotor
> position from 3 hall sensors and depending on the requested direction,
> determines which phase to deliver a 20 kHz PWM signal to via 3-phase
> H-bridge driver.
 
A little MCU definitely has a disadvantage when it comes to high speed
decoding. (some of those guys with position feedback on 10000RPM mills and
whatnot-- can't exactly go losing any pulses in some applications)
 
If you have a couple interrupt inputs that makes for even easier decoding on
an MCU, but I was always using the dedicated IRQ lines for my position
detection from light guns, so I just polled/supersampled the encoder states
instead.
 
The interrupt rate you can get on an encoder it pretty impressive really.
In the KHz range on a decent sized wheel/encoder combo with a flick of your
thumb! Back when we were doing MP3 players I remember thinking "oh, we can
do that in software" when it came to reading the encoder wheel (thinking
"hey, we have an 80MHz ARM! Piece-o-cake!"). With the rest of the system
running and one phase on our interrupt input... Too slow! We had the EE's
work on a hardware solution-- some time later (week+ ?) they came back with
an answer. Counter, flip-flop, buffer... I don't remember if I had the
heart to show 'em the trackball input page from Tempest or Centipede or not.
;-)
 
>5/ What's the crystal for?
> At that point, I started writing my code to trigger on a 2 MHz clock
> input and to process the states of the A & B signals once per clock tick.

 
Ahhh, gotcha. I cheated and just used one phase as clock and didn't try to
read both edges. (this was OK for all the emulation stuff we did using
trackballs since we actually had to scale the trackball pulses down still
more anyway-- too sensitive otherwise)
 
> Although it's been done before by several people, I'm probably going
> to make my own CPLD based Atari AVG for Space Duel/Gravitar/Black
> Widow/Major Havoc since I have those games to experiment with.
> Again, just an excuse to learn VHDL .
 
I circled that particular target a few times. I just couldn't ever come
close to the BOM cost of my discrete solution with a CPLD. :-/ It seems
like I couldn't fit the stack and the counters and misc glue into a 72
macrocell device and as soon as you hit the 108/144 macrocell level the
price on the parts went pear-shaped.
 
(Bothers me to no end that a 144 macrocell CPLD costs more than some
multi-thousand gate FPGA's!)
 
I do like the CPLD solution from a PCB complexity/power standpoint though.
 
-Clay

---------------------------------------------------------------------------
** Unsubscribe, subscribe, or view the archives at http://www.vectorlist.org
** Please direct other questions, comments, or problems to chris@westnet.com
Received on Fri Aug 1 05:16:23 2008

This archive was generated by hypermail 2.1.8 : Mon Aug 04 2008 - 06:50:00 EDT