The LCD display on this touchscreen is having issues. It is not responding to touch. And suddenly the display stopped working. So I cut the foam and suddenly the ribbon tore off completely.
As you can see the screen is completely removed.
It now gives access to all the pins that are being used by the LCD.
I am planning to make a VGA controller using this board since the microcontroller has an LTDC (LCD TFT Controller)
It is a power transistor capable of handling power dissipation up to 90W for a few microseconds(generally less than 300 microseconds). Also, it has a Vceo of 60 V and a collector current of 15A.
TIP3055 is a widely used NPN power transistor that can handle high power and high voltage applications. It has a maximum collector-emitter voltage of 60V and a maximum collector current of 15A, making it ideal for use in power supplies, audio amplifiers, and motor control circuits. TIP3055 is a versatile transistor that can be used in a variety of circuit designs due to its high current gain and fast switching speeds. Its popularity can be attributed to its low cost, high reliability, and ease of use. With its ability to handle high power and voltage, TIP3055 is a go-to component for any circuit designer looking for a reliable power transistor.
It comes in a TO-247 package. This is handy as it can be mounted to a heat sink with a nut bolt.
Do all the companies that manufacture TIP3055 have exactly the same pinouts?
The TIP3055 transistor has a standardized pinout, which means that all manufacturers of this transistor must follow the same pinout configuration. The pinout configuration for the TIP3055 transistor is as follows:
Pin 1: Base
Pin 2: Collector
Pin 3: Emitter
Therefore, no matter which company manufactures the TIP3055 transistor, the pinout configuration should always be the same, and you can expect the same pinout configuration for TIP3055 transistors from different manufacturers. However, it is always recommended to check the datasheet provided by the manufacturer to confirm the pinout configuration and other specifications before using the transistor in a circuit.
The STM32F103C8T6 development board which is also known as Blue Pill is a small and affordable development board. It is based on the ARM Cortex-M3 processor and features 64KB of flash memory, 20KB of SRAM, and a maximum clock speed of 72MHz. The Blue Pill is a popular choice for hobbyists and developers who want to experiment with embedded systems and microcontrollers. In this blog post, we will take a closer look at the Blue Pill’s schematic diagram and pinout.
To program the Blue Pill, you will need a development environment that includes the necessary tools and software. A popular choice is the STM32CubeIDE, which is an integrated development environment (IDE) that includes a compiler, debugger, and other tools. You will also need to download the STM32F1xx HAL library, which provides a set of functions for configuring and controlling the microcontroller.
what are the other IDE which can be used to program stm32f103c8t6?
Keil MDK: Keil MDK is an integrated development environment (IDE) that supports the ARM Cortex-M processor family, including the STM32F103C8T6. It includes a compiler, linker, debugger, and other tools for developing embedded applications.
Eclipse IDE: Eclipse is a popular open-source IDE that supports a wide range of programming languages and platforms, including the STM32F103C8T6. Eclipse provides a plugin called “GNU ARM Eclipse” that includes tools for building and debugging ARM-based projects.
Visual Studio Code: Visual Studio Code is a popular open-source code editor that supports a wide range of programming languages and platforms, including the STM32F103C8T6. You can use Visual Studio Code with extensions to provide support for C/C++ development, debugging, and uploading code to the board.
Can IAR Embedded Workbench be used to program?
Yes, IAR Embedded Workbench is another popular IDE that can be used to program the STM32F103C8T6. IAR provides a comprehensive toolchain that includes a C/C++ compiler, linker, and debugger, as well as tools for code analysis and optimization.
Step 2: Configuring the microcontroller
Before writing code for the Blue Pill, you need to configure the microcontroller’s peripherals and registers. This involves setting up clock and power management, GPIO pins, timers, interrupts, and other peripherals, depending on your project’s requirements. The STM32F1xx HAL library provides functions for configuring the microcontroller, which you can use in your code.
Step 3: Writing and compiling the code
Once the microcontroller is configured, you can write your code using a programming language such as C or C++. You can use the STM32F1xx HAL library functions to interact with the microcontroller’s peripherals and registers. Once you have written your code, you need to compile it using the compiler included in your development environment.
Step 4: Uploading the code to the board
Once you have compiled your code, you need to upload it to the Blue Pill board. This involves connecting the board to your computer using a USB cable and using a programming tool such as ST-Link or J-Link to upload the code. You can use the programming tool’s software or your development environment’s built-in upload tool to upload the code.
Schematic Diagram:
The STM32F103C8T6 Blue Pill’s schematic diagram is relatively simple and straightforward. The board features a 3.3V voltage regulator, which is used to provide power to the microcontroller and other components. The board also includes an external crystal oscillator (HSE) and a 32.768 kHz crystal oscillator (LSE) for real-time clock (RTC) functionality.
Other key components on the board include:
Reset circuitry: The Blue Pill features a reset button and an external reset circuit to ensure the reliable and safe operation of the microcontroller. USB connector: The board includes a USB connector that can be used for programming and communication with the microcontroller. LED indicators: There are two LED indicators on the board, one for power and one for user-defined purposes.
Pinout:
The STM32F103C8T6 Blue Pill’s pinout is organized into four rows of headers, with a total of 20 pins. Here is a brief overview of the pin functions:
PA0 to PA15: These pins are general-purpose input/output (GPIO) pins that can be used for a variety of purposes, including digital input/output and analog input.
PB0 to PB15: These pins are also GPIO pins, with the same capabilities as the PA pins.
PC13 to PC15: These pins are typically used for the onboard LED indicators, but can also be used as GPIO pins.
VDD: This is the 3.3V power supply pin.
VSS: This is the ground pin.
BOOT0: This pin is used to select between the bootloader and the user code during programming.
NRST: This is the reset pin.
SWDIO and SWCLK: These pins are used for programming and debugging the microcontroller using the Serial Wire Debug (SWD) protocol.
The STM32F103C8T6 Blue Pill is a versatile and affordable development board that is well-suited for a wide range of projects. Its simple schematic diagram and clear pinout make it easy to work with, even for beginners. With its powerful ARM Cortex-M3 processor, ample memory, and rich set of peripherals, the Blue Pill is a great choice for anyone looking to dive into the world of microcontroller programming.
The BD139 is a general-purpose NPN bipolar junction transistor (BJT). It has three pins:
Base (B)
Collector (C)
Emitter (E)
There are two companies that manufacture the transistor
STMicroelectronics
onsemi
The pinout diagram according to STMicroelectronics is as follows:
When looking at the center hole and keeping the metal side down the pins are arranged from right to left as:
Base (B)
Collector (C)
Emitter (E)
It’s important to note that the metal tab is connected to the Collector pin.
The pinout diagram according to ON Semiconductor is as follows:
When looking at the flat side of the transistor with the pins facing down and the metal tab facing up, the pins are arranged from left to right as follows:
Emitter (E)
Collector (C)
Base (B)
It’s important to note that the metal tab is connected to the Collector pin.
NOTE: The CYW43439 supports both 802.11 wireless and Bluetooth, initially Pico W does not have Bluetooth support. Support may be added later, and will use the same SPI interface. If support is added existing hardware may require a firmware update to support Bluetooth, but there will be no hardware modifications needed.
der Großvater - Grandfather
der Onkel - Uncle
der Vater - Father
der Cousin - Cousin
der Bruder - Brother
der Sohn - Son
der Ehemann - Husband
der Schwiegervater - father-in-law
der Schwiegersohn - son in law
der Schwager - brother in law
der Neffe - Nephew
der Enkel - Grandson
der Mann - Man
der Erwachsene - Adult
der Junge - Boy
der Stiefvater - Stepfather
der Stiefsohn - Stepson
der Partner - Partner
Weekdays – Wochentage
Monday - der Montag
Tuesday - der Dienstag
Wednesday - der Mittwoch
Thursday - der Donnerstag
Friday - der Freitag
Saturday - der Samstag
Sunday - der Sonntag
German Seasons – Deutsche Jahreszeiten
der Winter - winter
der Frühling - spring
der Sommer - Summer
der Herbest - Autumn
Makes of Cars der BMW – BMW der Jaguar – Jaguar
Alcoholic Drinks der Whisky – Whisky der Wien – Wine
German Nouns have grammatical gender and not biological gender. What this means is that sometimes a person can be of different gender even if it biological gender is actually something else.
example: A young girl is biologically female. So her gender would be feminine. But in german it is das Mädchen. Here das indicates neuter gender, which comes from the grammatical gender.
So it is always best to learn a noun with its article and gender. It will help in the long term.
The article change depending on the use of the noun in Accusative, Nominative, Dative, or Genative.
The article ‘the’ will always be ‘die’ for all the plural nouns.
Merge sort is good if your system has plenty of memory to accommodate the temporary array.
Embedded systems have very limited memory and it is often fixed.
If the system has some other function that also runs concurrently. Then that memory also gets shortened.
Merge sort is good for a bigger system like the personal computer and business computer which have the bigger memory in which all the temporary array can reside.
The advantage of merge sort is that it is stable.
Since it takes a lot of space it is not useful for an embedded system, as they have a very small memory sometimes it is just KilloByte. example: ATmega328p = 2KB SRAM ATtiny85 = 512B SRAM
Code for STM32F429ZIT6
This code redirects the printf statements towards the asynchronous UART.
As the size of input array for merge sort increases the space required to store temporary element increases, which eventually leads to stalling of the program.
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
#include "stdlib.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
UART_HandleTypeDef huart1;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_USART1_UART_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/*
* Function Name: _write
* Function Description: Redirect the printf() statement towards the UART using the HAL_UART_Transmit
Author: Abhay
*/
int _write(int fd, char* ptr, int len) {
HAL_UART_Transmit(&huart1, (uint8_t *) ptr, len, HAL_MAX_DELAY);
// HAL_UART_Transmit(&huart1, ptr, len, Timeout)
return len;
}
// Merges two subarrays of arr[].
// First subarray is arr[l..m]
// Second subarray is arr[m+1..r]
void merge(int arr[], int l, int m, int r)
{
int i, j, k;
int n1 = m - l + 1;
int n2 = r - m;
/* create temp arrays */
int L[n1], R[n2];
/* Copy data to temp arrays L[] and R[] */
for (i = 0; i < n1; i++)
L[i] = arr[l + i];
for (j = 0; j < n2; j++)
R[j] = arr[m + 1 + j];
/* Merge the temp arrays back into arr[l..r]*/
i = 0; // Initial index of first subarray
j = 0; // Initial index of second subarray
k = l; // Initial index of merged subarray
while (i < n1 && j < n2) {
if (L[i] <= R[j]) {
arr[k] = L[i];
i++;
}
else {
arr[k] = R[j];
j++;
}
k++;
}
/* Copy the remaining elements of L[], if there
are any */
while (i < n1) {
arr[k] = L[i];
i++;
k++;
}
/* Copy the remaining elements of R[], if there
are any */
while (j < n2) {
arr[k] = R[j];
j++;
k++;
}
}
/* l is for left index and r is right index of the
sub-array of arr to be sorted */
void mergeSort(int arr[], int l, int r)
{
if (l < r) {
// Same as (l+r)/2, but avoids overflow for
// large l and h
int m = l + (r - l) / 2;
// Sort first and second halves
mergeSort(arr, l, m);
mergeSort(arr, m + 1, r);
merge(arr, l, m, r);
}
}
/* UTILITY FUNCTIONS */
/* Function to print an array */
void printArray(int A[], int size)
{
int i;
for (i = 0; i < size; i++)
printf("%d ", A[i]);
printf("\n");
}
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
int arr[] = { 12, 11, 13, 5, 6, 7,12};
int arr_size = sizeof(arr) / sizeof(arr[0]);
// for( int temp=0; temp<1023;temp++){
// arr[temp] = rand()*1000;
// }
printf("Given array is \n");
printArray(arr, arr_size);
mergeSort(arr, 0, arr_size - 1);
printf("\nSorted array is \n");
printArray(arr, arr_size);
// return 0;
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief USART1 Initialization Function
* @param None
* @retval None
*/
static void MX_USART1_UART_Init(void)
{
/* USER CODE BEGIN USART1_Init 0 */
/* USER CODE END USART1_Init 0 */
/* USER CODE BEGIN USART1_Init 1 */
/* USER CODE END USART1_Init 1 */
huart1.Instance = USART1;
huart1.Init.BaudRate = 115200;
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_NONE;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
if (HAL_UART_Init(&huart1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART1_Init 2 */
/* USER CODE END USART1_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, ledg_Pin|ledr_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : ledg_Pin ledr_Pin */
GPIO_InitStruct.Pin = ledg_Pin|ledr_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */