More info in post 5 of this thread:Hi,
In Silicon Chip magazine it has a bit of a speil on the upcoming 18M2. It states that the 18M2 can now run 4 tasks in parallel. I was wondering what this means? Does it mean that it can run four programs at the same time?
Thanks
Tony
main:
high b.0
pause 500
low b.0
pause 500
goto main
start1:
high b.1
pause 5000
low b.1
pause 5000
goto start1
start2:
high b.2
pause 1000
low b.2
pause 1000
goto start2
Tony, I have some SPECS. on the 18M2, do in Jul 2010Hi,
In Silicon Chip magazine it has a bit of a speil on the upcoming 18M2. It states that the 18M2 can now run 4 tasks in parallel. I was wondering what this means? Does it mean that it can run four programs at the same time?
Thanks
Tony
Technical, I'm not sure what my chart is suppose to show since the info your18M2's have 2048 bytes of program memory, of which you can split however you want. Any task can be any length, within the total, so it is not 256x4. However your table shows data memory, which is separate and so just '256 + i2c' anyway on the 18M2.
Separate tasks are just typed at any point in the program with the predefined start0:, start1:, start2:, start3: labels. The first task is the default 'task 0', you could use a start0: label if you wanted but that is implied at the start of the program anyway.
The compiler automatically works out where the startX labels are so that all tasks start at the same time when the program commences.
e.g.
Code:main: high b.0 pause 500 low b.0 pause 500 goto main start1: high b.1 pause 5000 low b.1 pause 5000 goto start1 start2: high b.2 pause 1000 low b.2 pause 1000 goto start2
Thanks for the info from Technical. I have changed things back the way they were.2048 bytes of program memory
256 bytes of data memory (+i2c as an option)
Lines of memory is like asking how long a piece of string is. 2048 bytes is the same as the current 18X capacity - anywhere between 600 and 1800 lines of code depending on which commands are used, as all commands take different amounts of space. Use 'tune' or 'serout' on every line and you will also get less than 600!