How to calculate the value for TDRmn register

Hello,
I am using RL78/G13 evaluatoin board for learning. i'm trying to implement timer code. could some one guide me how to calculate the value for TDRmn register. also it would be great if there is any sample code for timer implementation.