CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Quick rs232 question
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Apr 02, 2009 8:29 pm     Reply with quote

I have used the NXP SC16IS75x serial UARTS with good success. I put a driver for these in the code library.
dave10



Joined: 09 Apr 2013
Posts: 14
Location: UK

View user's profile Send private message

Question regarding SC16IS752 IC2-to-Uart device
PostPosted: Tue Apr 09, 2013 8:40 am     Reply with quote

dyeatman wrote:
I have used the NXP SC16IS75x serial UARTS with good success. I put a driver for these in the code library.


Hi I require a third uart for the project that I am working on. I have searched the internet and forum which has come back with two tried and tested devices.
' Maxim 3100 and the NXPSC16IS752'

I would like to use the NXP device as it is cheaper and seem more favoured on what I have read from other peoples experiences. But the NXP is only a 3.3V device and my pic (PIC18F87K22T) is a 5V device. Will the two devices talk sucessfully between one another or do I need a level shifting device ?

The other solution is to write a software Uart as I do not need high speed coms which I have never done before is there a example on the forum. I can look at.

Any help greatly appreciated
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Apr 09, 2013 9:04 am     Reply with quote

So much depends on what the UART has to do.
I did post here some time ago, a crude software receive using a timer interrupt, as an example, to show how this can be done. For baud rates that are no more than perhaps 1/1000th the CPU clock, this can be simple, cheap and pretty reliable. A google search should find the post. Had one mistake, and that was fixed by another poster a moment later in the thread.
The higher the baud rate the harder this is.TX & RX can be done in the same interrupt. Other interrupts can interfere.
You can cheat a lot of ways if you can change the baud rates involved. For instance I recently needed to get data 'out' of a chip without any spare interrupts. The software UART was perfectly acceptable, if I turned the baud rate up, so that the entire byte is sent in only a few uSec, allowing then interrupts to be disable on a 'per character' basic, and still not interfere with the other peripherals.
The Phillips UART will work OK with a 5v device.
It has 5v tolerant inputs (so you can use pull-ups to 5v on the I2C bus), and the output is genuinely 'open collector', so can also drive a signal that is pulled up to 5v. They designed it to be 'reverse compatible' with the older 5v version, except for the supply.
There is a big 'caveat' waiting to catch you though. The 5v tolerant inputs, are only 5v tolerant, once it's 3.3v supply is established. You need to ensure it gets it's supply at least as early as the 5v pull-up resistors....

Best Wishes
dave10



Joined: 09 Apr 2013
Posts: 14
Location: UK

View user's profile Send private message

Question regarding SC16IS752 IC2-to-Uart device
PostPosted: Tue Apr 09, 2013 9:49 am     Reply with quote

Thankyou Ttelmah for the prompt reply really appreciated.

I think I'll try using the NXP device to start with and play around with the test code from the code lib for starters ??
Regarding the potential hazard you mention. Could I not declare the I2C pins within the pic as inputs intially and upon power-up of the 3.3V rail change the pin configuration to I2C.

Problem being the 3.3V Regulator is powered from 5V supply

What do you think is this a good way to go ?
dave10



Joined: 09 Apr 2013
Posts: 14
Location: UK

View user's profile Send private message

Question regarding SC16IS752 IC2-to-Uart device
PostPosted: Tue Apr 09, 2013 9:49 am     Reply with quote

Thankyou Ttelmah for the prompt reply really appreciated.

I think I'll try using the NXP device to start with and play around with the test code from the code lib for starters ??
Regarding the potential hazard you mention. Could I not declare the I2C pins within the pic as inputs intially and upon power-up of the 3.3V rail change the pin configuration to I2C.

Problem being the 3.3V Regulator is powered from 5V supply

What do you think is this a good way to go ?
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Apr 09, 2013 10:04 am     Reply with quote

Why not just use the PIC18F46K22 or similar device? It has 2 hardware UARTS as well as a ton of memory and other peripherals.Has to be simpler to wireup, no additional chips,simpler coding
I 'migrated' from the 4550 when I found out I could buy ttl-usb modules for $2...
Just an idea....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group