Program Editor Observations

RBruceM

New Member
I just finished coding and intial testing for a 40x1 project; about 300 lines of executeable for an engine controller and remote display/control unit with opto isolated current loop serial link between. I was happy to be able to use the picaxe once again because of the enhancements added to the 40x1. I once again, found the Picaxe easy, reliable, fun to use.

In general I must say that the basic manual and "getting started" updates for the X1 parts was very well done.

I have a few suggestions for improvement:

A few example code snippets for the background mode hserin would be a helpful. I found this on the forum thanks to a post by technical.

A full byte output to the C port such as pinsc=b0 will not work unless the dirsc command is used first. This shoud be added to the text for the pinsc command.

Not being able to use the symbol directive for port c, etc., is a frustration to more experienced programmers who want readable code.

The X1 could use a pause-like command that does not become terminated by the background polled interupt routine, but can be used the servo command (waiting for a servo to be moved before turning it off, for example). I see this has been addressed for the X2.

A discussion of how to use more features while avoiding conflicts using servo, count, timer, polled interupt, background hw serial, would be helpful to the more advanced application designer- this might belong in the "getting started" manual in an "advanced applications section".

Lastly, the program editor displays tabs properly but printouts don't match the display sometimes.

Again, bravo for the new X1 parts.

Bruce McCreary
Retired EE (computer science)
 
Last edited:

saunj

Senior Member
40X1 not spefifically supported by editor ver. 5.1.5

I just downloaded 5.1.5 so it must be the newest. It does not have an option for the 40X1, but it does support the "C" letter ports. However, although I put #picaxe 40X1 at the top of the code, it refuses to accept #setfreg m8, which I need to send 9600 baud for my Rogue Secure Digital flash memory writer.
Other gripes:
1. The readADC10 command is giving me random values, even though the inputs are buffered with op amps (I have succesfully used analog(UE?) inputs on 2 8M projects)
2. It won't allow me to set an interrupt on a C port, even though the pin is set to input with a let dirsc = command.
3. Pulsout was not accepted on a C port pin.
 

hippy

Technical Support
Staff member
I just downloaded 5.1.5 so it must be the newest.

That's correct, you have the latest version.


It does not have an option for the 40X1, but it does support the "C" letter ports.

You need to select 28X1. There is a note to explain that below the options presented.


However, although I put #picaxe 40X1 at the top of the code, it refuses to accept #setfreg m8, which I need to send 9600 baud for my Rogue Secure Digital flash memory writer.

What you need to use is "SETFREQ M8" without the # in front. The #SETFREQ configures the download options whereas SETFREQ sets the actual operating speed at runtime.


1. The readADC10 command is giving me random values, even though the inputs are buffered with op amps (I have succesfully used analog(UE?) inputs on 2 8M projects)

That sounds like a hardware fault or mis-wiring to me.


2. It won't allow me to set an interrupt on a C port, even though the pin is set to input with a let dirsc = command.

That's correct operation, a limitation of the PICAXE design. Interrupts can only be activated from the default Inputs.


3. Pulsout was not accepted on a C port pin.]

Again that's correct operation, a limitation of the PICAXE design. PULSOUT can only be used with the default output pins, not Port C.
 

BCJKiwi

Senior Member
What you need to use is "SETFREQ M8" without the # in front. The #SETFREQ configures the download options whereas SETFREQ sets the actual operating speed at runtime.
#SETFREQ should be just #FREQ

i.e.
directive is #Freq m8

runtime is setfreq m8
 

saunj

Senior Member
Thanks and Correction

Thank you, "BCJKiwi" and "hippy" for your prompt and helpful responses which I will use and solve my interrupt problem with rewiring my interrupt to a regular input pin.
I confess to finger problems on the analogue inputs. By setting my Vdd to exactly 5.12 V I can get a convenient calibration of 5mv per count.
BTW my project is to use an adapter I made some time ago for use with Ocean Controls (NZ) KIT 118 which is an 8-channel 12-bit ADC which connects to a PC parallel port. This worked fine for about a year but it tied up a laptop 24/7 and of course Windows crashed sometimes! Then I have used a Stamp II device for a year, but the ADC is only 8 bits. I store on SD chips using the Rogue board (Canada), which I can recommend.
 

rWAVE

Member
#Freq m8 on 08M Firmware 9.1

#SETFREQ should be just #FREQ

i.e.
directive is #Freq m8

runtime is setfreq m8
I have the latest editor 5.1.5 and "Freq m8" doesn't seem to work with my 08M (firmware 9.1). Is my firmware too old or does it not work with an 08M?

Richard
 

hippy

Technical Support
Staff member
"#Freq m8" works fine for me with 5.1.5 regardless of enhanced/original compiler etc.

Did you put the # in front ?
 
Top