[SOLVED] Interfacing monitor with MCU

MrChips

Joined Oct 2, 2009
25,011
It seems to me that STM32F407 is suitable for all three examples. But I can't say anything about any particular monitor because I have no idea about it.
Before you can connect device A to device B you ought to learn something about the interface and capabilities of both devices.

So you want to connect an MCU to a display.

Consider the following displays, how each works, and the interface required. Each one is not compatible with the other.

1) LED
2) Seven-segment display
3) LCD custom display
4) LCD alphanumeric character display
5) LCD Graphics display
6) VGA monitor
7) DVI monitor
8) HDMI monitor

Which ever you choose, you need to read up about the electrical interface and the protocol used to drive the display. On top of the hardware, software is required to drive the display. Don't assume that the software is already there to drive the display.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
1) LED
2) Seven-segment display
3) LCD custom display
4) LCD alphanumeric character display
5) LCD Graphics display
6) VGA monitor
7) DVI monitor
8) HDMI monitor
I know 1, 2 and 4 because I have experimented. I don't know about other options.

1) LED
In order to connect the LED to the microcontroller, a current limiting resistor is required, I have done this experiments.

2) Seven-segment display
current limiting resistor's are required to connect Seven-segment with microcontroller

4) LCD alphanumeric character display
I connect JHD162a LCD directly with microcontroller.

I agree with you that before using any device, its user manual should be read because the necessary information has been given in it.
 

ronsimpson

Joined Oct 7, 2019
1,750
I used this IC to convert "parallel" data, (Red data, Green data, Blue data, syncs) to "serial" for the HDMI. Maybe your CPU has this built in but I don't think so. This the hardware part of HDMI.
1634936470531.png
The Pi-0 has the HDMI hardware built in to the CPU .
1634936881721.png
 

trebla

Joined Jun 29, 2019
470
2) Seven-segment display
current limiting resistor's are required to connect Seven-segment with microcontroller

4) LCD alphanumeric character display
I connect JHD162a LCD directly with microcontroller.
You forgot the primary principle for selecting a MCU for application- available peripherials. If you want use for example a PIC12F1822 or STM32G041J6 for 7-segment display, you need more than resistors to drive seven segments despite these MCUs have enough memory and speed to do that.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
You forgot the primary principle for selecting a MCU for application- available peripherials.
Yes i totally agree with you this is my weakness. I am finding it challenging to select MCU and other device for an application.

I've watched two videos on youtube and I'm having trouble selecting the mask and display for them

Example : 1
What the MCU and Display will you select for this example?

Example : 2
What the MCU and Display will you select for this example?

Most problem i will use stm32 microcontroller because it has more memory and they have more speed. I can't get an idea what type of display would be suitable for these two display
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
You have chosen the Discovery Board, there must have been some reason or the other, it is better that you explain the reason.

I have three questions for you

1) Which microcontroller would you choose for Example1 remember, I am not asking for the board?

2) Which display would you choose for Example1

3) What kind software would be required to accomplish Example 1?

I have asked these three questions because I want to see that when designing the system how do you choose the MCU and other devices
 

MrChips

Joined Oct 2, 2009
25,011
Simple explanation.

You are at the stage where you are not quite ready to design a product. You need to experiment and learn what it takes to develop such as system. Hence you need a platform that will provide you with the tools to learn and experiment.

I have chosen the STM32F746G Discovery because it provides all of the above.
You have a working MCU with touch screen LCD display ready to go. What you need now is app software.

STM32CubeIDE and TouchGFX provide all the tools you need to get going.

Be forewarned. This is not an easy task for any system, any platform, any person. You have a long steep road ahead of you.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
You are at the stage where you are not quite ready to design a product. You need to experiment and learn what it takes to develop such as system. Hence you need a platform that will provide you with the tools to learn and experiment.

