Spark Logic

16 BIT HX8357C

nyx123 Sat Jan 20, 2018 4:49 pm

Any wiring diagram from my 3.2 tft lcd screen shield (16 bit hx8375c) to my “bluepill” ? I connected with my own but it appears only a white screen seems my wiring is messes me.

I use this library from stevestrong https://github.com/stevstrong/Adafruit_ … 6bit_STM32 and use the graphic test example and outputs the serial , this

TFT LCD test
TFT size is 320x480
TFT begin done.
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23230

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423012
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134014
Circles (filled) 187446
Circles (outline) 177968
Triangles (outline) 118044
Triangles (filled) 122775
Rounded rects (outline) 53757
Rounded rects (filled) 192713
Done!
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423013
Horiz/Vert Lines 6837
Rectangles (outline) 5713
Rectangles (filled) 134018
Circles (filled) 187445
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122777
Rounded rects (outline) 53757
Rounded rects (filled) 192715
Done!
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23228
Lines 423013
Horiz/Vert Lines 6837
Rectangles (outline) 5712
Rectangles (filled) 134011
Circles (filled) 187442
Circles (outline) 177967
Triangles (outline) 118044
Triangles (filled) 122778
Rounded rects (outline) 53757
Rounded rects (filled) 192713
Done!
rotation: 0, runtime: 23231
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423013
Horiz/Vert Lines 6839
Rectangles (outline) 5712
Rectangles (filled) 134017
Circles (filled) 187446
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122779
Rounded rects (outline) 53757
Rounded rects (filled) 192714
Done!
rotation: 0, runtime: 23231
rotation: 1, runtime: 23231
rotation: 2, runtime: 23229
rotation: 3, runtime: 23230

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423011
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134008
Circles (filled) 187444
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122787
Rounded rects (outline) 53756
Rounded rects (filled) 192712
Done!
rotation: 0, runtime: 23230
rotation: 1, runtime: 23231
rotation: 2, runtime: 23231
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423011
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134018
Circles (filled) 187444
Circles (outline) 177966
Triangles (outline) 118044
Triangles (filled) 122789
Rounded rects (outline) 53757
Rounded rects (filled) 192712
Done!

Replies

dannyf Sat Jan 20, 2018 5:48 pm

I wired my screen to bluepill like this

those things generally assume a set of wiring that’s consistent with the hardware. so you just need to make sure that your wiring matches the code – or what the code assumes. if not, change the wiring or change the code, until they match.

nyx123 Sat Jan 20, 2018 6:30 pm

[mrburnette – Sat Jan 20, 2018 5:01 pm] –
Maybe Steve’s post:
viewtopic.php?t=2322

Ray

Looks like i need some register port datasheet for bluepill base on stevs description of his library

nyx123 Sat Jan 20, 2018 6:51 pm

Update :

Still no display after putting all data ports in PB0-15

david.prentice Sat Jan 20, 2018 8:29 pm

The RD pin should be 3.3V when not active.

Personally, I always read ID, registers, GRAM memory …
When you get your screen going, please could you read the ID for me.

David

nyx123 Sat Jan 20, 2018 8:49 pm

[david.prentice – Sat Jan 20, 2018 8:29 pm] –
Personally, I always read ID, registers, GRAM memory …
When you get your screen going, please could you read the ID for me.

Base from the library given created by stev and the examples exist https://github.com/stevstrong/Adafruit_ … 6bit_STM32 he didnt provide any code that will be read you mentioned

zmemw16 Sun Jan 21, 2018 1:57 am

disable debug pins also i think boot0/boot1 as well mess things up for port b
srp

nyx123 Sun Jan 21, 2018 5:45 am

[zmemw16 – Sun Jan 21, 2018 1:57 am] –
disable debug pins also i think boot0/boot1 as well mess things up for port b
srp

By the discussion here http://stm32duino.com/viewtopic.php?f=1 … ins#p40009 it says that the core files was already update. Question is any idea on how to disable debug pins?

And yes I use the boot1 pin for the connection of the DB2 from the LCD, am right?

Im using stm32f103c8t6 board

zmemw16 Sun Jan 21, 2018 11:34 am

[email protected]:~$ cd sketchbook/hardware/Arduino_STM32/STM32F1
[email protected]:~/sketchbook/hardware/Arduino_STM32/STM32F1$ grep -R ableDebugPort *
cores/maple/wirish_debug.h: * @see enableDebugPorts()
cores/maple/wirish_debug.h:void disableDebugPorts(void);
cores/maple/wirish_debug.h: * @see disableDebugPorts()
cores/maple/wirish_debug.h:void enableDebugPorts(void);

nyx123 Sun Jan 21, 2018 12:12 pm

[zmemw16 – Sun Jan 21, 2018 11:34 am] –
[email protected]:~$ cd sketchbook/hardware/Arduino_STM32/STM32F1
[email protected]:~/sketchbook/hardware/Arduino_STM32/STM32F1$ grep -R ableDebugPort *
cores/maple/wirish_debug.h: * @see enableDebugPorts()
cores/maple/wirish_debug.h:void disableDebugPorts(void);
cores/maple/wirish_debug.h: * @see disableDebugPorts()
cores/maple/wirish_debug.h:void enableDebugPorts(void);

