I am new to the arduino and i am wanting to make a protocol converter.
Basically it takes a 485 input tx and rx in port 1 reads the hex and then outputs a different hex on port 2
It is going to be used for cctv protocols
I understand i can use c++ for this,
Can this be done on the uno? Or do i need a mega?
Some of the hex will be the same format going in the first few bytes will be...then the rest will change with camera number speed etc the output will be the same but different values.
I have searched on this but cant seem to find a definitive answer. I can make an app in visual studio that can do this but i need a an all in one box
Thanks
I think you need to take time to explain in more detail what you want to do. Your economy with words is not helpful.
Are you asking if you can receive data on one serial port and output an amended version of that data on a different serial port? If so, the answer is YES, as long as the amount of data can be handled by the Arduino.
And on an Uno you can use SoftwareSerial to add a second serial port - but it does not perform at high speeds like the HardwareSerial ports. There should be no trouble at 9600 baud.
If you have not yet invested in an Arduino I think it would make sense to buy a Mega and take advantage of the extra HardwareSerial ports. It also means you could connect 2 external serial devices and still communicate with the PC for debugging purposes.
Thanks for your reply, that is exactly what i want to achieve. I will invest in a mega for starters.
I see somebody has got the arduino to output the pelco protocol so i can start from there and then build on this to accept a different protocol input and then convert to pelco.
I want to then build different protocols so i can input and output different types by just uploading different sketches
Incentive:
I intend to try and use cctv protocols of
Just so you know for the future, you will need to explain those protocols in detail if we are to understand the programming required. It would be best if you can provide examples of the input data and the transformed output data.
rs485 input would be in hex the VCL protocol, three bytes
80 52 34
80 = for camera 1
52 = for right
34 = speed
first byte is camera number, second for direction, and third for speed on the VCL protocol.
this would then be converted to pelco and outputted as rs485 in hex to
FF 01 00 09 00 01 13
first bye is always the same, second byte is camera number, third byte is command = camera on, fourth byte command = focus, fifth byte is data = left/right etc, sixth byte is data = speed, seventh is checksum of byte 1 to 6.
so I would need to convert a 3 byte hex input to a 7 byte hex output.