Telling someone how to write a MIB is extremely difficult. It's a complex process and you need to understand a lot of the background behind MIB design. I strongly recommend you go read a book (Understanding SNMP MIBs being one of the best). Without learning about MIBs properly first, you'll make too many mistakes.
As for software, it's nearly impossible to answer without you explaining your environment: what operating system, machine type, etc. If you're using Net-SNMP, see the Coding Tutorials page. If you're using a commercial product (eg, SNMP research), then go ask them for help!