To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7612
7611  |  7613
Subject: 
Re: Non-polaroid Sonar
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 16 Mar 2000 19:06:53 GMT
Viewed: 
1648 times
  
Hi all,
I'm now building the ultrasonic sensor from kam leang's page, did anyone
interface it with handyboard?? Can anyone give me some advice on driving it?

thanks
Frankie Lai 97139371d@polyu.edu.hk


In lugnet.robotics.handyboard, Will Bain <willb@selway.umt.edu> writes:
Adam Oliver wrote:
Just so I'm clear, ref pink book page 10-17.
Does the "bit_set( 0x1021, 1 );" refer to bit 0 -EDG3B, and
bit_clear( 0x1021, 2 ); " refer to bit 1 -EDG3A.
This is what was throwing me, I always thought bits started at zero and
ended at 7, not 1 to 8 as appears to be the case here. Is this what the
"zero-indexed " means?

sorry if it's a basic question, but if you don't ask you never learn :-)

No, that's a very good question. It had me confused, too. The second argument
to bit_set and bit_clear is not actually the index of a bit at all; it's a bit
mask.

For example, when you do bit_set( 0x1021, 3 ), the 3 becomes 0000 0011 in • binary, so it will set the last two bits of the address. Hope this helps!

-- Will



Message has 1 Reply:
  Re: Non-polaroid Sonar
 
Hi Everyone! If anyone gets the interface to work, I'd love to post it on my site along with the appropriate references and credits. It would be neat if the sensor works with the HB! Good luck! (...) ______ ______ ---...--- |_ _| |_ _| Kam Leang | (...) (25 years ago, 16-Mar-00, to lugnet.robotics.handyboard)

Message is in Reply To:
  Re: Non-polaroid Sonar
 
(...) No, that's a very good question. It had me confused, too. The second argument to bit_set and bit_clear is not actually the index of a bit at all; it's a bit mask. For example, when you do bit_set( 0x1021, 3 ), the 3 becomes 0000 0011 in (...) (25 years ago, 16-Mar-00, to lugnet.robotics.handyboard)

7 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR