Hi all,
I'm running a 20X2 at 64MHz, but need to make a DS18B20 temperature measurement on a regular basis. From what I can see this needs to be done at the standard clock speed of 4MHz for the 20X2 and I should be able to do a Setfreq M64 command right after the Readtemp command.
It doesn't appear to work, if the code has the Readtemp command active - the clock speed stays at 4MHz. Have tried Setfreq m4 before the Readtemp as well, no luck.
Once the Readtemp command is commented out, everything is back to running flatout, I might need to go the thermistor route, the temperature value is not critical.
The code goes like this..
- Loop -
..
Readtemp b.7,b21
Setfreq m64
..
..
..
- Go to Loop -
Any clues?
Thanks,
Rob.
I'm running a 20X2 at 64MHz, but need to make a DS18B20 temperature measurement on a regular basis. From what I can see this needs to be done at the standard clock speed of 4MHz for the 20X2 and I should be able to do a Setfreq M64 command right after the Readtemp command.
It doesn't appear to work, if the code has the Readtemp command active - the clock speed stays at 4MHz. Have tried Setfreq m4 before the Readtemp as well, no luck.
Once the Readtemp command is commented out, everything is back to running flatout, I might need to go the thermistor route, the temperature value is not critical.
The code goes like this..
- Loop -
..
Readtemp b.7,b21
Setfreq m64
..
..
..
- Go to Loop -
Any clues?
Thanks,
Rob.