RS485/422 to UART , TTL


Closed Thread
Results 1 to 13 of 13
  1. #1

    Default RS485/422 to UART , TTL

    Has anyone here tried hooking up an RS485 or 422 type device directly to UART pins on a PIC without a converter. I know there is A,B and GND signals with differing polarity related to ground ?

    Don
    amgen

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Re: RS485/422 to UART , TTL

    I have done it many times. MAX13080E. Why would you need a converter? The MAX parts have logic levels on one side and RS-485 signals (both full and half duplex options) on the other.
    Charles Linquist

  3. #3

    Default Re: RS485/422 to UART , TTL

    I am looking at WizNet810 485 to ethernet module, about $20, and I always try to reduce/eliminate glue-logic. I have been using the wiz710 serial to e-net but the uart output of TX & RX has to be inverted. Thats why I was wondering about hooking directly to the module in-out with no other items on the 485 bus. I think the module has half and full duplex, selectable.

    Don

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    If you mean Wiz107 & Wiz108, the 108 requires a differential input which you cannot do directly - that's why they make transceiver chips. Why not just use Debug/DebugIn and invert the logic with your Wiz107 serial adapter?

  5. #5

    Default Re: RS485/422 to UART , TTL

    Yes, meant Wiz108 and 107, I don't have a 485 device for testing. But just thinking, differential input only means A>B by 2volts and B>A equals the 1's and 0's, so may be able to use voltage divider resisters on A or B and TX then on other pin for transmit to 485, and to recieve from 485 is just one of the differential outputs and gnd.
    I am now using hardware TX and RX from USART and interrupt for both in my program to send and recieve data. Since Debug isn't for interrupts, that would change the whole setup.
    The 107 generally works OK but it would hap-hazardly(?) erase its flash IP settings making it inoperable until reprogramming the flash, but it seems better since loading newer version of operating program from WIZ.
    I also saw the $30 802.11 WIZ module a few days ago and would like to try that too.

    Don
    Last edited by amgen; - 22nd September 2011 at 03:24.

  6. #6
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    What PIC? On some (e.g. 16F88), you can access inputs/outputs of both comparators and use them as inverters.

    However, I haven't used the Wiz107SR module you are using, but most serial-to-ethernet modules intended for interfacing with a µC use positive logic. And, the datasheet for the Wiz107SR indicates you should make direct connections with no need to invert. Connect module TXD to PIC RX and module RXD to PIC TX. You may need to jumper RTS & CTS if you are not using flow control (seldom needed for this) but this may be handled in the configuration of the Wiz107SR

  7. #7

    Default Re: RS485/422 to UART , TTL

    Thanks Dave,
    I have been using the 107 for a while and once familiar, its straight forward. Have you used the WIZ programming tools yet ?
    There is config prog for serial hookup and one for network access.
    The 107 has a RS232 converter, so when I first started using it I had to use inverted mode serout to hook-up direct to send and recieve, then going to hardware TX & RX on an 18F2525, that polarity is oposite RS232 so I added transisters to invert both signals. Now, I havn't tried the TX,RX polarity setting in BAUDCON reg. I have the TX also hooked to a FTDI usb serial module so I can read the data on Hyperterm while turning on and off the network connection.
    Name:  Capturea.JPG
Views: 2404
Size:  39.2 KB
    Saw your other post about shield (why is it called shield ?). I will look more at that, can you add hookup for the new WIFI module along with the 107 and 108. I am interested in those circuits and assemblies.

    Don
    amgen

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    "shield" is Arduino's terminology for the stackable add-on boards. See...
    Thanks for the picture - that clears things up. WizNET's documentation is sometimes lacking. I'll need to make sure they're not doing something equally idiotic on the WizFi810. I have the Wiz110SR so assumed the Wiz107SR would not be a duplicate but w/o a DB9.

    It makes no sense to do shields for the Wiz107 & Wiz108 as the shields interface with a µC that expects/uses positive logic. I need to keep the designs as universal as possible. If they have a similar module w/o the transceiver, I'll consider designing the shield to accept one or the other.

    And, I do not know when I'll get them built. I have age/health issues (plus hospital/doctor bills) that will delay things. On top of that, nurses from the VA visit almost daily so it's tough to get any continuity going on my projects.

    I've not tried the 18F2550 so don't know whether you can invert both TX & RX. Nor do I know whether you can get at the comparators to use them as inverters. Maybe others who use it can comment.

  9. #9
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    I meant WizFi210.

    I will look at incorporating support for their WIZ812MJ on the same shield as the WizFi210. It will be either/or as the WizFi210 is SMD and once installed you cannot "unplug" it and plug-in the WIZ812MJ.

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    I misread the Wiz812MJ datasheet - it's SPI or parallel - not serial. Their only ethernet-to-serial TTL seems to be the Wiz105SR and it may not be possible to mount to a shield designed for the WizFi210.

  11. #11
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    OK, the Wiz105SR just barely fits on a shield PCB with enough room left over to squeeze in a 2x6 header that can connect to the module via a ribbon cable. So, while I'm still waiting on answers to a couple of questions, I'm fairly sure I'll design a shield for the Wiz105SR and the WizFi210. Both are among the least expensive modules of these types.

  12. #12

    Default Re: RS485/422 to UART , TTL

    Dave,
    the WIFI210 data sheet says UART input, Shoud it be soldered to some kind of connector pins so it can be removed or replaced ? Mabye the different modules could fit the same connectors so a choice of boards could be used, like wifi, ethernet, bluetooth etc.

    Name:  Capturec.JPG
Views: 2291
Size:  83.0 KB
    Name:  Captured.JPG
Views: 2284
Size:  22.0 KBDon

  13. #13
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: RS485/422 to UART , TTL

    PICs and other µCs have UARTs - that's not the same as line drivers or transceivers. Fig. 9 in the WizFi210 manual makes it clear that it has 0-3V levels. The US dealer for WizNet checked the output of the Wiz105SR - it's 0-3V so it will need level conversion which can be as simple as a Schottky diode and pullup resistor (which will also work with a 3.3V supply). See this drawing which shows another (part of a) shield I'm working on that has six such level converters ... Name:  max4321e.png
Views: 5655
Size:  19.8 KB

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts