-
Data verification
I am working with two PICs different in different frequencies (10 and 20 MHz).
My doubt if relates to the use of HSERIN and HSEROUT. The baud rate is 9600.
The first PIC1 read seven sensors/potentiometers and send for the second PIC2, only three variables with eight bits. The second PIC2 will control an industrial DC motor.
In case of timeout, ok, stop the motor. Could be a broken wire. No problem here. The project is working.
These two pics are work fine. The motor control is OK and HSERIN/HSEROUT are OK
My problem is:
How to make the verification of the data sent?
In case that it occurs errors in the data, it will be able to cause an accident.
I do not know as to make or a verification or a automatic correction of the data sent.
The maximum time of delay will not be able to exceed 1,5mS
Do you can help me? Thanks,
Daniel
-
Search the forum/internet for information about CRC. That will provide you with error notification within each packet.
-
I looked for CRC and I did not find nothing. What it is CRC?
-
-
Hi DynamoBen,
Ok, but how make it in picbasic pro?
I send three variables with eight bits (byte) each, for another pic.
I don't know how to implement it.
Thanks, Daniel
-
What you are asking is very general, I'm not sure what would work best for your application. You will have to choose a method that works for you. The best I can do is suggest things that might work, you will have to sort through the details or each option. If you have specific questions about a specific method we should be able to help you out.
Have you searched the forums and read through other discussions on this topic? If so that should give you a start. Below are some threads that might help spark some ideas.
http://www.picbasic.co.uk/forum/sear...d=146892&pp=25
http://www.picbasic.co.uk/forum/show...light=checksum
http://www.picbasic.co.uk/forum/show...light=checksum
http://www.picbasic.co.uk/forum/show...light=checksum
http://www.picbasic.co.uk/forum/show...light=checksum