bskumar7080
Member level 2
Hi all,
How to implement RS485 communication between PC and PIC micro controller. I have used MAX485 to convert RX and TX signal to D+ and D-.
In PC side RS485 to RS232 converter is used. I think the hardware part is ok..
How to write a C Code for communication between microcontroller and PIC .
I am not getting output for the above code
what modifications i have to make
Regards
sivakumar
How to implement RS485 communication between PC and PIC micro controller. I have used MAX485 to convert RX and TX signal to D+ and D-.
In PC side RS485 to RS232 converter is used. I think the hardware part is ok..
How to write a C Code for communication between microcontroller and PIC .
Code:
#include<p18f452.h>
#include<usart.h>
/****************************** Set up the configuration bits *******************************/
#pragma config OSC = HS, OSCS = OFF
#pragma config PWRT = OFF
#pragma config BOR = OFF
#pragma config WDT = OFF
#pragma config CCP2MUX = OFF
#pragma config LVP = OFF
void main()
{
OpenUSART( USART_TX_INT_OFF &USART_RX_INT_OFF &USART_ASYNCH_MODE&USART_EIGHT_BIT &USART_CONT_RX &USART_BRGH_HIGH,64 ); // 64 = 19200bps // 10 = 15200
putrsUSART((const far rom char*)"IT WORKS !!! ");
}
I am not getting output for the above code
what modifications i have to make
Regards
sivakumar