Digital Poti MCP 4151

Hello,

can anyone help me please i'm trying to use a digital Poti MCP 4151 via SPI. I'm using the code and wiring described from Kner ( http://www.kner.at/home/40.avr/arduino/projekte.digitalpoti/index.html). With a 1K resistor between MOSI and MISO. When i run the program I get 524 for the Max value and 117 for min. Shouldn't it be 1024 and 0? Is there a mistake in the code or in my wiring?

Some time ago i've tried a 4131 and this worked verry well, but i would like a higher precision so i want the 4151 with 256 steps.

Thank you very much