View previous topic :: View next topic |
Author |
Message |
Setna
Joined: 24 Jun 2008 Posts: 10
|
Level Shifting Question |
Posted: Tue Jun 24, 2008 8:29 am |
|
|
Hi,
I'm using the PIC18F6722 Prototyping Board and trying to connect to a CMUCAM3 using a TTL serial port on the camera. I believe that TTL works up to 5V where the RS-232 outputs up to 12V. Do I need another level shifter between these two devices to get them to work or is there some other method that might be easier?
Also, the camera is only transmitting, it does not have to receive anything on its receive pin. Thanks. |
|
![](templates/subSilver/images/spacer.gif) |
stewart
Joined: 28 Nov 2005 Posts: 12
|
|
Posted: Tue Jun 24, 2008 8:48 am |
|
|
Setna,
I am not sure what a CMUCAM3 is, but
Quote: | using a TTL serial port on the camera |
As you said, TTL is commonly 5V and I assume the 5722 board is also 5V. The fact that we call the serial interface RS232 is from a standards committee back in the 80's. +-12V was pick to gain some noise immunity and they had those voltages handy, so they did the level shifting right on the board, that is from the UART chip (5V) up.down to +-12V.
in your case, it sounds like there is no level shift required because both side are 5V. That is if you are sure that the camera is 5V and not 3.3V please be sure.
I hope my explanation helped more than confuse.
Stewart |
|
![](templates/subSilver/images/spacer.gif) |
Setna
Joined: 24 Jun 2008 Posts: 10
|
|
Posted: Tue Jun 24, 2008 9:18 am |
|
|
Stewart,
I have checked the TTL port and it is at 5V. I guess now my question is, should I use #USE RS232 in my code or setup_uart()?
Also, if I'm understanding correctly, the UART Chip sends out 5V which goes to the RS-232 which alters it to +-12V. If this is correct, would i have to get the voltage before it gets the RS-232 connector, or does it matter. Thanks for your help.
Setna |
|
![](templates/subSilver/images/spacer.gif) |
stewart
Joined: 28 Nov 2005 Posts: 12
|
|
Posted: Tue Jun 24, 2008 9:24 am |
|
|
Senta
I just do the #use RS232.
Yes, tap off of the TX and RX signales BEFORE the level shifter. But you may need to break the connection from the output of the level shifter that drives your RX pin into the PIC, you don't want the camera and the level shifter fighting over the RX pin. Also the same may be true FOR the TX pin on the PIC, it may not drive both the level shifter and the camera with a nice sharp edge.
Stewart |
|
![](templates/subSilver/images/spacer.gif) |
Setna
Joined: 24 Jun 2008 Posts: 10
|
|
Posted: Tue Jun 24, 2008 9:28 am |
|
|
Stewart,
Thanks for all your help.
Setna |
|
![](templates/subSilver/images/spacer.gif) |
|