Dear All:
I am working on a project in the university, one part of the project is to program the C167CR controller so that it can receive RS485 signals from other controller and based on the received data (which is Frequency & Duty cycle) the C167CR will generate PWM signal/s. Now, I have to build a prgram that enables the build in RS485 on the MiniModule-167, in order to be able to comunicate with the other controller. I have checked the manuals and the articles on the Keil website, but unfortunately there is nothing about RS485.
Please advise.
Your suggestions and help are highly appreciated
Thank you in advance
Best Regards,
Then you just have to change these jumpers.
About software - there are no established standard for RS485 communication. You need similar ISR as for normal RS232.
The thing is that it is half-duplex, so the master must turn off the transmission to be able to hear the answer from the other side. That means that the RS485 transceiver on the board must have a transmit-enable signal connected to the processor. It may also have a receive-enable signal but normally not.
Your job it to turn on transmission, send a packet, and as soon as the last byte has been sent out, turn data direction and wait for an answer. So, no real need for any RS485 source code. Just an understanding of when en how to enable/disable the output from the RS485 transceiver.