I tried the JMP instruction that wrap around 64K boundary. the W65C02 works at 33MHz but failed to execute correctly at 34.5MHz. Screen capture shows when it is operating properly.
I'm driving the W65C02 directly with the output of the can oscillator. I'll try buffer the oscillator output with the CPLD and drive W65C02 with output of CPLD which has faster rise time.
Bill
Code: Select all
;ROM space from 0xC000 to 0xFFFF and from 0x0000-0x3FFF
;Actual ROM is 64 bytes, alias every 64 bytes over the ROM space
;serial port space from 0x4000 to 0xBFFF. data is at even address, status is at odd address
; Status d0 is receive data ready; status d1 is transmit empty
SerData = $7001 ;Serial transmit register
SerStat = $7000 ;Serial transmit status
;
.pc02
.ORG $FFC2
; ROM based test program
; write data out to serial port, then wait for TxEmpty flag
; JMP instruction wrap around 64K boundary
start:
STX SerData ;write to serial port
chkTXE:
LDA SerStat
AND #2 ;check transmit empty
BEQ chkTXE
INX
NOP
NOP
NOP
NOP
JMP $FFFF
.org $fffc
.word start
.byte 0
JMP start ;instruction wrap around 64K.Edit:
By buffering oscillator output with CPLD, I'm able to run W65C02 at 36MHz, but I noticed it will crash when voltage is lowered to 4.6V, so it is nearing the edge at 36MHz. By raising voltage above 5.3V, I can run successfully at 40MHz, but that's definitely outside of the commercial operating voltage. All tests are done at room temperature.