Page 128 of 229 Start Back Next End ZBasic Language Reference 118 ZBasic Microcontrollers TimerSpeed1Divisor, TimerSpeed2Divisor TimerSpeed1Divisor <value> Default: 1 TimerSpeed2Divisor <value> Default: 8 These parameters give the initial values for ®egister.TimerSpeed1and Register.TimerSpeed2, respectively. These prescaler values are used to select the operating frequency of the I/O Timer for certain timer-base I/O routines as described in the ZBasic System Library manual. Examples --device-parameter=TimerSpeed2Divisor,64 Option DeviceParameter TimerSpeed2Divisor 64 HWUartSpeed HWUartSpeed <value>[,<value>]* Default: none This parameter is only useful with devices that support fractional baud rate generation (e.g. the ATxmega devices), allowing you to specify one or more baud rates that your application might use. Certain “baud rate friendly” operating frequencies (e.g. 14.7456MHz) are integral multiples of the common UART baud rate and thus allow standard baud rate generation with zero error. With other operating frequencies (e.g. 1.0MHz) only a few baud rates can be achieved that fall under the generally accepted 2% error margin unless the fractional baud rate generator is used. The set of baud rates specified by the (possibly multiple) instances of this parameter are used to generate a table of initialization values for your application thus avoiding the need to perform the computationally intensive procedure for determining the fractional baud rate setup values at run time. If you do not specify a set of baud rates using this parameter, a default list of standard baud rates ranging from 300 to 460800 is employed. Use of this device parameter is only needed if your target device is not running at a “baud rate friendly” frequency and you need to use a non-standard baud rate. Note that only one baud rate may be specified when using the Option DeviceParameter form; use multiple instances to specify the set of baud rates desired. Examples --device-parameter=HWUartSpeed,9600,19200 Option DeviceParameter HWUartSpeed 9600 Option DeviceParameter HWUartSpeed 19200 SWUartDivisor, SWUartMinSpeed, SWUartMaxSpeed, SWUartBaseSpeed SWUartDivisor <value> Default: 0 SWUartMinSpeed <value> Default: 0 SWUartMaxSpeed <value> Default: 0 SWUartBaseSpeed <value> Default: 0 These parameters are used to configure the software UART timer to provide the bit timing for the software UART channels (3-6). It is only necessary to specify values for these parameters if the software UART channels are used. The parameter SWUartDivisor specifies the prescaler divisor value for the software UART timer causing the timer to run at that fraction of the main operating frequency. This value must be chosen to allow accurate bit timing of the software UART over the range of speeds desired and, further, to permit suitable timer limit values over the range of baud rates intended to be used. The timer limit value is computed as (ClockFrequency / SWUartDivisor / (4 * base baud rate)). This value must fall in the range given in the table below for all possible base baud rates (as defined below).