 */
 int read_adc_register(byte reg, byte *value, int read_len) {
     /* when specified register is invalid */
-    if (reg < 0x00 || reg > 0xFF) {
+    if (reg < 0x00 || reg > 0x3F) {
         if (DEBUG_ENABLED) {
             Serial.println("register out of range");
         }

     /* read the ADC device ID */
    read_adc_register(ID_REG, id, 2);
    /* check if the id matches 0x30DX, where X is don't care */
    bool valid_id = id[0] == 0x30 && id[1] == 0xD0;
    
    /* when debug enabled */

*/
int write_adc_register(byte reg, byte *value, int write_len) {
    /* when specified register is invalid */
    if (reg < 0x00 || reg > 0x3F) {
        if (DEBUG_ENABLED) {
            Serial.println("register out of range");
        }
