Subject:
|
SPI Bus problem solved!!!!!!
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 16 May 1996 04:52:34 GMT
|
Original-From:
|
Paul E. Rybski <rybski@^spamcake^cs.umn.edu>
|
Viewed:
|
1388 times
|
| |
| |
Hi-dee ho,
I'm happy to report that I've successfully gotten a Handyboard to
communicate to a Miniboard via the Synchronous Serial bus (SPI). The
secret was (as I alluded to in my last post on the subject) setting the
DDRD (Data direction for port D) register properly.
Remember how I said that when I typed poke(0x1028,0x54) in
Interactive-C, the corresponding peek(0x1028) returned 0x04? Well, after I
set the DDRC register via poke(0x1009,0x38), the SPCR register kept its
value at 0x54 and we were able to transfer bytes of information between the
two controllers. The strange thing that I cannot figure out is why the
SPCR register keeps resetting itself on the Handyboard. John tried setting
the register on his boards without setting the DDRC register first and
while the value didn't change, the SPI bus just didn't communicate.
Something in Interactive-C must do some sort of housekeeping with the CPU
or something. I don't know.
Incidentally, it was the Huang book that I mentioned in my last
post that told me all of the relevent information to solve this problem.
-Paul
=== 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
|
|
|
|