I am having a problem with my program.
I had set my Serial communication to a 4800bps, 8 bits 1 stop bit non parity (already set this parameter in the C++/Cli program and in the external circuit). Well I am trying to send an array of bytes (25 bytes) to my external Circuit (wich is the receptor .This has been set for receiving 25 bytes to perform an specific action), well when I used the following serial port code part (C++/CLI) I obtained very different results in my circuit(receptor) from the results I had by testing the communication on the HyperTerminal (this results are the ones that I expected) from Windows.
private: System::Void button6_Click_1(System::Object^ sender, System::EventArgs^ e)
{
array<Byte>^ TxBfr={0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0x00,0xFF,0x03};
serialPort1->Write(TxBrf,0,25);
};
This code DOES send the information (arry of bytes) but seems like its been modified, because my external circuit performs a different action to the one its supposed to do.
Do I have to do any convertion to my array? Might that be the problem?
Thanks for reading any feedback?
Bryan