If I have a few inputs from let's say PortA, and I want to concatenate those bits into an 8-bit variable(string or integer) of some sort, how can I do that??? I'm programming in C, but if you know how to do it in asm, that would be fine too... thanks
If I have a few inputs from let's say PortA, and I want to concatenate those bits into an 8-bit variable(string or integer) of some sort, how can I do that??? I'm programming in C, but if you know how to do it in asm, that would be fine too... thanks
If I have a few inputs from let's say PortA, and I want to concatenate those bits into an 8-bit variable(string or integer) of some sort, how can I do that??? I'm programming in C, but if you know how to do it in asm, that would be fine too... thanks
If I have a few inputs from let's say PortA, and I want to concatenate those bits into an 8-bit variable(string or integer) of some sort, how can I do that??? I'm programming in C, but if you know how to do it in asm, that would be fine too... thanks
PICC (are you talking HiTech or CCS?) will allow you to look at a port as either individual bits or all 8 as a byte. You can make a string of bytes (chars), but I have no idea what you're talking about in this context. In response to "can it be done?", doesn't sound like you're asking for anything outside the easiest, most basic ops, so yes it's possible. But what do you want to do?
sorry if you misunderstood me
basically, if i have the following inputs at porta:
ra1=0, ra2=1, ra3=0, ra4=1, i would like to combine them into "0110" and assign that to a variable or an 8 bit integer. Is that possible?