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.

[PIC] Xbee with SoftUart on PIC18F452

Status
Not open for further replies.
@Gorgon it depends.
If simultaneous RX/TX is not required, there is nothing wrong in using bit banging C code (Timer delay or CPU delay). Disabling hardware UART interrupt is not even required if the Rx stream is a response of Tx command/data. Of course, INT0 or other random interrupts may cause errors.

@adwnis123
If timing is crucial in your application then.
1. Like Gorgon and others suggested use additional chip.
2. Change the controller as FVM suggested (I prefer this, since your application demand is achievable without additional hardware).

If timing isn't that crucial ie., tx and rx operations of one of the UARTs is predictable or originated within the controller (Rx stream as response of Tx command/data) + no other interrupts are using, go for soft uart (bit banging code - timer or cpu delay). From your previous posts I assume soft uart will be enough for your application.
 
Last edited:

Finally I chose MAX399, but in the datasheet
https://datasheets.maximintegrated.com/en/ds/MAX398-MAX399.pdf

it says
V+ = 5 Volt,
V- = -5 Volt.

The problem is I use 0-5 Volt Supply voltage. How will I take the -5 Volt?

The MAX399 Datasheet also states, Section: Applications Information, Page: 8,

Operation with Supply Voltages Other than ±5V

Using supply voltages less than ±5V reduces the analog
signal range. The MAX398/MAX399 muxes operate with
±3V to ±8V bipolar supplies or with a +3V to +15V single
supply. Connect V- to GND when operating with a single
supply.
Both device types can also operate with unbalanced
supplies, such as +10V and -5V. The Typical
Operating Characteristics graphs show typical on-resistance
with ±3V, ±5V, +3V, and +5V supplies. (Switching
times increase by a factor of two or more for operation at
+5V.)

Therefore depending on your design you maybe able to use a +5v single supply. If you are in need of the voltage range afforded by a bipolar supply to handle RS-232 level signalling, you maybe able to simply tap the +/- 10v rails from your RS-232 transceiver (MAX232, etc). Such a technique is demonstrated in the Maxim Appnote 588.

MAX399App.JPG

BigDog
 
For some reason, I see now the answer! Thanx a lot!!
 

I am using MAX399 with LTC1046 but I get strange characters at the end of the UART!!!!!! What is wrong?
 

If the last character in a message or sequence is warped, I suppose you are not waiting until the last character has been transmitted.
If you turn off the transmitter, or cut off the transmission before the last character has been shifted out, it will be only partial, and unreadable. To fix this you need to check the flag that indicates transmission end, and not the flag for buffer empty, when you know the last character(s) is in the shift register.

This is a common problem when you work with real time applications, the program i running ahead of the time in the real world.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top