Subject:
|
Re: SPI port config???
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 27 Mar 1997 12:06:39 GMT
|
Original-From:
|
Pandit Panburana <pdp@ix.netcom^StopSpammers^.com>
|
Viewed:
|
2304 times
|
| |
 | |
Hi Adam,
I am not certain by poking the register 0x1009
(or DDRD reg) alone could provide the clean work.
The function of this register is also depending on SPE
bit in the register 0x1028 (or SPCR) according to
the manual.
I believe you could probably try to simply read the
value of the register and save it some place before
you poke it with the 0x3c value first. When
it needs to go back to the previous state, poke it
the the saved value. It would be nice along this
trial that read the value of SPE first to see what it is.
To be sure, I would suggest to follow the manual by
disable the SPI function first (clear SPE bit in
SPCR). Save the value of DDRD. Then finally poke
the DDRD reg to convert these pins into digital
output.
Regards,
-Pandit
----------
> From: Adam <adam@ring.zenox.com>
> To: handy board <handyboard@media.mit.edu>
> Subject: SPI port config???
> Date: Thursday, March 27, 1997 1:34 AM
>
>
> Anyone....
>
> This query pertains to the reconfig of the SPI on the HB
> done with a poke(0x1009, 0x3c) which turns the MISO, MOSI,
> SCK and SS into digital outputs. My question is:
>
> "What is the reverse poke if I wanted to turn the SPI back
> from digital to its original state?" (Please explain?)
>
> Thanks.
>
> ----------------------------------------------------------
> Adam B. Cox check out my web page
> Computer Engineer http://www.zenox.com/~adam
> Zenox Communications Corp. vmail: 416-241-7000 (x224)
> ----------------------------------------------------------
>
|
|
1 Message in This Thread: 
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|