GaBuZoMeu wrote:
Add a pushbutton to your arduino (well debounced of course)
The key debouncing can be done in software, to simplify the hardware. OTOH, if you don't have the experience with software to get that going easily, maybe hardware is best (an RC followed by a Schmitt-trigger inverter for example).
Quote:
When the programs becomes more complex, single stepping is usually not helpful.
Totally agreed. The usefulness is gone when you get to where you have to single-step hundreds, maybe thousands of times to get to where the problem shows up. Then suppose you realize the problem started happening several steps earlier, but you can't back up.
Dan Moos wrote:
Dumb question...Do I just tie the WE pin HIGH on my 28c256 EEPROM? Seems like the thing to do.
<snip>
That clarified, a simple wire tying WE HIGH is what I want, right?
You can use the circuit at
http://wilsonminesco.com/6502primer/pot ... ml#BAS_CPU, paying attention to note 6 about JW3 particularly if you want to write to the EEPROM in-circuit. If you do write to it in-circuit, you'll want to have some degree of safeguard that you don't accidentally overwrite you monitor or accidentally do any damage that's hard to recover from.
Quote:
Another question. I'm getting close to the next major test phase. I have both buses, the memory, and the decoding logic just about complete. I kinda want to test all that before I start talking to the VIA. I figure I need to hand enter something really simple into the ROM that does something with the data bus that I can confirm on my Arduino terminal connection.
Since I'll be entering this thing in machine code, it needs to be super simple. Any ideas for what I can tell the thing to do that basically tests RAM and ROM?
The debugging chapter of the 6502 primer relates:
http://wilsonminesco.com/6502primer/debug.htmlQuote:
Also, what is the standard easy [way] to code a delay? Some sort of loop full of NOPs? I was thinking a simple test would be to blink some LEDs. I can clock the CPU with my function gen to slow it down, but when it's running on the crystal oscillator, I'll need some delay if things are to blink at human speeds.
Something like:
Code:
DELAY: LDY #$FF ; Put the desired value in X before JSR'ing to DELAY.
d1: DEY
BNE d1
DEX
BNE DELAY
RTS
;-------------
If I calculated it right, the delay in cycles N, including the JSR & RTS, would be 1283X+13, so the value in X when you call it should be X=(N-13)/1283. So if you're running at 1MHz and want a 100ms delay (ie, 100,000 cycles), (1E5-13)/1283 is 78, or $4E. Getting it exact is seldom necessary though. If you need to preserve X or Y, you can push them onto the stack before, and pull them back off after.
Quote:
Yeah, it would be like a poor man's harddisk. I can definitely see the advantage. It's the big picture plan, but my attitude is as little plumbing, no matter how trivial, until she's running.
Then after you do get it going, a poor man's hard disc could be something like the 26VF064 8MB SPI serial flash in an 8-pin SOIC, and if you want it removable like an SD card, you can use my tiny hobbyist-friendly SPI-10 boards shown in the middle of the front page of my website. Yes, it takes some code for the driver, but it's much, much simpler and easier to understand than doing an SD-card driver. If doing file system is too complicated, you could just keep track of what files start at what addresses on which tiny memory modules, like we used to do with cassettes on Apple II's and C64's before the disc drives were available and affordable.