Greetings,
This is my first attempt at trying out building an 8-bit computer. I'm currently working out the circuit from the link:
http://www.grappendorf.net/projects/650 ... essor.html
Since I'm using 65c02, there's a few changes I made from the link above:
1. I leave the first pin floating (VPB).
2. Put a pull-up resistor to BE with 3.3k resistor to 5V+.
3. Connect the lower address bus to the 8 LED's.
4. Using a 4-pin crystal oscillator (1Mhz)
Since the data bus is inputted with $EA, I thought I want to run a visual test with LED's. I don't have an oscilloscope since I'm nowhere near my school except for a digital multimeter, so I thought I want something visual to debug before going any further.
I was expecting something a result akin to this https://www.youtube.com/watch?v=ZLhVni8Wy5Y but all of my LED's are turning on at the same time, but when I press the reset button it does stop at the last address it tries to fetch. Is this an expected behaviour for a 1Mhz?
To test it further, I put a piezo buzzer and connect it to A15 and all the way to A0 following the instructions from this http://www.6502.org/mini-projects/nop-gen/nop-gen.htm. The sound output do oscillates, and it's gradually getting faster and dimmer but it's not a low buzz noise at A15.
Is there any other way that I can test without using oscilloscope?
1 Mhz WDC 65c02 NOP Generator Led Test
-
crepesmort
- Posts: 5
- Joined: 23 Mar 2018
- Location: Malaysia
Re: 1 Mhz WDC 65c02 NOP Generator Led Test
Welcome!
Hmm, A15 might be going at about 7Hz - that's very fast for a flicker but I think you should see it. It's much too low for a sound to be heard. But somewhere in the middle of the address bus, A6 to A9, maybe you should hear an audio tone?
Can you build a little divider out of TTL? Or do you have a frequency readout on a multimeter?
Hmm, A15 might be going at about 7Hz - that's very fast for a flicker but I think you should see it. It's much too low for a sound to be heard. But somewhere in the middle of the address bus, A6 to A9, maybe you should hear an audio tone?
Can you build a little divider out of TTL? Or do you have a frequency readout on a multimeter?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 1 Mhz WDC 65c02 NOP Generator Led Test
Welcome!
At 1MHz, with LEDs on only the 8 address lsb's (since you said, "3. Connect the lower address bus to the 8 LED's."), the flashing will be too fast to see it, so yes, it will look like they're on all the time. At 1MHz, 2 cycles (for NOP) goes by in 2µs, meaning A0 will cycle on and off at 250kHz, A1 at 125kHz, ... and A7 at almost 2kHz!
Be sure to go through the 6502 primer, which about building your own 6502 computer, covering many aspects, at http://wilsonminesco.com/6502primer/ .
At 1MHz, with LEDs on only the 8 address lsb's (since you said, "3. Connect the lower address bus to the 8 LED's."), the flashing will be too fast to see it, so yes, it will look like they're on all the time. At 1MHz, 2 cycles (for NOP) goes by in 2µs, meaning A0 will cycle on and off at 250kHz, A1 at 125kHz, ... and A7 at almost 2kHz!
Be sure to go through the 6502 primer, which about building your own 6502 computer, covering many aspects, at http://wilsonminesco.com/6502primer/ .
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 1 Mhz WDC 65c02 NOP Generator Led Test
crepesmort wrote:
This is my first attempt at trying out building an 8-bit computer...
1. I leave the first pin floating (VPB).
2. Put a pull-up resistor to BE with 3.3k resistor to 5V+.
3. Connect the lower address bus to the 8 LED's.
4. Using a 4-pin crystal oscillator (1Mhz)
1. I leave the first pin floating (VPB).
2. Put a pull-up resistor to BE with 3.3k resistor to 5V+.
3. Connect the lower address bus to the 8 LED's.
4. Using a 4-pin crystal oscillator (1Mhz)
x86? We ain't got no x86. We don't NEED no stinking x86!
-
crepesmort
- Posts: 5
- Joined: 23 Mar 2018
- Location: Malaysia
Re: 1 Mhz WDC 65c02 NOP Generator Led Test
BigDumbDinosaur wrote:
I see mention of pulling BE up to Vcc, but no mention of doing so with RDY, IRQB and NMIB. None of these can be allowed to float.
BigEd wrote:
Welcome!
Hmm, A15 might be going at about 7Hz - that's very fast for a flicker but I think you should see it. It's much too low for a sound to be heard. But somewhere in the middle of the address bus, A6 to A9, maybe you should hear an audio tone?
Can you build a little divider out of TTL? Or do you have a frequency readout on a multimeter?
Hmm, A15 might be going at about 7Hz - that's very fast for a flicker but I think you should see it. It's much too low for a sound to be heard. But somewhere in the middle of the address bus, A6 to A9, maybe you should hear an audio tone?
Can you build a little divider out of TTL? Or do you have a frequency readout on a multimeter?
I don't have an oscilloscope, but I do have an arduino, so I used the processing-oscilloscope to measure the frequency and look at the duty cycle for each of the signal, it does have a limitation being that it can't read past 1Khz properly, but so far the frequency from A15 to A8 doubles i.e. (A15 -> 7.4Hz, A14-> 14.8Hz and so on until A8).
GARTHWILSON wrote:
At 1MHz, with LEDs on only the 8 address lsb's (since you said, "3. Connect the lower address bus to the 8 LED's."), the flashing will be too fast to see it, so yes, it will look like they're on all the time. At 1MHz, 2 cycles (for NOP) goes by in 2µs, meaning A0 will cycle on and off at 250kHz, A1 at 125kHz, ... and A7 at almost 2kHz!
Be sure to go through the 6502 primer, which about building your own 6502 computer, covering many aspects, at http://wilsonminesco.com/6502primer/ .
Be sure to go through the 6502 primer, which about building your own 6502 computer, covering many aspects, at http://wilsonminesco.com/6502primer/ .
So I took a leap of faith and venture to put an UART chip in it after burning the eeprom (atmel 28c256). Unfortunately, the ones I ordered is the latest w65c51 chip (with the lot no. A6A749.1 1016G015), and checking out the forum, there is a well known Xmit bug in it that prevents the bytes to stream to the receiver.
I am using an ft232rl usb to ttl chip to communicate with the UART, and I'm still referring to this schematic along with the code that was used http://www.grappendorf.net/projects/650 ... world.html, but just to be sure, if I were to modify the code to circumvent the xmit bug in the 65c51, would the code below works?
Code: Select all
.setcpu "65C02"
ACIA_DATA = $0000
ACIA_STATUS = $0001
ACIA_COMMAND = $0002
ACIA_CONTROL = $0003
.segment "VECTORS"
.word nmi
.word reset
.word irq
.code
reset: jmp main
nmi: rti
irq: rti
main:
init_acia: lda #%00001011 ;No parity, no echo, no interrupt
sta ACIA_COMMAND
lda #%00011111 ;1 stop bit, 8 data bits, 19200 baud
sta ACIA_CONTROL
write: ldx #0
next_char:
wait_txd_empty: lda ACIA_STATUS
and #$10
beq wait_txd_empty
lda text,x
beq read
sta ACIA_DATA
jsr delay_6551
inx
jmp next_char
read:
wait_rxd_full: lda ACIA_STATUS
and #$08
beq wait_rxd_full
lda ACIA_DATA
jmp write
delay_6551: phy
phx
delay_loop: ldy #1
minidly: ldx #$68
delay_1: dex
bne delay_1
dey
bne minidly
plx
ply
delay_done: rts
text: .byte "Hello World!", $0d, $0a, $00
Code: Select all
ca65 -o firmware.o -l firmware.lst firmware.s65
cl65 --cpu 65C02 -C firmware.cfg -t none -o firmware firmware.o