JJFORTY
Member level 1
PIC SINEWVAE DESIGN
Hi
I'm new to PIC's I'm trying to generate a sinewave using lookup table I created my code below which gives a pretty good sinousoidal the problem is that as the wave increases in lenght the amplitude decreases .. I can't figure out why.. is it the code is it the DAC .. Please give me your comments
Thanks in Advance
Hi
I'm new to PIC's I'm trying to generate a sinewave using lookup table I created my code below which gives a pretty good sinousoidal the problem is that as the wave increases in lenght the amplitude decreases .. I can't figure out why.. is it the code is it the DAC .. Please give me your comments
Thanks in Advance
Code:
list p=16f84
; Include file, change directory if needed
include "p16f84.inc"
org 0x00
INIT
bsf STATUS,RP0
clrf PORTB
clrf TRISB
bcf STATUS,RP0
BEGIN
movlw B'00000000'
movwf PORTB
movlw B'00000001'
movwf PORTB
movlw B'00000001'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000011'
movwf PORTB
movlw B'00000011'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000101'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000100'
movwf PORTB
movlw B'00000011'
movwf PORTB
movlw B'00000011'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000010'
movwf PORTB
movlw B'00000001'
movwf PORTB
movlw B'00000001'
movwf PORTB
movlw B'00000000'
movwf PORTB
movlw B'11111111'
movwf PORTB
movlw B'11111111'
movwf PORTB
movlw B'11111110'
movwf PORTB
movlw B'11111110'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111011'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111100'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111101'
movwf PORTB
movlw B'11111110'
movwf PORTB
movlw B'11111110'
movwf PORTB
movlw B'11111111'
movwf PORTB
movlw B'11111111'
goto BEGIN
end