Hi Tobie,
5- 20 : connected to GND pins of LED bar
I assume that means the cathodes of a common anode LED bar?
If so OK.

23 (Rext) - 220 ohm to GND
Seems kind of low. That would give 80 ma constant current per LED.
Around 1K would be better. (20 ma)

The code looks like it should work. Assuming the parts you didn't include are OK.

What problem are you having?
Won't compile?
No display?
DIM, Too bright?
<br>