Jump to content

Modular A-10C gauge controller for DCS Bios


lesthegrngo

Recommended Posts

I'd be interested to know if anyone else has had challenges with 7 Segment displays on a master / slave setup? Or do all components work for you? And if so, do you have a different approach to the wiring

 

I haven't seen any issues with 7-segment and slave over RS-485. I am running the MAX7219 for the 7-segments on the AN/ARC-164 UHF radio

 

 

This setup has been running for a year without any issues. How have you connected your 7-segments. Directly or via a driver ship?

 

Cheers

Hans

Link to comment
Share on other sites

Hi Hans, I connected my 7 Segment displays through a MAX7219 board. It worked perfectly on my radio stack which was dcs bios straight to an Arduino uno. However, on my RS485 network, it would display the correct value initially and without even changing the frequency it would glitch slightly, and one of the digits would disappear or display an incorrect value. I can only think it was noise on my network. All the connections were good. Any ideas? In a few months time I'll be taking a look at these again, I'll drop you a video at the time to show you the glitch happening.

 

Sent from my SM-G955F using Tapatalk

Link to comment
Share on other sites

Hans, a few months back I made a PCB for the master but haven't had chance to fully test it yet. I'm hoping that, removing the large amount of wiring I had from my previous version will solve the problem. Fingers crossed.

 

Sent from my SM-G955F using Tapatalk

Link to comment
Share on other sites

Les, your slave code is missing this;

 

 

 

When you post code it may be a good idea to wrap as code.

 

KHYPimM.png

 

Just clock on the # symbol and insert the code between the the two square brackets

 

cheers

Hans

 

Thanks as ever Hans, was not aware of this function!

 

Cheers

 

Les

Link to comment
Share on other sites

Checked the code out this morning, Hans, looks like I just made an error in copy and paste into here, the void loop statement was there in the sketch

 

Here's one I did for the CMSP, it was working fine in the USB version

 

/*
 The following #define tells DCS-BIOS that this is a RS-485 slave device.
 It also sets the address of this slave device. The slave address should be
 between 1 and 126 and must be unique among all devices on the same bus.
*/
#define DCSBIOS_RS485_SLAVE 17

/*
 The Arduino pin that is connected to the
 /RE and DE pins on the RS-485 transceiver.
*/
#define TXENABLE_PIN 2

#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>
#include "DcsBios.h"



LiquidCrystal_PCF8574 lcd(0x27);  // set the LCD address to 0x27 for a 16 chars and 2 line display

int show;



void onCmsp1Change(char* newValue) {
   lcd.setCursor(0, 0);
   lcd.print(newValue);
}
DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change);

void onCmsp2Change(char* newValue) {
   lcd.setCursor(0, 1);
   lcd.print(newValue);
}
DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change);


DcsBios::RotaryEncoder cmspArw1("CMSP_ARW1", "DEC", "INC", 2, 3);

DcsBios::RotaryEncoder cmspArw2("CMSP_ARW2", "DEC", "INC", 4, 5);

DcsBios::RotaryEncoder cmspArw3("CMSP_ARW3", "DEC", "INC", 6, 7);

DcsBios::RotaryEncoder cmspArw4("CMSP_ARW4", "DEC", "INC", 8, 9);

DcsBios::RotaryEncoder cmspMode("CMSP_MODE", "DEC", "INC", 10, 11);

void setup() {
 lcd.begin(16, 2);
 DcsBios::setup();
 
}

void loop() {
 DcsBios::loop();
 lcd.setBacklight(10);
}

 

I think it's all there

 

Cheers

 

Les

Link to comment
Share on other sites

Thank you Hans!

 

molevitch, I bought htese the last time; https://www.mouser.dk/ProductDetail/700-MAX487CPA

 

Cheers

Hans

 

I ordered the same from RS Components this morning! They arrive tomorrow.

 

Let's see if this makes a difference.....

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to comment
Share on other sites

Guys, I found a local electronics shop selling the Maxim MAX487CPA chips, at (amazingly for Hungary) a low price, so I bought ten plus IC 8 pin sockets as suggested by you guys.

 

This is the specification sheet

 

 

https://www.mouser.co.uk/datasheet/2/256/MAX490-1389177.pdf

 

 

My problem is that I am not certain which pinout arrangement pertains to the MAX487CPA chip, and they are very different.

 

