【STM32G431RBTx】备战蓝桥杯嵌入式→决赛试题→第八届

news2024/11/20 13:32:35

文章目录

    • 前言
    • 一、题目
    • 二、模块初始化
    • 三、代码实现
      • interrupt.h:
      • interrupt.c:
      • main.h:
      • main.c:
    • 四、完成效果
    • 五、总结

前言

学习完了所有模块之后(LIS302考点取消了, 扩展板也找不到了,如果你能找到可能你不是在十四届省赛后买的扩展板), 跟省赛一样,先拿第八届开刀。

一、题目

请添加图片描述
请添加图片描述
请添加图片描述

二、模块初始化

1.LCD这里不用配置,直接使用提供的资源包就行
2.KEY, 四个按键IO口都要配置,分别是PB0, PB1,PB2,PA0依次是B0,B1,B2,B3不要弄错了
3.LED:开启PC8-15,PD2输出模式就行了。
4.定时器:TIM3(按键消抖定时器):PSC:80-1,ARR:10000-1,TIM2(输入捕获定时器)PSC:80-1,ARR:4294967295(0xFFFFFFFF), TIM16,TIM17(PWM输出定时器):PSC:1-1, ARR:100-1, Pulse:50
5.PA4:ADC_IN17,PA5:ADC_IN13都要为Single-ended模式
6.i2c:设置PB6,PB7为GPIO_Output模式即可

三、代码实现

bsp组中共有:
在这里插入图片描述

interrupt.h:

#ifndef __INTERRUPT_H__
#define __INTERRUPT_H__

#include "main.h"
#include "stdbool.h"

struct keys 
{
	bool key_sta;
	unsigned char key_judge;
	bool single_flag;
	unsigned int key_time;
	bool long_flag;
};

#endif

interrupt.c:

#include "interrupt.h"

/* Captured Values */
uint32_t uwIC2Value1_T2CH2 = 0;
uint32_t uwIC2Value2_T2CH2 = 0;
uint32_t uwHighCapture_T2CH2 = 0;
uint32_t uwLowCapture_T2CH2 = 0;
/* Capture index */
uint16_t uhCaptureIndex_T2CH2 = 0;

/* Frequency Value */
uint32_t uwFrequency_T2CH2 = 0;
float uwDuty_T2CH2 = 0;



/* Captured Values */
uint32_t uwIC3Value1_T2CH3 = 0;
uint32_t uwIC3Value2_T2CH3 = 0;
uint32_t uwHighCapture_T2CH3 = 0;
uint32_t uwLowCapture_T2CH3 = 0;
/* Capture index */
uint16_t uhCaptureIndex_T2CH3 = 0;

/* Frequency Value */
uint32_t uwFrequency_T2CH3 = 0;
float uwDuty_T2CH3 = 0;




