victory460 Posted January 12, 2018 Posted January 12, 2018 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. 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: Which dma parameters, I just fill 1, which is what should be filled DMA figures? OpenScope.h: Then I add Serial1.begin(SERIALBAUDRATE); in the main.cpp, but it compiled failed that ' Serial1' was not declared in this scope. 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: This Firmware: https://github.com/victory460/OpenScopeOSSerial Please help me.I just want to add the serial1 transceiver for OpenScope MZ.
JColvin Posted January 12, 2018 Posted January 12, 2018 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
victory460 Posted January 13, 2018 Author Posted January 13, 2018 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 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.
Jiandan Posted January 26, 2018 Posted January 26, 2018 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.