Pedja089, In your suggested code you are treating "Control" as an array. If it is not then you are just resetting the LATx bits 16 times.