From: Craig S. <csc...@ya...> - 2000-05-10 23:58:30
|
--- Bruce Winter <br...@mi...> wrote: > > 1. I am able to read the temp fine, but the error "scratchpadcrc was > > wrong at ../lib/site/Hardware/iButton/Device.pm line 553" is repeatedly > > displayed. I commented out the message in Device.pm and now everything > > works fine. The temp is always correct so is that crc check really > > valid for the DS1820? > > > > 2. The temp is correct when connected to my Celeron pc. On my old 486 > > it reads about 12,000 degrees! Seems to be reproducable though, so I > > guess I could compensate with a little math. Why such a difference > > between pcs? > > Got me. I don't get the scratchpadcrc messages for any of the 4 1820's I > have on my iButton test bus. > > I'll yet yet another iButton mystery. I just installed Windows 2000 on 2 > different boxes. I can read ibutton temps fine, but the 'list all the > ibuttons' or 'read all the temps' commands both fail when they call the scan > function to read the bus. Yet the same exact code works with the same > hardware under Linux and Windows 98 ... on 2 different boxes! > > So there must be something different that NT/2000 does with the COM ports > that causes the scan function to fail. > > Anyone else out there running NT or 2000 that has tried the iButton scan > function? > > Bruce I am running mh under Windows 2000 (since last May). I have 3 1820's hooked up (1 in the Dallas Semiconductor weather station, and 2 others). The 2 have a barrier diode across gnd/data (to suppress ringing on the bus, per PointSix where I bought them). I have been having mixed success with the whole setup ever since I hooked up the weather station last weekend. However, the 2 1820's had been working perfectly for about 3 weeks. (they still work perfect after the weather station hookup, but the weather station was flaky) I had cases where the 1820 would appear and disappear from the bus (confirmed with the iButton viewer application, so it is NOT an mh problem) When I start getting the scratchpad errors, I am NOT getting good data from the temp sensors. I noticed that usually when I started having problems, I would get framing errors as mh started up. The weird part is that the other iButton devices would work ok. Not sure how that can be since they are all on the same pair of wires. One Win2000 problem. The code I wrote to read the counter in the DS2423 did not work properly under Win2000. It appeared to be a combination of bad code and timing issues. It only worked after I put in the usleep delay. I traced the serial output from the iButton viewer and the weather software and made some changes in Device.pm: sub read_counter{ my($self) = @_; my $c = $self->{'connection'}; $c->reset; $self->select; $c->write("\xa5\xdf\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"); $c->read(4); usleep(10000); my $buf = $c->read(4); my $counter= unpack("V", $buf); $c->reset(); return $counter; } This works ok, except every once in a while it will stop returning the correct value. Seems to just echo back the xff xff 's instead of the counter value. If I stop mh, run the iButton viewer it is sending the exact same ascii sequence, but gets back the correct data. I then restart mh and all is ok. I did have several times where the scan would hang mh hard (had to stop the process to fix) I havn't seen that for a while. Maybe I had a connection problem that got fixed when I messed with the wires. It seemed to be working pretty well for the last 4-5 days, but then my house got nailed by lightning today while I was at work. It spared all the cheap boards (SB, network card, modem), but fried my RocketPort 8 serial card. Someone gave me this card, and it looks like a replacement costs about $400 (ouch!). Bruce, what are you using for extra serial ports (and does it work under Win2000?, cost?) I will have to re-wire my weeder connection back to db9 and do without I/R and iButton until I can find a replacement. How is everyone else handling lightning/surge suppression. I have most things plugged into either a UPS or a high quality surge suppressor. Not everything is protected, and there are a lot of wires that snake all over the house (and outside: weather station and driveway sensor). Seems like it is not really possible to be totally protected. -Craig __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ |