Programming Editor Wishlist

pleiser

Senior Member
I would like to be able to see the bit variables in debug (it is inconvienient to have to convert the bytes to individual bits when necesasary)
 

SAborn

Senior Member
Another wish to add to the list would be an extension to the "Pause" command.

When using increased clock speeds we need to factor in the effect to pause statements and an extension to pause to automatically make the adjustment would save a lot of errors.

The example i give is for 16mhz........ pause16 1000........ 8mhz ..... pause8 1000..... and so forth, with the original pause still relevant to default clock speed.
 
Would it be possible to add an option to choose inverted vs. non-inverted USB to Serial adapters? This would help us gain converts from people who are already using a non-inverted adapter with a different microprocessor.
 

hippy

Technical Support
Staff member
Would it be possible to add an option to choose inverted vs. non-inverted USB to Serial adapters?
That's unlikely to be possible as Windows, application software and USB drivers have no ability to control the signal polarity of the cable hardware.
 

g6ejd

Senior Member
I would like to see a 'where-used' or variable analysis, so that I could see if a variable was never used, or used just once, etc. With memory being so low, any tool that helps maximise usage is of value.
 

mrburnette

Senior Member
That's unlikely to be possible as Windows, application software and USB drivers have no ability to control the signal polarity of the cable hardware.
Ron's idea surely is a good one, however. I have bunches of USB/serial adapters around here that must be inverted and are of the design that cannot be flash-updated. I have to stick two inverters in the designs to deal with the inversion problem. Deep down in the firmware, is there not an inversion register? If not, OK, but it is surely something that should be addressed as the PICAXE line matures, for the sake of completeness with commonly available hardware used in the community.

I would personally like to see a real prototype functions added to the language. This should be able to be done entirely in the editor (if global variables are assumed and a few dedicated 'temporary' variables are identified) in a matter similar to:
Code:
               SYMBOL Centigrade = B0
               SYMBOL Fahrenheit = B1
               TEMPORARY B10, B11, B12 [, Bxxx ]
               ...
               Centigrade = Cent2Fah ( Fahrenheit )
               SERTXD ( "C= ", Centigrade, "    F= ", Fahrenheit )
               END

               DEFINE FUNCTION Cent2Fah ( C )
               F = C * 9 / 5 + 32
               Return F
 
               ....
 

srnet

Senior Member
Deep down in the firmware, is there not an inversion register?
Depends what you mean, PICAXE firmware or USB firmware.

I can see the logic that Rev Ed support standard serial interfaces and the AXE027, adding more generric support could well lead to support headaches they dont want.
 

hippy

Technical Support
Staff member
Deep down in the firmware, is there not an inversion register? If not, OK, but it is surely something that should be addressed as the PICAXE line matures, for the sake of completeness with commonly available hardware used in the community.
PICAXE firmware could be coded to use a different serial polarity but that opens a whole can of worms with different PICAXE requiring different download cables and download circuits as there's simply no easy way to have a solution which works with either automatically. It could be done by dedicating an I/O pin for specifying polarity but that uses up a general purpose I/O. That or a firmware polarity change would likely be incompatible with almost all existing circuits.
 

mrburnette

