This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello sir
im using tms570lc4357, for transmitting data from rs422 and receiving through SCI protocol how to write a code for this and in this want to transmit a data packets
(Start Value, PAGE DATA ,DUMMY DNT, PAGENO, TYPE, LRC)
$a00 | 028e8e82c8b2d05a | 0a0000010400195056005e | 01 | 04 | 2e
so help me how to implement the code for this . LIKE how UART connected to rs422 converter
Hi Jeev,
There won't be any separate protocol for RS422, i mean RS422 is just a level shifter that means it will convert UART levels to the differential RS422 levels.
For example:
Usually, the connection looks like above right, i mean controller will have SCI (UART) and after that there will be one UART to RS422 converter to convert the SCI or UART levels into the RS422. And destination side another RS422 converter will be there right before the slave.
Here on controller side, you don't need to do anything special, you have to send the data as per the protocol.
$a00 | 028e8e82c8b2d05a | 0a0000010400195056005e | 01 | 04 | 2e
That means if you want to send above data to the slave device, you just need to store the above data into one array and after that you have to send that array data using the "sciSendByte" function like something below.
As you can see here, they are sending TEXT1, TEXT2 and TEXT3 right, similarly you have to create an array for above data and have to give that array to the input of sciSendByte function to send it output.
Once you send the data the data will be converted into RS422 levels by UART to RS422 converter and will be transmitted to the destination and at destination the reverse process will happen.
--
Thanks & regards,
Jagadish.
The only gotcha is that sometimes RS422 is sent and received on the same lines and you need to activate the driver with a gpio when transmitting.
its like im sending data packets from rs422 only and UART need to receive that data for that how can i write code
its like im sending data packets from rs422 only and UART need to receive that data for that how can i write code
Is that means, controller UART always receives the data?
Can you please tell me exact part number of RS422 you are using?
im getting a data from RFID reader so the controller must receive that data so the controller im using here is tms70lc4357 for UART so in this between we have a rs422 transceiver converter the part is tx. i sending data form RFID reader so i need output through uart for that im using docklight
Hi Jeev,
The received data will be receive to the Rx line of the SCI peripheral right?
So, you just need to call either the sciReceive function or sciReceiveByte function.
sciReceiveByte byte function will receive only single byte, whereas sciReceive function will receive the bytes-based length we give to the function.
For example:
You can see below code, here i am receiving data in the interrupt mode:
4606.SCI_Interrupt_Test_LC4357.zip
--
Thanks & regards,
Jagadish.
Hi Jeev,
i want that data packet to be send
If you want to send then please use SCI send functions, if you want to receive data then use SCI receive functions.
--
Thanks & regards,
Jagadish.