Can you help me avoid screwing them up by telling me which of the pinout diagrams I should be referring to?

 

Thanks

 

Les


Edited by lesthegrngo
Link to comment
Share on other sites

Well, I tried again with the new chips. Nothing.

 

Attached is the pinout I was using, plus a photo of the actual chip. In order to rule out powering issues I fed the mega from the USB connected to the PC, which in turn supplied the +5v to the master MAX487 chip.

 

The slave (an Arduino Uno) was then connected to a USB charger, so that then fed the LCD module and the slave MAX487 chip with the +5v.

 

The chips are the type that push into IC sockets, and I soldered the sockets onto the boards before inserting the chips.

 

Wiring is as follows

 

Mega pin 2 - master MAX487 chip pins RE and DE

Mega +5v pin - master MAX487 chip VCC pin

Mega GND pin - master MAX487 GND pin

Mega RX1 pin - master MAX487 RX pin (RO)

Mega TX1 pin - master MAX487 TX pin (DI)

Mega USB connection - PC running DCS

 

master MAX487 pin A - slave MAX487 pin A

master MAX487 pin B - slave MAX487 pin B

 

Uno pin 2 - slave MAX487 pins RE and DE

Uno +5v pin - slave MAX487 VCC pin and LCD module VCC

Uno GND pin - slave MAX487 pin GND and LCD module GND

Uno RX pin - slave MAX487 RX pin (RO)

Uno TX pin - slave MAX487 TX pin (DI)

Uno A4 pin - LCD module SDA pin

Uno A5 pin - LCD module SCL pin

Uno USB connection - USB charger

 

The master sketch is as follows

 

/*
 Tell DCS-BIOS this is a RS-485 Master.
 You will need to flash this to a Mega 2560.
*/
#define DCSBIOS_RS485_MASTER

/*
 Define where the TX_ENABLE signals are connected.
 You can connect up to three half-duplex RS-485 transceivers.
 
 Arduino Pin             RS-485 Transceiver Pin
 TXn ------------------- DI (driver input)
 RXn ------------------- RO (Receiver Output)
 UARTn_TXENABLE_PIN ---- /RE, DE (active low receiver enable, driver enable)
 
 If you have less than three transceivers connected, comment out the corresponding
 #define UARTn_TEXENABLE_PIN lines for receivers that are not present.
*/
#define UART1_TXENABLE_PIN 2
/*#define UART2_TXENABLE_PIN 3
#define UART3_TXENABLE_PIN 4
*/
#include "DcsBios.h"

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

 

The slave sketch is this

 

/*
 The following #define tells DCS-BIOS that this is a RS-485 slave device.
 It also sets the address of this slave device. The slave address should be
 between 1 and 126 and must be unique among all devices on the same bus.
*/
#define DCSBIOS_RS485_SLAVE 1

/*
 The Arduino pin that is connected to the
 /RE and DE pins on the RS-485 transceiver.
*/
#define TXENABLE_PIN 2

#include "DcsBios.h"
#include  "Wire.h"    
#include  "OLedI2C.h"  
OLedI2C LCD;

/* paste code snippets from the reference documentation here */
void onCmsp1Change(char* newValue) {
   LCD.sendString(newValue, 0, 0);
}
DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change);

void onCmsp2Change(char* newValue) {
   LCD.sendString(newValue, 0, 1); 
}
DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change);


void setup() {
 DcsBios::setup();
   Wire.begin();
 LCD.init();  
}

void loop() {
 DcsBios::loop();
}

 

I just can't see anything wrong with any of it. The Mega TX light flashes, but the Uno slave just sits there as if nothing is happening. Is there something in the slave sketch missing to tell it to listen to the MAX487 chip?

 

I've included pictures of the master and slave for you.

 

I have to say I'm getting to the end of my tether on this as I just cannot see anything at all wrong......

 

Cheers

 

Les

1483097809_MAX487pinout.jpg.b574cd8d749405e668ace4cc8c26bc18.jpg

20190618_064445.thumb.jpg.0a83629730c18c00f2b472ca6cc55842.jpg

20190618_071633.thumb.jpg.76326fd496b2c9eb0de1cff53b0bbcf5.jpg

20190618_071726.thumb.jpg.88adb10e70a8387b5c137e460afb1b34.jpg


