well the dsp module is interesting but for this project perhaps its easier to do it the old way
Code:'**************************************************************** '* Name : MODULATOR.BAS * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 5/29/2016 * '* Version : 1.0 * '* Notes : * '* : 16F1825 * '**************************************************************** #CONFIG __config _CONFIG1, _FOSC_INTOSC & _CP_OFF & _WDTE_ON & _PWRTE_ON & _MCLRE_ON & _CLKOUTEN_OFF __config _CONFIG2, _PLLEN_ON & _LVP_OFF #ENDCONFIG OSCCON=$70 DEFINE OSC 32 ' PIC 16F1825 TRISA = %001111 ' Make some pins Input trisc = %001111 ;Make some pins Input ANSELA=0 ANSELC=0 X VAR byte darta VAR byte[4] clear modout var latc.4 darta.0[14]=1 darta.0[15]=1 modout =1 lata.5=0 ;cro triger Main_Loop: lata.5=1 modout=0 pauseus 9900 modout =1 pauseus 1880 for x = 0 to 30 modout =0 if darta.0[x] then pauseus 2000 else pauseus 780 endif modout =1 pauseus 635 next modout =1 lata.5=0 PAUSE 200 goto Main_Loop end




Bookmarks