beholder wrote:
I wrote a simple test code to output 1s and 0s on the 1st VIA:
Code starts at $8000
LDA #FF
STA $7F52
STA $7F53
LDA #AA
STA $7F50
STA $7F51
JMP $8000
I look at the address bus and I can confirm that the code is running and looping, but instead of storing the accumulator value on to $7F50 it's going to $FF50
The code laid down by the assembler should be 8D 50 7F. Make sure its output is putting that in the program. I expect it is; so is there a problem in the address decoding?
Quote:
Shouldn't the above code set the 1st VIA output to 1s and 0s?
Yes, 10101010B for both port A and port B (PA and PB). (You don't need a loop to do it though. The data will stay until you explicitly change it.)
Quote:
Also, for the SBC, I only have a 10uF capacitor between +5 and GND of the power source.
Do I need more capacitors? Maybe a 100uF?
If the regulator is right there on the board, 10uF is enough. If the power source is wired some distance away from the board and its minimum output voltage is bordering on the dropout voltage of the regulator, ie, the voltage that's so low the regulator is almost unable to regulate, then put a bigger capacitor at the regulator's input. For example if you're using a 7805 and you're feeding it with 7.5V with quite a bit of ripple on it, you'll need more capacitance at the input of the regulator. OTOH, if you're feeding it with something like 12 or 13.8V, the lowest voltage in the ripple, plus sags from the loading, will be way above what the regulator needs to output its specified voltage.