From mwallace@sps1.phys.vt.edu Mon Aug 3 12:05:51 1998 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) id AA15988; Mon, 3 Aug 1998 12:05:51 -0400 Received: from sps1.phys.vt.edu (sps1.phys.vt.edu [128.173.176.53]) by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id LAA12381 for ; Mon, 3 Aug 1998 11:16:53 -0400 (EDT) Received: from localhost (mwallace@localhost) by sps1.phys.vt.edu (8.8.7/8.8.7) with SMTP id LAA20283; Mon, 3 Aug 1998 11:16:50 -0400 Date: Mon, 3 Aug 1998 11:16:50 -0400 (EDT) From: Mark Wallace To: alf.kuchenbuch@usa.net Cc: handyboard@media.mit.edu Subject: Re: Polaroid trouble again In-Reply-To: <35C5C521.446B@eikon.e-technik.tu-muenchen.de> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I had this same problem when I got mine a few weeks ago. I ended up putting a capacitor from pin 1 to pin 3 on U2 of the sonar driver board. I also had to take out the 1k resistor from the BINH. It kept BINH at 1 V instead of Zero and that seamed to cause problems. As for the 6 ft problem, it should be closer to 9 ft. I think the problem there is the IC code you used. If you used the code for SONAR.C from the HB web site then there is a problem with it. What that program does is take the difference in time from the internal clock. the problem is that in the code it says that if the difference between start time and currnet time is negative too much time has elapsed. Well, this has a 16 bit counter so when the difference is greater the about 32,700 it becomes negative. If you do the math, that means at about 9 ft that happens so it tell you you are out of range. The way I fixed this was to slow the clock down. I looked up information on the motorola web page and found where the prescalers were for the clock. If you want to slow it down by a factor of four you can just add this line to you program in sonar_init() bit_set(0x1024, 1); I believe bit_set(0x1024, 2); will slow it down by a factor of 8 and bit_set(0x1024, 3); will slow it down by a factor of 16. There are better ways of fixing this problem but they appear much more complicated. For example the motorola chip has an overflow flag that says when the internal clock flips. You could incorporate that into your code instead of slowing the clock down. Good luck and I hope this helps. Mark Wallace e-mail mawalla3@vt.edu mwallace@sps1.phys.vt.edu Web page http://sps1.phys.vt.edu/~mwallace/index.html "What a waste it would be after 4 billion tortuous years of evolution if the dominant organism contrived its own self-destruction" Carl Sagan On Mon, 3 Aug 1998, Alf Kuchenbuch wrote: > Hi! > I am having trouble with my Polaroid sonar: > When I keep my HB hooked up > to external power, I will only get correct readings up to 20 inches. As > soon as I use battery power without hooking it up to external power, the > readings are correct up to 6 feet, not more! This sound like EMI, I > guess. I tried all the capacitor tricks from HB mailing list, but in > vain. Do you know a fix that works? > > Alf H. Kuchenbuch > From mawalla3@vt.edu Wed Aug 12 13:10:06 1998 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) id AA07529; Wed, 12 Aug 1998 13:10:06 -0400 Received: from quackerjack.cc.vt.edu (root@quackerjack.cc.vt.edu [198.82.160.250]) by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id MAA05729 for ; Wed, 12 Aug 1998 12:13:53 -0400 (EDT) Received: from sable.cc.vt.edu (sable.cc.vt.edu [128.173.16.30]) by quackerjack.cc.vt.edu (8.8.8/8.8.8) with ESMTP id MAA20678 for ; Wed, 12 Aug 1998 12:20:09 -0400 (EDT) Received: from research10.phys.vt.edu (dhcp9.phys.vt.edu [128.173.176.166]) by sable.cc.vt.edu (8.8.8/8.8.8) with SMTP id MAA05159 for ; Wed, 12 Aug 1998 12:13:51 -0400 (EDT) Message-Id: <3.0.5.32.19980812121345.00796960@mail.vt.edu> X-Sender: mawalla3@mail.vt.edu (Unverified) X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Wed, 12 Aug 1998 12:13:45 -0400 To: Handyboard@media.mit.edu From: Mark Wallace Subject: serial library for C++ Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Hello, I have a handy board with poloroid transducers and I am trying use the results of my distance measurments in a C++ program on the computer. I have found programs on the handyboard web page that should alow the handyboard to transmit information over the serial line. What I am looking for is if anyone knows were I could find a serial for Microsofts Visual C++ 5.0. I would like to find one that is free or sharware but any information on any serial that will work would be appreciated. Thanks. Mark Wallace e-mail mawalla3@vt.edu mwallace@sps1.phys.vt.edu web page http://sps1.phys.vt.ede/~mwallace "What a waist it would be after 4 billion tortuous years of evolution if the dominant organism contrived its own self-distruction" Carl Sagan From aarone@sirius.com Wed Aug 12 13:42:19 1998 Received: from aleve.media.mit.edu by hub.media.mit.edu; (5.65v3.2/1.1/06Jun95-8.2MPM) id AA13439; Wed, 12 Aug 1998 13:42:19 -0400 Received: from mail3.sirius.com (mail3.sirius.com [205.134.253.133]) by aleve.media.mit.edu (8.8.7/ML970927) with ESMTP id MAA10630 for ; Wed, 12 Aug 1998 12:48:27 -0400 (EDT) Received: from aarone (ppp-asfm05--041.sirius.net [205.134.241.41]) by mail3.sirius.com (8.8.7/Sirius-8.8.7-97.08.12) with SMTP id JAA20821; Wed, 12 Aug 1998 09:48:24 -0700 (PDT) Message-Id: <004401bdc62a$e8ecc8c0$70f086cd@aarone.sirius.com> From: "Aaron Edsinger" To: "Mark Wallace" Cc: "handy" Subject: Re: serial library for C++ Date: Wed, 12 Aug 1998 12:53:41 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 Check out this site. It works well. The only problem I had was timing issues when trying to read and write to the port too quickly. http://www.codeguru.com/show.cgi?general=/misc/misc_toc.shtml -----Original Message----- From: Mark Wallace To: Handyboard@media.mit.edu Date: Wednesday, August 12, 1998 9:25 AM Subject: serial library for C++ >Hello, > I have a handy board with poloroid transducers and I am trying use the >results of my distance measurments in a C++ program on the computer. I >have found programs on the handyboard web page that should alow the >handyboard to transmit information over the serial line. What I am looking >for is if anyone knows were I could find a serial library for Microsofts >Visual C++ 5.0. I would like to find one that is free or sharware but any >information on any serial librarys that will work would be appreciated. >Thanks. >Mark Wallace > > e-mail mawalla3@vt.edu > mwallace@sps1.phys.vt.edu >web page http://sps1.phys.vt.ede/~mwallace > >"What a waist it would be after 4 billion tortuous years of evolution if >the dominant organism contrived its own self-distruction" > Carl Sagan >