Jump to content

F16 DED with SSD1322 and DCS BIOS


wiggles5289

Recommended Posts

5 hours ago, Doc78 said:

 

First of all, thanks to you guys who made this possilble!!

I had the same problem with the missing text on the left side. This new code did work. The complete text on the DED is visible, but now it is flipped upside down.

Probably an easy way to correct this, but i have no clue. 

Seems that the Newhaven Displays and the display's you all are using are a little different. The code I posted had no issues with missing text. There was no reason to change the code for new haven displays but I can see it is needed for other than new haven displays. I have resorted to buying from American companies so I can get parts faster.


Edited by fusion
Link to comment
Share on other sites

8 hours ago, Doc78 said:

 

First of all, thanks to you guys who made this possilble!!

I had the same problem with the missing text on the left side. This new code did work. The complete text on the DED is visible, but now it is flipped upside down.

Probably an easy way to correct this, but i have no clue. 

I realized the issue and fixed the code. In the U8G2 Display initialization I had set the rotation to "2" instead of a "0". Mine is upside down so all of yours were setup the wrong way lol.

Link to comment
Share on other sites

Success! Thank you all for this topic, to me these things are akin to vodoo spells.. in the pictures you can see the list numbers in a "positive" font, and the ** missing from the auto steerpoint.. am I missing/mistaking something or this is the current situation of this project?

1.jpg

2.jpg

Link to comment
Share on other sites

On 2/7/2022 at 3:34 PM, Krysnic said:
Try this code
//F-16 DED for DCS BIOS using 256x64 ER-OLED032-1G from BuyDisplay.com

#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"
#include <Arduino.h>
#include <U8g2lib.h>
#include <U8glib.h>
#include <SPI.h>

U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);  // Enable U8G2_16BIT in u8g2.h
//U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 5, /* dc=*/ 3, /* reset=*/ 4);
char* line1;
char* line2;
char* line3;
char* line4;
char* line5;

