ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 12.06.2025
Просмотров: 8192
Скачиваний: 1
© MCS Electronics, 1995-2007
The settings for the internal hardware UART are:
No parity , 8 data bits , 1 stop bit
Some AVR chips have the option to specify different data bits and different stop bits and parity.
Note that these settings must match the settings of the terminal emulator. In the simulator the output is always shown correct since the baud rate is not taken in consideration during simulation. With real hardware when you print data at 9600 baud, the terminal emulator will show weird characters when not set to the same baud rate, in this example, to 9600 baud.
Options Compiler I2C, SPI, 1WIRE
Options Compiler I2C, SPI, 1WIRE
Item |
Description |
SCL port |
Select the port pin that serves as the SCL-line for the I2C related |
statements. |
|
SDA port |
Select the port pin that serves as the SDA-line for the I2C related |
statements. |
|
1WIRE |
Select the port pin that serves as the 1WIRE-line for the 1Wire related |
statements. |
|
Clock |
Select the port pin that serves as the clock-line for the SPI related |
statements. |
page -67-
© MCS Electronics, 1995-2007 |
||
MOSI |
Select the port pin that serves as the MOSI-line for the SPI related |
|
statements. |
||
MISO |
Select the port pin that serves as the MISO-line for the SPI related |
|
statements. |
||
SS |
Select the port pin that serves as the SS-line for the SPI related |
|
statements. |
||
Use hardware SPI |
Select to use built-in hardware for SPI, otherwise software emulation of |
|
SPI will be used. The 2313 does not have internal HW SPI so it can only |
||
be used with software spi mode. |
||
When you do use harware SPI, the above settings are not used |
||
anymore since the SPI pins are dedicated pins and can not be choosen |
||
by the user. |
||
It is advised to use the various CONFIG commands in your source code. It make more clear in the source code which pins are used.
Options Compiler LCD
Options Compiler LCD
Item |
Description |
LCD type |
The LCD display used. |
Bus mode |
The LCD can be operated in BUS mode or in PIN mode. In PIN |
mode, the data lines of the LCD are connected to the processor |
|
port pins. In BUS mode the data lines of the LCD are connected |
|
to the data lines of the BUS. |
|
Select 4 when you have only connect DB4-DB7. When the data |
|
mode is 'pin' , you should select 4. |
|
page -68-
© MCS Electronics, 1995-2007 |
|||
Data mode |
Select the mode in which the LCD is operating. In PIN mode, |
||
individual processor pins can be used to drive the LCD. In BUS |
|||
mode, the external data bus is used to drive the LCD. |
|||
LCD address |
In BUS mode you must specify which address will select the |
||
enable line of the LCD display. For the STK200, this is C000 = |
|||
A14 + A15. |
|||
RS address |
In BUS mode you must specify which address will select the RS |
||
line of the LCD display. For the STK200, this is 8000 =A15 |
|||
Enable |
For PIN mode, you must select the processor pin that is |
||
connected to the enable line of the LCD display. |
|||
RS |
For PIN mode, you must select the processor pin that is |
||
connected to the RS line of the LCD display. |
|||
DB7-DB4 |
For PIN mode, you must select the processor pins that are |
||
connected to the upper four data lines of the LCD display. |
|||
Make upper 3 bits high in Some displays require that for setting custom characters, the |
|
LCD designer |
upper 3 bits must be 1. Should not be used by default. |
It is advised to use the CONFIG LCD command. This way the settings are stored in your source code and not in the separate CFG file.
Options Communication
With this option, you can modify the communication settings for the terminal emulator.
Item |
Description |
Comport |
The communication port of your PC that you use for the terminal emulator. |
Baud rate |
The baud rate to use. |
Parity |
Parity, default None. |
page -69-
© MCS Electronics, 1995-2007 |
||
Data bits |
Number of data bits, default 8. |
|
Stop bits |
Number of stop bits, default 1. |
|
Handshake |
The handshake used, default is none. |
|
Emulation |
Emulation used, default BBS ANSI. |
|
Font |
Font type and color used by the emulator. |
|
Back color |
Background color of the terminal emulator. |
|
Note that the baud rate of the terminal emulator and the baud rate setting of thecompiler options, must be the same in order to work correctly.
The reason why you can specify them both to be different is that you can use the terminal emulator for other purposes too.
Options Environment
OPTION |
DESCRIPTION |
Auto Indent |
When you press return, the cursor is set to the next line at the current |
column position. |
|
Don't change |
When set, the reformat won't change the case of the line after you have |
case |
edited it. |
Default is that the text is reformatted so every word begins with upper |
|
case. |
|
Reformat BAS |
Reformat files when loading them into the editor. |
files |
All lines are reformatted so that multiple spaces are removed. |
This is only necessary when you are loading files that where created |
|
with another editor. Normally you won't need to set this option. |
|
page -70-
© MCS Electronics, 1995-2007 |
||
Reformat code |
Reformat code when entered in the editor. |
|
The reformat option will change the modified line. |
||
For example a = a + 1 will be changed into : a = a + 1 . When you |
||
forget a string end marker ", one will be added, and endif will be |
||
changed into End IF. |
||
Smart TAB |
When set, a TAB will place the cursor to the column where text starts on |
|
the previous line. |
||
Syntax |
This options highlights BASCOM statements in the editor. |
|
highlighting |
||
Show margin |
Shows a margin on the right side of the editor. |
|
Comment |
The position of the comment. Comment is positioned to the right of your |
|
source code. Exception if comment is first character of a line. |
||
TAB-size |
Number of spaces that are generated for a TAB. |
|
Key mapping |
Choose default, Classic, Brief or Epsilon. |
|
No reformat |
File extensions separated by a space that will not be reformatted when |
|
extension |
loaded. For example when DAT is entered, opening a DAT file can be |
|
done without that it is reformatted. |
||
Size of new |
When a new editor window is created you can select how it will be made. |
|
editor window |
Normal or Maximized (full window) |
|
Line Numbers |
Show line numbers in the margin. |
|
OPTION |
DESCRIPTION |
Background color |
The background color of the editor window. |
Keyword color |
The color of the reserved words. Default Navy. |
The keywords can be displayed in bold too. |
page -71-
© MCS Electronics, 1995-2007 |
||
Comment color |
The color of comment. Default green. |
|
Comment can be shown in Italic too. |
||
ASM color |
Color to use for ASM statements. Default purple. |
|
HW registers color |
The color to use for the hardware registers/ports. Default maroon. |
|
String color |
The color to use for string constants : "test" |
|
Variable color |
The color to use for variables. |
|
Editor font |
Click on this label to select another font for the editor window. |
|
OPTION |
DESCRIPTION |
Tool tips |
Show tool tips. |
File location |
Click to select a directory where your program files are stored. By |
default Windows will use the My Documents path. |
|
Use HTML Help |
HTML help or CHM Help is the preferred help file. Since HLP is not |
supported under Vista, it is advised to switch to CHM/HTML Help. |
|
With the UpdateWiz you can still download the HLP file. |
|
Code hints |
Select this option to enable code hints. You can get code hints |
after you have type a statement that is recognised as a valid |
|
statement or function. |
|
Hint Time |
The delay time in mS before a code hint will be shown. |
Hint Color |
The background color of the hints. |
Allow multiple |
Select this option when you want to run multiple instances of |
Instances |
BASCOM. When not enabled, running a second copy will terminate |
the first one. |
|
Autosave on compile |
The code is always saved when you compile. When you select this |
option, the code is saved under the same name. When this option |
|
is not selected, you will be prompted for a new filename. |
page -72-