View Full Version : DS2450 problem with nv82 basic code

08-09-2004, 01:20 AM
I am trying to measure wind direction on a Dallas 1-wire device with my BS2p24. I have used the nv82 article as a base for temperature, humidity, wind speed and wind direction measurements. All other devices measure correctly. The wind direction device (DS2450) does not work. I have confirmed the DS2450 direction device works with a PC based program called Weather Display and the AAG basic program. I have confirmed the correct 64 bit address is being used.

I can’t get the DS2450 to report correctly.

The first attempt to communicate specifically with this device (other then device_id detection) is to program the device for 8 bit mode and 5.10v peak voltage detection.

I have used the following code fragment and do not receive the correct verification data from the DS2450. This is the exact same code used in the nv82 example.

и eeAddr = DS2450
и OWOUT OWpin, OW_FERst, [MatchROM_DS2450, STR romData\8, WriteMem, $08, $00]
и FOR idx = 1 TO 4иииииииииииииииииииииииииииии ' setup four channels
иии OWOUT OWpin, OW_NoRst, [$08]иииииииииииииии ' 8-bit values
иии OWINи OWpin, OW_NoRst, [crc16.LOWBYTE, crc16.HIGHBYTE, verify]
иииииии DEBUG 2, 0, 8+(idx*2), "crc16 ", HEX2 crc16.LOWBYTE, " ", HEX2 crc16.HIGHBYTE, " ", HEX2 verify
иии OWOUT OWpin, OW_NoRst, [$01]иииииииииииииии ' 5.12 volt scale
иии OWINи OWpin, OW_NoRst, [crc16.LOWBYTE, crc16.HIGHBYTE, verify]
иииииии DEBUG 2, 6, 9+(idx*2), HEX2 crc16.LOWBYTE, " ", HEX2 crc16.HIGHBYTE, " ", HEX2 verify

The following screen display shows the values that are printed by the debug statement
crc16 6E 37 08
иииии FE 39 01
crc16 7E 3E 08
иииии FF F0 03иии ▀ should be 01
crc16 FB E7 10иии ▀ should be 08
и ииииFF D1 04иии ▀ should be 01
crc16 FF BB 1Aиии ▀ should be 08
иииии DF 77 0Eиии ▀ should be 01

The first line correctly shows the verify bytes 08 and 01 on each line. The next line pairs do not show the correct verify bytes. (They should also be 08 and 01.)

Can anyone suggest why these verify bytes are not correct? They should be echoes of the 08 and 01 written inside the loop.

I have read the DS2450 spec cover to cover. As near as I can tell this programming sequence is correct.

Any suggestions are grateful.

ииииии Bob, Ottawa
W75 54 17ии N45 18 30
ииииииииии G16 #27