Android phone to stay on when it is charging, for instance, connected to the USB port resting on your desk at work, then this is how you go about it:
1. Press the menu key
2. Select settings
3. Tap Applications
4. Then Development
5. Now tick the Stay Awake checkbox
You've finished. Now, when your phone is charging, you can tap the power button to turn the display on or off. This doesn't affect the display time out when the device is not charging.
That concludes my first blog post from my Google Nexus One.