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 / 1515
1514  |  1516
Subject: 
Re: Digit outputs....
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 20 Feb 1997 06:00:51 GMT
Original-From: 
Mike Degon <degon@cadetmail.uscga^NoSpam^.edu>
Viewed: 
4197 times
  
Rather than trying to figure out the hex for the bits, I use the IC binaray
number format, "0b".  I set the bits using a binary mask, for example, to
set the MOSI pin high, I use:

bit_set(0x1008, 0b00001000)

then to set the MOSI pin low, I use:

bit_clear(0x1008, 0b00001000)

The location of the 1's in the mask indicate the bits to be set or cleared.
There is a pretty good explanation of this in the HandyBoard Manual.
Hope it helps,
Mike Degon


> I've tried to program the digital outputs from the SPI
> header J6 on the HB with no success.  I pump the values
> into the HB as per instruction form the FAQ note and measure
> the 4 outputs.  No high/low, just some sort of oscillation.
> 
> What could be my mistake.... I do a poke(0x1009, 0x3c) to
> make them outputs (as per instruction) then, poke(0x1008, 0x??)
> Give examples of what you might stick here.
> It states in the FAQ notes that.....
> 
> bit     J6 pin
> ---     ------
> 5         SS
> 4        SCK
> 3       MOSI
> 2       MISO
> 
> Any help with this would be greatly appreciated.  Thank you.
> 
> ----------------------------------------------------------
> 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
    

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