void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
	if(htim->Instance == TIM2)
	{
		if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_2)
		{
			if(uhCaptureIndex_T2CH2 == 0)
			{
				/* Get the 1st Input Capture value */
				uwIC2Value1_T2CH2 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2);
				__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_FALLING);
				uhCaptureIndex_T2CH2 = 1;
			}
			else if(uhCaptureIndex_T2CH2 == 1)
			{
				/* Get the 2nd Input Capture value */
				uwIC2Value2_T2CH2 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); 
				__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_RISING);
				/* Capture computation */
				if (uwIC2Value2_T2CH2 > uwIC2Value1_T2CH2)
				{
					uwHighCapture_T2CH2 = (uwIC2Value2_T2CH2 - uwIC2Value1_T2CH2); 
				}
				else if (uwIC2Value2_T2CH2 < uwIC2Value1_T2CH2)
				{
					/* 0xFFFF is max TIM1_CCRx value */
					uwHighCapture_T2CH2 = ((0xFFFFFFFF - uwIC2Value1_T2CH2) + uwIC2Value2_T2CH2) + 1;
				}
				else
				{
					/* If capture values are equal, we have reached the limit of frequency
						 measures */
					Error_Handler();
				}
				uhCaptureIndex_T2CH2 = 2;
				uwIC2Value1_T2CH2 = uwIC2Value2_T2CH2;
				/* Frequency computation: for this example TIMx (TIM1) is clocked by
					 APB2Clk */      

			}
			else if(uhCaptureIndex_T2CH2 == 2)
			{
				uwIC2Value2_T2CH2 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); 
				if (uwIC2Value2_T2CH2 > uwIC2Value1_T2CH2)
				{
					uwLowCapture_T2CH2 = (uwIC2Value2_T2CH2 - uwIC2Value1_T2CH2); 
				}
				else if (uwIC2Value2_T2CH2 < uwIC2Value1_T2CH2)
				{
					/* 0xFFFF is max TIM1_CCRx value */
					uwLowCapture_T2CH2 = ((0xFFFFFFFF - uwIC2Value1_T2CH2) + uwIC2Value2_T2CH2) + 1;
				}
				uwFrequency_T2CH2 = 1000000 / (uwLowCapture_T2CH2 + uwHighCapture_T2CH2);
				uwDuty_T2CH2 = uwHighCapture_T2CH2 * 100.0 / (uwLowCapture_T2CH2 + uwHighCapture_T2CH2);
				uhCaptureIndex_T2CH2 = 0;
			}
		}
		if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_3)
		{
			if(uhCaptureIndex_T2CH3 == 0)
			{
				/* Get the 1st Input Capture value */
				uwIC3Value1_T2CH3 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_3);
				__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_3, TIM_INPUTCHANNELPOLARITY_FALLING);
				uhCaptureIndex_T2CH3 = 1;
			}
			else if(uhCaptureIndex_T2CH3 == 1)
			{
				/* Get the 2nd Input Capture value */
				uwIC3Value2_T2CH3 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_3); 
				__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_3, TIM_INPUTCHANNELPOLARITY_RISING);
				/* Capture computation */
				if (uwIC3Value2_T2CH3 > uwIC3Value1_T2CH3)
				{
					uwHighCapture_T2CH3 = (uwIC3Value2_T2CH3 - uwIC3Value1_T2CH3); 
				}
				else if (uwIC3Value2_T2CH3 < uwIC3Value1_T2CH3)
				{
					/* 0xFFFF is max TIM1_CCRx value */
					uwHighCapture_T2CH3 = ((0xFFFFFFFF - uwIC3Value1_T2CH3) + uwIC3Value2_T2CH3) + 1;
				}
				else
				{
					/* If capture values are equal, we have reached the limit of frequency
						 measures */
					Error_Handler();
				}
				uhCaptureIndex_T2CH3 = 2;
				uwIC3Value1_T2CH3 = uwIC3Value2_T2CH3;
				/* Frequency computation: for this example TIMx (TIM1) is clocked by
					 APB2Clk */      

			}
			else if(uhCaptureIndex_T2CH3 == 2)
			{
				uwIC3Value2_T2CH3 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_3); 
				if (uwIC3Value2_T2CH3 > uwIC3Value1_T2CH3)
				{
					uwLowCapture_T2CH3 = (uwIC3Value2_T2CH3 - uwIC3Value1_T2CH3); 
				}
				else if (uwIC3Value2_T2CH3 < uwIC3Value1_T2CH3)
				{
					/* 0xFFFF is max TIM1_CCRx value */
					uwLowCapture_T2CH3 = ((0xFFFFFFFF - uwIC3Value1_T2CH3) + uwIC3Value2_T2CH3) + 1;
				}
				uwFrequency_T2CH3 = 1000000 / (uwLowCapture_T2CH3 + uwHighCapture_T2CH3);
				uwDuty_T2CH3 = uwHighCapture_T2CH3 * 100.0 / (uwLowCapture_T2CH3 + uwHighCapture_T2CH3);
				uhCaptureIndex_T2CH3 = 0;
			}
		}
	}
}

struct keys key[4] = {0, 0, 0, 0, 0};

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef * htim)
{
	if(htim->Instance == TIM3)
	{
		key[0].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_0);
		key[1].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_1);
		key[2].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_2);
		key[3].key_sta = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0);
		for(unsigned char i = 0; i < 4; i++)
		{
			switch(key[i].key_judge)
			{
				case 0:
				{
					if(key[i].key_sta == 0)
					{
						key[i].key_judge = 1;
						key[i].key_time = 0;
					}
					break;
				}
				case 1:
				{
					if(key[i].key_sta == 0)
					{
						key[i].key_judge = 2;
					}
					else 
					{
						key[i].key_judge = 0;
					}
					break;
				}
				case 2:
				{
					if(key[i].key_sta == 1)
					{
						key[i].key_judge = 0;
						if(key[i].key_time < 70)
						{
							key[i].single_flag = 1;
						}
					}
					else
					{
						key[i].key_time++;
						if(key[i].key_time >= 70)
						{
							key[i].long_flag = 1;
						}
					}
					break;
				}
			}
		}
	}
}

main.h:

/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @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 */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */
#define DATA 0
#define PARA 1
/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

main.c:

/* 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"
#include "adc.h"
#include "tim.h"
#include "gpio.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "lcd.h"
#include "interrupt.h"
#include "stdio.h"
#include "dadc.h"
#include "i2c.h"
#include "led.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 ---------------------------------------------------------*/

/* USER CODE BEGIN PV */
char text[30];
extern uint32_t uwFrequency_T2CH2;
extern float uwDuty_T2CH2;
extern uint32_t uwFrequency_T2CH3;
extern float uwDuty_T2CH3;
float volt_AO1, volt_AO2;
extern struct keys key[4];
unsigned char eeprom_readData;
unsigned char eeprom_writeData;
unsigned char DisplayMode;
unsigned char Div = 1, Mul = 1;
unsigned char SettingIndex;
unsigned char switchPwm = 1;
unsigned char LED = 0;
/* USER CODE END PV */

/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP */
void DisposeKey(void);
void LCD_Disp(void);
void LED_Control(void);
/* USER CODE END PFP */

/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */

/* 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_ADC2_Init();
  MX_TIM2_Init();
  MX_TIM3_Init();
  MX_TIM16_Init();
  MX_TIM17_Init();
  /* USER CODE BEGIN 2 */
	Mul = eeprom_read(1);
	Div = eeprom_read(0);
	LCD_Init();
	LCD_Clear(Black);
	LCD_SetBackColor(Black);
	LCD_SetTextColor(White);
	LED_Disp(0x00);
	HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_2);
	HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_3);
	HAL_TIM_Base_Start_IT(&htim3);
	HAL_TIM_PWM_Start(&htim16, TIM_CHANNEL_1);
	HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
		getDualADC(&hadc2);
		volt_AO1 = adc2_in17_AO1 * 3.3 /4096;
		volt_AO2 = adc2_in13_AO2 * 3.3 /4096;
		if(switchPwm)
		{
			HAL_TIM_PWM_Start(&htim16, TIM_CHANNEL_1);
			HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);
			__HAL_TIM_SET_PRESCALER(&htim16, 80000000 / 100 / (uwFrequency_T2CH2 / (float)Div));
			__HAL_TIM_SET_PRESCALER(&htim17, 80000000 / 100 / (uwFrequency_T2CH3 * (float)Mul));
		}
		else
		{
			HAL_TIM_PWM_Stop(&htim16, TIM_CHANNEL_1);
			HAL_TIM_PWM_Stop(&htim17, TIM_CHANNEL_1);
		}
		DisposeKey();
		LED_Control();
		LED_Disp(LED);
		LCD_Disp();
//		sprintf(text, "Fre1:%05d", uwFrequency_T2CH2);
//		LCD_DisplayStringLine(Line0, text);
//		sprintf(text, "Fre2:%05d", uwFrequency_T2CH3);
//		LCD_DisplayStringLine(Line1, text);
//		sprintf(text, "volt1:%.2f", volt_AO1);
//		LCD_DisplayStringLine(Line2, text);
//		sprintf(text, "volt2:%.2f", volt_AO2);
//		LCD_DisplayStringLine(Line3, text);
  }
  /* 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_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);

  /** Initializes the RCC Oscillators according to the specified parameters
  * in the RCC_OscInitTypeDef structure.
  */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV3;
  RCC_OscInitStruct.PLL.PLLN = 20;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
  RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
  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_PLLCLK;
  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_2) != HAL_OK)
  {
    Error_Handler();
  }
}

