Thread: Shiftout
View Single Post
  #3   Spotlight this post!  
Unread 12-02-2003, 13:38
Skabana159's Avatar
Skabana159 Skabana159 is offline
Robotics and Field Hockey
AKA: Jesse C. Owens
#0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2000
Location: Ft. Collins, CO
Posts: 92
Skabana159 is on a distinguished road
Send a message via AIM to Skabana159
I guess my question is this:
Are you sure you need synchronus serial communication? I can only assume that if you truly do, then you are using an external circuit that has a need for a clock. If this is not the case, then you want serout. Otherwise, here is shiftout:

shiftout Dpin,Cpin,Mode[data{\bits},...]

This means that you will have three constants: Dpin, Cpin, and Mode. Dpin is going to be the data line, 16 if your going to use the program port. CPin is the pin where you will connect the clock on your device. I actually have no idea how to do this on an IFI system, only on a breadboard-stamp. Mode must be matched depending on the protocol of the device that you are using. Since it is a constant from 0-3, it won't be too painful to find out by trial-and-error. Then, you put your data. It will, by default, output 8 bits for every value, but you can change this with the optional operand {\bits}. This, once again, depends on the protocol of your device.
Good luck with this, becuase I would not want to try and figure all this out in the last week!
__________________
"What most people do not understand is that the Buddha, the Godhead, resides just as comfortably in gears and circuits as in hills and trees. To believe otherwise is to dilute the Godhead."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance