as close as I can get . it has a glitch after the last bit sent
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_OFF & _LVP_OFF #ENDCONFIG OSCCON=$70 DEFINE OSC 8 ' PIC 16F1825 TRISA = %011111 ' trisc = %001111 ; ANSELA=0 ANSELC=0 MDSRC= %00000000 MDCARH =%01000100 MDCARL =%00000000 X VAR byte darta VAR byte[4] TIMER1 VAR WORD EXT clear modout var latc.4 darta.0[14]=1 darta.0[15]=1 t2con=6 pr2=158 CCPR1L =318>>2 ccp1con=12 MDCON.0 = 0 modout =1 Main_Loop: lata.5=1 ; cro trigger while !pir1.1 :wend modout=0 pauseus 9900 modout =1 pir1.1=0 while !pir1.1 :wend pir1.1=0 while !pir1.1 :wend MDCON= %11000001 pir1.1=0 while !pir1.1 :wend for x = 0 to 31 if darta.0[x] then MDCON.0 = 0 pir1.1=0 while !pir1.1 :wend pir1.1=0 while !pir1.1 :wend MDCON.0 = 1 pir1.1=0 while !pir1.1 :wend else MDCON.0 = 1 pir1.1=0 while !pir1.1 :wend endif next modout = 1 MDCON = 0 lata.5=0 PAUSE 200 goto Main_Loop end




Bookmarks