Hello,
I am new to the TI MCU world. currently, I am trying to learn to program a Ti MCU (cc2640), I have a cc2640R2 development kit. SO far, I have read through some examples but I could not find an option to write data to multiple Digital I/Os at the same time. All the functions that I have seen are either configuring or reading/writing data to a single pin. Is there a function to write data to multiple digital I/Os?
My particular requirement is, I have an array of 4-bit data. and I want to write the 4-bit data to 4 digital GPIO.
For Example:
byte controlPin[]={0b0000,0b0001,0b0010,0b0011,0b0100,0b0101,0b0110,0b0111,0b1000,0b1001,0b1010,0b1011,0b1100,0b1101,0b1110,0b1111}; for(pinSelect=0; pinSelect<=pinLimit; pinSelect++) { GPIO_write(Selected Port Pins); // write data to pin 0 to 3 sleep(time); }
Is there any function that can perform this "GPIO_write(Selected Port Pins)" operation? I want to write data at the same time to all the selected pins.
For example, if the pinSelect=3 then
controlPin[3] is the value then that means "0b0011" data is to be written to pin 0,1,2,&3 so that pin-1 outputs a value of 0 ........ and pin-3 outputs a value of 1).
If there is a function to perform this kind of operation then, I would appreciate it greatly if someone can direct me to it, otherwise to a tutorial that can perform this operation on the register level. If there is no tutorial of such kind then I would also appreciate it if someone can help me figure out a way to perform this operation.
Thank you for your time and consideration.
Best Regards