ok i actually found a mistake i made with the Reset line on my PCB. fixed that and now it should be ready to ship.
though i also wanted to play around with the ATF1504, but since i never worked with it i don't want it directly on my SBC...
instead i want to design and order some "smart" breakout boards. with smart meaning that all imporant pins are kina grouped together (like GND and Vcc lines) instead of it just being a straight PLCC to DIP adapter.
but i'm already running into issues with this chip, for example some of the pins don't seem to be explained anywhere, like the Global Clocks (GCLK), Global Reset? (GCLR), PD, and EO. are they optional pins? should i use a or all Global Clock pins when using the PH2 clock for decoding? etc.
another thing: it never really mentions what type of JTAG connector it uses. it just mentions the 4 signals required.
I'm almost sure it's the 10 pin JTAG type, but the pinouts i find online are kinda inconstant, they often switch the sides of the pins, but then again that shouldn't matter because i can just rotate the connector. but it would still be nice to know exactly how it should be on the PCB.
a second problem is the fact that i need a programmer, i really don't want to spend 50 bucks on an offical one unless i have to. (I'm cheap)
I checked Ebay to find some, and came across these things:
LINK
20 bucks, JTAG, but it says Lattice instead of Atmel so i'm not sure...
I also thought about getting this
USB Blaster, which isn't compatible with the ATF1504, but with the MAXII CPLD i also wanted to play around with. it has more IO Pins, a lot more Macrocells, and is around the same price as the ATF1504, only downside it's 3.3V logic so it requires some input voltage shifting in order to connect it to the CPU's Address/Control lines. the outputs shouldn't matter as any 5V device should see 3.3V as a logic High.
anyways besides that i've been programming around a bit with my current board since it still is a functional computer.
and my confusion about the 65c02's Flags continue as i recently got a "Get String" function complete...
aparently i don't understand the Zero flag, i thought it would be set when the output of an arithmetic/logic instruction is equal to 0. but aparently not.
I have a simple loop in my "Get String" function that checks if there is data inside the FT240X, by constantly checking the status pins of the chip.
If there is no data to read bit 1 of the byte is "1", if there is data to read that bit is "0"
here is my loop (the wrong one):
Code: Select all
.WAIT_RX: ; Check if there is data available in the FIFO
LDA STT ; Load from the STaTus Register
AND 0b00000010 ; Mask out all bits except bit 1 and check if it's 0
BNE .WAIT_RX ; if it's not, jump back to the start
my idea was the following:
This is the input data when there is no data to read: 0bxxxxxx1x (x = don't care)
so if you AND this by 0b00000010 the output should be: 0b00000010, right?
but for some reason that sets the Zero flag, so it doesn't do the BNE instruction and just continues with the rest of the function....
but why?
.
sorry for the loaded post