6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu May 09, 2024 7:59 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Dec 07, 2020 1:11 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
You should be able to improve that situation as follows:
Code:
1: Raise clock, beginning Phi2 phase.
2: Check address.
3: If address matches for a read, perform internal action and place data on pins.
4: If address matches, set data pins to output mode.  (This ordering avoids a double transition on the bus.)
5: Lower clock, ending Phi2 phase.  This instructs the CPU to latch the data on the bus.
6: Set data pins to input mode immediately after lowering clock, the sooner the better.
The only reason your current scheme works is because the bus has some parasitic capacitance which tends to keep voltages where they are unless actively driven elsewhere.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 07, 2020 1:36 am 
Offline

Joined: Fri Dec 04, 2020 8:14 pm
Posts: 8
Yeah that’s exactly what the oscilloscope showed under test. As long as the clock pulse executes immediately after the direction change, it seems fine. It’s a big, ugly hack. But, surprisingly reliable probably outside of crazy EMI conditions.

Changing up the algorithm would be nice. It’s current state was a long process of compiling to assembly and going instruction-by-instruction to optimize the speed as much as possible. The shortest execution loop is 7 instructions, which gives me the 2.28MHz with the Arduino’s crystal.

But, for the time being, I’m just trying to get the glue logic right :?. I’m already down about $60 on failed boards + components. This next build is going to be fully through-hole, so at least I can socket and reuse the components if there’s another problem.


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

All times are UTC


Who is online

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