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 / 6930
6929  |  6931
Subject: 
port addresses
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Wed, 20 Oct 1999 10:08:03 GMT
Original-From: 
Russell Farnhill <r.farnhill@storSAYNOTOSPAM-wave.co.uk>
Viewed: 
574 times
  
Hi all,

I was wondering if anyone has some kind of table or list to show
the address of all the ports and what each bit is for on each port.
Iam asking this because I was looking through some modified sonar code
as below and wondered how people know what address to write to and
what value to send to that address to enable and set-up the hardware.

In the code below there are lots of pokes and bit_set's to various
addresses. Where do I find out more about these addresses and what values
to send to them.


Thanks Russ...



void sonar_init()
{
bit_set(0x1009, 0x30); /* ddrd */
bit_set(0x1021, 5); /* at tctl2,      */
bit_clear(0x1021, 0x0a); /* set tic3, tic2 for rising edge */
}

int sonar_sample()
{
int start_time;
int first, sec;

poke(0x1023, 1);    /* clear tic3 flag */
poke(0x1023, 2);    /* clear tic2 flag */

start_time= peekword(0x100e); /* capture start time */
bit_set(0x1008, 0x20);   /* trigger pulse */

while ((peek(0x1023) & 0x3) != 3)  /* wait until receive echo */
{
if ((peekword(0x100e) - start_time) < 0)
{
/* if too much time has elapsed, abort */
   bit_clear(0x1008, 0x20);
   return -1;
}
defer();     /* let others run while waiting */
}

bit_clear(0x1008, 0x20);  /* clear pulse trigger */

first = peekword(0x1014) - start_time; /* tic3 has time of echo */
sec = peekword(0x1012) - start_time;
printf("1:%d 2:%d\n", first, sec);
return 1;
}



Message has 2 Replies:
  Re: port addresses
 
(...) If you haven't already done so, pick up a copy of the motorola chip guides (not sure which version of chip is used in the Handyboard 'A9 version? or E2? Either way, these "Pink books" are absolutely essential to learning the addressing of the (...) (25 years ago, 20-Oct-99, to lugnet.robotics.handyboard)
  Re: Vector 2x
 
I know everyboard has been sucessfully connected vector 2x to hb. I try to do the same thing as per Tom Brusehaver guides. Connecting as below :- +5V (SPI) to VCC (vector2x) GND(SPI) to GND (vector2x) MISO(SPI) to SDI (vector2x) MOSI(SPI) to (...) (25 years ago, 20-Oct-99, to lugnet.robotics.handyboard)

3 Messages in This Thread:


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

Custom Search

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