nei02 wrote:
Delay:
Yes I have a WDS 65C02. The manual says that there is a bug and one should use a delay.
But even without delay I would have assumed that I get a least some characters transmitted.
Yes, if you try transmitting "HELLO" over and over, you should see those letters coming through, but not in order, since many letters would get skipped between the ones that do get sent. The problem is that the onboard oscillator will not work with the .1µF capacitor from input to ground. If you use an outboard oscillator can, you don't need the capacitor at the input at all. Make sure you put the 1M resistor across the crystal like the WDC data sheet shows. Not all brands use this. Also, check the lot on your '51. I see now that the WDC data sheet says the internal oscillator didn't work right in a couple of lots SA1105A and SA0519A. Darn. It looks like they hurried this thing too much! I never had any trouble with the other (slower) brands of '51 I used, as long as I had the 22pF capacitor at he input.
Quote:
For the first step I will go with a delay since I don't have an AVIA. And I want to reduce the complexity.
You wouldn't need the VIA for just RS-232 I/O; but soon you'll probably want the other benefits of a VIA anyway, especially some parallel I/O and timers. BTW, it's "VIA" (for "Versatile Interface Adapter," not "AVIA." The "A" in "ACIA" (the 65c51) is for "Asynchronous," in "Asynchronous Communications Interface Adapter.")
At 1MHz processor clock speed, one frame of RS-232 at 9600,8,N,1 will take a little over 1042 processor clock cycles. Your software delay could be something like:
Code:
LDX #$D0
loop: DEX
BNE loop
which with the other instructions in your loop, will give just a few more cycles than you need. I'm in a hurry to leave now so I can't take time to merge it with your code, but I'll take a look later.