Problem calling a function from another function

There are a number of typos in the code snippets in your last reply. It's OK, I hit he wrong key too sometimes. But in this case, as we're trying to help you with a coding issue, you must cut-N-paste the actual code you use, not retype it in the forum. Otherwise we would suggest fixes to something not present in your code, and we can't comment on that which you have not typed in.

So start a new tiny sketch, where you only use, say, pin 5 and your registerWrite routine. with/without a for loop or an oneline extra function.