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.

Simple UART question

Status
Not open for further replies.

AtomSoft

Well-Known Member
hey people i am familiar with UART no issue. But was wondering since i am only going to receive data how would i go about NOT using a Max232 type IC?

Can i use a transistor to turn the Serial (Rx) line to 5V when a Voltage is + (which is a Logic 0 on serial) and turn off when voltage is - (logic 1)

Any thoughts would be awesome!!!!
 
1 more question... if switching at 300ns whats the bps MAX?

Like i want to use another Transistor and it switches at a total of about 300ns.. which includes RISE, STORE, FALL time... The total is 300ns...or so

Now if it is... 1 / .0000003(300ns) then i get:3,333,333 3.3mhz i correct? Im sure im not but heh
 
Last edited:
I think you forgot a few zeros.
 
Switching at 300nS would produce a baud rate around 1,500,000 bps. Maybe you meant 300uS which would be 0.5/0.0003 =1,500 bps as it takes two transitions per bit.

Mike.
 
Well I wasn't the first person to think of doing PC port serial with just a resistor, that is VERY old school from early 80's with the first XT PCs.

It's a shame the PIC's don't have an "invert" bit on the USART. Some other micros do.

With the PICs the only way you can do it with just a resistor is to manually generate INVERTED serial (which is what my code does in the link above).
 
You can also use the comparators as inverters.

Also check bit 4 of register BAUDCTL on the 16F886. I've not tried this but it suggest you can send inverted data but not receive!! Very strange feature to add.

Mike.
 
I use it with the debug command in picbasic pro you can send the data any way you want it.
 
The other first one would be my choice since it seems safer heh mainly because there is no straight connection. I only need Rx tho so its even smaller heh...
 
Well I wasn't the first person to think of doing PC port serial with just a resistor, that is VERY old school from early 80's with the first XT PCs.

Older than that, XT's were fairly late machines, such tricks were common long before IBM became involved.

It's a shame the PIC's don't have an "invert" bit on the USART. Some other micros do.

Apparently some later PIC's do, but I've never had occasion to use one.

With the PICs the only way you can do it with just a resistor is to manually generate INVERTED serial (which is what my code does in the link above).

My tutorials do the same, it gives you more flexibility doing it in software, and it's perfectly fine for most uses.
 
It will not hurt the pic or the computer but it only works with software. picbaisc pro has a simple command that lets you use it.
I've done the same as mike pomme posted with just plain transistors don't even need the fets
 
They will work better I think then a 2n3904 but there 3 time higher I got 400 some where cheap there on a row and some Bc250 the fets are good if you have them some times hard to find.
 
Status
Not open for further replies.

Latest threads

Back
Top