Edited by lesthegrngo
Link to comment
Share on other sites

Your wiring looks good to me.

Not shure if that matters, but I use brackets <> for all includes except for "DcsBios.h".

 

#include "DcsBios.h"
#include <Wire.h>
#include <SPI.h>
#include <AccelStepper.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Thanks Vinc

 

Some 'progress'..... I reconnected everything after work today, after checking the connections again, after all what else could I do? As I expected, nothing.

 

In disgust, I went and got a beer from the fridge in the garage, and got distracted by the Cricket game, and forgot to unplug the setup. After listening to England doing well for a change I went back to switch everything off.... and found that something had happened. Take a look at the first two pictures, the first is what was being displayed, and the second is what should have been displayed by the 1602A module.

 

I sat and watched it, and after a few more minutes, another character appeared. Five minutes after that, some of the original characters corrupted, and another character appeared, albeit apparently out of the correct place.

 

Now, an hour later (about two hours after plugging it in), I have the characters displayed in the third photo.

 

At one point the display actually looked like the correct info, but soon corrupted again. I also noted that changing the configuration in game did not result in the new info being displayed, but after a while the LCD display changed to show some different characters.

 

So something is happening, and as I finish typing this, the display shows as picture four and the in game displayshows picture five

 

Feels like I've been beta testing LSD......

 

 

Les

20190618_183846.thumb.jpg.970f8410db1dedbcb355108898ce375a.jpg

20190618_183854.thumb.jpg.41c888d281e937b590f51c7a037de537.jpg

20190618_185214.thumb.jpg.4b1440c8f52f10efd448a2dd1a686fea.jpg

20190618_185727.thumb.jpg.f1ea187965e5de9ebdd5bec4eee08f3e.jpg

20190618_185732.thumb.jpg.dc5625e3e366f38b36eb60f472afbee0.jpg

Link to comment
Share on other sites

This is the one I just used that shows the garbled and delayed data in the previous post

 

/*
 The following #define tells DCS-BIOS that this is a RS-485 slave device.
 It also sets the address of this slave device. The slave address should be
 between 1 and 126 and must be unique among all devices on the same bus.
*/
#define DCSBIOS_RS485_SLAVE 1

/*
 The Arduino pin that is connected to the
 /RE and DE pins on the RS-485 transceiver.
*/
#define TXENABLE_PIN 2

#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>
#include <DcsBios.h>

LiquidCrystal_PCF8574 lcd(0x27); // set the LCD address to 0x27 for a 16 chars and 2 line display

int show;


void onCmscTxtJmrChange(char* newValue) {
lcd.setCursor(0, 0);
lcd.print(newValue);
}
DcsBios::StringBuffer<8> cmscTxtJmrBuffer(0x1096, onCmscTxtJmrChange);

void onCmscTxtChaffFlareChange(char* newValue) {
lcd.setCursor(4, 0);
lcd.print(newValue);
}
DcsBios::StringBuffer<8> cmscTxtChaffFlareBuffer(0x108e, onCmscTxtChaffFlareChange);

void onCmscTxtMwsChange(char* newValue) {
lcd.setCursor(0, 1);
lcd.print(newValue);
}
DcsBios::StringBuffer<8> cmscTxtMwsBuffer(0x12b0, onCmscTxtMwsChange);

void setup() {
lcd.begin(16, 2);
lcd.clear();
DcsBios::setup();

}

void loop() {
DcsBios::loop();
lcd.setBacklight(255);
}

 

 

 

Note, I also changed the master sketch to try using pin 3 in stead of pin 2 in case it was damaged in my earlier trials with no effect

 

Cheers

 

Les

Link to comment
Share on other sites

I had one more unopened Nano board left, so in the interests of science and beer I thought I would see if it made any difference. The answer is no, not really, although this time I see the Nano RX light working. The display still took five minutes or so to display anything, and when it did it was partial and corrupted, and seems to be taking longer to display the rest of the data

 

Cheers

 

Les

20190618_195046.thumb.jpg.ce524224b62e493a27446c38c59f843d.jpg

Link to comment
Share on other sites

Hi Les,

 

Three small comments;

1. You write that Mega RX1 pin is connected to master MAX487 RX pin (RO) and Mega TX1 pin is connected to master MAX487 TX pin (DI). Which pin numbers is that on your Mega. Remember there is something 'funny' about the texting on the clone Mega's.

