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.

about the Software UART option for pic 16f877

Status
Not open for further replies.

mathewbme

Newbie level 4
Joined
Nov 14, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Cochin, India
Activity points
1,314
Hai,

I am doing a project involving communication of pic with four independent modules using UART pulse a pc communication also in UART. The role of pic is to collect data from this modules and send to the pc in a consolidated form only. so don't need any advances version.

The solution i could find was Software UART Library in mikroC PRO. so my question is...

1. Can i use it for all the four modules where communication happen in TTL, 4800, Start bit + 8 data bits + 1 stop bit, no parity pattern.

2. How do i switch in between them and how do i close them after use.

Thank You
 

Well, I only ever tried collect data from one module, RFID reader.
Interesting question here.
Hope somebody here can help you.


Linspire
 

I can only do UART software transmit. The software receive is more challenging. I also wan't know the result from somebody.
 

If all the modules have to be run simultaneously you have a problem and I doubt a software solution will work. Most soft-UARTs use interrupts to find the start of the serial bits and with only one external interrupt on that PIC it would be difficult to sense incoming data on all channels at the same time. If they operate only one at a time, you can use an external multiplexer in conjunction with either a software UART or indeed the hardware one.

Probably the simplest solution if all channels are active at once is to use external UARTS and connect to them through a single software driver. For example, I use MAX3100 devices which can generate interrupts and be read via an SPI type interface which is very easy to implement in software. You can parallel many of these devices and make them share a single interrupt pin and to some extent common SPI connections too.

Brian.
 
Yes, i require to access only one at a time. can u sagest a better mux for the purpose.
 

If only one input is monitored at a time, you can use a simple logic mulitplexer or signal gate. I often use the 74HCT4351 which has 8 inputs although you don't have to use them all. You can either actively drive the channel select pins or latch them. It can handle positive and negative input voltages but for TTL level serial such as the 16F877 uses you can forget the negative supply voltage and connect the VEE pin to ground.

Brian.
 
Hi,

My four modules is communicating in TTL level and the 16F877 is also in TTL Level. Will 74HCT4351 being a CMOS IC work for me with out a level change.
 

It certainly will. The '4351 is actually an analog switch so it passes whatever logic level is at it's input straight through to its output, it will work equally well on 3.3V or 5V systems as long as the input does not exceed the supply voltage to the IC. There are numberous other devices you could use instead, I only suggested that type because it's what I use here most often.

Brian.
 
Thank You very much. will 74HCT4051 be an alternative for the 74HCT4351 because 4351 it not available in retail sale in India.
 

Yes, it will work. the only difference between the '4051 and '4351 is that the '4351 has latched select inputs which makes it easier to use in a bus structured system. The actual signal routing and performance is almost identical betwen the two devices.

Brian.
 
I have started with it it. Thanks for the help. I will reply u as soon as i get to some conclusion.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top