BigDumbDinosaur wrote:
Please post the entire schematic in monochrome. The first thing to settle is the design and if it has any "gotchas" that are behind your trouble. Is this running with a 65C02 or a 65C816? If the latter, did you include VDA and VPA in your chip select logic?
It's a 65816 build; I posted the schematic here:
http://forum.6502.org/viewtopic.php?f=4&t=5385#p64619VDA and VPA logic are included in my address decode GAL:
Code:
IO1SEL = /A20 * /A19 * /A18 * /A17 * /A16 * A15 * A14 * A13 * A12 * /A11 * /A6 * /A5 * /A4 * VDA * !VPA
IO2SEL = /A20 * /A19 * /A18 * /A17 * /A16 * A15 * A14 * A13 * A12 * /A11 * /A6 * /A5 * A4 * VDA * !VPA
IO3SEL = /A20 * /A19 * /A18 * /A17 * /A16 * A15 * A14 * A13 * A12 * /A11 * /A6 * A5 * /A4 * VDA * !VPA
IO4SEL = /A20 * /A19 * /A18 * /A17 * /A16 * A15 * A14 * A13 * A12 * /A11 * /A6 * A5 * A4 * VDA * !VPA
Just in case that was somehow broken however I did write a script that turned your initialization table into linear code (complete with a couple NOPs after every write) and the behavior is the same; the BRG is still in normal mode as opposed to extended mode II.
BigDumbDinosaur wrote:
A somewhat-obscure note in the 28L92 data sheet mentions that the X1 clock (the signal from your 3.6864 MHz oscillator) should be pulled up to Vcc with a 470 ohm resistor (figure 17 on page 62, most recent data sheet attached). If you did not do so, that may explain the raggedy waveform you are seeing. Also, you did leave pin 37 (X2) unconnected, right?
The resistor is not in my schematic but I did add it to the build after I took a look at your POCv2 schematic. You can actually see the resistor in the picture I posted of the breadboard build; it's next to the crystal at the bottom middle of the board. And yes X2 is unconnected.
FWIW I did check the waveform without the resistor and the only change I noticed was that the ringing at the bottom of the wave form was pulled up closer to 0V. The waveform did bother me at first, at least until I got far enough along to discover that the problem wasn't the BRG being off-frequency but rather being in the wrong mode.
BigDumbDinosaur wrote:
Please post the code you are using to drive the DUART.
It's pretty much the same code you posted in another thread back in October, except I tweaked the constants in one or two spots for testing (like having it send the Tx/Rx clocks out the OPx pins).
Code:
ldy #s_nxptab-2 ;DUART setup table index
@loop: ldx nxpsutab,y ;get register
lda nxpsutab+1,y ;get parameter
sta nxp_base,x ;write to register
nop
nop
nop
nop
nop
dey
dey
bpl @loop ;next register
I attached my copy of the nxp constants file instead of posting inline, since it's kind of long.
I'll take pictures of the DUARTs when I get home from work. I tried pulling up something from the original hi-res photo of the breadboard (the original is 4096 (!) pixels wide) but some of the markings are smudged and hard to read. Are you thinking maybe these aren't 28L92s but something else, like 28C92s?