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.

RS232 to 16F pic

Status
Not open for further replies.

Mosaic

Well-Known Member
I realise that regular rs232 requires a max232 level converter. But if I want to run RS232 via a USB serial port driver...is the level conversion required?
 
I realise that regular rs232 requires a max232 level converter. But if I want to run RS232 via a USB serial port driver...is the level conversion required?
Depends what you want, or what you're doing with it. You can do it with USB-to-Bridge Chip-to-"sorta TTL":

**broken link removed**

**broken link removed**

**broken link removed**
 
So the CA-42 cable delivers logic level 57.6K baud to a PIC?

Otherwise if i want to roll my own USB-serial converter I need to use the MAX232 still?
 
So the CA-42 cable delivers logic level 57.6K baud to a PIC?

Otherwise if i want to roll my own USB-serial converter I need to use the MAX232 still?

Nope just get a 1814k50 and microchips usb stack **broken link removed**

And roll your own

You would use the max if you want USB to PC serial converter
 

Attachments

  • USB_ser..PNG
    USB_ser..PNG
    5.8 KB · Views: 384
Your sketch shows a max232....I do happen to have an 1814k50...so I am interested in this...
 
On the 18F14k50 you can invert the RS232 signals and not need a MAX232. However, if you just want PC to Pic then it's all done through USB, no other chips required.

Mike.
 
Mike (Pommie ) have you tried swordfish basic with the 18f14k50? I have but I never got the dang thing to work It would find it and show up as unknown USB device. But Jalv2 and C18 are easy as pie.

I've only tried the CDC
 
Last edited:
So the CA-42 cable delivers logic level 57.6K baud to a PIC?
Yup. It should be capable of much faster rates, but I haven't looked into it much.

The CP210x and MCP2200 can do up to a million baud. Surely the Prolific chip in the CA-42 must be capable of more than 57.6K. I just don't know (yet).

Otherwise if i want to roll my own USB-serial converter I need to use the MAX232 still?
Only if you're planning on plugging the serial end of your converter into a DB9 socket that is outputting full-voltage RS-232 signals (from another MAX232 probably).

If you only want this to be able to comm at TTL levels to microcontrollers or whatever then you don't need the MAX232.

If you do use a MAX232 it limits your top data rate to 120kbps (200kbps for MAX232A). Probably not a problem, but something to be aware of.
 
Last edited:
Ok, let's step back from the 18F for a mo'.

Let's see if i got this down:


16f886 MCU:
1) talk to rs232 DB9 ( requires MAX232 to handle voltage.)
2) Serial conn. via usb/serial virtual driver in XP. This does NOT require MAX232.

Is that correct? Are their any signal inversions on the USB TTL sig.?
 
Last edited:
Is that correct? Are their any signal inversions on the USB TTL sig.?
Nope

That's it, I like this one **broken link removed**

**broken link removed**

This is a very useful module that is designed to convert serial port with RS232 level to USB port.
The upper board incorporates a CP2102 IC which allows the communication between USB and serial port with TTL signal.
USB B female and Mini USB B female are pre-assembled on board for your convenienve.
The lower board incorporates SP3243 IC which allows the communication between TTL signal and RS-232 signal.
Besides, male and female DB-9 connectors are also integrated on board.
You may disassemble this module into two separate PCBs for different applications.
 
Last edited:
Nope to 'is that correct.'

Or Nope to ' Are their any signal inversions on the USB TTL sig.? '
 
No you don't need a max232 if you use a usb to serial adapter that has TTL output Like the ones Futz posted or this one CP2102 USB/TTL/RS232 Serial Port Converter it has both.

You can also use the pickit2
 
The MAX232 takes the logic level output signal, inverts it (IIRC), and has a charge pump to bump the signal voltage up to real RS-232 levels (8-12 volts?) for reliable longer distance data transmission. It does the reverse for input signals.

If you're just communicating from PC to MCUs or that kind of thing, and only going very short distances, then you don't need the MAX232. Its higher voltages are necessary for getting that signal solidly to the other end of longer wires and for noise immunity on longer wires.
 
Last edited:
The MAX232 takes the logic level output signal, inverts it (IIRC), and has a charge pump to bump the signal voltage up to real RS-232 levels (8-12 volts?) for reliable longer distance data transmission. It does the reverse for input signals.

If you're just communicating from PC to MCUs or that kind of thing, and only going very short distances, then you don't need the MAX232. Its higher voltages are necessary for getting that signal solidly to the other end of longer wires and for noise immunity on longer wires.


After all this I am still not clear.Bear with me.

I understand that DB9 rs232 requires the max232.

Is it that USB operates at wrong levels for a USART 16F I/O? Is it that it runs in some type of batch data xfer mode than needs buffering to a serial stream?

Is that what the CA42 or the MCP2200 does?
 
Last edited:
After all this I am still not clear.Bear with me.

I understand that DB9 rs232 requires the max232.

Is it that USB operates at wrong levels for a USART 16F I/O? Is it that it runs in some type of batch data xfer mode than needs buffering to a serial stream?

USB is entirely different to RS232, they aren't in anyway compatible.

On a scale of one to ten, RS232 is only about one to implement, it's really VERY, VERY easy - USB is probably about twenty on the same scale!, it's FAR more difficult, and FAR more complicated.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top