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 / 1835
1834  |  1836
Subject: 
Re: Digital Outputs
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 1 Apr 1997 05:37:11 GMT
Original-From: 
Adam <ADAM@saynotospamRING.ZENOX.COM>
Viewed: 
3953 times
  
Gordon,

The steps on how to turn the SPI into 4 digital outputs are in the
HB FAQ - off the top of my head I think it goes something like this....

poke (0x1009, 0x3c); /* set the 4 DDR bits for SPI (reg D) */
bit_set(0x1008, 0b00000100); /* set MISO output (high) */
bit_set(0x1008, 0b00001000); /* set MOSI output (high) */
bit_set(0x1008, 0b00010000); /* set SCK output (high) */
bit_set(0x1008, 0b00100000); /* set SS output (high) */

/* bit_clear will toggle the above outputs low */



On Mon, 31 Mar 1997, Gordon Smith wrote:

> > 
> > I'm interested in finding more on how I might digitally controll
> > more devices from the HB.
> > 
> > > From my current knowledge I was thinking it is possible
> > (with some asm code) to drive TTL signals to the unused
> 
> > ----------------------------------------------------------
> > Adam B. Cox      check out my web page
> > Computer Engineer http://www.zenox.com/~adam
> > Zenox Communications Corp. vmail: 416-241-7000 (x224)
> > ----------------------------------------------------------
> 
> Adam,
>    Have you thought about using a some of the Motor Chip driver digital
> output lines(if you don't need two motor driver chips)? If you pull one of
> the L293 chips you can free up 4 digital output lines very easily. It would,
> of course, entail some re-writing of code to remove the motor driver
> software for the pulled chip but that shouldn't be a problem for a computer
> engineer. By the way, could you tell me how you got ouputs with the SPI
> header? I'm interested to know because I need two digital outputs myself for
> a project.
> 
> Gordon F. Smith II
> SDSU Mechanical Engineering Student
> T-53 Days untill graduation!
> 
> 



Message is in Reply To:
  Re: Digital Outputs
 
(...) Adam, Have you thought about using a some of the Motor Chip driver digital output lines(if you don't need two motor driver chips)? If you pull one of the L293 chips you can free up 4 digital output lines very easily. It would, of course, (...) (30 years ago, 31-Mar-97, to lugnet.robotics.handyboard)

2 Messages in This Thread:

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

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