How do you independently program a GSM/GPRS IC
You use the AT command set to read/write the GPIO and ADC, for example to read the ADC (page 149):


>AT+CADC?
+CADC:1,2800
OK


The first line is to read the ADC, the second is the response, with the status (1 = OK/Good), and the value (0-2800 integer). There are similar AT commands for reading the GPIO (AT+SGPIO/AT+CGPIO) or the PWM (AT+SPWM). 

It is possible you could write custom firmware for the module, but that would have to be done through reverse engineering the processor/circuit.