Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

should i use max 232 with USB to DB9 connector?

Status
Not open for further replies.

Sajjadkhan

Full Member level 5
Joined
Sep 25, 2010
Messages
307
Helped
17
Reputation
34
Reaction score
16
Trophy points
1,298
Location
Rawalpindi,Pakistan
Activity points
4,199
when you connect a db9 cable from your PC which has a db9 serial port then you use max232 ic to interface with you controller. but if i but a usb to db9 connector than do i need max232 pin on my circuit? i dont know but i believe that their is already max232 ic in that connector???
 

Hi,

It depends on the cable you buy.

Many are USB to Serial RS232 , they quote ' Support RS232 serial interface' - so as you say will have a max232 or similar in there to send/receive the rs232 level signals, so your micro needs a max232 to mate with.

There are a few as USB to Serial TTL which will connect directy to a 5v micro.
 

... but if i but a usb to db9 connector than do i need max232 pin on my circuit? i dont know but i believe that their is already max232 ic in that connector???
Even if there is a MAX232 inside the DB9 connector, you still need an inverter, and MAX232 provides both: level conversion and signal inversion.
Otherwise, if the USB-RS232 cable can accept 0-5V, you may use single-transistor inverters in both directions with pull-up resistors hocked-up between the uC pins and 5Vdc ..

:wink:
IanP
 

using hyper terminal when i click the connect icon then voltage on pin 4(Data terminal ready) and pin 7(request to send ) goes to 5v. As i have never used DB9 port do u thing the opposite happens in Db9 com port as far as the polarity is concerned?

and if i do need an inverter transistor then do i need it for evey pin i.e. Rx,Tx,RTS and CTS as i m going to use enhance usart mode. thanks.
 

using hyper terminal when i click the connect icon then voltage on pin 4(Data terminal ready) and pin 7(request to send ) goes to 5v. As i have never used DB9 port do u thing the opposite happens in Db9 com port as far as the polarity is concerned?

and if i do need an inverter transistor then do i need it for evey pin i.e. Rx,Tx,RTS and CTS as i m going to use enhance usart mode. thanks.

My advice is: loop the hanshake signals (RTS, CTS, ....) and don't worry about them ..
In 99% of cases they are irrelevant ..
See attached picture on how to configure the DB9 connector for the handshake loops .. and 3 usables: Rx, Tx and GND

:wink:
IanP
 

Attachments

  • rs232 - handshake-looping1.jpg
    rs232 - handshake-looping1.jpg
    13.7 KB · Views: 88

Thanks for the reply but its not working. i am not using max232 because signal level is not more than 5.1V.
I am using this cable:

**broken link removed**

- - - Updated - - -

i am trying to send a character using example in mikroC help, i just editted it to send just one character over and over .

char uart_rd;

void main() {
ANSELH = 0;
ANSEL = 1;
TRISB = 0;
TRISA = 1;

UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize

while (1) { // Endless loop
//if (UART1_Data_Ready()) // If data is received,
//{
//uart_rd = UART1_Read(); // read the received data,
uart_rd = "H";
UART1_Write(uart_rd); // and send data via UART
//}
}
}
 

Thanks for the reply but its not working. i am not using max232 because signal level is not more than 5.1V
Even if the levels are around 5V, you still have to invert the signals.
When you connect inverters, loop Tx through Rx and using Hyperterminal test the loop.

:wink:
IanP
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top