/* USER CODE BEGIN 4 */
void DisposeKey(void)
{
	if(key[0].single_flag)
	{
		LCD_Clear(Black);
		if(DisplayMode == DATA)
		{
			DisplayMode = PARA;
			switchPwm = 0;
		}
		else if(DisplayMode == PARA)
		{
			eeprom_write(0, Div);
			HAL_Delay(5);
			eeprom_write(1, Mul);
			switchPwm = 1;
			DisplayMode = DATA;
		}
		key[0].single_flag = 0;
	}
	if(key[1].single_flag)
	{
		if(DisplayMode == PARA)
			SettingIndex = !SettingIndex;
		key[1].single_flag = 0;
	}
	if(key[2].single_flag)
	{
		if(DisplayMode == PARA)
		{
			if(SettingIndex == 0)
			{
				Div++;
				if(Div == 5)
					Div = 1;
			}
			if(SettingIndex == 1)
			{
				Mul++;
				if(Mul == 5)
					Mul = 1;
			}
		}
		key[2].single_flag = 0;
	}
	if(key[3].single_flag)
	{
		if(DisplayMode == PARA)
		{
			if(SettingIndex == 0)
			{
				Div--;
				if(Div == 0)
					Div = 4;
			}
			if(SettingIndex == 1)
			{
				Mul--;
				if(Mul == 0)
					Mul = 4;
			}
		}
		key[3].single_flag = 0;
	}
}

void LCD_Disp(void)
{
	if(DisplayMode == DATA)
	{
		LCD_DisplayStringLine(Line1, "        DATA");
		sprintf(text, "PULS1:%05.2fKHZ", uwFrequency_T2CH2 / 1000.0);
		LCD_DisplayStringLine(Line4, text);
		sprintf(text, "PULS2:%05.2fKHZ", uwFrequency_T2CH3 / 1000.0);
		LCD_DisplayStringLine(Line5, text);
		sprintf(text, "AO1:%.2fV", volt_AO1);
		LCD_DisplayStringLine(Line6, text);
		sprintf(text, "AO2:%.2fV", volt_AO2);
		LCD_DisplayStringLine(Line7, text);
		LCD_DisplayStringLine(Line9, "                   1");
	}
	if(DisplayMode == PARA)
	{
		LCD_DisplayStringLine(Line1, "        PARA");
		if(SettingIndex == 0) {LCD_SetTextColor(Green);}
		sprintf(text, "DIV:%d", Div);
		LCD_DisplayStringLine(Line3, text);
		LCD_SetTextColor(White);
		if(SettingIndex == 1) {LCD_SetTextColor(Green);}
		sprintf(text, "MUL:%d", Mul);
		LCD_DisplayStringLine(Line4, text);
		LCD_SetTextColor(White);
		LCD_DisplayStringLine(Line9, "                   2");
	}
}

void LED_Control(void)
{
	if(DisplayMode == PARA)
	{
		LED = LED & 0xfe | 0x01;
	}
	else
	{
		LED = LED & 0xfe;
	}
	if(volt_AO1 > volt_AO2)
	{
		LED = LED & 0x7f | 0x80;
	}
	else
	{
		LED = LED & 0x7f;
	}
}
/* 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 */

四、完成效果

蓝桥杯嵌入式第八届国赛试题实现效果

五、总结

第八届省赛是目前为止我认为难度最高的,但第八届决赛题难度还行,不会太难为人,难点就在输入捕获采集频率。
本篇文章只是为了存放我的代码,所以看不懂很正常,如果需要代码可以找我私信。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/542619.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

这个屏幕录制太好用了!

