Page 26 of 229 Start Back Next End ZBasic Language Reference 16 ZBasic Microcontrollers Option MainTaskStackSize Option MainTaskStackSize <constant-expression> Default: n/a This directive provides a different way of allocating RAM between the string heap and the task stacks. The value provided is interpreted as the desired size of the task stack for the Main() task and the heap limit is set at the end of the task stack. See the section on setting heap and task stack sizes for more information. Option TxQueueSize Option RxQueueSize Option TxQueueSize <constant-expression> Default: 25 Option RxQueueSize <constant-expression> Default: 50 These directives can be used to modify the sizes of the default transmission and reception queues for the console channel (typically Com1). They are effective only for native mode devices such as the ZX-24n and generic target devices. The value of zero for one or the other is useful for setting up the console for transmit-only or receive-only operation. Example Option TxQueueSize 100 Option ConsoleSpeed Option ConsoleSpeed [ <constant-expression> | Default ] Default: see text This directive can be used to set the default speed of the serial channel assigned to the console (typically Com1 but see Option Console). It is not supported on VM devices with a VM version older than v3.0.4 nor is it supported on any ZX device based on the mega32. The set of allowable baud rates is given in the table below; the shaded entries are supported only on native mode devices. 300 600 1200 2400 4800 9600 14400 19200 28800 38400 57600 76800 115200 230400 It is important to note that for VM devices, the speed selection is made part of the download image and is written to Persistent Memory when the code is downloaded. If, later, a program is downloaded that does not contain Option ConsoleSpeed directive, the Persistent Memory location containing the console speed indicator will be unchanged from the earlier setting. The default console speed is 19200 for all ZX devices and it is zero for all generic target devices. For native mode devices, the console speed can be set to zero thereby requesting that the console serial channel not be open initially. In this case, if you want to use the console serial channel you must specifically open it. For ZX devices, setting the console speed to zero when Com1 is the console has the further effect of allowing Com1 to fully closed when CloseCom() is called. This is in contrast to the normal ZX behavior of always keeping Com1 open. The primary advantage to specifying the speed as zero is that it results in a smaller executable size provided that your application does not explicitly open the console serial channel. Example Option ConsoleSpeed 9600