u/kr_107_cuz

Problems with the 6502 at higher clock speed

Hello! So I explain it in the video but ill provide a summary here. I completed the LCD integration and the RAM installation and those both seemed to work. However when I tried to run it with the 1MHz oscillator instead of using my arduino it didn't. After a lot of troubleshooting I've stripped away as many potential sources of error as I can and im just using the 6502, 6522, and the EEPROM. Ive made a program (below) that just blinks lights super slowly, going into a long loop after each ror command. At 40KHz from the arduino it works fine, but at 50KHz it is unstable, stopping at random points. above that it doesn't turn on any lights, and connecting it to the 1MHz oscillator doesn't work either.

EDIT: just to clarify, the instruction pointer initalization vector is at 9ffc because I am using a smaller EEPROM (8K). I broke the one that came with the kit

I have no idea what the issue could be, it could obviously be with my arduino nano but everything I can find says that 50KHz should be no problem for it. That would mean I also have a separate problem with my 1MHz crystal though.

    .
org $8000


PORTA = $6001
PORTB = $6000


reset
:
    
lda
 
#$ff    ; Set all to outputs on A
    
sta
 $6002  


    
clc


    
lda
 
#$01


loop
:
    
ror
    
sta
 PORTB   
; blink


    
jmp
 wait



wait
:
    
ldx
 
#$10


wait_loop_x
:
    
ldy
 
#$ff


wait_loop_y
:
    
dey
    
bne
 wait_loop_y
    
dex


    
bne
 wait_loop_x


    
jmp
 loop


    .
org $9ffc
    .
word reset
    .
word $0000
    .org $8000


PORTA = $6001
PORTB = $6000


reset:
    lda #$ff    ; Set all to outputs on A
    sta $6002  


    clc


    lda #$01


loop:
    ror
    sta PORTB   ; blink


    jmp wait



wait:
    ldx #$10


wait_loop_x:
    ldy #$ff


wait_loop_y:
    dey
    bne wait_loop_y
    dex


    bne wait_loop_x


    jmp loop


    .org $9ffc
    .word reset
    .word $0000
```

```

u/kr_107_cuz — 21 hours ago

Got the 6502 kit, trying to get the EEPROM to work but no luck. Help appreciated!

i can provide more details if need be. The EEPROM is AT28C256.

AUDIO explains what im doing

I am trying to do it much like he does in this video: https://www.youtube.com/watch?v=BA12Z7gQ4P0

seemingly the EEPROM that comes with the kit doesn't have a maximum write pulse time, so im just controlling that with a button. Its possible im just not sending any sort of write pulse idk.

Steps:
Set output enable to high (deactivated)

Connect data bits to low/high

Press button to send write pulse

disconnect data bits from low/high

Set output enable to (active) low

See that the lights are still all on, instead of displaying the on/off pattern that was supposed to be programmed in.

I didn't get the EEPROM programmer yet because I thought i could maybe just use an Arduino for now, but i can't even get it to work manually

u/kr_107_cuz — 29 days ago