哈喽&#xff0c;大家好&#xff01;今天给各位小伙伴测试了一屏幕录制的小工具——ApowerREC。它是一款专业同步录制屏幕画面及声音的录屏软件。界面简洁&#xff0c;操作简单&#xff0c;支持实时编辑屏幕录像、创建计划任务、录制摄像头高清视频等功能。废话不多说&#xff…

汇编九、直接地址与寄存器、ROM和RAM

1、直接地址与寄存器 1.1、A和ACC (1)A是没有地址的&#xff0c;可以当作寄存器使用。 (2)ACC是有地址的&#xff0c;地址为E0H(查数据手册)。 (3)如果使用压栈操作&#xff0c;要用ACC。因为ACC可当做直接地址。 (4)如果使用位操作&#xff0c;要用ACC。因为ACC可位寻址。…

总结855

学习目标&#xff1a; 月目标&#xff1a;5月&#xff08;张宇强化前10讲&#xff0c;背诵15篇短文&#xff0c;熟词僻义300词基础词&#xff09; 周目标&#xff1a;张宇强化前3讲并完成相应的习题并记录&#xff0c;英语背3篇文章并回诵 每日必复习&#xff08;5分钟&#…

chatgpt赋能Python-python3_9_2怎么安装

Python3.9.2的安装指南 Python是一种高级编程语言&#xff0c;广泛应用于各种领域&#xff0c;从数据科学到机器学习到Web应用程序。Python具有易学性和通用性&#xff0c;因此成为众多开发人员的首选语言。此篇文章将指导您如何安装Python3.9.2版本。 为什么选择Python3.9.2…

Packet Tracer – 对 VLAN 实施进行故障排除 – 方案 1

Packet Tracer – 对 VLAN 实施进行故障排除 – 方案 1 地址分配表 设备 接口 IP 地址 子网掩码 交换机端口 VLAN PC1 NIC 172.17.10.21 255.255.255.0 S2 F0/11 10 PC2 NIC 172.17.20.22 255.255.255.0 S2 F0/18 20 PC3 NIC 172.17.30.23 255.255.255.0…

一星期学mysql day2

文章目录 DQL&#xff08;数据查询语言&#xff09;基础查询条件查询聚合查询&#xff08;聚合函数&#xff09;分组查询注意事项 排序查询注意事项 分页查询注意事项 编写顺序DQL执行顺序 DCL 管理用户管理用户注意事项 权限控制注意事项 函数字符串函数数值函数日期函数流程函…

车辆管理系统的设计与实现

背景 4S店车辆系统&#xff0c;为用户随时随地查看4S店车辆信息提供了便捷的方法&#xff0c;更重要的是大大的简化了管理员管理4S店车辆信息的方式方法&#xff0c;更提供了其他想要了解4S店车辆信息及运作情况以及挑选方便快捷的可靠渠道。相比于传统的管理方法&#xff0c;…

chatgpt赋能Python-python3_8怎么安装numpy库

Python3.8怎么安装numpy库&#xff1f;一个详细的步骤指南 你是否想要在Python3.8中安装numpy库&#xff0c;但不知道如何开始&#xff1f;没问题&#xff0c;本篇文章将介绍Python3.8的numpy安装步骤。 什么是numpy&#xff1f; numpy是Python中的一个重要的数学计算库&…

chatgpt赋能Python-python3_7怎么保存

Python 3.7 - 新的保存方式 Python 语言是一种广泛使用的编程语言之一&#xff0c;它在数据分析、网络编程、科学计算等领域都得到了广泛的应用。Python 的一个新版本&#xff0c;Python 3.7&#xff0c;增加了一种新的保存方式&#xff0c;这种方式可以提高数据的保存效率&am…

ElasticSearch漫游 (5.RestClient初始化准备)

之前都是在客户端页面各种操作&#xff0c; 但是我们作为一个java开发者&#xff0c;需要使用代码的方式 来操作ES&#xff0c; 所以我们要先从 Rest Client 开始 准备数据 既然是ES 查数据 不整点测试数据 没法下饭是吧 先建个酒店表 搞点数据&#xff1a; &#xff08;新手…

两款亲测非常优秀的压缩软件

