Jump to content

Please help me!Use another Serial1 in OpenScope MZ


Recommended Posts

Posted

My goal is to add another one serial communication to OpenScope MZ then I tried to use a soft serial port in the OpenScope MZ firmware, but it compiled failed.

 

image.png.006fa0388169ef084d2f784425a09603.png

Arduino:1.6.9 (Windows 10),  "Digilent OpenScope"

In file included from C:\Users\victory\AppData\Local\Arduino15\packages\Digilent\hardware\pic32\1.0.3\cores\pic32/WProgram.h:20:0,

                 from C:\Users\victory\AppData\Local\Arduino15\packages\Digilent\hardware\pic32\1.0.3\cores\pic32/Arduino.h:4,

                 from C:\Users\victory\AppData\Local\Arduino15\packages\Digilent\hardware\pic32\1.0.3\libraries\SoftwareSerial/SoftwareSerial.h:40,

                 from sketch\main.cpp:17:

C:\Users\victory\AppData\Local\Arduino15\packages\Digilent\hardware\pic32\1.0.3\cores\pic32/HardwareSerial.h:264:39: error: conflicting declaration 'HardwareSerial Serial'

                 extern HardwareSerial Serial;

                                       ^

In file included from sketch\main.cpp:15:0:

OpenScope.h:1486: error: 'Serial' has a previous declaration as 'OSSerial Serial'

     extern OSSerial         Serial;

                             ^

exit status 255
'Serial' has a previous declaration as 'OSSerial Serial'

 

I know this question is repeated definition Serial, but I do not know how to modify it to add a serial port.

This Firmware: https://github.com/victory460/OpenScope

Please help me to add one serial communication to OpenScope MZ .Thank you very much.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

And I try another other ways to this requirement,such as:

 

I'm trying to use Serial1 in the OpenScope MZ firmware  By using the OSSerial module .

I make the following changes in GlobalData.cpp and in OpenScope.h.

 

GlobalData.cpp: 

image.png.113b56caefd5e35ee831422176a6fff2.png

Which dma parameters, I just fill 1, which is what should be filled DMA figures?

OpenScope.h:

image.png.2e43e9a42863aad25a872b1dc09a4dd8.png

 

Then I add    Serial1.begin(SERIALBAUDRATE); in the main.cpp, but it compiled failed that  ' Serial1' was not declared in this scope.

 image.png.95efc2a31f843febebc68944f809e650.png

Then I try to find where the original  Serial declared,but I cannot find it.I want to know where the original Serial instance is declared ?

How to solve this problem of ' Serial1' was not declared in this scope?

Besides,what codes should add in Initialize.cpp follow this:image.png.e0819b5138934f92a850e256fec13613.png

This Firmware: https://github.com/victory460/OpenScopeOSSerial 

Please help me.I just want to add the serial1 transceiver  for OpenScope MZ.

 

 

 

Posted

Hi @victory460,

My understanding is that original Serial is declared in the Board_Defs.h file for the OpenScope MZ and is through the main usb port. It does look like in that same file that an additional serial port is supported, although based off the the Board_Data.c file it should be using pins 5 and 12 rather than 4 and 12, though I am not certain if this was intentional. The OpenScope MZ uses some different firmware, so I'm not as familiar with it.

I have moved this thread to the OpenScope MZ section of the subForum and tagged @Kristoff to see if they have some additional input on this.

Thanks,
JColvin

Posted
On 2018/1/13 at 3:09 AM, JColvin said:

Hi @victory460,

My understanding is that original Serial is declared in the Board_Defs.h file for the OpenScope MZ and is through the main usb port. It does look like in that same file that an additional serial port is supported, although based off the the Board_Data.c file it should be using pins 5 and 12 rather than 4 and 12, though I am not certain if this was intentional. The OpenScope MZ uses some different firmware, so I'm not as familiar with it.

I have moved this thread to the OpenScope MZ section of the subForum and tagged @Kristoff to see if they have some additional input on this.

Thanks,
JColvin

Thank you very much!

I select 4 and 12 pin,because image.png.65dd4409e7a5091352be81d5618146d8.png

in  Board_Defs.h.

I do not know whether this is correct or not, and I urgently need to solve these problems because I want to print the results of the OpenScope MZ measurement through the serial1 port.

Posted

Dear Digilent engineers

  I also have such a demand, that I would like to use the serial port 1 to send data to my arduino UNO board. But I do not know how to add a serial port 1 in the OpenScopeMZ firmware.Can Digilent engineers help us by take a few minutes.  Thanks a lot.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...