Good job! Here's what I got on the oscilloscope, having added only STA VIA2PA afer the ADC instruction to send the result to the D/A converter:
PseudoSine.jpg (28.86 KiB) Viewed 1672 times
It would be even slightly better if I were to sync it to a timer interrupt, since as it is it's a couple more clocks for one half of the cycle than it is for the other (19 versus 17 with the variable not in ZP).
It would be even slightly better if I were to sync it to a timer interrupt, since as it is it's a couple more clocks for one half of the cycle than it is for the other (19 versus 17 with the variable not in ZP).
hmm
I get 15 and 13 cycles.
I guess if you were going to time it with code you'd have to add
a nop to the dey side.
Add 4 clocks for the STA VIA2PA (for the D/A converter).
About the NOP-- of course. I was in too big of a hurry.
Quote:
I wasn't really thinking of it as having any practical use
I have recently been watching videos of home-computer history (or should I say "listening," since I had them going while working and didn't keep my eyes glued) and it was interesting that Jobs and Woz were going to these meetings of hobbyists who were trying to build their own computers that did absolutely nothing useful, and even that first huge Altair was pretty useless, apparently having only toggle switches for inputs and LED for outputs. My workbench computer gets used only for real-life control and data collection on the workbench though, and I might do an FFT on this method to get some harmonic-distortion numbers. It may come in handy someday. In the past I've done it with look-up tables which works well too of course.