Chris
The following compiles OK
Norm
Code:
'4520
@ __CONFIG _CONFIG1H, _OSC_XT_1H
@ __CONFIG _CONFIG2L, _BOREN_ON_2L
@ __CONFIG _CONFIG2H, _WDT_ON_2H
@ __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
DEFINE OSC 4
CLEAR
sSEROUT_PIN VAR PORTC.1
sBAUD CON 19697 '3313 = INVERTED 300 USE 19697 = 300 16416 = 19200 BAUD
arraydat VAR BIT(26)
C VAR BYTE
'***********************************************
GOTO START
ONE:
SEROUT2 sSEROUT_PIN,sBAUD,["sub ONE",13]
RETURN
ZERO:
SEROUT2 sSEROUT_PIN,sBAUD,["sub ZERO",13]
RETURN
START:
PAUSE 1000
SerOut2 sSEROUT_PIN,sBAUD,["START",13]
PAUSE 100
MAIN:
' arrayadat = %01010101011111111000000001
arraydat[0] = 1
arraydat[1] = 0
arraydat[2] = 0
arraydat[3] = 0
arraydat[4] = 0
arraydat[5] = 0
arraydat[6] = 0
arraydat[7] = 0
arraydat[8] = 0
arraydat[9] = 1
arraydat[10] = 1
arraydat[11] = 1
arraydat[12] = 1
arraydat[13] = 1
arraydat[14] = 1
arraydat[15] = 1
arraydat[16] = 1
arraydat[17] = 0
arraydat[18] = 1
arraydat[19] = 0
arraydat[20] = 1
arraydat[21] = 0
arraydat[22] = 1
arraydat[23] = 0
arraydat[24] = 1
arraydat[25] = 0
FOR C = 0 TO 25
IF arraydat[C] = 1 THEN
Gosub ONE
Else
Gosub Zero
EndIf
NEXT C
' goto main
SEROUT2 sSEROUT_PIN,sBAUD,["END",13]
END
Bookmarks