

lesthegrngo
Members-
Posts
1245 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by lesthegrngo
-
Thanks once more Vinc, that resolved it. I was successful in recovering it, and then programming it with the USB connection APU Temp sketch used with nanos, and it worked fine. However once I converted the sketch to the RS485 version, I got a load of error messages, which I think mean that I have the TX / RX / TX enable pins set wrong Take a look at this lot....! If I read this correctly it will mean that I have to not only change the code, but also it will be different pinouts so will not be directly interchangeable with the sockets I made for Nano's, am I right? Not that it would be a disaster, it would just mean that I wouldn't be able to use them with my current bank of gauges without hardware modifications Cheers Les In file included from f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:34:0, from F:\Users\LES\Documents\Arduino\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro.ino:7: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::set_txen()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:44: error: 'RXEN0' was not declared in this scope inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:44: note: suggested alternative: 'RXEN1' inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~ RXEN1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:57: error: 'RXCIE0' was not declared in this scope inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:57: note: suggested alternative: 'RXCIE1' inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~~ RXCIE1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:110: error: 'TXEN0' was not declared in this scope inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:110: note: suggested alternative: 'TXEN1' inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~ TXEN1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:123: error: 'TXCIE0' was not declared in this scope inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:83:123: note: suggested alternative: 'TXCIE1' inline void set_txen() { *ucsrb &= ~((1<<RXEN0) | (1<<RXCIE0)); *txen_port |= txen_pin_mask; *ucsrb |= (1<<TXEN0) | (1<<TXCIE0); }; ^~~~~~ TXCIE1 In file included from f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:34:0, from F:\Users\LES\Documents\Arduino\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro.ino:7: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::clear_txen()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:46: error: 'TXEN0' was not declared in this scope inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:46: note: suggested alternative: 'TXEN1' inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~ TXEN1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:59: error: 'TXCIE0' was not declared in this scope inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:59: note: suggested alternative: 'TXCIE1' inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~~ TXCIE1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:113: error: 'RXEN0' was not declared in this scope inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:113: note: suggested alternative: 'RXEN1' inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~ RXEN1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:126: error: 'RXCIE0' was not declared in this scope inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:84:126: note: suggested alternative: 'RXCIE1' inline void clear_txen() { *ucsrb &= ~((1<<TXEN0) | (1<<TXCIE0)); *txen_port &= ~txen_pin_mask; *ucsrb |= (1<<RXEN0) | (1<<RXCIE0); }; ^~~~~~ RXCIE1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::tx_byte(uint8_t)': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:85:72: error: 'TXC0' was not declared in this scope inline void tx_byte(uint8_t c) { set_txen(); *udr = c; *ucsra |= (1<<TXC0); } ^~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:85:72: note: suggested alternative: 'TXC1' inline void tx_byte(uint8_t c) { set_txen(); *udr = c; *ucsra |= (1<<TXC0); } ^~~~ TXC1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::tx_delay_byte()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:86:48: error: 'TXEN0' was not declared in this scope inline void tx_delay_byte() { *ucsrb |= ((1<<TXEN0) | (1<<TXCIE0)); *udr = 0; } ^~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:86:48: note: suggested alternative: 'TXEN1' inline void tx_delay_byte() { *ucsrb |= ((1<<TXEN0) | (1<<TXCIE0)); *udr = 0; } ^~~~~ TXEN1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:86:61: error: 'TXCIE0' was not declared in this scope inline void tx_delay_byte() { *ucsrb |= ((1<<TXEN0) | (1<<TXCIE0)); *udr = 0; } ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:86:61: note: suggested alternative: 'TXCIE1' inline void tx_delay_byte() { *ucsrb |= ((1<<TXEN0) | (1<<TXCIE0)); *udr = 0; } ^~~~~~ TXCIE1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::set_udrie()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:87:43: error: 'UDRIE0' was not declared in this scope inline void set_udrie() { *ucsrb |= (1<<UDRIE0); } ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:87:43: note: suggested alternative: 'UDRIE1' inline void set_udrie() { *ucsrb |= (1<<UDRIE0); } ^~~~~~ UDRIE1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h: In member function 'void DcsBios::RS485Slave::clear_udrie()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:88:46: error: 'UDRIE0' was not declared in this scope inline void clear_udrie() { *ucsrb &= ~(1<<UDRIE0); } ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.h:88:46: note: suggested alternative: 'UDRIE1' inline void clear_udrie() { *ucsrb &= ~(1<<UDRIE0); } ^~~~~~ UDRIE1 In file included from f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:35:0, from F:\Users\LES\Documents\Arduino\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro.ino:7: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc: At global scope: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:25: error: 'UDR0' was not declared in this scope RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:25: note: suggested alternative: 'UDR1' RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~ UDR1 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:32: error: 'UCSR0A' was not declared in this scope RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:32: note: suggested alternative: 'UCSR1A' RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ UCSR1A f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:41: error: 'UCSR0B' was not declared in this scope RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:41: note: suggested alternative: 'UCSR1B' RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ UCSR1B f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:50: error: 'UCSR0C' was not declared in this scope RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:178:50: note: suggested alternative: 'UCSR1C' RS485Slave rs485slave(&UDR0, &UCSR0A, &UCSR0B, &UCSR0C, TXENABLE_PIN); ^~~~~~ UCSR1C In file included from F:\Users\LES\Documents\Arduino\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro.ino:7:0: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc: In function 'void DcsBios::setup()': f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:18:14: error: 'PRR' was not declared in this scope #define PRR0 PRR ^ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:184:3: note: in expansion of macro 'PRR0' PRR0 &= ~(1<<PRUSART0); ^~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:18:14: note: suggested alternative: 'PRR0' #define PRR0 PRR ^ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:184:3: note: in expansion of macro 'PRR0' PRR0 &= ~(1<<PRUSART0); ^~~~ In file included from f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/DcsBios.h:35:0, from F:\Users\LES\Documents\Arduino\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro\X27_168_APU_temp_gauge_no_stepper_driver_zeroing_for_Pro_micro.ino:7: f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:185:3: error: 'UBRR0H' was not declared in this scope UBRR0H = 0; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:185:3: note: suggested alternative: 'UBRR1H' UBRR0H = 0; ^~~~~~ UBRR1H f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:186:3: error: 'UBRR0L' was not declared in this scope UBRR0L = 3; // 250000 bps ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:186:3: note: suggested alternative: 'UBRR1L' UBRR0L = 3; // 250000 bps ^~~~~~ UBRR1L f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:187:3: error: 'UCSR0A' was not declared in this scope UCSR0A = 0; ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:187:3: note: suggested alternative: 'UCSR1A' UCSR0A = 0; ^~~~~~ UCSR1A f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:3: error: 'UCSR0C' was not declared in this scope UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:3: note: suggested alternative: 'UCSR1C' UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ UCSR1C f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:16: error: 'UCSZ00' was not declared in this scope UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:16: note: suggested alternative: 'UCSZ10' UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ UCSZ10 f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:30: error: 'UCSZ01' was not declared in this scope UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ f:\Users\LES\Documents\Arduino\libraries\dcs-bios-arduino-library-master\src/internal/DcsBiosNgRS485Slave.cpp.inc:188:30: note: suggested alternative: 'UCSZ11' UCSR0C = (1<<UCSZ00) | (1<<UCSZ01); ^~~~~~ UCSZ11 Multiple libraries were found for "SwitecX25.h" Used: F:\Users\LES\Documents\Arduino\libraries\SwitecX25 Not used: F:\Users\LES\Documents\Arduino\libraries\SwitecX25-X12 exit status 1 Compilation error: exit status 1
-
USB and HDMI / Displayport interconnectors and wiring
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
I suspect that we are at crossed purposes on the terminology, probably caused by me not explaining myself correctly. I don't intend to split an HDMI signal, that's a misnomer; I intend to split the extended desktop, so what I should be looking at is the USB3.0 input from the PC to then output to the four small monitors, each one showing a different part of the desktop. I believe that the devise specified above does that, correct? With the HDMI (and Displayport) I want 6 panel mounted female sockets that are female to female, one each on the input panel and another located to optimise where the outputs for the HDMI /DP go. The extender jobbie above would connect to the inside of four of these HDMI sockets before short HDMI cables are attached between them and the small screens, while either the remaining HDMI or DP connectors would then have cables going to the main TV or monitor. That would be the original signal from the Graphics card My worry is that the multiple connectors could be an issue for the smaller screens Cheers Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
That's not good - we all need to pull in the same direction, after all it does help to try and resolve all the issues. Life copying politics? -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
The thing I noticed was that when more than one RS485 connected devices were connected simultaneously, any glitching was simultaneously happening on all of them, so that (for me at least) seems to rule out individual boards being to blame. Nonetheless it would be stupid not to try it to rule it out. I think I already tried seeing whether 328 nanos were better than 168 versions, but I may revisit that to make sure Les -
it was a short lived experiment that didn't get to the RS485 stage - downloaded the Pro Mini board manager from Sparkfun, tried uploading a simple sketch and it bricked it. Can't be recognised by any windows PC any more, I get the USB device not recognised error Oh well Les
-
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Right, tried that, and it did make a difference. The pointer doesn't twitch as much, however it still does freeze momentarily, then jumps to the correct position, so it's a bit like watching a stop motion film It's better, but still not as smooth as the USB version (which to be truthful is not as good as I'd like it to be). Take a look at the video, via USB on the left, hard wired RS485 on the right I made an LCD monitor to look at the DCS output live for the APU temp (my test case above) and I don't see any spiking or unstable numbers being output, I'm going to see if there is any way to output the data to the Ardiono IDE serial monitor Les -
ok, so basically same difference to the Nano then I'll give one a go, hopefully won't brick anything! Les
-
All, I have some Arduino Pro Micros, what is the slave connection to RS485 for these? it has a TX0 and RX1 instead of the Nano's TX1 and RX0, and according to the pinot diagram pin D2 is actually the RX1 pin. I am assuming that there is no reason I can't select the D1 pin (actually labelled pin 2 on the board) for the TXenable pin, right? however the fact that the RX and TX are sort of transposed is confusing Cheers Les
-
USB and HDMI / Displayport interconnectors and wiring
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
As it happens I was asking about splitters and extenders a short while back, and was directed to this https://www.amazon.co.uk/StarTech-com-USB-HDMI-Adapter-Converter/dp/B09BJWGPXR/ref=sr_1_1_sspa?crid=RNSVV5C3C0DO&keywords=startech%2Bquad%2Bhdmi&qid=1666526021&qu=eyJxc2MiOiIwLjAwIiwicXNhIjoiMC4wMCIsInFzcCI6IjAuMDAifQ%3D%3D&sprefix=startech%2Bquad%2Bhdmi%2Caps%2C74&sr=8-1-spons&th=1 it does actually extend, so maybe of use to you? Thanks for the info on both the hub and the USB pin stuff. I'm actually struggling to think of any devices other than the extender that uses USB 3.0, so that may end up simplifying things Cheers Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Didn’t know you could do that! Should be easy enough, let me give it a go cheers Les -
I'm trying to put all the 12v and 5v power supplies, USB hubs, and power distribution via C13 sockets into the box structure I am making to raise the current screen to a level that isn't obscured by the dash. The intention is to cut down on wiring and rationalise everything to make it easy and avoid incorrect or reversed connections I will also put in the master Mega, and make an interface board with keyed RS485 sockets, likewise the 12v and 5v sockets will be keyed plus I will make them in switchable banks to make it easy to connect what is needed The intention is also to do the same for the HDMI, Displayportand USB ports. The intention would be HDMI - two HDMI inputs, from PC, then inside to HDMI out sockets; I will be using an HDMI splitter inside to port to at least four 1080p / 720p small screens Displayport - two inputs and two output sockets USB - this is more complicated. I want a dedicated Master Mega USB connection. I am assuming that USB 3 is not a prerequisite however I do want it to connect to the motherboard USB sockets to prevent hub issues. Unfortunately it seems that my PC will fail to boot if the Mega is connected, but I am not aware of any way to make this as a switchable socket so while it's not ideal it looks like that will have to remain a 'pull the plug' option As for the remaing USB connections, I am assuming a good powered hub will be suffcicient, and again don't believe that there is any need for USB 3, although there is nothing stopping me from putting in one USB2.0 and one USB 3.0 hub. This brings me to the question of the connectors for the DP / HDMI and USB. There are panel mount double ended sockets for all these, but I need to know whether they will cause any issues. For example, will the USB ones work equally for USB 2.0 and USB 30, or are they different somehow? Any advice on setups and what to avoid would be gratefully received, and if I have forgotten anything please let me know Les
-
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
virtually zero wiring, all hard wired apart from a short (2 inch) jumper cable to replace the stepper. And it doesn't do it when the exact same hardware (minus Max 487 chip) is used. Tried it with just one gauge and without the external power supply, so effectively powered by the Mega, it's the same. Today I will reinstall a stepper driver board and see if it continues with the original setup Cheers Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Right, reinstalled the IDE and reflashed the master and back up and running again. Don't know what happened there...... The glitching is affecting all the RS485 driven gauges, and is synchronised so they all twitch at the same time. I am trying to get an LCD device set up so I can see if the signal is jittery or not I also want to put a little subroutine in the sketches to make sure that when the gauge is supposed to go to zero that it really does go to zero, as I notice that some don't, and then start from the incorrect zero position. Eventually after a few cycles, the zero has moved to a completely different position. If I can get someting in there that says something like "if newValue is less than 100, move the pointer by -100 steps" so that it hard resets the zero every time. I tried with the following, but it isn't doing what I expected //#define DCSBIOS_DEFAULT_SERIAL #define DCSBIOS_RS485_SLAVE 37 #define TXENABLE_PIN 2 #include "DcsBios.h" #include "SwitecX25.h" // 315 degrees of range = 315x3 steps = 945 steps int newValue; unsigned int maxSteps = 800; unsigned int currentStep; unsigned int targetStep = -800; unsigned int targetSteppark = -100; int runXTimes = 0; int N = 1; // declare motor1 with 945 steps on pins SwitecX25 motor1(maxSteps, 7, 8, 5, 6); void setup(void) { DcsBios::setup(); } void onREngFuelFlowChange(unsigned int newValue) { unsigned int position = map(newValue, 0, 65535, 0, maxSteps); if (newValue < 100) { motor1.setPosition(targetSteppark); motor1.update(); } else { motor1.setPosition(position); motor1.update(); } DcsBios::IntegerBuffer rEngFuelFlowBuffer(0x10b0, 0xffff, 0, onREngFuelFlowChange); void loop(void) { if (runXTimes < N) { motor1.zero(); // this is a slow, blocking operation motor1.setPosition(targetStep); motor1.update(); runXTimes++; } motor1.update(); DcsBios::loop(); } cheers Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
No, the glitching is occurring even when only driving one stepper per nano As ever, solved one issue, another couple have cropped up just to keep me busy For some reason I can't fathom, yet again, suddenly my RS485 network will now not function at all. I've reflashed the master, the slaves, replaced the MAX487 chips, rebooted the PC, nothing. Literally from one moment to the next it stopped. Last time I ended up curing it by redownloading the Arduino IDE, so I will start there As for the glitching, it only happens on RS485 connected steppers; the ones connected via USB are stable cheers -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
so a pair of caps on each of the Nano inputs as well? Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Thanks - as I understand it then, the capacitors would be attached at the power input end, effectively across the 5v and GND power in pins, and not one set for each device? An update on the stepper sketch, I managed to figure a way to make the zeroing run once, and now the sketch is rock solid with absolutely no pointer flicker when the gauge is indicating a steady reading. However when the stepper is moving the pointer, it is still flickering, and despite the gauges running from different Nanos the flicker happens simultaneously on both gauges. Is that a sign that there is power noise or some kind of glitching in the data stream to the nanos or RS485 master? Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
That flicker was something I saw with stepper driver versions too; I just assumed it was due to the data stream, maybe I have to re-evaluate, remember I always banged on about how jerky the movement was? It never occurred to me it may be power related. It still may not be, but I'm happy to experiment I still would like to nail down the 'run once' subroutine, I've been looking at some, errrrr, 'tutorials ' that purport to explain how to do so but assume a degree in astrophysics before you start. As for the forums, ooh, how I enjoy being made to feel stupid! This is why I so appreciate this forum; we all try to help without the expectation that we all are experts, which is the whole point of a help forum Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Interesting, could that be the cause of some pointer flicker? Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Because I'm a stubborn so and so, after I got the zeroing working I went back to looking at seeing if multiple steppers could be driven by one nano using RS485. A thought ocurred that I had been using the 168 nanos rather than the 328 boards for the test and I know that they are more restrictive, having less memory. So after getting the zeroing working for two gauges via USB on a 328 board, I re-tried with the RS485 enabled. It didn't work, but it gave me a lead to follow. When you connect the USB version, the first thing it does is go through the zeroing routine, which of course is also what should happen if connecting via RS485. This wasn't happening. I wondered if that was due to low power getting to the Nanos so I attached a 5v supply to the RS485 connection, and improved the integrity of the RS485 connector to ensure that it wasn't a weak link. And away it went, two gauges running from one Nano via RS485 (APU REVS and APU TEMP, which are easy to play with on the ground) zeroing on power up and then working correctly in game. However all is not perfect yet as the movement of the gauges is jerky, and every minute or so the pointer with twitch and reduce the value shown, until after five minutes the gauge has fallen back to near the zero position despite the value being output by DCS BIOS being the steady. I suspect that the zeroing function is to blame for this, and it is being momentarily called causing the gauge pointer to fall back. I am trying to work out how to get the the zero function to be a run once command to see if this stops it For reference here is the sketch, and I ran the sketch without the zero function and it cured the issue of the gauge oposition dropping back. If anyone can help me with instering the 'run once' code for the zeroing function I would be grateful Les //#define DCSBIOS_DEFAULT_SERIAL #define DCSBIOS_RS485_SLAVE 34 #define TXENABLE_PIN 2 #include "DcsBios.h" #include "SwitecX25.h" // 315 degrees of range = 315x3 steps = 945 steps int newValue; unsigned int maxSteps = 800; unsigned int targetStep = -800; unsigned int currentStep; // declare motor1 with 945 steps on pins 8-11 //SwitecX25 motor1(maxSteps, 9, 8, 10, 11); SwitecX25 motor1(maxSteps, 5, 4, 6, 7); void setup(void) { DcsBios::setup(); motor1.zero(); // this is a slow, blocking operation motor1.setPosition(targetStep); //motor1.update(); } void onApuRpmChange(unsigned int newValue) { unsigned int position = map(newValue, 0, 65535, 0, maxSteps); motor1.setPosition(position); } DcsBios::IntegerBuffer apuRpmBuffer(0x10be, 0xffff, 0, onApuRpmChange); void loop(void) { motor1.update(); DcsBios::loop(); } looks like our posts crossed Vinc! Essentially what I did is what you suggest, but need to refine the code to stop it influencing the gauge after startup Les -
Connecting and using multiple Leo Bodnar BBI in DCS issue.
lesthegrngo replied to TED's topic in Home Cockpits
I seem to remember that there was a way to rename or at least identify, maybe using one of those 3rd party button logging programs. Each has it's own internal ID that is used by the PC to identify it, and I think it uses that somehow. Maybe check out Bodnars FAQ page, pretty sure this has been raised before Les -
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Well, I got it to work with a zeroing routine at the beginning. I now have a nice light sketch that drives the X27 steppers without the ned for driver boards or a 12V input, and as long as the RS485 input has a good 5V supply attached to the 5v and GND pins, the steppers use so little power that it means only one four way connection is required for the whole lot Pretty pleased with myself! Cheers Les -
Hi agian, I'm going to connect the Mega as a slave as I had previously indicated, just want to verify that I have the pin selection correct I intend to connect the Max487 chip RE pin to the Mega pin 19 (RX) and the DE pin to TX (pin 18, is that correct? There are other RX / TX pins on the Mega and these are selected as that's how I set up the master (pints reversed) Cheers Les
-
Help requested geting a sketch to run with RS485
lesthegrngo replied to lesthegrngo's topic in Home Cockpits
Yeah, maybe the way it handles the data. Still, It's certainly not a problem, as I said I had planned on using the 12 nanos for the gauges anyway so for me just deleting the EasyDriver boards is enough. So the sketch above works, but one thing I can't get the sketch to do is to zero the stepper. There is a section of the sketch that has "motor1.zero(); // this is a slow, blocking operation motor1.setPosition(500);" In theory this should zero the stepper, then set it to the position correlating to 500. It doesn't, in fact it appears to do nothing. In the SwitecX25.cpp file there is a section defining this, but for some reason it is not functioning What I want is for it to do as the other sketches that are based on Craig's original one, which has a subroutine that drives the gauge to max, then back to the min position so that the gauge always starts in the zero point. I have tried putting in multiple values into the setup to try this, but I can't get it to work I also tried putting this into the void setup section " motor1.setPosition(currentStep-500); motor1.update();" It accepts it but it does nothing. Any thoughts? It would certainly make the sketch complete to get the zeroing functioning Les