Page 23 of 229 Start Back Next End ZBasic Language Reference 13 ZBasic Microcontrollers Option PortPinEncoding Option PortPinEncoding [On | Off] Default: see text When the compiler encounters an I/O port pin designator like C.2 it can convert it to the corresponding physical pin number for the target device or it can convert it to a composite value whose fields specify the port and the bit number. This directive controls which of these conversions is performed. When the option is off, the result is a pin number and when it is on the result is the encoded port/pin value. The encoded result is a Byte value that has the binary form 1PPPPnnn where PPPP represents a port index (PortA=0, PortB=1, etc.) and nnn represents the bit number (0-7). The option is on by default for all generic target devices and for ZX devices based on the mega328P, mega128, mega1280, mega1281, xmega32A4 and xmega128A1 and off by default for other devices. Example Option PortPinEncoding On Option CodeLimit Option CodeLimit <limit-value> Default: none This option can be used to have the compiler check the size of the generated code and issue an error message if it exceeds a specified size. The limit value is specified by a decimal number, optionally using the suffix K or k to denote a multiple of 1024. Examples Option CodeLimit 32K Option CodeLimit 32768 Option SignOn Option SignOn {On | Off} Default: On This option can be used to control the generation of a sign-on message when the ZX begins running after a reset. The flag to control the sign-on is stored in Persistent Memory of the processor. This is important to remember because if you download one program to the ZX that, say, turns it off and then you download another program that has no Option SignOn directive at all, the sign-on will still be in the off state. In other words, if you want to ensure that it is in particular state for your particular program, be sure to include this directive. Of course, if you’ve never turned it off, it will still be in the On state. Example Option SignOn Off Option DefaultISR Option DefaultISR {On | Off} Default: see discussion For native mode devices, this option can be used to control whether a "catch all" ISR is automatically included in your application. By default, it is included for ZX devices and not included with generic target devices. Note that this option has no effect if you explicitly define a default ISR in your application source code. Example Option DefaultISR Off