In the past I built a device that read the temperature from two DS1620 (SPI) using an 18F4620 at 8MHz and it has been working good for years. Recently I had some boards made for this design, however I used an 18F46k22 running at 16MHz instead. I am using shiftin/shiftout commands to read the temp. The speed difference in micros seems to be affecting the temp reading. I tried adding DEFINE SHIFT_PAUSEUS 100 to the code. I also added a small pause between the reading of Temp1 and Temp2. I played around with different SHIFT_PAUSEUS (1000, 2000, & 3000). Nothing seems to help. I am not sure if the timing is the problem, however I am just guessing at the values I am trying. Does anyone know what setting I should be using on the 18F46k22 running at 16MHz to make it as close to a 18F4620 running at 8MHz? Or any other suggestions?
Thanks,
Jim