Inorder to check whether my rs 485 is working,i had connected my lpc2378 (rs485) with my PC through ADAM-4561(1 port isolated USB to RS 232/422 485converter).when i open the hyperterminal to see the transmitted data ,nothing is shown.Now how to check it and where to check it?????.i am very new to microprocessor development and am still figuring out the way things work on the LPC2378 . So up front apologies for "stupid" questions.i had done the programing.First time iam doing code with rs 485.MAX3430EPA IC pin REbar and DE is connected to p2(2),RO pin to p2(1) and DI pin is connected to p2(0).This is the code which i have written.
int main (void)
PCONP |= (1<<4) /* power for uart 1 */
PINSEL4 |= 0x0000000A; /* Enable TxD1 *//* Enable RxD1 */
U1LCR = 0x83; /* 8 bits, no Parity, 1 Stop bit */ U1DLM = 0x00;
U1DLL = 69; /* 9600 Baud Rate @ 16MHz Clock */
U1FDR = 0x21;
U1LCR = 0x03; /* DLAB = 0 */
U1FCR = 0x81;
FIO2SET|=(1<<2); /*TRANSMIT MODE*/
while (!(U1LSR & 0x40));
FIO2CLR|=(1<<2); while (!(U1LSR & 0x01));
data1 =U1RBR; } .
while debugging,it is seen that pin 2 is not set in the transmit mode,even if it is given FIO2SET|=(1<<2).what will be the problem.please help Is my code correct,if not please help me with changes. .please provide valuable suggestions.