Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hardware UART

Status
Not open for further replies.

richb

New Member
Hi

Maybe i don't fully understand the principles, but here goes.

I would like to connect the PIC16F628 to both a max233 and an RS485 tranceiver allowing both devices to utilise the PIC's hardware UART. Is this possible as i'm unsure how to achieve this?

If so does anyone know of any tutorials out there for some help that would be great.

Thanks

Rich
 
richb said:
Hi

Maybe i don't fully understand the principles, but here goes.

I would like to connect the PIC16F628 to both a max233 and an RS485 tranceiver allowing both devices to utilise the PIC's hardware UART. Is this possible as i'm unsure how to achieve this?

If so does anyone know of any tutorials out there for some help that would be great.

You can use my tutorials to connect one to the UART and one to a software UART. You can't have two incoming signals connected to the UART input pin, because it means you have two outputs joined together - you could have the outgoing UART pin feeding the two driver chips, two inputs together is no problem - but both will obviously output exactly the same thing.
 
You could use a bus switch, mosfets as switches, mechanical switches, as long as you dont need them both at the same time then there are a million answers to your problem.

You don't state if they need to work at the same time or not.
 
I would need to utilise them at the same time.

I will look into Nigel's tutorial on software UART for rs232 and most probably utilise the hardware UART for the RS485 tranceiver.

Thanks for help

Rich
 
There are PICs available with two hardware UARTs. However none of them are in DIP pkgs, I believe they're all at least TQFP-64's.
 
I've recently spoken to my lecturer who sudjested I look at a RS232 device with sites on either the SPI or I2C line of the P16F628a.

I've had a search around, but been unable to located this device, anyone have any idea?

Also could someone explain the down side to using Software UART, alongside the hardware UART on this chip please as he seems to think that this approach is a bad idea ? :S

Thanks

Rich
 
The MAX3100 and later variants provide a UART with an SPI interface. In my application the deep FIFO on the receiver was a considerable advantage over the onboard UART
 
Hi Papabravo,

I've been putting off playing with those long enough. Just ordered the '3110E (with int osc) in DIP and SOIC flavors and looking forward to playing with them.

Take care. 73, Mike
 
Mike said:
Hi Papabravo,

I've been putting off playing with those long enough. Just ordered the '3110E (with int osc) in DIP and SOIC flavors and looking forward to playing with them.

Take care. 73, Mike
The MAX3110E doesn't have an internal osc, you'll need a crystal 1.8432Mhz or 3.6864 if memory serves. I've got a couple of them, I wish they had internal osc.

Now you could run a PIC at the same speed and share a crystal.

PS if you want the schematic for both RS232 (I use RS485 though, easy enough to change) look for the ladybug on my "old site" It uses a MAX3110E and a PIC16F876A. Easy to steal half the MAX3110E level converters for a two RX/TX pairs.
 
Last edited:
As near as I can tell the UART part of the 3100 and the 3110 is the same. The choice is between one big expensive package ($4.73) or two smaller packages and a handfull of caps.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top