Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
BASCOM AVR, help reference (2007).PDF
Скачиваний:
286
Добавлен:
12.08.2013
Размер:
17.02 Mб
Скачать

© 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-