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 / 409
408  |  410
Subject: 
Continuation of the quest to understand the SPI port
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sun, 12 May 1996 03:59:21 GMT
Original-From: 
Paul E. Rybski <rybski@!spamless!cs.umn.edu>
Viewed: 
1303 times
  
Hi,
Under Interactive C, something is resetting bits 6 and 4 of the
SPCR register (0x1028).  Whenever we try poke(0x1028,0x5C); and then do a
peek(0x1028), we always get back 0x0C!!!  Trying to figure out whether
this was an instantaneous thing or not, I wrote the following program:

void main()
{
    int i=0;
    poke(0x1028,0x5C);
    while (peek(0x1028)==0x5C)
        {
            i++;
            msleep(1L);
    }
    printf("%d\n",i);
}

From powerup, I got returns anywhere from 5ms to 472ms.  This seems to
suggest that something else in Interactive-C is resetting these
particular pins.

The next thing that John and I tried was to see whether the pcode.asm
file or any of the other files in the libs directory could be setting
this particular set of bits.  Unfortunately, we could find _nothing_.
The only thing we could see was a couple of places where the bits $20 are
set in 0x1028, but that doesn't affect what we're doing since the
instruction was a BSET.

We even went so far as disassembling the .s19 files and searching for
instances of things setting 1028.  As far as we could tell, the only
thing we could find was the BSET SPCR,X $20 command.

The next obvious conclusion that I can come up with is that something
else is setting 0x1027 or 0x1029 (I'm not sure which direction it's
going) as is using a poke word command instead of a poke command or
_something_ like that.  This, I would assume, would count as a serious
bug since I don't see anything in how the Handyboard operates which would
need to have the SPE (SPI enable) and MTSR (Master mode select) bits
pulled low.

This is something that has jumped to the highest priority with us right
now since we really want to use a Miniboard in concert with a Handyboard
so that we can run our robot cars off of their internal 6V battery packs
(powering the Miniboard which drives them) as well as making use of all
of the input and output ports to run all 5 or 6 sonars that we've got
mounted on the little beast.  In order to communicate between the two
boards, we'd like to use the SPI bus since John (the other 6811 user in
the lab) has written a lot of SPI bus communication routines that we can
use and since we need to use the serial port for other things (such as
downloading information between robots).

Before you jump on me and say "Use the IR system for that!", let me just
say that I'm seriously considering it right now but that we'd prefer to
use the serial port due to mechanical constraints.

Anyway, I'm off to continue searching.  Ugh... I'll post anything I find
to the group.

-Paul

ObWhine -- Randy, you don't happen to know of _anything_ that might be
causing this inside the internal guts of IC?  Maybe there's somebody at
Newton labs that I might be able to contact?

=== Paul E. Rybski ## 1st Yr. Csci Grad Student, Univ of MN, AI & Robotics ===
=== B.A. in Math/Computer Sci, Magna Cum Laude for Project, Lawrence Univ. ===
------------------------------------------------------------------------------
http://www.cs.umn.edu/~rybski/home.html //\\ "One-trillionth of a surprise = 1
PGP:Finger rybski@cs.umn.edu ======================== picaboo(and a kiloboo is
Email:rybski@cs.umn.edu    //2015 Central Ave NE #336\\ enough to scare you to
Phone:(612)-788-4880      //   Minneapolis,MN 55418   \\ death.)" - Anonymous
------------------------------------------------------------------------------



1 Message 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