Connect with us

Sending a hex number to 8 pins

Discussion in 'Microcontrollers, Programming and IoT' started by gregfox, Dec 24, 2015.

  1. gregfox


    Mar 25, 2013
    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.
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
  3. cjdelphi


    Oct 26, 2011
    You'll find those 8 pins are infact 8bits

    You should be able to set the value and each bit will represent the byte..
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day