diff --git a/.vscode/launch.json b/.vscode/launch.json
index 38a0e834bb438fae2748ee1f411813c3860d18ed..4644648b9ecde1b8de9fe3cae6430a0b149b2456 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -16,7 +16,7 @@
             "externalConsole": false,
             "MIMode": "gdb",
 //            "miDebuggerPath": "d:/CodeBlocks_20_03/MinGW/bin/gdb.exe",
-            "miDebuggerPath": "c:/msys64/usr/bin/gdb.exe",
+            "miDebuggerPath": "c:/msys64/mingw64/bin/gdb.exe",
             "setupCommands": [
                 {
                     "description": "Włącz formatowanie kodu dla gdb",
diff --git a/CHANGELOG b/CHANGELOG
index 0587b1557bf2f717879b52b1f70f22b03be248b4..5c6924505f47ae8c2944e84e09420cf8891a2b97 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,8 +8,10 @@ TODO::
 LAST DONE:
 
 CHANGES:
+- ver. 0.20.028 - <b>2023.06.14</b> Fixed: 
+  - fixed gray coding in DSP::u::SymbolMapper 
 - ver. 0.20.027 - <b>2022.04.21</b> Fixed: 
-  - not Main.o is not included in libDSPE.a 
+  - now Main.o is not included in libDSPE.a 
 - ver. 0.20.026 - <b>2022.04.21</b> Fixed: 
   - fixed DSP::TMorseTable::LoadFromFile
   - DSP::TMorseTable::LoadFromFile and DSP::u::MORSEkey::LoadFromFile now read file based on full path to *.mct file
diff --git a/src/Main.cpp b/src/Main.cpp
index 7c01e03c359258873c2bf7f92a26a9489c93dde5..ca3bf3e214d38cde40dd07af13af64a979ecfccf 100644
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -2526,7 +2526,8 @@ int test_SymbolMapper() {
   blocks["binary_stream"]->Output("out") >> blocks["file_bin"]->Input("in");
 
   blocks["SPconv"] = std::make_shared<DSP::u::Serial2Parallel>(BitClock, bits_per_symbol);
-  blocks["mapper"] = std::make_shared<DSP::u::SymbolMapper>(DSP::e::ModulationType::ASK, bits_per_symbol);
+  //blocks["mapper"] = std::make_shared<DSP::u::SymbolMapper>(DSP::e::ModulationType::ASK, bits_per_symbol);
+  blocks["mapper"] = std::make_shared<DSP::u::SymbolMapper>(DSP::e::ModulationType::PSK, bits_per_symbol);
   blocks["binary_stream"]->Output("out") >> blocks["SPconv"]->Input("in");
   blocks["SPconv"]->Output("out") >> blocks["mapper"]->Input("in");
   SymbolClock = blocks["mapper"]->GetOutputClock();
@@ -2953,6 +2954,10 @@ int main(int argc, char*argv[])
   DSP::log.SetLogState(DSP::e::LogState::console | DSP::e::LogState::file);
   DSP::log.SetLogFileName("DSPElib_test_log.txt");
 
+  DSP::log << "Starting SymbolMapper test" << std::endl;
+  test_SymbolMapper();
+  DSP::log << DSP::e::LogMode::pause << "Finished SymbolMapper test" << std::endl;
+
   DSP::log << "test MORSEkey" << std::endl;
   {
     DSP::TMorseTable MorseTable;
@@ -2997,10 +3002,6 @@ int main(int argc, char*argv[])
 
 #endif // INCLUDE_DSPE_EXAMPLES
 
-  DSP::log << "Starting SymbolMapper test" << std::endl;
-  test_SymbolMapper();
-  DSP::log << DSP::e::LogMode::pause << "Finished SymbolMapper test" << std::endl;
-
   DSP::log << "Starting test_ZPSTC_cw_3" << std::endl;
   test_ZPSTC_cw_3();
   DSP::log << "Finished test_ZPSTC_cw_3" << DSP::e::LogMode::pause << std::endl;
diff --git a/src/cpp/DSP_modules2.cpp b/src/cpp/DSP_modules2.cpp
index bba270b6fb4d27a1be0738e0f310a6ac19944ead..8a375689fc8bc14333909bea613bc3bcb055768e 100644
--- a/src/cpp/DSP_modules2.cpp
+++ b/src/cpp/DSP_modules2.cpp
@@ -1788,10 +1788,11 @@ unsigned int getConstellation(
 //          constellation[n].re = static_cast<DSP::Float>(cos(constellation_phase_offset+(DSP::M_PIx2*n)/M));
 //          constellation[n].im = static_cast<DSP::Float>(sin(constellation_phase_offset+(DSP::M_PIx2*n)/M));
 //        }
-        // Gray codding (start from LSB)
-        uint16_t mask = 0x0001;
-        uint16_t n = 0;
+        // // Gray codding (start from LSB)
+        // uint16_t mask = 0x0001;
+        unsigned int n = 0;
         for (unsigned int ind=0; ind < M; ind++) {
+          n = ind ^ (ind >> 1); // convert to gray coding
           constellation[ind].re = static_cast<DSP::Float>(cos(constellation_phase_offset+(DSP::M_PIx2*n)/DSP::Float(M)));
           constellation[ind].im = static_cast<DSP::Float>(sin(constellation_phase_offset+(DSP::M_PIx2*n)/DSP::Float(M)));
 
@@ -1799,12 +1800,13 @@ unsigned int getConstellation(
 //          ss << "constellation[" << ind << "]={" << std::setprecision(2) << constellation[ind].re << "," << constellation[ind].im << "}; n=" << n;
 //          DSP::f::InfoMessage(ss.str());
 
-          n ^= mask;
-          //mask <<= 1u;
-          mask = uint16_t(mask << 1);
-          if (mask == M) {
-            mask = 0x0001;
-          }
+          // n ^= mask;
+          // //mask <<= 1u;
+          // mask = uint16_t(mask << 1);
+          // if (n >= M) {
+          //   n = 0;
+          //   mask = 0x0001;
+          // }
         }
       }
       //! \TODO is_real should be set based on analysis of all constellation points
@@ -1818,9 +1820,11 @@ unsigned int getConstellation(
 
     case DSP::e::ModulationType::ASK: {
         constellation.resize(M);
-        for (unsigned int n=0; n < M; n++) {
-          constellation[n].re = static_cast<DSP::Float>(n)/static_cast<DSP::Float>(M-1);
-          constellation[n].im = 0;
+        unsigned int n;
+        for (unsigned int ind=0; ind < M; ind++) {
+          n = ind ^ (ind >> 1); // convert to gray coding
+          constellation[ind].re = static_cast<DSP::Float>(n)/static_cast<DSP::Float>(M-1);
+          constellation[ind].im = 0;
         }
         if (constellation_phase_offset != 0.0) {
           for (unsigned int ind=0; ind < M; ind++) {
diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h
index 15ca7d7a15a36353a490107e92641b97bd807114..f462cf2b0c3bd980d420363a6850be5b7ad4fa92 100644
--- a/src/include/DSP_lib.h
+++ b/src/include/DSP_lib.h
@@ -11,7 +11,7 @@
 
 #define DSP_VER_MAJOR 0
 #define DSP_VER_MINOR 20
-#define DSP_VER_BUILD 27 // !!! without zeroes before, else this will be treated as octal number
+#define DSP_VER_BUILD 28 // !!! without zeroes before, else this will be treated as octal number
 #define DSP_VER_YEAR  2023
 #define DSP_VER       DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD