I new here and not very familiar with all info that i need to give but ill do my best to explain.
I am using pic32mz2048efm144 controller for my project and want to implement communication with another pic(same model). For this I have decided to use Rs485 communication as this will in future expand to communicate with multiple slaves over relatively long distance. I have MAX14783E attached to UART6 on both controllers. I have implemented a similar UART communication with rs232 to connect it to pc terminal for communication and it works fine. I have used a similar approach along with controlling directions for rs485 according to datasheet but i couldnt figure out what the issue is but its not working.
Any suggestions would be great. I wrote a code for testing the communication which is below. In the main- i am using code under master(comment) while commenting the code under slave(comment) for master controller and vice-versa.
What does "not working" mean? Please be more specific in what you can see working, what doesn't and what you expect that is not happening.
For example, can you see the \RE\ and DE signals as expected? Can you see a signal on the DI line when you are sending? Do the A and B signals occur as expected?
For receiving, can you see a signal on the A and B lines? What about the RO signal? Is the ISR being called?
Also what is your development environment - that might help us with making suggestions so we don't suggest something that you can't do.
Susan
PS - also just seen that line 49 uses a capital 'I' where the loop variable is a lower case 'i'. Did this actually compile????
@Aussie Susan Sorry for not being specific. The code compiles and that capital must have been when I copied it and edited. The issue is that I cannot get any data on receiver. The master send the data(according to debugger) but I can't see any on the receiver. I'm using mplabx ide and icd3. I'm not sure about the signal on particular lines as I would need an oscilloscope to be sure but I don't have one right now. I have done a similar implementation for Rs232 using uart and it works fine but I'm having issues with this. @KlausST I have searched for libraries but couldn't find any. Can you point me to any site that I can explore?