6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 7:05 am

All times are UTC




Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject:
PostPosted: Sat Mar 19, 2011 2:45 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
heh, I plugged in the LCD, but not the RAM. Tried running that program I wrote earlier again, and was wondering why the CPU was screwing up. Totally forgot the stack was at 100-1ff.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 25, 2011 1:58 am 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 25, 2011 2:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?

The crystal oscillator cans do put out a square wave. I suspect you had the oscilloscope probe on the x1 setting, which limits it to maybe a couple of MHz even if the 'scope is rated for 100MHz, 400MHz, whatever. This will make a 2MHz square wave look pretty much like a sine wave. You have to have the probe on the x10 setting to get good performance.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 25, 2011 2:08 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 26, 2011 1:54 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Apr 04, 2011 8:13 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
Yea, I wasn't trying to do the LCD stuff, just get it to go into loops. Tried wiring it to a Analyzer I got for $80, but nothing normal is getting outputted (I think it's the analyzer). Oh well. Anyway, I think I am going to strip it down, and try again. Will test out the diagram Garth posted.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Apr 04, 2011 8:41 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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 :D!!! 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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 08, 2011 12:54 am 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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 :D!!!!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 08, 2011 5:28 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Congrats! Is RAM OK too?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 08, 2011 1:33 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 08, 2011 6:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?

Right. The 6551 gets some criticism for a few quirks, but it does work fine, and I have used it for decades with never a problem. Do note that DCD\ (pin 16), if you don't use it, needs to be pulled low for the receiver to operate.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 08, 2011 7:48 pm 
Offline

Joined: Tue Feb 01, 2011 3:10 am
Posts: 41
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).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: