multipul outputs
MR SPARKY
Posts: 23
I have written many programs and every one i had send a high or low signal to multipul pins. my question is simple, can I tell two different pins to go low or high in one line. For example: I want pins 1,5,9, and 13 to go low. The way i have been doing it is with 4 lines of code. is there any way to consolidate it. I have attached an example of the way I am doing it now. If someone could tell if this is consolidatable. If so where can I find the information on how to do it. I have been looking for a while and have no clue what im looking for or where to find it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!
You don't separate them, you use them in groups of 4, 8 or 16 pins as required. It's merely a matter of logically assigning consecutive physical pin ports when you do your wiring. Once you've done it, you'll never turn back.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Involvement and committment can be best understood by looking at a plate of ham and eggs. The chicken was involved, but the pig was committed. ANON
outl =%11011001 would make pins 1,2,and 5 low all others high
outh does the same, but addresses pins 8 through 15
if you wanted to address 4 consecutive pins you would use :
outa for pins 0 through 3
outb for pins 4,5,6,7
outc = 8,9,10,11
outd = 12,13,14,15
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!
In any event, we can't help you figure out what's wrong without a posted copy of your source program. If it's short, use the [noparse][[/noparse] code ] [noparse][[/noparse] /code ] brackets to include it in your message (without the extra spaces). If it's long, attach it to your message using the Attachment Manager.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!