prenticedavid / MCUFRIEND_kbv

MCUFRIEND_kbv Library for Uno 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend Shields
Other
358 stars 177 forks source link

DLO-138 (id 0x9595) #66

Closed SMDT1 closed 5 years ago

SMDT1 commented 5 years ago

Hello. Sorry for my english. Could you help me . I changed the display to DSO 138, and now instead of ili9341 it became 0x9595. I am uploading the DLO138 mcufriend project to the DSO 138 board. I use define support 8347d But nothing happens. Always white screen .... Thank you.

SMDT1 commented 5 years ago

if i add in setup() afio_cfg_debug_ports(AFIO_DEBUG_NONE);

reg(0x0000) 95 95 ID: ILI9320, ILI9325, ILI9335, ... reg(0x0004) 00 00 00 00 Manufacturer ID reg(0x0009) 3F 3F 3F 3F 3F Status Register reg(0x000A) 00 00 Get Power Mode reg(0x000C) 01 01 Get Pixel Format reg(0x0061) 00 00 RDID1 HX8347-G reg(0x0062) 00 00 RDID2 HX8347-G reg(0x0063) 00 00 RDID3 HX8347-G reg(0x0064) 00 00 RDID1 HX8347-A reg(0x0065) 00 00 RDID2 HX8347-A reg(0x0066) 00 00 RDID3 HX8347-A reg(0x0067) 00 00 RDID Himax HX8347-A reg(0x0070) 00 00 Panel Himax HX8347-A reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963 reg(0x00B0) 00 00 RGB Interface Signal Control reg(0x00B4) 00 00 Inversion Control reg(0x00B6) 00 00 00 00 00 Display Control reg(0x00B7) 00 00 Entry Mode Set reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA reg(0x00CC) 00 00 Panel Control reg(0x00D0) 00 00 00 Power Control reg(0x00D2) 00 00 00 00 00 NVM Read reg(0x00D3) 00 00 00 00 ILI9341, ILI9488 reg(0x00D4) 00 00 00 00 Novatek ID reg(0x00DA) 00 00 RDID1 reg(0x00DB) 00 00 RDID2 reg(0x00DC) 00 00 RDID3 reg(0x00E0) 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 GAMMA-P reg(0x00E1) 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 GAMMA-N reg(0x00EF) 14 14 14 14 14 14 ILI9327 reg(0x00F2) 08 08 08 08 08 08 08 08 08 08 08 08 Adjust Control 2 reg(0x00F6) 00 00 00 00 Interface Control

prenticedavid commented 5 years ago

You have a Himax HX8347-I controller

From the extras/mcufriend_how_to.txt file

HX8347-I 240x320 ID=0x9595 #define SUPPORT_8347D

I was not aware that anyone used this library for DSO138. Please post a link to the project code. Note that tft.begin(ID) must use the correct ID.

David.

SMDT1 commented 5 years ago

David, thanks for the reply! Here is the link : https://github.com/prenticedavid/MCUFRIEND_kbv/issues/55 I uploaded this project https://github.com/ardyesp/DLO-138/issues/10#issue-343247357 and added in MCUFRIEND_kbv.cpp - #define SUPPORT_8347D . But it always a white screen with stm32f103c .boarded оn DS0-138. Then I downloaded an example graphictest_kbv to Arduino Uno, аnd see the test on screen. screenshot_2018-10-10-02-27-23 If i downloaded the project DLO-138 mcufriend on my board DSO138 -i get a white screen and such information in monitor port: Dual channel O Scope with two logic channels, ver: 1.0 Test square wave started Loading stored config... Loaded config: Timebase: 1 Trigger Rising: 1 Trigger Type: 0 X Cursor Pos: 874 Y Cursors: -70, -90, -110, -130 Waves: 1, 1, 1, 1 Trigger Level: 0 Print Stats: 0 Wave1 Zero: 1985 Wave2 Zero: 1985 ID = 0x95

prenticedavid commented 5 years ago

Print Stats: 0 Wave1 Zero: 1985 Wave2 Zero: 1985 ID = 0x95

It looks as if tft.readID() was returned as 0x0095 instead of 0x9595. You can force tft.begin(0x9595) but I would worry more about whether your TFT wiring is correct.

Your photo looks like a 3.3V display. It does not look like a Uno shield.

Surely DSO-138 kits come with all the correct components. Even correct firmware for the STM32F103. Yes, it would be an interesting project to modify the firmware. I really can't see any attraction in making a DSO-138 without a ready-made pcb. In which case you would always buy a kit.

David.

SMDT1 commented 5 years ago

If i delete afio_cfg_debug_ports(AFIO_DEBUG_NONE); from setup() it become id 0x1095

Dual channel O Scope with two logic channels, ver: 1.0 Test square wave started Loading stored config... Loaded config: Timebase: 1 Trigger Rising: 1 Trigger Type: 0 X Cursor Pos: 874 Y Cursors: -70, -90, -110, -130 Waves: 1, 1, 1, 1 Trigger Level: 0 Print Stats: 0 Wave1 Zero: 1985 Wave2 Zero: 1985 ID = 0x1095

prenticedavid commented 5 years ago

I really don't want to debug someone else's code. It looks as if the project you are building is not my original code.

I see from your link that I had written the SPECIAL for rtek1000 in July 2018. My SPECIAL changes PB4 from JRST to GPIO if using ST core. Roger's weird MapleCore does this in the startup. Since PB3 is JTDO you probably need to change this to GPIO as well. Hence rtek1000's mention of afio_cfg_debug_ports(AFIO_DEBUG_NONE) which sounds like a Maple thing.

Which Core are you using? The first step is to read the correct ID.

I am sorry to be so negative. But DSO138 kits seem to be about £13 plus £5 for acrylic case. I can even get a ready-built one from a "UK supplier" for £17.58. I suspect it is "Fast Chinese" rather than genuine "UK".

If you tell me that you have got a proper pcb, I am happy to spend time helping you. If you have got trailing wires from a BluePill, you are on your own.

David.

SMDT1 commented 5 years ago

The display perfectly works on the Arduino Pro Mini 328 3.3v. 20181010_194644 But does not want to work with the STM32F103C8 20181010_202331 The financial side does not interest me. I wanted to deal with this display.

Thank you.

prenticedavid commented 5 years ago
  1. your "3.3V Pro Mini" photo shows "readPixel() should be 24-bit". So it is NOT working correctly.

  2. your other photo shows a DSO138 pcb. That is GOOD. It shows trailing wires from the header which is BAD.

  3. if you show me a photo with the correct screen plugged into the correct pcb header, I am happy to help you.

  4. Which Arduino IDE version are you using? Current version is v1.8.7. Any v1.8.x version is good.

  5. Which STM32 Core? the IDE "Board Manager" should tell you the version.

  6. How do you program the STM32 ? e.g. ST-LinkV2 or bootloader.

  7. There are many people on the http://www.stm32duino.com/ forum that have built DSO138.

David.

SMDT1 commented 5 years ago

Do not worry. I did it. Now everything works well. Yes, indeed, the problem was with the board. Your library works great! Thanks! Good luck.