Using Mem slots for LCD / Zigbee comms

rjconway

New Member
I am new to the X2 however just wanted to make sure I understand some concepts prior to the project. This will be my mk II Aquarium controller.

As I want the PICAXE to communicate bi-directionally to my PC I had been worried about the serin command just locking up the PICAXE waiting for a message from the PC that may never arrive. I also want the PICAXE to connect to a LCD, provide timing functions for some outputs and have some user buttons

Now with program slots, I assume I can now partition the comms into another slot from the main program. I want the PC to send on/off commands to the PICaxe and the PICaxe to send A/D values and I/O status back to the PC via ZIGBEE.

So I could setup the PICaxe to just wait for a serin string and then send back data. Even if the serin never arrived it, it would not effect the operation of the programs running in other slots ?

Can a program in slot 1 stop/reset a program in another slot. ?

rob
Australia
 

Brietech

Senior Member
The slots are not running simultaneously - they are just partitions for storing more code (you can jump from one to another). The X1 and X2 chips, however, have serial 'timeout' features, though, which let you wait for some predetermined time for a serial input, and then continue with the program. You can also have serial comms take place entirely 'in the background' because there is a built-in hardware UART that can just notify you with an interrupt.

Your program will probably fit quite easily into just a single slot (which is 4KB of space), so I wouldn't worry about it.
 
Top