zmemw16 Sun Jan 21, 2018 1:28 pm

arduino code is arduino code on any of win, linux and mac

the calls needed are
void enableDebugPorts(void);
void disableDebugPorts(void);
use disableDebugPorts(); in setup
use enableDebugPorts(); in the code that terminates execution maybe on a button press ... ...

stevestrong Mon Jan 22, 2018 8:41 am

Using the latest Arduino_STM32 core from Roger you don’t need to mess up with debug ports.
BUT
You use PB2 as data pin. For this, you have to shorten (or replace) R4 (on back side of blue pill) with a wire.

I have tested the graphicstest example, it should work for you, too.
Which value do you get by reading the ID?
Please post here your latest connection.

nyx123 Mon Jan 22, 2018 9:17 am

So this is the summary of what am I doing

This is what my lcd screens looks alike https://ibb.co/muQJGw 3.2′ tft lcd screen shield, HX8357C

I use your 16 bit library https://github.com/stevstrong/Adafruit_ … 6bit_STM32 and also include the library https://github.com/adafruit/Adafruit-GFX-Library and put the library under the stmf1 folder , the adafruit gfx library i rename it into Adafruit_GFX_AS

After uploading the graphic test code my serial outputs like this

TFT LCD test
TFT size is 320x480
TFT begin done.
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23230

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423012
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134014
Circles (filled) 187446
Circles (outline) 177968
Triangles (outline) 118044
Triangles (filled) 122775
Rounded rects (outline) 53757
Rounded rects (filled) 192713
Done!
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423013
Horiz/Vert Lines 6837
Rectangles (outline) 5713
Rectangles (filled) 134018
Circles (filled) 187445
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122777
Rounded rects (outline) 53757
Rounded rects (filled) 192715
Done!
rotation: 0, runtime: 23229
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23228
Lines 423013
Horiz/Vert Lines 6837
Rectangles (outline) 5712
Rectangles (filled) 134011
Circles (filled) 187442
Circles (outline) 177967
Triangles (outline) 118044
Triangles (filled) 122778
Rounded rects (outline) 53757
Rounded rects (filled) 192713
Done!
rotation: 0, runtime: 23231
rotation: 1, runtime: 23229
rotation: 2, runtime: 23229
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423013
Horiz/Vert Lines 6839
Rectangles (outline) 5712
Rectangles (filled) 134017
Circles (filled) 187446
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122779
Rounded rects (outline) 53757
Rounded rects (filled) 192714
Done!
rotation: 0, runtime: 23231
rotation: 1, runtime: 23231
rotation: 2, runtime: 23229
rotation: 3, runtime: 23230

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423011
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134008
Circles (filled) 187444
Circles (outline) 177966
Triangles (outline) 118045
Triangles (filled) 122787
Rounded rects (outline) 53756
Rounded rects (filled) 192712
Done!
rotation: 0, runtime: 23230
rotation: 1, runtime: 23231
rotation: 2, runtime: 23231
rotation: 3, runtime: 23229

Benchmark Time (microseconds)
Screen fill 54845
Text 23229
Lines 423011
Horiz/Vert Lines 6839
Rectangles (outline) 5713
Rectangles (filled) 134018
Circles (filled) 187444
Circles (outline) 177966
Triangles (outline) 118044
Triangles (filled) 122789
Rounded rects (outline) 53757
Rounded rects (filled) 192712
Done!

stevestrong Mon Jan 22, 2018 9:26 am

There is no way around making short on R4 for PB2, because it is originally used as BOOT1 pin via R4 (100k) which should be removed.

Do you use the graphicstest example?
You have to change line 26 to:
identifier = 0x8357;

nyx123 Mon Jan 22, 2018 11:35 am

[stevestrong – Mon Jan 22, 2018 9:26 am] –
Do you use the graphicstest example?
You have to change line 26 to:
identifier = 0x8357;

stevestrong Mon Jan 22, 2018 12:14 pm

One more thing you could still try is to change this line to “#if 1” – thus enable slow control signalling.
The serial output is not relevant yet, but the display should show something.

nyx123 Mon Jan 22, 2018 12:32 pm

[stevestrong – Mon Jan 22, 2018 12:14 pm] –
One more thing you could still try is to change this line to “#if 1” – thus enable slow control signalling.
The serial output is not relevant yet, but the display should show something.

Still white on the screen , im following this pin configuration of my lcd https://imgur.com/W1Gwtsc , when I try the lcd in due the lcd is okay maybe the problem is in the hardware I think

stevestrong Mon Jan 22, 2018 12:44 pm

Which library do you use for Due? Can’t you use the same here, too?

nyx123 Mon Jan 22, 2018 12:51 pm

[stevestrong – Mon Jan 22, 2018 12:44 pm] –
Which library do you use for Due? Can’t you use the same here, too?

I use bodmer`s library for due https://github.com/Bodmer/TFT_HX8357_Due I didn`t try because the library is written for due boards, am I right?

Sign in to reply