Maker Pro
Maker Pro

Sending a hex number to 8 pins

gregfox

Mar 25, 2013
164
Joined
Mar 25, 2013
Messages
164
Hi all,
I'm trying to send a hex code to 8 pins of a parallax propeller in c.
Send hex 38 to pins 27,26,25,24,23,22,21,20 which is 00111000 in binary, so that;
0 goes to pin27
0 goes to pin26
1 goes to pin25
1 goes to pin24
1 goes to pin23
0 goes to pin22
0 goes to pin21
0 goes to pin20
In stead of sending a binary to each pin I want to send a single hex code.
Thanks
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
You'll find those 8 pins are infact 8bits

You should be able to set the value and each bit will represent the byte..
 
Top