Re: how to send 0 and 1 data on otg and how to access otg data of pic32mx530f128h
Is a PC the master and the PIC32 the connected device?
If yes, then use the USB as a COM port and talk back and forth via a serial connection.
This is very simple.
Microchip provides a number of sample projects with Harmony, I suggest that you get this one running,
This example allows you to open a terminal window on a PC and to send a character back and forth from the PC to the PIC and back again. After you get this running you will be able to modify it to send a '1' or a '0' from the PIC to the PC.
I also recommend starting with Harmony 2.x at this time as version 3 is still being worked out.
Hope this helps.