AnsweredAssumed Answered

FRDM-K22F:  Working with arrays

Question asked by brian cavanagh on Apr 6, 2018
Latest reply on Apr 6, 2018 by Mark Butcher

Hi, I'm looking for an example of how to use arrays in my code. 


What I currently have is a CD4094 8-bit shift register connected to the FRDM-K22.

I'm using PTE0 as a clock, and PTE1 as my Data pin.

All the outputs of the shift register are tied to leds so I can confirm it works.

Below is a picture of the shift register if anyone's interested. 


This is more of a fun project for me.  I'm using KDS 3.2.0 and PE.




Below this statement is how it would be connected, IF, I was using an ATtiny 13.


Also included is the code for the ATtiny below that.  The syntax used to create the array I assume is different than in KDS.  My biggest problem is correctly writing the code PRIOR to "int main(void) {...", i.e. initializing the array,

followed by what to write within  "int main(void) {...}" in order to use the array.


I did try, however, I haven't been successful.