Excellent idea.A helpful feature would be the ability to compare the changes in the code since the last save (perhaps even last several versions), sort of like the app "kaleidoscope" on the mac app store.
Comparing files D:\file1.bas and D:\FILE2.BAS
***** D:\file1.bas
0(w0) | Bits | loopcounter | moving average| | | moving average|
1(w0) | | readvar | 1 w10 | autolevel2 | autolevel22 | 11 w25 |
2(w1) | | bintoascii1/T | moving average| autolevel3 | autolevel23 | moving average|
***** D:\FILE2.BAS
0(w0) | Bits | loopcounter | moving average| | | moving average|
1(w0) | | | 1 w10 | autolevel2 | autolevel22 | 11 w25 |
2(w1) | | bintoascii1/T | moving average| autolevel3 | autolevel23 | moving average|
*****
***** D:\file1.bas
6(w3) | count1 w3 | bintoascii5 | moving average| autolevel7 | autolevel27 |---------------|
7(w3) | count1 | pwmdutyvar | 4 w13 | | |
8(w4) | count2 w4 | moving average| level1 | moving average| moving average|
***** D:\FILE2.BAS
6(w3) | count1 w3 | bintoascii5 | moving average| autolevel7 | autolevel27 |---------------|
7(w3) | count1 | pwmdutyvar | 4 w13 | skew1 | skew2 |
8(w4) | count2 w4 | moving average| level1 | moving average| moving average|
*****
***** D:\file1.bas
2 | bits | autolevel3 | autolevel23 | | | |
3 | | autolevel4 | autolevel24 | | | |
4 | | autolevel5 | autolevel25 | | | |
5 | | autolevel6 | autolevel26 | | | |
***** D:\FILE2.BAS
2 | bits | autolevel3 | autolevel23 | | | |
3 | skew1 | autolevel4 | autolevel24 | | | |
4 | skew2 | autolevel5 | autolevel25 | | | |
5 | | autolevel6 | autolevel26 | | | |
*****
***** D:\file1.bas
symbol loopcounter = b10
symbol readvar = b11
symbol bta1 = b12
***** D:\FILE2.BAS
symbol loopcounter = b10
symbol bta1 = b12
*****
***** D:\file1.bas
symbol autolevel7 = b36
symbol autolevel22 = b41
***** D:\FILE2.BAS
symbol autolevel7 = b36
symbol skew1 = b37
symbol autolevel22 = b41
*****
***** D:\file1.bas
symbol autolevel27 = b46
symbol s1 = 4
***** D:\FILE2.BAS
symbol autolevel27 = b46
symbol skew2 = b47
symbol s1 = 4
*****
***** D:\file1.bas
138,146,156,169,189,226)
adcsetup = 16
adcsetup2 = 4
high fan1
high fan2
read 0,level1
read 1,level2
read 2,b0
read 11,autolevel2
read 12,autolevel3
read 13,autolevel4
read 14,autolevel5
read 15,autolevel6
read 16,autolevel7
read 21,autolevel22
read 22,autolevel23;
read 23,autolevel24
read 24,autolevel25
read 25,autolevel26
read 26,autolevel27
b0 = b0 and $03
setfreq em64
dirsB = 255
low rs
output enable
lcddata = %00000110 : pulsout enable,100
lcddata = %00001100 : pulsout enable,100
lcddata = %00111011 : pulsout enable,100
lcddata = %00000001 : pulsout enable,100
pause 100
low rs
lcddata = 64 : pulsout enable,1
high rs
for loopcounter = 0 to 55
lookup loopcounter,(32,32,32,32,32,32,63,32,32,32,32,32,32,63,63,32,32,32,32,32,63,63,63,32,32,32,32,63,_
63,63,63,32,32,32,63,63,63,63,63,32,32,63,63,63,63,63,63,32,63,63,63,63,63,63,63,32),
readvar
lcddata = readvar
pulsout enable,1
***** D:\FILE2.BAS
138,146,156,169,189,226)
adcsetup = 16 'Configure ADC inputs
adcsetup2 = 4 'Configure ADC inputs
high fan1 'Turn fan 1 on - done i
n case fan cannot start on lowest PWM setting
high fan2 'Turn fan 2 on - done i
n case fan cannot start on lowest PWM setting
read 0,level1 'Read set speed level for fan 1
read 1,level2 'Read set speed level for fan 2
read 2,b0 'Read saved bit variabl
es
read 3,skew1
read 4,skew2
read 11,autolevel2 '
read 12,autolevel3 'Fan 1
read 13,autolevel4 'auto levels
read 14,autolevel5 '
read 15,autolevel6 '
read 16,autolevel7 '
read 21,autolevel22 '
read 22,autolevel23 'Fan 2
read 23,autolevel24 'auto levels
read 24,autolevel25 '
read 25,autolevel26 '
read 26,autolevel27 '
b0 = b0 and $03 'Keep only first two bits of b0
setfreq em64 'Use 16MHz resonator
dirsB = 255 'Set pinsB as outputs
low rs 'instruction mode
output enable 'set enable pin as output
lcddata = %00000110 : pulsout enable,100 'OLED initialization
lcddata = %00001100 : pulsout enable,100 'OLED initialization
lcddata = %00111011 : pulsout enable,100 'OLED initialization
lcddata = %00000001 : pulsout enable,100 'OLED initialization
pause 100 'Allow OLED to finish i
nitialization
lcddata = 64 : pulsout enable,1 'Set selected OLED RAM location to 64 f
or loading CGRAM characters
high rs 'Data mode
for loopcounter = 0 to 63 'Loop: Load CGRAM characters fo
r level meter
lookup loopcounter,(32,32,32,32,32,32,63,32,32,32,32,32,32,63,63,32,32,32,32,32,63,63,63,32,32,32,32,63,_
63,63,63,32,32,32,63,63,63,63,63,32,32,63,63,63,63,63,63,32,63,63,63,63,63,63,63,32,_
63,63,63,63,63,63,63,63),lcddata
pulsout enable,1
*****
Sort of like the *nix diff command . . .A helpful feature would be the ability to compare the changes in the code since the last save (perhaps even last several versions), sort of like the app "kaleidoscope" on the mac app store.
Unfortunately, I don't have those IC's at hand.Some PICAXE chips have 28 byte variables (some older ones have less) and others have 56 byte variables (b0 to b55) as detailed in the PICAXE manual 2 under general variables.
There are also means to save and retrieve values in the byte variables to other RAM using PEEK and POKE or into scratchpad memory with PUT and GET.
Some of these techniques have been discussed on this forum previously.
Ah... I see only the good in people, so that didn't occur to me.Allowing assembler code blocks will likely never be imimented on PICAXE.
Anyone could then write code to read and dump the proprietary PICAXE firmware with interprets the BASIC command. Then unscrupulous types clone the PICAXE so Revolution Education's profits fall and the demise of Rev Ed and PICAXE chips may follow.
I know this is the interpreter really, but I would like a variant on serout with another parameter to specify an inter-character transmission delay.
b0 = 0: b1 = 0
Do Until b1 = 255
Lookup b0, ("Hello World", 255), b1
Serout C.3, (b1)
Inc b0
Loop
End
There is a free online utility to perform this task:A helpful feature would be the ability to compare the changes in the code since the last save (perhaps even last several versions)
I'll second that idea. Good thinking.Another function that would be useful would be a variant of terminal that emulates axe033, 133 ect serial LCDs. This could be used to see if a problem was in hardware or software, or start programming before adding the LCD/OLED.
You could create your own cvs on your local computer using open source software such as Subversion or GIT.A helpful feature would be the ability to compare the changes in the code since the last save (perhaps even last several versions)
Use bptr to point to the position you want, you can't use array type notation e.g. (0) in symbol names.
Code:[COLOR=Blue]symbol [/COLOR][COLOR=Black]fault1 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Purple]b1[/COLOR] [COLOR=Blue]symbol [/COLOR][COLOR=Black]fault2 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Purple]b2[/COLOR] [COLOR=Blue]symbol [/COLOR][COLOR=Black]fault3 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Purple]b3[/COLOR] [COLOR=Blue]symbol [/COLOR][COLOR=Black]fault4 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Purple]b4[/COLOR] [COLOR=Blue]symbol [/COLOR][COLOR=Black]fault5 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Purple]b5[/COLOR] [COLOR=Blue]for [/COLOR][COLOR=Purple]bptr [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]1 [/COLOR][COLOR=Blue]to [/COLOR][COLOR=Navy]5 [/COLOR][COLOR=Green];Loop for DTCs 1-5 [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]b0 [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]1 [/COLOR][COLOR=Green];Set b0(fault) to 1 [/COLOR][COLOR=Blue]pulsin [/COLOR][COLOR=Black]pulse,[/COLOR][COLOR=Navy]0[/COLOR][COLOR=Black],[/COLOR][COLOR=Purple]w13 [/COLOR][COLOR=Green];Measure low pulses & store @ w13 [/COLOR][COLOR=Blue]if [/COLOR][COLOR=Purple]w13 [/COLOR][COLOR=DarkCyan]> [/COLOR][COLOR=Navy]400 [/COLOR][COLOR=Blue]then[/COLOR][COLOR=Green];If low pulse is greater than 400, gosub faultcount [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Black]temp [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]0 [/COLOR][COLOR=Green];Set temp to 0 [/COLOR][COLOR=Blue]gosub [/COLOR][COLOR=Black]faultcount [/COLOR][COLOR=Green];Goto sub routine to count pulses [/COLOR][COLOR=Blue]endif [/COLOR][COLOR=Green];End IF statement [/COLOR][COLOR=Purple]@bptr [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Black]temp [/COLOR][COLOR=Green];Assign temp value to fault(b0) [/COLOR][COLOR=Blue]inc [/COLOR][COLOR=Black]temp [/COLOR][COLOR=Green];Increment bo(fault)[/COLOR] [COLOR=Blue]next [/COLOR][COLOR=Green];Increment loop[/COLOR] [COLOR=Blue]goto [/COLOR][COLOR=Black]results [/COLOR][COLOR=Green];Loops finished, goto results[/COLOR]
Hi,I've noticed that this post from Technical has colour syntax!
The current PE has colour syntax, but the 'Copy to Forum' function doesn't transfer the colours when pasted.Hi,
But hasn't PE 5.5.5 (and maybe a few versions before that) already got colour syntax?
Cheers, Alan.
I would like to see an additional logic-related capability:It may have been mentioned in this l-o-n-g thread already but....
1. Implied logic for desicion statements (actually raised by hwholmes in another thread)
If b0 Then....
If Not pin C.1 Then...
Do While pinC.1....
bit1 = b2 > b3
Another vote for this. Actually, it would be nice if we could edit/scroll/read the program when any of the other windows are open. For example, if the ASCII table (in the Help menu) is open, I can't edit my program and view the table at the same time.Hi,
And whilst I'm here, another vote to be able to edit (or at least scroll and read) the program when the terminal window is open!
Cheers, Alan.
I've thought about that one too but the speed of the PICAXE is dynamic: the user can change it at any time for a number of reasons. Eg Slowing the PICAXE in some parts of your program to conserve battery power or when using a longer than standard i2c bus. Also, you sometimes need to drop the speed to get some slower baud rates. Therefore, the compiler could never be smart enough to know what division rate to use. Rev-Ed could do it in the chips themselves but that would need a rewrite of the firmware!Commands could automatically compensate for set frequency e.g chip is set to 16 MHz, 2cfast becomes i2cfast_16, pauses double etc. the adjustments could be compiler (or interpreter, or whatever) side only, maybe defined by #frequency.
True, but perhaps it could be an option that you would only use if your program was all the same frequency, or you could specify one chunk of code (which would always be the same frequency) to apply it to (sort of like #rem followed by #endrem).I've thought about that one too but the speed of the PICAXE is dynamic: the user can change it at any time for a number of reasons. Eg Slowing the PICAXE in some parts of your program to conserve battery power or when using a longer than standard i2c bus. Also, you sometimes need to drop the speed to get some slower baud rates. Therefore, the compiler could never be smart enough to know what division rate to use. Rev-Ed could do it in the chips themselves but that would need a rewrite of the firmware!
I agree!The release of PE6
or better yet, make the X work....but remove the close window X on the download dialog box. It doesn't do anything and always teases me into clicking it when I realize I haven't plugged in the download cable.
Perhaps Re-ed has already blowen the candles out on PE6.Today is the 500th Anniversary since PE6 was first dangled before our eyes.
I think we all deserve a slice of the cake !.