const u8g_fntpgm_uint8_t DEDfont16px[1148] U8G_FONT_SECTION("DEDfont16px") =
  "_\0\3\3\4\4\4\5\5\10\16\0\376\12\376\12\377\1\212\3\1\4_ \5\0\10\61!\14\224\32"
  "q$\207\212H,\222\0\42\10\66y\61DL\2#\22\227\31q\224$\222\213\222D$\221\134\224$"
  "\22\0$\20\326\371\260\204\62\212\210\252\225$\241\11E\0%\24\270\10q\206\22\231D\22\232Hu\31"
  "E\324$\302\11\0&\21\227\31qf\22\221D\66\223JL\22\221h\42'\6\62{\61\14(\15\264"
  "\372\260$\42\211H\67\221L\0)\15\264\372\60d\42\231H\27\221D\4*\20\310\10\61~\60\205h"
  "s\300\214\24:<\20+\12V\71\261\204\42\223P\4,\10C\373\60,\24\0-\6\26Y\61\14."
  "\6#\33\61\14/\16\246\11\61\325\204\62\241L(\23\12\1\60\16\226\32q(\42JS\245B\222P"
  "\0\61\11\225\31\361D\207\230>\62\14\226\31q(\42\222P\246\243\1\63\17\226\31q(\42\222P\64"
  "%\221$\24\0\64\20\227\31q\244*\42\211H\242$\71J%\0\65\15\226\31\61\16A\305\252P&"
  "!\1\66\15\226\31\261fj\25\21'\11\5\0\67\15\226\31\61\214\62\241L(\23\252\1\70\20\226\31"
  "q(\42REB\221\224H\22\12\0\71\15\226\31q(\42N\222\232\332\10\0:\10s\33\61\354 "
  "\3;\12\223\373\60\354 \13\5\0<\11\226\31\61e\272\352\0=\7\66I\61\314\6>\11\226\31\61"
  "\244\272\351\10\77\16\226\31q(\42\222LQ\16\23\212\0@\17\230\30q,B&\213\204\42!\331\1"
  "\7A\14\226\31\261d\24\21\323a\304$B\14\226\31\61*\42\246\213\210\351\2C\15\226\31q(\42"
  "FM$\11\5\0D\14\226\31\61H\22%\276HH\0E\14\226\31\61\16A\305\212P\321\0F\14"
  "\226\31\61\16A\305\212P#\0G\14\226\31q(\42F\225\22IRH\13\226\31\61D\234\16#N"
  "\2I\11\224\32\61(\42}!J\13\226\31\61\365H\42I(\0K\15\226\31\61D,ZH\22\235"
  "H\2L\11\226\31\61\204\372\321\0M\20\227\31\61d\264J%B\211P\42\64\66\1N\15\227\31\61"
  "d\264\222\205b\252\261\11O\13\226\31q(\42~\222P\0P\14\226\31\61*\42\246\213P#\0Q"
  "\14\266\371p(\42~\222\20\245\2R\14\226\31\61*\42\246\213&&\1S\14\226\31q(\42\252V"
  "\222\204\2T\11\226\31\61LB\375\4U\12\226\31\61D\374IB\1V\13\226\31\61D\374$\241\211"
  "\0W\21\227\31\61d\134\42\224\10%\242I\42\222H\0X\17\226\31\61D$\211$&\224E\224\230"
  "\4Y\14\226\31\61D\234$\64\241&\0Z\12\226\31\61\214j:\12\15[\11\304\352\60L\372'\2"
  "\134\27\230\30\61d\22ID%\42\71L\42*\21\221D&\221ID\0]\11\304\352\60H\372'\3"
  "^\11\66\231\261d\24\221\0_\7\30\350\60\16\1`\10\64\232\61F\62\1a\16\267\31\361\242\263\312"
  "\35\303\245\66\215\1b\14\226\31\61\204\302\212\210\247\13\0c\14v\31q(\42\242&\11\5\0d\12"
  "\226\31\61UN<I\12e\14v\31q(\42\322a(\245\0f\14\226\31\261(B\65\213P\33\0"
  "g\14\246\351pN<I\212\302\13\0h\13\226\31\61\204\302\212\210O\2i\13\246\31\261\204r\10Q"
  "O\6j\12\325\351\360\224i\372\315\2k\15\226\31\61\204J,\22\222D\211$l\11\226\31\61\210\372"
  "\311\0m\21w\31\61,\222\10%B\211P\42\224\10M\0n\11v\31\61*\42>\11o\11Cm"
  "qR$)\0p\14\246\351\60*\42\236.BE\0q\12\246\351pN<I\212\32r\13v\31\61"
  "D\24\233P#\0s\12v\31q\216R\252\360\2t\13\226\31q\204\62\213PW\2u\11v\31\61"
  "D|\222\24v\13v\31\61D<Ih\42\0w\21w\31\61d\224\10%B\211P\42\232$\22\0"
  "x\15v\31\61D$\11MF\21\221\4y\24\247\350pD\22\221D$\21ID\22\221\210*\24\321"
  "\0z\11v\31\61\214\62\35\15{\14\265\371\360D\62%E\65E\1|\7\302\353\60>\14}\15\265"
  "\372\60\204\62E%\65%\31\0~\12\70xqf\23\311l\2\0\0\0\4\377\377\0";


void onDedLine1Change(char* newValue) {
  line1 = (newValue);
}
DcsBios::StringBuffer<25> dedLine1Buffer(0x44fc, onDedLine1Change);

void onDedLine2Change(char* newValue) {
  line2 = (newValue);
}
DcsBios::StringBuffer<25> dedLine2Buffer(0x4516, onDedLine2Change);

void onDedLine3Change(char* newValue) {
  line3 = (newValue);
}
DcsBios::StringBuffer<25> dedLine3Buffer(0x4530, onDedLine3Change);

void onDedLine4Change(char* newValue) {
  line4 = (newValue);
}
DcsBios::StringBuffer<25> dedLine4Buffer(0x454a, onDedLine4Change);

void onDedLine5Change(char* newValue) {
  line5 = (newValue);
}
DcsBios::StringBuffer<25> dedLine5Buffer(0x4564, onDedLine5Change);

void setup() {
  DcsBios::setup();
  u8g2.begin();
  u8g2.clearBuffer();
  u8g2.setFont(DEDfont16px);
}

void loop() {
  u8g2.firstPage();
  do {
    u8g2.drawStr(32, 12, line1);
    u8g2.drawStr(32, 25, line2);
    u8g2.drawStr(32, 38, line3);
    u8g2.drawStr(32, 51, line4);
    u8g2.drawStr(32, 64, line5);
  } while ( u8g2.nextPage() );
  u8g2.updateDisplay();
  DcsBios::loop();
}

 

 

On 2/9/2022 at 7:42 PM, wiggles5289 said:

I realized the issue and fixed the code. In the U8G2 Display initialization I had set the rotation to "2" instead of a "0". Mine is upside down so all of yours were setup the wrong way lol.

It works. Changing the code from U8G2_R0 to U8G2_2 did the trick.