2. Do you have a interconnecting GND between the two MAX487 chips? It may not be relevant but I have it to ensure that GND is the same on all components.

3. Try and make a simple Slave sketch just to get your RS485 going. I remember Tekkx writing something about his code for the CDU LCD worked over USB but he couldn't get it to run over RS485. The simple code I am thinking of something like this;

/*
 The following #define tells DCS-BIOS that this is a RS-485 slave device.
 It also sets the address of this slave device. The slave address should be
 between 1 and 126 and must be unique among all devices on the same bus.
*/
#define DCSBIOS_RS485_SLAVE 126

/*
 The Arduino pin that is connected to the
 /RE and DE pins on the RS-485 transceiver.
*/
#define TXENABLE_PIN 2

#include "DcsBios.h"

/* paste code snippets from the reference documentation here */
DcsBios::Switch2Pos aapCdupwr("AAP_CDUPWR", A0);
DcsBios::LED masterCaution(0x1012, 0x0800, 13);

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

Nothing fancy just enough to check communication from Slave to Master (toggle switch) and from Master to Slave (Master Caution light). The former can be tested without DCS running, simply by started SOCAT with the COM port the Mega Master is connected to and then flip the switch. When running SOCAT without DCS then you can clearly see all the communication coming from Slave to Master;

 

 

I am putting together a small post with the simple setup I did last night to get the Master-Slave running over RS485. Will post it later in a separate thread.

 

Cheers

Hans


Edited by Hansolo
Link to comment
Share on other sites

Hey, Hans, thanks for chipping in again

 

Fast responses while I figure out the rest

 

RX pin is 18, TX 19

 

The ground is not shared between the two Max487 chips in this instance - in my earlier attempts it was, as was the 5V supply. Now the ground is supplied to each MAX487 by the individual Arduino GND pins, as are the +5v supplies.

 

I can easily interconnect the two ground pins for testing

 

Cheers

 

Les


Edited by lesthegrngo
Link to comment
Share on other sites

Confirmed, that at the original Mega layout pin D18 is TX1 (connectet to DI) and pin D19 is RX1 (connected to RO).

 

Are you sure that the PCF chip's I2C address is 0x27 ?

You could easily read out I2C addresses in the serial monitor by using the i2c_scanner sketch: https://playground.arduino.cc/Main/I2cScanner/


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Right, I have been busy today trying a few things. Generally positive, but with some glitches

 

The two days away made me review everything I was doing. The fact that I was able to make the simple test work made me take a step back and look at what did and didn't work, and I read and re-read all the posts pertaining to this saga. One of the points that sprang to mind was that I was able to make the CMSC sketch work with the RS485 network briefly at the beginning, yet the later trials were working but differently. A quick look at the timelines gave me a lead - the initial sketch I was able to make work was for a simple 1602A LCD module, and the one that was working erratically was the PCF8574 module. I did not get the USB version of the PCF8574 working until well after, and it was due to not getting the RS485 network working that I spent the time to resolve the sketch for it.

 

So that meant that I had been using the 1602A module sketch for trialling the RS485 setup. A search on the PC located the sketch used, so I swapped the LCD module hardware into the wiring, loaded up the old sketch, and away it went. Success. And repeatable success too, I could stop it, disconnect it, reconnect it and it would still work.

 

I went back to the PCF8574 hardware and tried that, with the same results s I had been getting earlier in the week. That meant it had to be something in the hardware or the sketch. I tried it using the USB sketch without the RS485, and it worked fine, so for me that narrowed it down to the sketch.

 

As a result I went through the RS485 sketch line by line, and found the error. I had screwed up the address that the data was being reported to, instead of it being (8, 0) I had put (4, 0). I believe that this then was trying to force the LCD module to write conflicting data in the same location.

 

Once I changed it to (8, 0) it worked straight away, over the RS485 setup.

 

So that was the positive side. Now the negative, and still to resolve issue. Now that I had two working RS485 sketches and modules, the next test would be to get two simultaneously RS485 connected Slave Nanos to talk to the master.

 

I made some simple interconnectors using veroboard with straight 0.1" headers so that I had the GND, +5, A and B pins all as rails so that using a four pin header connector I could easily connect the slave RS485 modules together.

 

