Dallas temperature sensor DS18S20 with the ATmega32-16PU

The pin numbers on the header on the arduino board are numbered by writing on the board.

These numbers do not correspond directly to the pin number of the actual microprocessor chip.

The correspondence of these numbers is available in a table somewhere , for your arduino model.

The chip numbers vary depending on the chip. The pin header numbers are the same, thats how you can use the same add-on shields on different arduino boards. A standard header interface.

When you write programs using the standard arduino c++, and you refer in your code to digital inputs and outputs to read or write from, the numbers you use are the pin numbers on the board headers, not the chip pin numbers.

Avoid using pins which are used for other things. For example, don't use pin 0 or 1, if those are the pins used for Serial RX/TX