哈喽&#xff0c;大家好。今天给大家带来两款超级好用的压缩软件&#xff0c;一款是老牌的WinRAR&#xff0c;另一款是开源的7-Zip。 这两款都是小编电脑上必备的压缩软件&#xff0c;至于为什么要装两款嘛&#xff0c;可能因为任性吧&#xff0c;哈哈。 一、测试演示参数 演…

nvm-windows安装和配置

1.下载nvm-windows https://github.com/coreybutler/nvm-windows/releases 进入后如下图 选择nvm-setup.exe下载 2.安装 2.1 运行安装包&#xff0c;同意协议&#xff0c;下一步 2.2 选择nvm的安装目录&#xff0c;安装路径名最好不要有空格 2.3 点击Next&#xff0c;设…

【CPP】NULL nullptr

文章目录 NULLnullptr总结Ref. NULL 在C中&#xff0c;NULL实际上是0.因为C中不能把void*类型的指针隐式转换成其他类型的指针&#xff08;cpp是强类型语言&#xff09;&#xff0c;所以为了解决空指针的表示问题&#xff0c;C引入了0来表示空指针&#xff0c;这样就有了上述代…

Python 爬虫(七):pyspider 使用

1 简介 pyspider 是一个支持任务监控、项目管理、多种数据库&#xff0c;具有 WebUI 的爬虫框架&#xff0c;它采用 Python 语言编写&#xff0c;分布式架构。详细特性如下&#xff1a; 拥有 Web 脚本编辑界面&#xff0c;任务监控器&#xff0c;项目管理器和结构查看器&#…

chatgpt赋能Python-python3_8_6怎么用

Python 3.8.6 全面介绍及使用指南 Python是一种高级编程语言&#xff0c;广泛应用于Web开发、数据科学、人工智能等领域。Python 3.8.6是Python 3.x系列的最新版本&#xff0c;在性能、稳定性、开发效率等方面有了重大的提升。本文将对Python3.8.6进行全面介绍&#xff0c;并给…

【野火启明_瑞萨RA6M5】梦的开始 ---- 点灯(FSP库)

文章目录 一、FSP配置二、hal_entry入口函数三、封装 LED 设备驱动程序下载验证 一、FSP配置 对于 Keil 开发环境&#xff1a; 拷贝一份之前的 Keil 工程模板 “06_Template”&#xff0c; 然后将工程文件夹重命名为 “11_GPIO_LED”&#xff0c;并进入该文件夹里面双击 Keil …

2023关于ES中的数据聚合相关操作

1.ES数据聚合 聚合(aggregation)可以实现对文档数据的统计、分析、运算。聚合常见有三大类。 桶(Bucket)聚合&#xff1a;用来对文档做分组 常用的方法 语句描述TermAggregation按照文档字段值分组Date Histogram按照日期阶梯分组&#xff0c;列如一周或一月为一组 度量(Me…

【走进Linux的世界】Linux---基本指令(1)

个人主页&#xff1a;平行线也会相交 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 平行线也会相交 原创 收录于专栏【Linux专栏】&#x1f388; 本专栏旨在分享学习Linux的一点学习心得&#xff0c;欢迎大家在评论区讨论&#x1f48c; 目录 ls指令pwd指令…

IS420UCSBH4A 用于高速应用中的Mark VIe系列

控制器IS420UCSBH4A由通用电气公司设计&#xff0c;用于高速应用中的Mark VIe系列&#xff0c;采用1066 MHz EP80579英特尔处理器。该控制器可与Mark VIe系列一起用于EX2100e和LS2100e应用。 IS420UCSBH4A技术规格 系列马克维处理机类型1066兆赫EP80579英特尔型号IS420UCSBH4A…

chatgpt赋能Python-python3_8_5怎么打开

Python3.8.5 是如何打开的&#xff1f; Python3.8.5 是近期发布的 Python 编程语言的一个版本&#xff0c;它具有很多新的功能和性能的改进。对于想要学习或者使用 Python3.8.5 的人&#xff0c;本文将介绍如何打开 Python3.8.5 环境。 步骤1&#xff1a;下载 Python3.8.5 首…