It doesn't work consistently. I have designated the CMSP slave 2, and the CMSC is designated slave 1. If I run either as a single connected slave they work fine individually. But, if I then connect both RS485 chips to the +5 / B / A / GND rail the first time I connect it, both LCD screens will display some data, but it is corrupted. If I disconnect it and reconnect (i.e. disconnect the master and remove the 5v supply to the slaves, then reconnect the master to USB, start the CMD, then repower the 5v to the Nanos and slave), everything stops working. I can get one working if I disconnect the other, but if I want to get both 'working' again, I have to replace one of the RS487 chips with a different one. This is the weird bit, if I go and connect everything up again, it will 'work' until I recycle the power, then it stops. I can then re-install the chip I had to remove a few minutes before, and then it will start 'working' again. Then, recycle to try and clear the corrupted data, it will stop working, so then I have to take out the chip I just reinstalled and put in the one that I'd had to take out!

 

So the two chips have to be used alternately....., but they don't fail and they don't consistently work.

 

The Tx light on the master flashes and the Rx lights on the Nanos stay on but don't flash

 

I've attached the picture of the +5v / B / A / GND rails so you can see how simple it is,

 

Les

20190621_172916.thumb.jpg.59086718647de2f0868bb9200e328f88.jpg


Edited by lesthegrngo
Link to comment
Share on other sites

Hi Les,

 

First question. Where do you get your power supply from?

 

Secondly I am not sure I understand your picture. I presumre GND is Black, 5V is Red and Purple/Grey are RX/TX or vs.

In order to run Master and 2 Slaces you need 3 set of wires. You only have two? Perhaps a picture showing the entire setup would paint the picture for me

 

Cheers

Hans

Link to comment
Share on other sites

***Edit*** Due to formatting issues I have attached a rich text version of what is written below to make the pinout information easier to follow

 

The power supply to the Mega is via USB, and the Mega supplies +5v and GDND to the master MAZ487 chip. The power supply to the two slave MAX487 chips, the two slave Nanos, the 1602A and PCF8574 LCD modules come from a common rail +5v and GND supply from an old phone charger.

 

I have made the A and B connections as common rails, so the common rails between the MAX487 chips are +5v (red header) B connections (green header) A connections (blue header) and GND (black header)

 

I have also put a common GND wire connecting the GND connection of the Mega to the common GND rail

 

Wiring is as follows

 

Master Mega -

- wire colour

+5v -

- master MAX 487 VCC -

- Red

GND -

- master MAX 487 GND -

- Black

2 -

- master MAX 487 RE/DE -

- Yellow

18 -

- master MAX 487 RO/RX -

- Green

19 -

- master MAX 487 DI/TX -

- Blue

 

Master MAX487 -

- Wire colour

DI/TX -

- Mega 19 -

- Blue

RO/RX -

- Mega 18 -

- Green

RE/DA -

Mega 2 -

- Yellow

VCC -

- Mega +5v -

- Red

GND -

- Mega GND -

- Black

A -

- Common rail A -

- Purple

B -

- Common rail B -

- Grey

 

Slave MAX487 chip for Nano controlling PCF8574 module -

- wire colour

DI/TX -

- Nano TX -

- Blue

RO/RX -

- Nano RX -

- Green

RE/DA -

- Nano 2 -

- Yellow

VCC -

- Common rail +5v -

- Red

GND -

- Common rail GND -

- Black

A -

- Common rail A -

- Purple

B -

- Common rail B -

- Grey

 

PCF Module Nano -

- wire colour

+5v -

- Common rail +5v -

- Red

GND -

- Common rail GND -

- Black

2 -

- Slave MAX 487 RE/DE -

- Yellow

RX -

- Slave MAX 487 RO/RX -

- Green

TX -

- Slave MAX 487 DI/TX -

- Blue

A4 -

- PCF module SDA -

- Red

A5 -

- PCF module SCL -

- Black

 

 

PCF8574 -

- wire colour

+5v -

- Common rail +5v -

- Red

GND -

- Common rail GND -

- Black

SDA -

- Nano A4 -

- Red

SCL -

- Nano A5 -

- Black

 

Slave MAX487 chip for Nano controlling 602A module -

- wire colour

DI/TX -

- Nano TX -

- Blue

RO/RX -

- Nano RX -

- Green

RE/DA -

- Nano 2 -

