I am try to studying Proton Basic compiler..... Now am Stuck...
This is my code
Code:
Device = 12F675
Config INTRC_OSC_NOCLKOUT, MCLRE_OFF, WDT_OFF, PWRTE_ON,
CMCON=7
ANSEL=0
XTAL = 4
Symbol buton=GPIO.0
Symbol LED=GPIO.1
cal_1:
Low LED
If buton=0 Then GoSub abc: GoTo cal_1
GoTo cal_1:
abc:
high led
DelayMS 10000
Return
End
I need a loop when I press again when the delay time end....
The code will only run once top down while wend is the main loop
Code:
Example
Var1 = 1
While Var1 <= 10
Hrsout Dec Var1, 13
Var1 = Var1 + 1
Wend
Code:
Example 3
If X = 10 Then
High LED1
ElseIf X = 20 Then
High LED2
Else
High LED3
EndIf
Code:
Display in decimal, all the values of WordVar within an upward loop
Dim WordVar as Word
For WordVar = 0 to 2000 Step 2 ' Perform an upward loop
HRsout Dec WordVar, 13 ' Display the value of WordVar
Next