fachat wrote:
drogon wrote:
Dr Jefyll wrote:
drogon wrote:
I was pulling Rdy low, then BE low, then fiddling with the RAM from another processor (an ATmega), then releasing BE then taking Rdy high ...
Yes, that part sound fine.
Quote:
At that point, sometimes the 65C02 would crash - it's as if it was reading a random instruction at that point.
I tried qualifying the Rdy signal with the clock (both falling and rising edges
Qualifying the
Rdy signal... l can you clarify? If you mean combinatorial logic, that's not the answer. In the scenario you describe (ie, accepting an asynchronous cue from the ATmega), what's required is a flipflop (clocked by the rising edge of Phi2) to ensure that tPCS and tPHC are satisfied (see below). Nothing tricky about it, really (for 'C02, at least). You simply need
RDY to be stable -- either high or low, but not in flux -- immediately before and after the fall of Phi2.
And, because the flipflop will introduce a certain delay, the ATmega mustn't be too hasty in adjusting BE. To be on the safe side, you'd wanna allow one entire 65xx clock cycle before concluding that the
RDY cue has been accepted.
HTH!
-- Jeff
Based on some suggestions a while back, I was ANDing it inside a GAL with either the rising edge of the clock or the falling edge. No real difference
Not sure I understand. ANDing does not work on edges. Can you give more details?
Where do you detect the
RDY condition? On the CPU side or the bus side? If you assert BE the bus side becomes invalid....
I'm not detecting it - at least in this scenario, I'm not - in my current system, I am. This may be confusing.
I have a system with an ATmega and a 65C02. The ATmega can "see" 256 bytes of RAM from $FF00 through $FFFF, but only when the 65C02 is tristated (ie. BE low).
I wanted to poke data into the memory window while the 65C02 was running, so thought initially that if I simply pulled
Rdy low, then pulled BE low, then did the Atmega stuff to latch onto the RAM, store the data then do the reverse, the 6502 would not notice anything but "magically" would see new data.
I now know this doesn't work, so I have another solution that does work - it's driven from the 65C02 which executes a WAI instruction, which stops the 65C02 and sets
Rdy low which the Atmega detects and does what it needs to do (bring BE low, etc. ) and finished off by sending an NMI to the 65C02 to wake it from WAI.
What I was looking to do was re-investigate the issue I had back then (2 years ago, thread linked in my first post), and see if anyone knew why so I might again look at it on my next board.
Anyway, thanks for all the input so-far. I think I might just leave this to rest for a while and file my current solution in the "if it aint broke, don't fix it" drawer...
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/