- Yellow

VCC -

- Common rail +5v -

- Red

GND -

- Common rail GND -

- Black

A -

- Common rail A -

- Purple

B -

- Common rail B -

- Grey

 

160A Module Nano -

- wire colour

+5v -

- Common rail +5v -

- Red

GND -

- Common rail GND -

- Black

2 -

- Slave MAX 487 RE/DE -

- Yellow

RX -

- Slave MAX 487 RO/RX -

- Green

TX -

- Slave MAX 487 DI/TX -

- Blue

3 -

- 1602A module pin 11 -

- Red

4 -

- 1602A module pin 12 -

- Black

5 -

- 1602A module pin 13 -

- Red

6 -

- 1602A module pin 14 -

- Black

10 -

- 1602A module pin 6 -

- Green

12 -

- 1602A module pin 4 -

- Blue

-

Power supply

power supply +5v -

- Common rail +5v -

- Red

Power supply GND -

- Common rail GND - - Black

 

Here are some photos showing the setup

 

I also forgot to mention that when I did extended testing with just one slave attached to the system, I noticed after a while the LCD screen stopped updating when the in-game data changed. If I restarted the slave module it would stop working altogether. I would then have to disconnect everything, and wait about 15 minutes before I could reconnect, otherwise it would still not function! The Max487 chips, nanos and LCD modules are not getting hot, I can easily hold them in my hands when they are powered. I am going to do the same extended test using the USB sketches for comparison

 

Cheers

 

Les

RS485 setup text.doc

RS485 schematic 1602A and PCF8574pdf.pdf

20190622_125738.thumb.jpg.8fb26d556d109c32bdd4bcac521558bb.jpg

20190622_125621.thumb.jpg.aea04917be7022d0bee55f702dd1c5df.jpg

20190622_125539.thumb.jpg.226e932651b6e7c62a3b63d677c07587.jpg

20190622_125555.thumb.jpg.52d918d332e88756e64a81a6165fe128.jpg

20190622_125705.thumb.jpg.129911106f3bc1689bc1632f68db635d.jpg

20190622_125725.thumb.jpg.b1474150e511a96639b2caf53bbfc328.jpg


Edited by lesthegrngo
formatting
Link to comment
Share on other sites

****edit****

I installed the new Mega, and wired up the TX1 (pin 18 on the new Mega) to the DI pin and RX1 (pin 19) to the RO..... and away she goes. Perfect.

 

I have spent all this time trying to resolve a problem due to misnamed pins on the Mega. No wonder I couldn't find anything wrong with the wiring or schematics. I am sorry that I have wasted all your time too, and to those of you that had the patience to continue to assist me through all of this painful saga I must offer my sincere thanks. I just hope that this assists people, and shows that you should never take things being right for granted.

 

Hans, I recommend that your RS485 simple sketch thread be made a sticky, and that in it we put things like this as the troubleshooting guide for bozos like me.

 

****Original text****

 

I had wondered whether I had damaged my Mega with the 12v, so just in case I got another on that basis I may need it later on.

 

I was using the new Mega in order to make a shield to carry the MAX487 chip and socket, when I realised that I seemed to have transposed the TX and RX pins on my diagram...... but I was absolutely sure I had checked and checked and checked again. And I was right, I did have the correct pins, but only for the first board.

 

Look at the pictures of the two boards side by side - pins 18 and 19 on the two boards are transposed!

 

Is it possible that after all this time, an incorrectly laid out board has been the cause of the problems......?

 

 

 

Cheers

 

Les

20190622_164619.thumb.jpg.9bef637cf5c543231025fe77756cfcaf.jpg


Edited by lesthegrngo
Link to comment
Share on other sites

****edit****

I installed the new Mega, and wired up the TX1 (pin 18 on the new Mega) to the DI pin and RX1 (pin 19) to the RO..... and away she goes. Perfect.

 

Yeah I tried to hint you off to that in post 42 but should probably have made a picture showing the Mega. I'll highlight it more clearly in the DCS-BIOS over RS485 thread.

 

Hans, I recommend that your RS485 simple sketch thread be made a sticky, and that in it we put things like this as the troubleshooting guide for bozos like me.

 

Mighty kind of you sir, but you need to talk to a moderator because they are the only ones who can make a sticky if it is relevant enough.

 

Cheers

Hans

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...