This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assigning bit to GPIO stm32

How I can assign 8 bits of a byte to different GPIO pins.

What I am trying to do is to convert HEX to binary and then want to assign each bit to 8 different GPIO output pins.

 but I am unable to do anything. As there is no Sbit or single-bit data type

Parents
  • Not sure which processor you're using, however in general (if I understand your question correctly), in a "port" register, if you pick 8 bits together (say 0-7) and write an 8-bit value to that port, you will control 8 different output pins. 

Reply
  • Not sure which processor you're using, however in general (if I understand your question correctly), in a "port" register, if you pick 8 bits together (say 0-7) and write an 8-bit value to that port, you will control 8 different output pins. 

Children
No data