본문 바로가기

공부/STM32F4

6.[stm32f429] 74hc245 테스트

반응형

1. stm32CubeMx 





2. 회로도

3. main.c


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_TIM1_Init();

  /* USER CODE BEGIN 2 */

  HAL_TIM_OC_Start(&htim1,TIM_CHANNEL_1);

  /* USER CODE END 2 */


  /* Infinite loop */

  /* USER CODE BEGIN WHILE */

  while (1)

  {


  /* USER CODE END WHILE */


  /* USER CODE BEGIN 3 */


  }

  /* USER CODE END 3 */


} 


4. 결과


3V->5V 로 레벨 시프트 되는 것을 볼 수 있다.




반응형