Go Down

Topic: Seperating Serial messages w/ Prefix's? (Read 547 times) previous topic - next topic


Im sending out a 3byte serial messages from max/msp, to 3 different 74HC595's. Thing is, i would rather send them out individually, 1 register at a time. And im trying to realize the idea from this clever guy:


"it is possible to use a numbering prefix (1 to 3) to control the register"

What i really cant figure out however, is how to make this work.
Any ideas?


Worth mentioning is perhaps how i want it to work:
By using a letter prefix in max/msp in front of the byte (like, A255, B255)
and somehow identifying the letters in the Arduino code, to be read at the places i want to.

if A do this
if B do this.. etc..


I guess this is too complicated if it even works, so that explains why noone cares to help out here. Understandable. :)


It's a matter of how you're explaining your problem, or how far you've gone on your own to figure it out.  How to ask questions the smart way.  Even just posing the right question would walk you through the problem and you might answer your own question before hitting the Post button.

"Hi, I want to control multiple 74HC595 packages from serial input.  Kind of like this scheme on this blog [link].  Over serial, the PC will send "A255" to indicate the first package (A) gets eight high bits (255 or 0xFF)."  Pick one:  "I can send bits and bytes to a 74HC595 okay, but I can't figure out how to parse the serial input."  or  "I can parse okay, but I have no idea how to turn an 'A' into a specific 74HC595 package."  or "I can parse and select packages okay, but I have no idea how to latch the bits to the selected package."


First of all, i think i explained things pretty well. People who know what im talking about seems to understand anyway. Second, as said, im quite the beginner, i dont have a scheme of this - package? - parse?..

I did my best, and im sorry if it wasnt good enough for you and/or others.

Meanwhile, some good souls who understood what i was referring to, even with my explanations, gave me some examples of how to do this. So im gonna spend a few months trying to understand the new code, as its way beyond the knowledge i have so far.



If you post up your commented code, and explain what it does and how that is different to what you want it to do, I'll bet you get a reply or three

Go Up