Beginner in digital circuitry
Ok, I still kept having problems with the circuit. I was able to get a fellow coworker at work to let me use their oscilloscope. I found out the Ossiliscope is generating a sin wave. We need a square one correct? I just wired the clock out from the 4 pin crystal to the clk pin on the 2A03. Could this be the cause of some problems?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
I found out the Ossiliscope is generating a sin wave. We need a square one correct? I just wired the clock out from the 4 pin crystal to the clk pin on the 2A03. Could this be the cause of some problems?
If I remember correctly, we did have it at the 10x setting. The sine wave did not have any jagged edges or anything, was really smooth. However I did probe the clk out and the address lines, and they produced square waves out.
I am going to have to do a bit more research (and probably my own oscilloscope) before I can continue it seems.
I am going to have to do a bit more research (and probably my own oscilloscope) before I can continue it seems.
there's more you can do without a scope though...
(on the clock question, did you look at phi2, the clock out from the CPU? That will need to be nice and square. Did you try buffering your clock can output through a logic gate before feeding it into the CPU? That's the only thing it should be driving, anyway)
I think you've shown that cpu+rom works ok, but you haven't had success yet with cpu+rom+lcd. What about cpu+rom+ram? You can signal results from your program, so you could write a small ram test to check that the ram works as expected. That will increase confidence and might show you something that needs fixing.
for the LCD problem, it's worth reviewing your circuit throughly and carefully: you need to have the address decode and the clocking right.
you may have noticed Garth sometimes posts a schematic: roughly drawn on paper and scanned. That's absolutely fine - if it's good enough for him, it's good enough for anyone here!
Cheers
Ed
(on the clock question, did you look at phi2, the clock out from the CPU? That will need to be nice and square. Did you try buffering your clock can output through a logic gate before feeding it into the CPU? That's the only thing it should be driving, anyway)
I think you've shown that cpu+rom works ok, but you haven't had success yet with cpu+rom+lcd. What about cpu+rom+ram? You can signal results from your program, so you could write a small ram test to check that the ram works as expected. That will increase confidence and might show you something that needs fixing.
for the LCD problem, it's worth reviewing your circuit throughly and carefully: you need to have the address decode and the clocking right.
you may have noticed Garth sometimes posts a schematic: roughly drawn on paper and scanned. That's absolutely fine - if it's good enough for him, it's good enough for anyone here!
Cheers
Ed
On the pinout page, it comments that on all memory access, the M2 pin (clock out), is HIGH. I was thinking of inverting the M2 signal, and ORing it with the enable signal from the mux. Thus only when both are 0 will the ROM enable. Same goes for RAM.
Or would feeding the M2 signal to the enable active-high pin on the mux be a better idea?
Added:
Dunno if I mentioned, but I aquired a EEPROM, so testing will be so much faster now. Anyway, ROM is being read properly. Let's see if I can get SRAM to work.
Do you know a good way to test SRAM?
Added2:
Well I am getting some kind of output
!!! I tried running a quick test program on the sound generator of the NES CPU and I got a solid Square Wave tone!!! So this proves the ROM works, still got to test SRAM though. Will try storing value into ram, then load into the generator.
Or would feeding the M2 signal to the enable active-high pin on the mux be a better idea?
Added:
Dunno if I mentioned, but I aquired a EEPROM, so testing will be so much faster now. Anyway, ROM is being read properly. Let's see if I can get SRAM to work.
Do you know a good way to test SRAM?
Added2:
Well I am getting some kind of output
LCD Works!!!!! I was hitting me head on the desk trying to figure out why it wasn't working. I was looking at this (http://www.6502.org/mini-projects/optrexlcd/lcd6502.gif) trying to figure out WTF it wasn't working. Then I noticed that last NAND on the E line... then checked the datasheet... E was ACTIVE-HIGH /facepalm. Well I got a character to appear on the screen WOOHOO.
Thank you BigEd, Garth, Dino, and everyone else that helped. I bought a 6551 for later, but now to write some software
!!!!
Thank you BigEd, Garth, Dino, and everyone else that helped. I bought a 6551 for later, but now to write some software
Seems so. The initialization of the LCD, and printing characters to it are done with subroutines. Same with enabling and generating sound from the sound generator. Also I threw in some loading and saving to the ram on certain parts to test it.
My professor suggested once I get the serial interface working, to create a simple machine code monitor, which would be perfect in messing with RAM.
Was looking up about the 6551. So basically I wire it to the bus, then the serial lines connect into a TTL to Serial voltage converter (going to use a MAX232) and that goes to your serial cable correct?
My professor suggested once I get the serial interface working, to create a simple machine code monitor, which would be perfect in messing with RAM.
Was looking up about the 6551. So basically I wire it to the bus, then the serial lines connect into a TTL to Serial voltage converter (going to use a MAX232) and that goes to your serial cable correct?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
My professor suggested once I get the serial interface working, to create a simple machine code monitor, which would be perfect in messing with RAM.
Was looking up about the 6551. So basically I wire it to the bus, then the serial lines connect into a TTL to Serial voltage converter (going to use a MAX232) and that goes to your serial cable correct?
Was looking up about the 6551. So basically I wire it to the bus, then the serial lines connect into a TTL to Serial voltage converter (going to use a MAX232) and that goes to your serial cable correct?
Yea, saw an example circuit. The two pins above Vcc were tied high. Forgot the other ones name but /DCD was one of em.
Everything is already pre-wired, so I just have to drop the two chips in now.
Added:
Been playing around with the NES APU that is built in (while I wait for the 6551), and got it to work! Wired up a amplifier circuit, and combined both channels to one. It's now playing glorious NES chiptunes lol. The code isn't mine though since I never played with the APU (I can't compose at all).
Everything is already pre-wired, so I just have to drop the two chips in now.
Added:
Been playing around with the NES APU that is built in (while I wait for the 6551), and got it to work! Wired up a amplifier circuit, and combined both channels to one. It's now playing glorious NES chiptunes lol. The code isn't mine though since I never played with the APU (I can't compose at all).