Thank you guys!
In the meantime, i took a long fast ride on my motorcycle and came back with a clear head. I got it working...
All this time I was looking in the manual when I should have been looking at the datasheet.
When I get to trying to make the code more elegant, I'll be back!
Thanks.