Be forewarned. This is not an easy task for any system, any platform, any person. You have a long steep road ahead of you.
I absolutely 100% agree with you. I know the two examples I gave are very complex products. I was not able to directly guess what hardware and what kind of software need for them.

I have chosen the STM32F746G Discovery because it provides all of the above.
You have a working MCU with touch screen LCD display ready to go. What you need now is app software.

STM32CubeIDE and TouchGFX provide all the tools you need to get going.
From your response I understand that you are selecting a board instead of MCU. maybe you are right in your place but i was hoping to tell me about the specific MCU and display. This would have made me think more about how to connect MCU and display. I know designing a complete board is not an easy task. I have learned a lot from your guideline.

I have a question to you that when you think of selling this kind of product will you still use the board If You're Selling Millions of Products What's Your Choice or will you design your own board in which you choose your microcontroller. I think it would be beneficial to design own board as it will save cost
 

MrChips

Joined Oct 2, 2009
25,011
The board I have selected uses STM32F746NGH6 MCU.

At your stage in the game it doesn't matter if you learn with STM32F407, STM32F469, STM32F746, etc...
Software development is practically the same on any platform.

Development kits or discovery kits are simply that. They allow you to investigate the capabilities of the MCU.
If you are going to manufacture and produce >100 units, you are not going to use a development kit. You will make your own customized PCB for your product.

I will give you a real example.

DSO138 Oscilloscope is a low cost hobbyist tool that is readily available. This is an MCU based system designed for a specific application.

What is driving this product? It is an STM32F103 MCU. It could have been done with an STM32F407, STM32F469, STM32F746, etc... There is not much else on the board besides an opamp chip and other analog components.
To get the product up and running at the development stage it really doesn't matter which STM3Fxxx is selected.



1635015211158.png
1635015727471.png
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
If you are going to manufacture and produce >100 units, you are not going to use a development kit. You will make your own customized PCB for your product.
Thank you for agreeing with my opinion

I will give you a real example.

DSO138 Oscilloscope is a low cost hobbyist tool that is readily available. This is an MCU based system designed for a specific application.
This is a good example i have seen similar product before on amazon

Which STM32 Discovery board would you choose if you want to connect a VGA monitor or HDMI monitor?
 

MrChips

Joined Oct 2, 2009
25,011
Which STM32 Discovery board would you choose if you want to connect a VGA monitor or HDMI monitor?
I have already gone down this road.
My first venture with ST was with STM32F4 Discovery board many years ago. Once I discovered for myself the capabilities of the MCU (not the DISCO board) and I was confident that the MCU would work for my intended application, I went ahead and built the PCB.

Here is my first attempt at driving a VGA monitor.

1635022596127.png
 

djsfantasi

Joined Apr 11, 2010
8,074
You forgot the primary principle for selecting a MCU for application- available peripherials. If you want use for example a PIC12F1822 or STM32G041J6 for 7-segment display, you need more than resistors to drive seven segments despite these MCUs have enough memory and speed to do that.
And you are forgetting to consider the current sourcing/sinking characteristics of your MCU. If you are driving 10 LEDs at 20mA apiece, it may be more than (for example) an Arduino can supply.
 

djsfantasi

Joined Apr 11, 2010
8,074
Many of MCUs i use can source/sink even less current
Exactly my point. So when considering the interfaces, one must consider both the voltage and current requirements of the interface PLUS the total current requirements of your design. Still using LEDs as an example… How would you reduce the current requirements on the MCU and still drive the LEDs? The same question must be answered for every output. And a similar question exists for inputs.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
I have come to this conclusion, when we have to select the MCU for an application, then we have to keep the following things in mind.

  1. current sourcing/sinking characteristics
  2. available peripherials.
  3. enough memory and speed

 

MrChips

Joined Oct 2, 2009
25,011
interesting project, I am curious to know What kind of software program have you written for this project? Have you written program in C language or used any other language like C++
Program written entirely in C by me. No external libraries used.
The sine wave was digitized by the MCU from a function generator.
 
Top