BigDumbDinosaur wrote:
sponaugle wrote:
I printed the schematic on B-size paper so I could read it and noted a few things:
- The SOB input on the 65C02 must be tied to Vcc or Gnd if you are not planning to actively drive it. Allowing it to float will make it susceptible to noise and may cause the V bit in the status register to be randomly set. There's no telling what that might do in your software. I suggest pulling SOB up to Vcc through a 3.3K resistor so you can use it as a high speed input if desired.
- The pullup resistor values for /IRQ and /NMI are too high. I recommend no more than 3.3K for these resistors. If they are too high, a long R-C time-constant will be created and the corresponding circuit will take too long to return to Vcc when all interrupt sources are cleared. Such behavior is a common cause of spurious interrupts. Garth Wilson has a good discussion of this phenomenon in his interrupts article on his website.
- I see that you are using an SRAM as a pseudo-ROM, but it appears that it isn't write-protected once the ISL has been completed. A bug in your code could corrupt its contents.
- I notice that your serial port has no provisions for hardware handshaking. That will limit its useful speed to around 9600 bps, as XON/XOFF handshaking is unreliable above that speed.
Otherwise, it looks as though it ought to work once you get the PIC programmed.
That for taking the time to print it out and take a look! If you are ever in Portland, OR, beer on me.
On the pull-ups, indeed those would be high in a wired-or/open collector setup. In my layout, the NMI, RDY, and IRQ (edit: IRQ was, NMI now is!) are all driven directly by the PIC, and I'll configure the PIC to always drive them (no tristate), so in theory no pull-up needed. I will leave the pull-ups in the schematic (and the board layout) in case I change something later. I will also edit the schematic to change them to 3.3K, as if I did do an open collector setup you are spot on that 10k is too high.
SOB: Yes.. great catch.. I was going to run through all of the 'disconnected' pin, so I'll add the pull-up to that one.
SRAM: Yea... The 65C02 could write to the SRAM where the rom is. I'll add a jumper pad for that, so if I later want to allow that it would be easy to do.
Interesting comment on the serial port.. I can see that with a 65C02 running a serial port that the hardware handshaking would be needed, as it would be easy to overflow the CPUs ability to handle input. In my case I am having the serial terminate inside the PIC, and I am implemented a large buffer that can hold data while being sent to the 65C02. In my experience using PICs and AVRs, I have not had any problem without handshaking as long as there is a good amount of buffer space. Since I have two SPI ports exposed, I hope to add a real keyboard and display so I don't need to use serial as the primary IO. Good input non the less.
Cheers!
Jeff