Browse Source

adding microbit V2

Klaas, Wilfried 3 years ago
parent
commit
73f2be9069
6 changed files with 337 additions and 306 deletions
  1. 4 0
      README.md
  2. 2 2
      SPS_EMU.000
  3. BIN
      SPS_Emu.lsu
  4. 292 292
      ugui.lfm
  5. 27 0
      ugui.pas
  6. 12 12
      usps.pas

+ 4 - 0
README.md

@@ -1,4 +1,8 @@
 # **SPS_Emulator Version History**
+**08.04.2021 Version 0.2.1.80**
+
+  * Feature: upload activating for BBC micro:bit V2 via serial connection. 
+
 **01.04.2021 Version 0.2.1.78**
 
   * BUG: fixing upload activating for BBC micro:bit. 

+ 2 - 2
SPS_EMU.000

@@ -2,8 +2,8 @@
 LSUTextFile=1
 Copyrigth=MCS Media Computer Software
 [LSUInfo]
-CompileDate=01.04.2021
-CompileTime=07:50:52
+CompileDate=08.04.2021
+CompileTime=16:42:42
 Name=Wilfried Klaas
 LSUBinFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.lsu
 LSUTextFile=H:\privat\git-sourcen\SPS_Emulator\SPS_Emu.

BIN
SPS_Emu.lsu


File diff suppressed because it is too large
+ 292 - 292
ugui.lfm


+ 27 - 0
ugui.pas

@@ -1408,6 +1408,33 @@ begin
     ADC2.MaxValue := 15;
   end;
 
+  if (cbTPSVersion.ItemIndex = 5) then
+  begin
+    // micro:bit
+    sps.setTPSVersion(MicroBitV2);
+
+    Label2.Visible := True;
+    ADC2.Visible := True;
+    PWM2.Visible := False;
+    Label16.Visible := False;
+    RC1.Visible := False;
+    Label17.Visible := False;
+    RC2.Visible := False;
+    Servo1.Visible := False;
+    Servo2.Visible := False;
+    Shape1.Visible := False;
+    Shape2.Visible := False;
+    EditE.Visible := False;
+    EditF.Visible := False;
+    acUpload.Enabled := True;
+    Label5.Visible := False;
+    btnTone.Visible := False;
+    ADC1.Value := 0;
+    ADC1.MaxValue := 15;
+    ADC2.Value := 0;
+    ADC2.MaxValue := 15;
+  end;
+
   cbCommand.Items.Clear;
   sps.getCommands(cbCommand.Items);
 end;

+ 12 - 12
usps.pas

@@ -135,7 +135,7 @@ const
 type
   {TPSVersion}
 
-  TTPSVersion = (Holtek, ATMega8, ATTiny84, Arduino, MicroBit);
+  TTPSVersion = (Holtek, ATMega8, ATTiny84, Arduino, MicroBit, MicroBitV2);
 
   { TServo }
 
@@ -548,7 +548,7 @@ begin
       case Data of
         0: if (a = 0) then
             case version of
-              ATTiny84, Arduino, MicroBit: skip := True;
+              ATTiny84, Arduino, MicroBit, MicroBitV2: skip := True;
             end;
         1: if (a > b) then
             skip := True;
@@ -676,7 +676,7 @@ begin
   if (cmd = 0) then
   begin
     case version of
-      Holtek, ATMega8, MicroBit: MCSStrings.copyArray2List(O_LIST_H, list);
+      Holtek, ATMega8, MicroBit, MicroBitV2: MCSStrings.copyArray2List(O_LIST_H, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(O_LIST_AT, list);
     end;
   end;
@@ -693,7 +693,7 @@ begin
   if (cmd = 5) then
   begin
     case version of
-      Holtek, MicroBit: MCSStrings.copyArray2List(IS_A_LIST_H, list);
+      Holtek, MicroBit, MicroBitV2: MCSStrings.copyArray2List(IS_A_LIST_H, list);
       ATMega8: MCSStrings.copyArray2List(IS_A_LIST_A8, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(IS_A_LIST_AT, list);
     end;
@@ -701,7 +701,7 @@ begin
   if (cmd = 6) then
   begin
     case version of
-      Holtek, MicroBit: MCSStrings.copyArray2List(A_IS_LIST_H, list);
+      Holtek, MicroBit, MicroBitV2: MCSStrings.copyArray2List(A_IS_LIST_H, list);
       ATMega8: MCSStrings.copyArray2List(A_IS_LIST_A8, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(A_IS_LIST_AT, list);
     end;
@@ -709,14 +709,14 @@ begin
   if (cmd = 7) then
   begin
     case version of
-      Holtek, ATMega8, MicroBit: MCSStrings.copyArray2List(A_CALC_LIST_H, list);
+      Holtek, ATMega8, MicroBit, MicroBitV2: MCSStrings.copyArray2List(A_CALC_LIST_H, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(A_CALC_LIST_AT, list);
     end;
   end;
   if (cmd = 8) then
   begin
     case version of
-      Holtek, ATMega8, MicroBit: MCSStrings.copyArray2List(PAGE_LIST_H, list);
+      Holtek, ATMega8, MicroBit, MicroBitV2: MCSStrings.copyArray2List(PAGE_LIST_H, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(PAGE_LIST_AT, list);
     end;
   end;
@@ -729,7 +729,7 @@ begin
   if (cmd = 12) then
   begin
     case version of
-      Holtek, MicroBit: MCSStrings.copyArray2List(SKIP_LIST_H, list);
+      Holtek, MicroBit, MicroBitV2: MCSStrings.copyArray2List(SKIP_LIST_H, list);
       ATMega8: MCSStrings.copyArray2List(SKIP_LIST_A8, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(SKIP_LIST_AT, list);
     end;
@@ -739,14 +739,14 @@ begin
   if (cmd = 14) then
   begin
     case version of
-      Holtek, ATMega8, MicroBit: MCSStrings.copyArray2List(RET_LIST_H, list);
+      Holtek, ATMega8, MicroBit, MicroBitV2: MCSStrings.copyArray2List(RET_LIST_H, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(RET_LIST_AT, list);
     end;
   end;
   if (cmd = 15) then
   begin
     case version of
-      Holtek, ATMega8, MicroBit: MCSStrings.copyArray2List(F_LIST_H, list);
+      Holtek, ATMega8, MicroBit, MicroBitV2: MCSStrings.copyArray2List(F_LIST_H, list);
       ATTiny84, Arduino: MCSStrings.copyArray2List(F_LIST_AT, list);
     end;
   end;
@@ -961,7 +961,7 @@ begin
       end;
   end;
   case version of
-    Holtek, ATMega8, MicroBit: a := a and 15;
+    Holtek, ATMega8, MicroBit, MicroBitV2: a := a and 15;
   end;
 end;
 
@@ -1005,7 +1005,7 @@ begin
   case (Data) of
     0: if (a = 0) then
         case version of
-          ATTiny84, Arduino, MicroBit: addr := addr + 1;
+          ATTiny84, Arduino, MicroBit, MicroBitV2: addr := addr + 1;
         end;
     1: if (a > b) then
         addr := addr + 1;

Some files were not shown because too many files changed in this diff