WavePOD WaveLoop E

WaveLoop E
waveloop_14                         ; Fast arbitrary waveform generator

; This code is simple in line setting of the DAC values each 1uS for 
; a 32 step loop. The values plugged in here are a SINE wave, but may
; be replaced with anything you like. Depending on how much program space
; you have, the number of steps can be anything. Using (say) 100 steps of 1uS 
; will give exactly a 10KHz loop.  Simply make a table of N values for your 
; waveform and edit them into the code.

l_141

        movlw   128                 ; WAV-0
        movwf   PORTB               ; put it to the DAC
        nop                         ; nops pad to 1uS per step
        nop
        nop
        movlw   153                 ; WAV-1
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   177                 ; WAV-2
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   199                 ; WAV-3
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   219                 ; WAV-4
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   234                 ; WAV-5
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   246                 ; WAV-6
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   253                 ; WAV-7
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   255                 ; WAV-8
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   253                 ; WAV-9
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   246                 ; WAV-10
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   234                 ; WAV-11
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   219                 ; WAV-12
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   199                 ; WAV-13
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   177                 ; WAV-14
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   153                 ; WAV-15
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   128                 ; WAV-16
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   103                 ; WAV-17
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   79                  ; WAV-18
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   57                  ; WAV-19
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   37                  ; WAV-20
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   22                  ; WAV-21
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   10                  ; WAV-22
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   3                   ; WAV-23
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   1                   ; WAV-24
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   3                   ; WAV-25
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   10                  ; WAV-26
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   22                  ; WAV-27
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   37                  ; WAV-28
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   57                  ; WAV-29
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   79                  ; WAV-30
        movwf   PORTB               ; put it to the DAC
        nop
        nop
        nop
        movlw   103                 ; WAV-31
        movwf   PORTB               ; put it to the DAC
        nop
        goto    l_141               ; and loop