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

© MCS Electronics, 1995-2007

ATMEGA162

This page is intended to show the outline of the chip and to provide additional information that might not be clear from the datasheet.

The M162 has a clock-16 divider enabled by default. See the M162.bas sample file

page -160-

© MCS Electronics, 1995-2007

ATMEGA163

This page is intended to show the outline of the chip and to provide additional information that might not be clear from the datasheet.

The M163 by default uses the internal clock running at 1 MHz

When you have problems with timing set the right fuse bit A987= 0101. This will solve this problem.

I have just found a small difference in PortB when using the Mega163 in place of a 8535. The difference is in regard to PortB.4 - PortB.7 when not used as a SPI

interface. The four upper bits of PortB are shared with the hardware SPI unit.

If the SPI is configured in SLAVE mode (DEFAULT) the MOSI , SCK, /SS

Are configured as inputs, Regardless of the DDRB setting !

The /SS (slave select) pin also has restrictions on it when using it as a general input.- see data sheet ATmega163 - p57.

This sample allows you to use the upper nibble of PortBas outputs.

Portb = &B0000_0000

DDRB = &B1111_0000 'set upper bits for output.

Spcr = &B0001_0000 ' set SPI to Master and Disable.

If The SPCR register is not set for Master, you cannot set the pins for

Output.

page -161-

© MCS Electronics, 1995-2007

ATMEGA165

This page is intended to show the outline of the chip and to provide additional information that might not be clear from the datasheet.

ATMEGA169

This page is intended to show the outline of the chip and to provide additional information that might not be clear from the datasheet.

page -162-

© MCS Electronics, 1995-2007

ATMEGA323

This page is intended to show the outline of the chip and to provide additional information that might not be clear from the datasheet.

page -163-