the waveform is simple to simulate like this is you have a chip with a dsp module.
note the timings are estimated since the curious one's info is lacking most of the meaningful detail
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 = %111111 ' Make all pins Input trisc = %101111 ;Make all pins Input ANSELA=0 ANSELC=0 MDSRC= %00000000 MDCARH =%11000100 MDCARL =%00000000 X VAR byte darta VAR byte[4] TIMER1 VAR WORD EXT clear modout var latc.4 darta.0[15]=1 hpwm 1,128,1600 MDCON.0 = 0 modout =0 Main_Loop: modout=1 pauseus 8000 modout =0 while tmr2 :wend MDCON= %11000000 for x = 0 to 31 while tmr2 :wend MDCON.0 = ! darta.0[x] next modout=1 MDCON= 0 pauseus 600 modout = 0 PAUSE 200 goto Main_Loop end




Bookmarks