6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 3:02 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon May 11, 2020 12:12 pm 
Offline

Joined: Mon May 11, 2020 11:52 am
Posts: 2
Location: Italy
Hi everyone, I'm bulding a simple computer with a Rockwell 6502P, but I'm having problems with the writing process.

I connected the 6502 to an arduino and to a w27c512 EPROM to test it. I loaded the code for load the accumulator with memory and then push it into the stack.

When it's time to write the memory, the R/W pin goes LOW, the EPROM is set in high impedence state (because of the A15 pin goes LOW), but the data bus of the 6502 seems to remain in high impedence state or reading state.
In fact, the arduino reads in the data bus the same byte of the previous instruction, and if I put a 10Kohm resistor as pull-up on each line of the bus, the byte read is FF.

The pin that I connected to the Vcc are: IRQ, NMI, VCC, RES, SO, BE.
PHI2 frequency is 10Hz.
RDY is connected to Vcc with a 1Kohm resistor.

What can I do? Could be the chip bad?

Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 12:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Welcome!

If you really do mean 10Hz, that's too slow for an old non-CMOS 6502. It will lose track of what it is doing.

Instead, clock at 1MHz and use some form of single-stepping circuit (search this forum for suggestions)


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 1:54 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
diego2000 wrote:
When it's time to write the memory, the R/W pin goes LOW, the EPROM is set in high impedence state (because of the A15 pin goes LOW), but the data bus of the 6502 seems to remain in high impedence state or reading state.
The issue Ed mentioned may also have a bearing. But... When do you sample the data bus?

Every cycle has two halves... the first half when Phi2 is low, and the 2nd half when it's high.

During the first half, the conditions you describe are NORMAL for a write cycle. The CPU remains high-impedance until Phi2 goes high. THEN is when you need to take your sample (if you're not doing it that way already).

If you continue to have difficulty please post a photo and a schematic. This will help us to advise you.

Cheers, and welcome!
ps- on this forum you may attach images to your post :)

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 2:39 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
So you don't reset your CPU? It may or may not work then. How about RDY line?


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 3:14 pm 
Offline

Joined: Mon May 11, 2020 11:52 am
Posts: 2
Location: Italy
Dr Jefyll wrote:
During the first half, the conditions you describe are NORMAL for a write cycle.

You're right, I misunderstood the timing diagrams. Now I make the sample after the rising edge and everything works :D .

BigEd wrote:
that's too slow for an old non-CMOS 6502

That was what also I thought, but I seen that even at 10Hz registers don't lose their values... anyway the single-stepping ciruit is exactly what I was searching for

Thank you all.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 11, 2020 4:26 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Good result!


Top
 Profile  
Reply with quote  
PostPosted: Tue May 12, 2020 2:52 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
It could be that your CPU is actually a CMOS chip in disguise. Try loading this little routine into it to find out for sure.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 45 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: