ProblemA simple 1MHz frequency divider implemented in a 16V8 doesn’t perform as expected.
The output does not have a 50% duty cycle and sporadically flat-lines for a few cycles. The results are quite inconsistent and once I managed to get a nice clean 50% duty cycle, but I cannot work out why so consequently I haven't been able to repeat that since.
More DetailsI’m trying to condense a few TTL gates into a 16V8. The circuit works 100% using discrete gates, but only 75% using a 16V8. The 25% non-functioning bit is the frequency divider so I stripped out all the other code to concentrate on resolving that piece, but no luck so far.
I have:
- tested on both GAL16V8D-25 and ATF16V8B-10 devices
Tried different input and output pin combinations
Played with decoupling capacitors
Grounded unused inputs and outputs
All with the same results.
This is my first adventure into PLDs since playing with Xilinx 20+ years back at university so I’m guessing that I’m missing some subtle secret sauce.
I’m using WinCUPL and everything tests fine in WinSIM.
Device g16v8a ;
/* ------- */
/* CK |1 20| Vcc */
/* X |2 19| CKlp */
/* HD |3 18| oscff */
/* X |4 17| RDY */
/* MTR |5 16| I/O */
/* X |6 15| ff1 */
/* DS |7 14| I/O */
/* X |8 13| oscot */
/* oscin |9 12| c */
/* GND |10 11| !OE */
/* ------- */
/* *************** INPUT PINS *********************/
PIN 1 = CK ; /* OSC input */
/* *************** OUTPUT PINS *********************/
PIN 18 = oscff ; /* 1/2 OSC freq FF output */
/* ***************** LOGIC ********************** */
oscff.d = !oscff ;