U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);

I use a different (Chinese, FeiYang) display than the display from Buydisplay.com. 

Link to comment
Share on other sites

On 2/15/2022 at 8:12 AM, KPCK said:

I´m afraid that the inverted text is just not possible with DCSBIOS output. When you look at the output data, it doestn´t change when inverted. The inverted 5 is still being outputted as 5.

Well I guess if we bug Eagle Dynamics to help with this, they may be able to do something about it....we can be a flea on their ankles.

Link to comment
Share on other sites

  • 2 weeks later...

image_67197441.JPG

Has anyone tried to use DED on different computer? Mine worked just fine, but when i plugged it into different PC, everything just messed up. When I try to plug it in the first PC I originally programmed it on, it works. I tried to upload the arduino sketch on this PC, but it didn´t make a difference. Pages switch and all that, but the text is messed up. 

Link to comment
Share on other sites

5 hours ago, KPCK said:

image_67197441.JPG

Has anyone tried to use DED on different computer? Mine worked just fine, but when i plugged it into different PC, everything just messed up. When I try to plug it in the first PC I originally programmed it on, it works. I tried to upload the arduino sketch on this PC, but it didn´t make a difference. Pages switch and all that, but the text is messed up. 

Can you send me the link to the display you are running so I can have an idea what we are working with? Also the pinout from the display to arduino you have.

Link to comment
Share on other sites

  • 1 month later...
On 4/21/2022 at 4:00 PM, 303_Tees said:

HI im trying to use this code on esp8266 and 3'5in tft ili9488 Driver and TFT eSPI lib can any one can help me to converts this code ??

I took a look at the ILI9488 and unfortunately that's not supported by U8G2 to drive that display. I would try adding a request to the U8G2 GitHub, you might get lucky and get native support for this code.

Link to comment
Share on other sites

4 hours ago, wiggles5289 said:

I took a look at the ILI9488 and unfortunately that's not supported by U8G2 to drive that display. I would try adding a request to the U8G2 GitHub, you might get lucky and get native support for this code.

HI thanks i sorted out

A10 CDU Caption

 


Edited by 303_Tees
Link to comment
Share on other sites

  • 2 weeks later...

I have the working ded on DCS, but did anyone tried to make it work with Falcon BMS using Deduino? I have tried that sketch but cant make it work, just want to ask here if anyone is using it in bms too so maybe he can help me.

Link to comment
Share on other sites

  • 2 weeks later...
On 5/8/2022 at 1:16 PM, malarcky said:

I have the working ded on DCS, but did anyone tried to make it work with Falcon BMS using Deduino? I have tried that sketch but cant make it work, just want to ask here if anyone is using it in bms too so maybe he can help me.

I used to make FFI, DED and PFL displays using deduino. Since F-16 has come out for DCS. I've trashed BMS. It's nice playing an old game but, what is the point in playing BMS since DCS F-16 is becoming more advanced than BMS? Simply said, it is easier interfacing with DCS than BMS. I threw away the code.

Link to comment
Share on other sites

  • 4 weeks later...
On 2/15/2022 at 9:12 AM, KPCK said:

I´m afraid that the inverted text is just not possible with DCSBIOS output. When you look at the output data, it doestn´t change when inverted. The inverted 5 is still being outputted as 5.

Well, I have been toying around with this problem... the DED has 25 characters, yet DCS-BIOS has 29 reserved for the DED Lines.  While the actual characters don't change, the remaining 4 characters DO change to reflect different areas of inverted text.  My problem is that I have used all of my brain power to decipher them, to no avail :(.

For example for the LIST page the addresses for bytes 26 to 29 read on lines 2, 3 and 4 read:

|0x41|0x10|0x04|0x00|  
 

If you enter the COM1 page, line 3 is the one with the "inverted" text and the code for both asterisks inverted on "chars" 26 to 29 is:
|0x00|0x20|0x10|0x00|

If I click on any number (to write a new value) so that the region becomes "highlighted" (several chars highlighted) then values are now:|

|0x00|0xe0|0x1f|0x00

I really can't seem to understand how those values are representing the inverted text. If someone has working knowledge of how to interpret those "inverted" numbers, I'd be really happy to hear it.

 

Best regards,

Rafa.

I'm Dragon in the Multiplayer servers.

Link to comment
Share on other sites

