Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

RS485 communications interface with PIC

RS485 communications interface with PIC

RS485 communications interface with PIC

Hi all,

First off, if this is in the wrong place, then please let me know.

I am very new to PIC programming, but I do know a little about writing embedded software in C and assembler.  I have been asked to design an interface to send status information over an RS485 link for a power supply application, but I know nothing about what tools I need for development, or to implement the application

Can anyone help get me started?

My initial research seemed to show that I may need something like a PIC16F628, is this approporiate for what I want to do?

Dave Roseman

RE: RS485 communications interface with PIC

Google pic rs485
lots of stuff. Code, demo kits, ect.
rs 485 is similar to rs 232 but with differential drivers.
So, you may want to Google pic rs 232, or pic usart.
Also check Microchip App notes.

RE: RS485 communications interface with PIC


You are in luck. And I guess this is the right group to be talking with.  

There are various free tools that you can get from Microchip to implement your task.  The assembler and a simulator is free from them. Just wander over to the website.

Depending upon the complexity, there are even (I believe) free  allbeit limited versions of the C complier available.  I personally use the CC5X (search google) for a copy of their software.  Their's is kind of strange.  The *FIRST* commercial project you use it for is FREE, then you are supposed to buy a copy for any additional ones......

Since this seems to be a "commercial" project, I think that you will find that spending a little bit of money for development hardware might be a great tradeoff for your efforts.

I would suggest that you look at the microchip's "bottom end" hardware development stuff.  Specifically the PICKIT II which can be had for very little money.  Also, maybe buying a development board would prove cost effective.  That way, you know you have some core hardware that works.  

Instead of the 16F628 (which is a fine processor) you might consider the "newer" version of the chip the 16F648 which is only a couple of pennies more in cost, but allows one some additional features. Not the least, the doubling of the flash memory size.  It is pin for pin compatible, and might prove to be cheaper over time as they tend to have the older processors become lower in quantity and hence higher (a little) in cost.

There are various "self help" guides on the web I liked the one from Nigel:


I didn't use the prototyping system he did. I got one of those "push in" breadboards and it worked just fine for me.
That and a 5V power supply and a logic probe is almost all that is/was needed to get the tutorial stuff done.  A handful of LEDs and resistors, maybe a cap or two and you are ready to rock and roll.

For the rs485 portion of the code, well the rs485 is only the electrical interface connection, not a "protocol" for devices.  For that, you can easily simulate the interface using rs232, then after it's working, convert to rs485 either with custom hardware or some commercially available converters. For the "other end" of the device, if one has an RS232 port on the PC, one can (with some "funnies" on the PC side) use Hyperterminal in a windoze system or minicom on a 'nix system.  I prefer minicom as there are many less "gottchas".  In fact it might be interesting to hear from the group as to their recommendations for the windoze application of choice in lieu of hyperterminal.

This little note should get you started.  Oh, and there are many other fine microprocessors out there.  Many folks like the AVR line of them.  I got started with the PIC and since the majority of the investment is in the learning curve, I found no reason to change over.  I have done some AVR programming, but the pic for me is the tool of choice for the class of applications that it covers.

One other thing, the PIC is a "Harvard" or non Von Neumann architecture.  Many folks find the instruction set irritating.  For me however, I found that the device lends itself well to basically I/O processing.

Hope this helps.


   Rich S.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close