diff --git a/src/config/conf_usb.h b/src/config/conf_usb.h
index 89a3885feb10f55010a5f227361aac48ff7aab2a..e9149942cd74d0163f8947f216c832dfd4c33ab2 100644
--- a/src/config/conf_usb.h
+++ b/src/config/conf_usb.h
@@ -67,7 +67,10 @@
 //! USB Device string definitions (Optional)
 #define  USB_DEVICE_MANUFACTURE_NAME      "Wheeler Lab"
 #define  USB_DEVICE_PRODUCT_NAME          "DStat"
-#define  USB_DEVICE_SERIAL_NAME           "12...EF"
+#define  USB_DEVICE_SERIAL_NAME
+#define  USB_DEVICE_GET_SERIAL_NAME_POINTER serial_number
+#define  USB_DEVICE_GET_SERIAL_NAME_LENGTH  10  //DSTAT + 5
+extern uint8_t serial_number[];
 
 
 /**
@@ -164,6 +167,6 @@ extern void my_callback_cdc_set_rts(uint8_t port, uint8_t b_enable);
 
 //! The includes of classes and other headers must be done at the end of this file to avoid compile error
 #include "udi_cdc_conf.h"
-#include "leds.h"
+#include "usb.h"
 
 #endif // _CONF_USB_H_
diff --git a/src/leds.c b/src/leds.c
deleted file mode 100644
index ab94e1efec31860a2347467317d3b9735720f3c0..0000000000000000000000000000000000000000
--- a/src/leds.c
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-//  leds.c
-//  dstat-firmware
-//
-//  Created by Michael Dryden on 2017-05-04.
-//  Copyright © 2017 Michael Dryden. All rights reserved.
-//
-
-#include "leds.h"
-#include "config/conf_board.h"
-#include <ioport.h>
-#include <util/atomic.h>
-
-void my_callback_cdc_set_rts(uint8_t port, uint8_t b_enable){
-    static uint8_t connected = 0;
-    
-    #if BOARD_VER_MAJOR >= 1 && BOARD_VER_MINOR >= 2 && BOARD_VER_MICRO >=3
-        ioport_set_pin_level(LED2, b_enable);
-    #endif
-    
-    if (connected && !b_enable){
-        ATOMIC_BLOCK(ATOMIC_RESTORESTATE){
-            CCP = 0xD8;                        // Configuration change protection: allow protected IO regiser write
-            RST.CTRL = RST_SWRST_bm;           // Request software reset by writing to protected IO register
-        }
-    }
-    connected = b_enable;
-}
-
-
diff --git a/src/main.c b/src/main.c
index e6e5a33478e7bfc2af93f905f7e35013089dd521..4e259d9bbeace4677b134252c6464902afed2985 100644
--- a/src/main.c
+++ b/src/main.c
@@ -15,6 +15,7 @@
 #include <stdint.h>
 #include "conf_board.h"
 #include "ext_twi.h"
+#include "usb.h"
 #include <util/atomic.h>
 
 //Internal function declarations
@@ -119,7 +120,9 @@ int main(void){
 	sysclk_enable_module(SYSCLK_PORT_GEN, SYSCLK_EVSYS);
 	
 	pmic_set_scheduling(PMIC_SCH_ROUND_ROBIN);
-	
+    
+    init_build_usb_serial_number();
+    
 	stdio_usb_init();
 	
 	ads1255_init_pins();
diff --git a/src/usb.c b/src/usb.c
new file mode 100644
index 0000000000000000000000000000000000000000..a6dc4d654d61e98e26e10421b8110a3117a64668
--- /dev/null
+++ b/src/usb.c
@@ -0,0 +1,77 @@
+//
+//  leds.c
+//  dstat-firmware
+//
+//  Created by Michael Dryden on 2017-05-04.
+//  Copyright © 2017 Michael Dryden. All rights reserved.
+//
+
+#include "usb.h"
+#include "config/conf_board.h"
+#include <ioport.h>
+#include <util/atomic.h>
+#include <string.h>
+
+uint8_t ReadSignatureByte(uint16_t Address);
+void NVM_GetGUID(uint8_t* bytearray);
+
+void my_callback_cdc_set_rts(uint8_t port, uint8_t b_enable){
+    static uint8_t connected = 0;
+    
+    #if BOARD_VER_MAJOR >= 1 && BOARD_VER_MINOR >= 2 && BOARD_VER_MICRO >=3
+        ioport_set_pin_level(LED2, b_enable);
+    #endif
+    
+    if (connected && !b_enable){
+        ATOMIC_BLOCK(ATOMIC_RESTORESTATE){
+            CCP = 0xD8;                        // Configuration change protection: allow protected IO regiser write
+            RST.CTRL = RST_SWRST_bm;           // Request software reset by writing to protected IO register
+        }
+    }
+    connected = b_enable;
+}
+
+void init_build_usb_serial_number(void)
+{
+    serial_number[0] = 'D';
+    serial_number[1] = 'S';
+    serial_number[2] = 'T';
+    serial_number[3] = 'A';
+    serial_number[4] = 'T';
+    
+    NVM_GetGUID(&serial_number[5]);
+}
+
+uint8_t ReadSignatureByte(uint16_t Address) {
+    NVM_CMD = NVM_CMD_READ_CALIB_ROW_gc;
+    uint8_t Result;
+    __asm__ ("lpm %0, Z\n" : "=r" (Result) : "z" (Address));
+    //  __asm__ ("lpm \n  mov %0, r0 \n" : "=r" (Result) : "z" (Address) : "r0");
+    NVM_CMD = NVM_CMD_NO_OPERATION_gc;
+    return Result;
+}
+
+void NVM_GetGUID(uint8_t* b) {
+    enum {
+        LOTNUM0=8,  // Lot Number Byte 0, ASCII
+        LOTNUM1,    // Lot Number Byte 1, ASCII
+        LOTNUM2,    // Lot Number Byte 2, ASCII
+        LOTNUM3,    // Lot Number Byte 3, ASCII
+        LOTNUM4,    // Lot Number Byte 4, ASCII
+        LOTNUM5,    // Lot Number Byte 5, ASCII
+        WAFNUM =16, // Wafer Number
+        COORDX0=18, // Wafer Coordinate X Byte 0
+        COORDX1,    // Wafer Coordinate X Byte 1
+        COORDY0,    // Wafer Coordinate Y Byte 0
+        COORDY1,    // Wafer Coordinate Y Byte 1
+    };
+    
+    b[ 0]=ReadSignatureByte(LOTNUM0);
+    b[ 1]=ReadSignatureByte(LOTNUM1);
+    b[ 2]=ReadSignatureByte(LOTNUM2);
+    b[ 3]=ReadSignatureByte(LOTNUM3);
+    b[ 4]=ReadSignatureByte(LOTNUM4);
+    b[ 5]=ReadSignatureByte(LOTNUM5);
+
+}
+
diff --git a/src/leds.h b/src/usb.h
similarity index 53%
rename from src/leds.h
rename to src/usb.h
index 7eae01223432699420e1be3a79cc27ef27e8fa42..13eadcb0690a3b611037a6e4e8653bef2e5188bf 100644
--- a/src/leds.h
+++ b/src/usb.h
@@ -1,17 +1,19 @@
 //
-//  leds.h
+//  usb.h
 //  dstat-firmware
 //
 //  Created by Michael Dryden on 2017-05-04.
 //  Copyright © 2017 Michael Dryden. All rights reserved.
 //
 
-#ifndef leds_h
-#define leds_h
+#ifndef usb_h
+#define usb_h
 
 #include <stdio.h>
+#include "config/conf_usb.h"
 
 void my_callback_cdc_set_rts(uint8_t port, uint8_t b_enable);
+uint8_t serial_number[USB_DEVICE_GET_SERIAL_NAME_LENGTH];
+void init_build_usb_serial_number(void);
 
-
-#endif /* leds_h */
+#endif /* usb_h */