 #define SETUPCON7_REG 0x27
 
 /* ADC values */
-//#define 31kHZ 0x00
-
-/* other configuration */
+#define HZ_1 0x16
+#define HZ_10 0x13
+#define KHZ_1 0x0A
+#define KHZ_2 0x09
+#define KHZ_5 0x08
+#define KHZ_10 0x07
+#define KHZ_15 0x06
+#define KHZ_31 0x00
+#define HZ_500 0x0B
 #define DEBUG_ENABLED true
+#define CONTINUOUS_READ_MODE 0
+#define SINGLE_CONVERSION_MODE 1
+#define CONTINUOUS_CONVERSION_MODE 2
 #define DATA_READY digitalRead(MISO) == LOW
+
+int adc_data_mode = CONTINUOUS_CONVERSION_MODE;
 
 /*
 ===================================

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

*/
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");
        }
