Can you run parallel task on 20X2 Chip or is it inly available on 'M2' versions

hamtech

Member
I am doing a project to rotate my HF antenna using a picaxe, 4 x 3 key pad and a LCD display. To do this effectively I need to run two tasks, one for the display bargraph and bearing readout and the other to monitor the keypad and service an interupt from my 8574 chip.

This all works using a 14m2 chip on my breadboard. However as parallel tasking operates at half processor basic speed I wanted it to go quicker. I therefore substituted a 20X2 chip, adjusted the wiring for the different pins on my breadboard and in my program, but it won't work. I then thought about it and realised that the 20M2 chip is the same pinout so I swapped the 20X2 for a 20M2 (same code) and bingo it works again.

I have made all necessary changes to the code ( changed the picaxe directive) but it won't work with the 20X2. What I do get is the display part of the program running on the 20X2 but not the keypad element, suggetsing that the chip itself is OK.

So my question is this. Can I run a 20X2 chip in parallel task mode or not????

I would be grateful to know, reading the information in the part one of the manual, it only mentions 'M2' variants and not once an 'X2'.

Thanks in anticipation Hamtech.
 

nick12ab

Senior Member
Parallel tasking is only available on the PICAXE-M2 series.

Since it only really works in 'parallel' for commands such as pause and is useless for blocking commands, it isn't considered necessary on X2 parts.
 

hamtech

Member
Nick thanks for the info,

I wish I had realised that earlier but I sort of came to that conclusion anyway.

Regards

Hamtech
 

inglewoodpete

Senior Member
The 20X2 has superior timer, hardware and communications interrupts, making it possible to run multiple 'tasks'.

In my opinion, the 20X2 is far superior to the 20M2. Given a choice, I would use the 20X2 every time.

Having said that, in answering hamtech's original question, the 20X2 does not run separate pedantic tasks as such. With careful, non-blocking coding the 20X2 will easily match the 20M2.
 

westaust55

Moderator
Additionally, an M2 part has a default clock speed of 4 MHz.
When multitasking is invoked, the clock speed is automatically raised to 16 MHz (and the SETFREQ command does not function)
With the "time slice" arrangement for multitasking east task then appears to run about at 4 MHz so roughly the default speed.
 

premelec

Senior Member
@ipete - I rather like the PWMOUT and 14M2 & 20M2 have 4 of these X2 only one... whatever suits your application...
 
Top