Skip to content

Commit

Permalink
Added a UARTForwarded plugin which implements an external buffered ES…
Browse files Browse the repository at this point in the history
…P UART instead of the built-in CSpect one (which only sends ASCII chars not binary).
  • Loading branch information
Threetwosevensixseven committed Jan 10, 2020
1 parent fcf5ea1 commit c7ba2fa
Show file tree
Hide file tree
Showing 16 changed files with 1,492 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CSpectPlugins.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RTC", "RTC\RTC.csproj", "{0
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "I2CTestHarness", "I2CTestHarness\I2CTestHarness.csproj", "{3708E183-3E15-4D20-8726-46C452B951C7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UARTForwarder", "UARTForwarder\UARTForwarder.csproj", "{B620589D-3613-40FB-ACFB-9C825D474D7F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +35,10 @@ Global
{3708E183-3E15-4D20-8726-46C452B951C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3708E183-3E15-4D20-8726-46C452B951C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3708E183-3E15-4D20-8726-46C452B951C7}.Release|Any CPU.Build.0 = Release|Any CPU
{B620589D-3613-40FB-ACFB-9C825D474D7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B620589D-3613-40FB-ACFB-9C825D474D7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B620589D-3613-40FB-ACFB-9C825D474D7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B620589D-3613-40FB-ACFB-9C825D474D7F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
43 changes: 28 additions & 15 deletions I2CTestHarness/Forms/TestHarnessForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions I2CTestHarness/Forms/TestHarnessForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,32 @@ private byte[] ReadBytes(int Count)
bytes.Add(Master.CMD_RX(i == Count - 1));
return bytes.ToArray();
}

private void btnRtcSys_Click(object sender, EventArgs e)
{
if (running) return;
running = true;
lblStatus.Text = "Running...";
Application.DoEvents();
if (!first)
{
txtMaster.AppendText("--------------------------------\r\n");
txtSlave.AppendText("--------------------------------\r\n");
txtBus.AppendText("--------------------------------\r\n");
}
first = false;
bool success = true;
Master.CMD_START(); // Start
success = success && Master.CMD_TX(DS1307.WriteAddress); // Write DS1307
success = success && Master.CMD_TX(0x3e); // Set reg = 62 (Z)
Master.CMD_START(); // Start
success = success && Master.CMD_TX(DS1307.ReadAddress); // Read DS1307
var bytes = ReadBytes(1);
if (success)
lblStatus.Text = "Success: RTC.SYS";
else
lblStatus.Text = "Failed, received NACK";
running = false;
}
}
}
Binary file added RTC/AsmDebug/RTC.SYS
Binary file not shown.
13 changes: 13 additions & 0 deletions RTC/AsmDebug/cspect_rtcsig.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:: Set current directory
::@echo off
C:
CD %~dp0


pskill.exe -t cspect.exe
hdfmonkey.exe put C:\spec\cspect-next-2gb.img RTC.SYS NextZXOS
cd C:\spec\CSpect2_12_1
CSpect.exe -w2 -zxnext -nextrom -basickeys -exit -brk -tv -com="COM5:115200" -mmc=..\cspect-next-2gb.img


::pause
Loading

0 comments on commit c7ba2fa

Please sign in to comment.