Hi,
I am just looking at the settimer command for internal timers (in manual 2, p223) and it does not mention that the 20M2 has no such thing.
Yes it does. The top three "footprints" on the left-hand side are blank. Only the "X" footprints are labelled to show that the command is relevant to them.
I also though that a read that you always can upgrade from "M' to "X", without loosing functionality ( which seem not to be true for the ADC.!
The M2s are the most recently-designed chips, so they may have some features not included with some of the earlier chips. I'm afraid you have to read the data quite carefully to see what's available for each device. But some of the features may be available in the "silicon" (hardware) if you don't mind reading the "base" PIC data sheets and using PEEK/POKE SFR commands.
I looked at the "calibadc" function but have not figured out yet how to use it as a workaround for the FRVSETUP
Basically, CALIBADC allows you to calculate the voltage on the supply rail, which is the default "reference" voltage for the ADC (etc.). Then you can calculate the ADC "step size" from the supply voltage instead of the (nominal) FVR voltage, to calculate the actual measured analogue voltage. There are several examples in the "code snippets" section of the forum.
So if the M@ does not have any timers, how would I get a repeating task to work, let's say every 1.333 seconds...?
Isn't this a basic thing for a MCU?
For a simple program, you might just put a PAUSE 1330 inside a loop, together with the task instruction(s). For more complex programs you have the choice of the "time" variable, 20 ms pulses from a servo pin, almost any frequency from a PWM pin, interrupt inputs, SLEEP and NAP commands, or multitasking, etc..
Because PICaxe Basic is High Level language, precise timings are not generally defined, but, for more critical timing situations, there are some threads which give an indication of individual instruction execution times.
Cheers, Alan.