Sign in to follow this  
Followers 0
ace21122112

DF1 max232 cant connect

6 posts in this topic

I am trying to use a PIC microcontroller to talk to a micrologix 1000 using DF1 I am absolutley sure I have the command sytax correct. I have used serial comm software on my laptop to simulate it and it works perfectly on both sides the PIC microcontroller and the Micro funtion properly but I can't seem to get them talking to each other. No 10 05's 10 06's or anything completly dead. I am using a max232n chip as the interface and I think there may be still some kind of issue regarding the levels etc (however it will talk to my PC just fine). Has anyone tryed to do this before and if so any insight to what I am doing wrong? Thanks Andrew

Share this post


Link to post
Share on other sites
Nothing beats measuring, right ? Get a breakout box and a scope and compare the signal levels between when the MicroLogix is connected to the PC and when it's connected to your microcontroller. Also remember that the MicroLogix has a DTE type port; if your microcontroller board is DTE as well, you're going to hook it up with a null-modem cable. The A-B 1761-CBL-PM02 cable is a null-modem cable, because it's meant to connect PC's (which are also DTE ports) to the controller. I don't imagine you've overlooked this, but I'm mentioning it for the folks watching at home. EIA-232C is pretty darn standard (and very forgiving of anything but ground loops) and the MAX232 is in zillions of devices. I wouldn't be surprised at all if you tore apart the MicroLogix 1000 and found one in there too.

Share this post


Link to post
Share on other sites
I modified the pm02 cable by cutting it and left only the txd rxd and ground wires connected. Go my hands on a scope, these are my findings When I connect Microcontroller to Laptop via max232 signal voltage swings from -8 to +8 (which is correct) I can talk just fine When I connect pm02 cable and load up my rs 500 voltage looks very similar (again can connect/download/ monitor and everythings good) When I connect microcontroller to Micrologix via max232 the voltage swings from -8 to just about 0 not quite (never gets into the positive) seems like something in the micrologix is loading it down. but yet can communicate with the laptop no problem.

Share this post


Link to post
Share on other sites
Nevermind, do I feel like a tool. The cable I was using to test the micrcontroller with the laptop was staight thru (I thought it was null modem) and the lines were backwards on the microcontroller board which explains why I could talk between the two. reversed the lines on the microcontroller..... all good now ANdrew

Share this post


Link to post
Share on other sites
Nothing beats measurement ! Thanks for posting with the resolution. What is the application for which you are interfacing the MicroLogix and the PIC controller ? I've always wanted to learn about PIC and AVR stuff but have never had the time as a hobby or the opportunity professionally.

Share this post


Link to post
Share on other sites
Set up a 20x4 (80) character LCD display. made the PIC read the values of 80 integer registers (for example N7:0 - N7:79) then display the ascii equivilent of each in its respective Character block... Then read a 4x4 Matrix keypad and write its data back to the AB plc into a B register. In essence a dirt cheap HMI Edited by ace21122112

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0