Ok, I think I figured it out.  It was simple binary: each line is segmented in blocks of 8, each of the 3 addresses: 26, 27 and 28 is a hex that, when converted to binary (and reversed)  expresses the on/off characters.  So: 0x41 is '1000001' which you reverse, and pad it to blocks of 8: '10000010'. Those are the highlighted characters in the first block of 8 (which, in the list, perfectly resembles that.

Hope this helps some people, looks like we can paint the DED perfectly!

  • Like 1
  • Thanks 1

I'm Dragon in the Multiplayer servers.

Link to comment
Share on other sites

On 6/13/2022 at 6:43 AM, RafaPolit said:

Ok, I think I figured it out.  It was simple binary: each line is segmented in blocks of 8, each of the 3 addresses: 26, 27 and 28 is a hex that, when converted to binary (and reversed)  expresses the on/off characters.  So: 0x41 is '1000001' which you reverse, and pad it to blocks of 8: '10000010'. Those are the highlighted characters in the first block of 8 (which, in the list, perfectly resembles that.

Hope this helps some people, looks like we can paint the DED perfectly!

Good times, great work!

There is also a pdf at the project that describes the plan to translate inverted and other special characters to ascii:

https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/planes/DCS BIOS DED Processing Spec.pdf

WarLord describes some problems decoding the information, perhaps your findings can help?

Getting closer!

Link to comment
Share on other sites

Well, that project sure looks complex. My own research was to present the DED on a Web Browser in order to interact with DCS not with a dedicated panel, but with a Web Browser running on any sort of touchscreen.  So, as mentioned on that paper, I am using a RPi3, therefore I don't need to have each character reversed, I can just print a black text on a colored background.

If anyone is interested in my project, I have created a quick "teaser" thread here on the forums:

If any of my research is useful, feel free to head into the github repo and if something is not clear, ask either on the thread linked above or on issues on the Github repo.

 

I'm Dragon in the Multiplayer servers.

Link to comment
Share on other sites

  • 1 month later...
On 1/11/2022 at 6:03 PM, mike4t5 said:

Yeah sure so I have a 

SPI 3.12" 256x64 Graphic OLED Display Module SSD1322 Arduino STM32/51 PIC ARM

The board is set to SPI 4 it was on 80xx on delivery 

This is a link to the ebay post (Display link)

As far as connecting it it was a bit more difficult as it didn't have the pins labeled as what they were it's just pins 1 to 16 I went online to see what each of them were and came up with this as a pinout 

OLED — Arduino 

2 — 3.3v

4 — pin D13

5 — pin D11

11 — ground

14 — pin D9

15 — pin D8

16 — pin D10

 

  Reveal hidden contents
  Reveal hidden contents

 

 

20220111_165718.jpg

20220111_165816.jpg

20220111_165840.jpg

I got this Ver 2.1 board - and have unsoldered the parts beneath 0 (R5) and resoldered it back to the correct spot - in that way I think its working as a 4 wire SPI. Its hard to see on your pictures but it looks like you´ve done the same - Have you used the code on the first post on this thread? I did not manage that to work out for me. Not sure if the pinout is correct, but looks like you got the hang of it. Care to share more information?

 

 


Edited by Meringdal
Link to comment
Share on other sites

A small update from me:
As mentioned above I had some troubles with this 3.12" oled display from Aliexpress - Ver: 2.1.

At first boot it worked like a charm, but changing to "List" or any other page on the DED made the display go black. Looked like there were some kind of issue where some of the letters or numbers did not fit into the panel (tried to record it in slow motion from my phone).

I deleted the font in the code, and added the standard font from the library. Now, everything works expect there is some minor bugs with some of the letters like degrees on NAV page. 

Will update this post if I find any suitable font for this display.

 

Short update:

Did not find any solution on the font, but found out that this Ver 2.1 SSD1332 display has an active area of that is smaller than the one from Buydisplay. Anyone got any input?


Edited by Meringdal
Link to comment
Share on other sites

  • 2 weeks later...
On 8/8/2022 at 11:59 AM, Meringdal said:

I got this Ver 2.1 board - and have unsoldered the parts beneath 0 (R5) and resoldered it back to the correct spot - in that way I think its working as a 4 wire SPI. Its hard to see on your pictures but it looks like you´ve done the same - Have you used the code on the first post on this thread? I did not manage that to work out for me. Not sure if the pinout is correct, but looks like you got the hang of it. Care to share more information?

 

 

 

Hi sorry for the late reply. unfortunately i've never managed to get it working properly. i have the same issue as yourself. it works perfectly till you get to the list page then it gets corrupted or something. im wondering if i should just try to find the same board as was used by everyone else. 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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