PSOC Serial Communication With Arduino

Hello guys

i am working on a project in which PSOC sends 16 bits of data to arduino while arduino receives that 16 bit and process it further to DAC. Now i want to send those 16 bits in such a way that it should be received by
arduino in a manner like time stamp. By time stamp i means i want to make sure high precision of serial communication.

One method i tried was that PSOC sends data and Arduino using serial available option responds accordingly. for example:

if (Serial.available())
{ // If data comes in from PSOC

.........................
}
by this i mean when arduino has some data received from PSOC only then it will respond and will send the result of DAC back to PSOC. and when there would be nothing received by arduino it will not respond to PSOC. So can i called this timestamp precision?

Is this method correct for time Stamp or high precision of Serial data?As i am successful in that but i want to make sure that highest precision should be achieved.

Is there any other ideas how to do that or some code from anybody for high precision of serial communication?
i would be glad to hear from this forum.

Thanks in advance

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

What exactly do you mean by PSOC?

...R

Robin2:
What exactly do you mean by PSOC?

Guessing OP means this, which looks like yet another uC.

sarmad-Adeel:
it should be received by arduino in a manner like time stamp. By time stamp i means i want to make sure high precision of serial communication.

That's the part I'm struggling with: not seeing a link between "time stamp" and "precision of serial communication".

LesserMole:
Guessing OP means this, which looks like yet another uC.

In addition to being another uC, it also has Analog and FPGA-like reconfiguration capabilities.

LesserMole:
Guessing OP means this, which looks like yet another uC.

If the OP answers we won't need to guess.

...R

Guys
PSOC means Programmable System on Chip by Cypress. It a Microprocessor.
So, i am actually serially communicating ArduinoMicrocontroller with PSOCMicroprocessor.

sarmad-Adeel:
PSOC means Programmable System on Chip by Cypress. It a Microprocessor.
So, i am actually serially communicating ArduinoMicrocontroller with PSOCMicroprocessor.

We don't charge by the word so you could easily provide a lot more information. Such as what Cypress MCU and a link to its datasheet.

  • You say "PSOC sends 16 bits of data" - does that mean 2 bytes?
  • Did you write the program on the Cypress MCU?
  • Can you provide one or two examples of the messages that the Cypress MCU sends?
  • Can you provide a diagram showing how everything is connected?
  • Can you post your Arduino program?
  • Have you studied the link I gave you in Reply #1?

...R

Hello guys,

How can i communicate psoc to the arduino and vice-versa?

seggi:
Hello guys,

How can i communicate psoc to the arduino and vice-versa?

Did you read the earlier Replies in this Thread before posting?

Why do you think the questions asked earlier don't apply to you?

...R

I have no idea what "high precision of serial communication" means in the original post.
If you have 16bits, you send 16 bits, and that's all the precision there is - send two bytes in a defined order (read with Serial.read()) and put them back together into a 16bit value (in the correct order.)
Are you looking for error checking and correction? Doubting that PSoC serial and Arduino Serial are compatible? Trying to wrap a whole command/value structure around the data so that you have room to do other things on the same communications link?