ATMEGA163

Top  Previous  Next

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

 

atmega163

 

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 PortB as 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.