Subject:
|
Re: Basic Stamp to Handy Board Interfacing
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Wed, 14 Mar 2001 04:58:24 GMT
|
Viewed:
|
1537 times
|
| |
| |
In lugnet.robotics.handyboard, Guillermo M. Rivera-Martinez writes:
> Hello,
>
> Has anyone ever interfaced the Stamp to the Handy Board. I am thinking
> about using the SPI port on the HB to do this. I truly appreciate any
> assistance.
>
>
> Guillermo
This is an update to my previous message. Before I tried to interface the
Basic Stamp to the Handy Board I went through the mailing list and found
some information on the use of the SPI to interface the HB to other micro
controllers. I read the HC11 reference manual and found information on the
SPI. At this point I am trying to interface two HBs by using the SPI. My
IC code to do this is as follows:
MASTER
void main()
{
int a=0;
poke(0x102A,0b01010101);
poke(0x1009,0x38);
poke(0x1028,0x5C);
a=peek(ox102A);
printf("TX =%b\n",a);
}
SLAVE
void main()
{
int a=0;
poke(0x1009,0x24);
poke(0x1028,0x4C);
a=peek(ox102A);
printf("RX =%b\n",a);
}
This code sent information from the MASTER HB to the SLAVE HB. When I tried
to send information from the SLAVE HB to the MASTER HB I could not get the
SPIF flag to reset. The SLAVE HB is not permitted to write to the SPDR due
to this flag. Could anyone please tell me if I am on the right track. I
know that I need to clear the SPIF in order to have the SLAVE HB communicate
to the MASTER HB but it seems to me that this is not possible to do in IC.
I think that I am going to have to write this in assembly (e.g. SPSR EQU
$1029, LDAA SPSR...). I could really use some help with this. I will post
all of my final results on this list:).
Thanks,
Guillermo
|
|
Message is in Reply To:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|