Senior Member
PICAXE firmware could be coded to use a different serial polarity but that opens a whole can of worms with different PICAXE requiring different download cables and download circuits as there's simply no easy way to have a solution which works with either automatically.
Understood that a default for download would be required (pre-DISCONNECT.) But, one (I) might think that once the download was disconnected, that a SFR bit(s) could be utilized to perform the magic. Surely no-one would object to doing a little poking into the SFR's to perform a weebit of magic? ... anyway, I felt that Ron's idea was good and I often utilize inexpensively purchased Chinese USB-serial connections which do not natively work with the PICAXE but require either a single NPN inverter (if I'm doing only output serial) or a 7404'ish series if I need both Send/Receive translations.

As a distant observer using the PICAXE as a non-educational device, I really try and not voice an opinion negative to the often voiced 'educational nature' of the PICAXE. However, every forum member seems to agree that the PICAXE is useful outside of the classroom and I often see support for using the chips outside the normal RevEd available hardware. I certainly think that inversion of the serial comm signals is an evolutionary idea with merit but I agree it is only useful for a small band of users that utilize a variety of different uC devices.

- Ray
 

srnet

Senior Member
Some PICAXEs, especially the more modern ones do have PIC register settings that allow the hardware UART to use inverted logic for TX and RX.

The PICAXE download does not use the hardware UART though, so it would be a case of having a specific RAM location to poke.
 

HertzHog

Member
So many replies! The feature I would like is the ability to do make programs smaller by lines like
high c.0+3
If comparison > test + 12
I.e. a formula where the compiler expects a constant. It saves having to store the result in a variable 1st. HertzHog
 

Buzby

Senior Member
I quite often have a single line like SERTXD ( "Minibot_V5",cr,lf) near the start of my code.

The idea is that "Minibot_V5" is the file name of the program, and when the PICAXE starts up it reminds me, via the Terminal, which project it belongs to.

It would be good if this line could be inserted automagically. maybe with some kind of #command, to build the line from the current file name.

Just an idea, if it's not too late !.
 

pleiser

Senior Member
I would like the ability to use command
Code:
play B.1, b0
in an old kit I had that came with an old version of programming editor ( Snap circuits micro) you could use variables with the play command. in the new version you can only use numbers
I know that you can do a more complicated program, for example
Code:
select case b0
case 0
play B.1, 0
case 1
play B.1, 1
...
endselect
but it is more convienient to be able to use variables directly.
patrick
 

matherp

Senior Member
Sorry if these have been raised already

Serial terminal window should be non-blocking so you can move it and review code whilst monitoring the window, also it should possible to change its size (particularly width)

Pinout option on "view " menu that displays the pinout for the currently selected chip. when developing ideas with the AXE091 I'm for ever opening manual 1 just to check if pin b.6 is the one that is read only or is it...
 
Dont know if it has been mentioned, but I would like a "check firmwarebutton" at the top of PE (where the program button is) so that i dont need to open the options everytime i need to check.
 

SAborn

Senior Member
Pinout option on "view " menu that displays the pinout for the currently selected chip. when developing ideas with the AXE091 I'm for ever opening manual 1 just to check if pin b.6 is the one that is read only or is it...
I agree with this, although a double sided printout and laminated of the pinouts in the manual works well for me, so maybe a better lay out of the pinout page in the manual, to allow a more printer friendly double page of all the chips pinouts, as current view requires 2 double sided pages, and a single printed double page would be better.
 

SAborn

Senior Member
I dont know if this is practical or even possible, but a form of "code lock" could be handy.

This stems from a problem i encounted recently with end users needing to change code values for things like calibration of voltage readings for example.
What happened was the value of a number needed changing and the user deleted more of the code line than just the number when making changes.

It would be nice to be able to select sections of code and "LOCK" it, but still allow other parts to be changed.
This might require the code to be highlighted as you would for a copy/paste application and once highlighted then click a lock function in the menu, requiring a double click on the locked code to highlight it again and click a unlock function if needing to make changes to that section code.

Some design programs have a "Group" option that allows selected sections to be grouped or locked together in much the same way.
 

Jamster

Senior Member
This may be near impossible but how about being able to program the chips via the sound card? You can get software that allows you to use it as a serial port so the technology is there and it would provide a cheaper way to program the chips from a laptop than the Axe027.

@SAborn, I can build you some software that will allow users to download code to a PICAXe without being able to see the code (well, there are some ways) and I can customise it to allow specific changes if you wish.
 

mrburnette

Senior Member
From my collection; one possible way ... IMG095.jpg :D

<...>@SAborn, I can build you some software that will allow users to download code to a PICAXe without being able to see the code (well, there are some ways) and I can customise it to allow specific changes if you wish.
 

mrburnette

Senior Member
I dont know if this is practical or even possible, but a form of "code lock" could be handy.
I've done this a few ways... complicated, using IR remote for entering a string of data. The user moves a Jumper from Run mode to Program mode and the PICAXE walks them through value by value. An easier way, for limited data, may be something like this: http://www.picaxeforum.co.uk/showthread.php?19372-Add-field-adjustable-coefficients-to-your-project

Obviously, not an ideal solution for every circumstance.

- Ray
 

Hendriks

Member
I would fancy a command to output a fixed number of pulses, like
PULSOUT pin, TimeHigh, TimeLow, NumberOfPulses
or
PULSOUT pin, time, duty, NumberOfPulses
or
PWMOUT, pin, period, duty cycles, NumberOfPulses
 

SAborn

Senior Member
@SAborn, I can build you some software that will allow users to download code to a PICAXe without being able to see the code (well, there are some ways) and I can customise it to allow specific changes if you wish.
Hi Jamster,

Hey that would be neat to have software to do that, and if you feel like making the software i would be interested in a copy.
In the case above it was not so much a need to hide the code but more so the ability to prevent accidental changes being made other than to the sections that was required for calibration.

@Ray,

I have used press buttons and key pads in the past for calibration and setup, but this was a simple block of code with the need to calibrate it once, so i was not prepared to add the extra hardware and code for a 1 time calibration, although i thought others may have struck a similar issue and a editor function could have been handy.

Is that one of the New IBM releases you posted above (He,he)

Technical did ask for ideas.
 

tinyb

Member
could a new file extension be a reasonable suggestion? *.bas is used by almost all basic programing. I have to open prog edit before opening the file. if i make prog edit the main editor it tries and fails to open VB code. jsu a thought?

thanks
tiny
 

cravenhaven

Senior Member
Dont know if its been mentioned yet, but a 'step over' function in the simulator would be handy.
Currently with the "memory slot" capability not being supported in PE, I have to comment out the RUN statements before simulating the program segment. There are other times when a non-simulated peripheral is being used, it would be nice to be able to step over/ignore the access commands and just poke in the expected results at the time.
 

Hendriks

Member
could a new file extension be a reasonable suggestion? *.bas is used by almost all basic programing. I have to open prog edit before opening the file. if i make prog edit the main editor it tries and fails to open VB code. jsu a thought?

thanks
tiny
That's why I rename Picaxe programs to *.AXEBAS
In Explorer you can than associate this extension to the ProgramEditor so it always starts with these files. Only problem is that it is not allowed to open the next basic program when PE is already running.
 

tinyb

Member
That's why I rename Picaxe programs to *.AXEBAS
In Explorer you can than associate this extension to the ProgramEditor so it always starts with these files. Only problem is that it is not allowed to open the next basic program when PE is already running.
That would be perfect. It is hard to do the associate thing on the computers (and I have admin rights). Would also like to open more than one window at a time via this method. Could use the window tabs?

Thanks
Tiny
 

Technical

Technical Support
Staff member
Thanks for all the ideas - they are all being noted.

It is hard to do the associate thing on the computers (and I have admin rights).
Quite simple - in Windows Explorer simply right click over the file - select Open With>Choose Program and then select 'always use this program' when you browse to the Programming Editor.
 

tinyb

Member
But on the school network that has been locked down, and we also teach VB, i have to do it to all possible macines that i teach picaxe on and then take the roth of the it teacher because the file association for VB now doesn't work fully.
Students also don't have permission to use right click (silly i know but it did solve one of our hacking problems)

thanks
tiny
 

Buzby

Senior Member
A 'count point'. It's like a break point, but just keeps a count of how many times it gets executed.

And moving on from that, an instruction counter, maybe counting instructions executed between a 'Start point' and a 'Stop point'.
 
Last edited:

Buzby

Senior Member
The current simulator stops if it encounters a Run command. ( i.e. a call to a prog in a different slot. )

Better would be a dialog box asking to what to do, such as skip, abort, or goto label.

( Even better would be full simulation of slot stuff. )
 

100317

New Member
Also very helpful would be, to use a Label in the TABLE command, alternatively to Location. It is always painful if you create a Table and then insert text in the middle of it.
You have always to recalculate the the rest of the Table entries.

For example:
Table 0,("Puffersensor 1",255)
Table 15,("Puffersensor 2",255)
Table 30,("Boilersensor",255)
Table 118,("Fussbodenpumpe",255) Line to insert
Table 43,("Aussensensor",255)
Table 56,("Innensensor",255)
Table 68,("O.K.",255)

for b0 = 30 to 50
readtable b0,b1
sertxd (b1)
if b1 = $FF then exit_next
next
exit_next:
sertxd (cr,lf)

The compiler can calculate the position of the text elements faster as I'm.

Table ps1,("Puffersensor 1",255)
Table ps2,("Puffersensor 2",255)
Table bs,("Boilersensor",255)
Table Fs,("Fussbodenpumpe",255) Line to insert
Table as,("Aussensensor",255)
Table is,("Innensensor",255)
Table ok,("O.K.",255)

for b0 = bs to 50
readtable b0,b1
if b1 = $FF then exit_next
sertxd (b1)
next
exit_next:
sertxd (cr,lf)

Also very helpful would be to use Labels.
e.g.
for b0 = bs to Fs
would save one Byte for me in the table for each entry.
or:
for b0 = bs + 7 to Fs

All calculations can be made by the compiler.
Thank's

Kind regards,
Hans
 

Hendriks

Member
In a project I need to stop a pump when a fixed number of pulses from a flow sensor has been reached.
So I count the pulses in a subroutine during 1 second until NumberOfPulses > Value.

Code:
CountPulses:
	count FlowSensor,100,NumberOfPulses
	PulseCounter = PulseCounter + NumberOfPulses
return
Problem is that during the rest of the program pulses are being lost.

It would be great if the COUNT command had an parameter that makes the command count until that number of pulses has been reached.
 
Top