Hola Mac, Although I've never done this, I think I can explain it. First, the pulse waveform toggles between "low" and "hi". What you want to do is lock it into "hi", to keep a voltage on the output. The time spent low versus the time spent high is the duty cycle. Setting the pulse width register to 2048 gives a 50% duty cycle -- over a given period, the pulse is high half of the time and low the other half. The thing to realize is that this is true for any frequency -- that is, if the period of the waveform is 1 second, it will be high for a half second and low for the other half. If it is ten seconds, it will be high for five and low for five. The reason I go through all this is twofold: 1) if the frequency is zero, the pulse will never toggle between low and hi, and 2) you want a duty cycle of 100%, not 4095/4096%. So here's my (untested, WAG) suggestion: Set the voice three pulse width to some nonzero value: LDA #$80 (50%) STA $D411 Set voice 3 to a nonzero frequency: STA $D40E Monitor the voice 3 oscillator output :loop LDA whatever BPL :loop When it hits $FF, set the pulse width to zero: STZ $D410 STZ $D411 That's my guess. A 99% pulse width might work well enough. Either way, though, you need a nonzero frequency to get the thing started. -Steve On Thu, 27 Jul 2000, Robin Harbron wrote: > >From what you're saying, is this all the code I should need? > > lda #255 ;max pulse width > sta $d402 > sta $d403 > sta $d409 > sta $d40a > sta $d410 > sta $d411 > > lda #64 ;select pulse waveform in control registers > sta $d404 > sta $d40b > sta $d412 > > I'm asking because this is what I've tried, and it doesn't seem > to make any noticeable difference in volume for the digis. Thanks! > -- > Robin Harbron macbeth@psw.nu > http://www.tbaytel.net/macbeth > http://www.psw.nu/ > - > This message was sent through the cbm-hackers mailing list. > To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi. > - This message was sent through the cbm-hackers mailing list. To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.
Archive generated by hypermail 2.1.1.