久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2991|回復: 1
收起左側

STM32 32X64全彩圖片顯示程序

[復制鏈接]
ID:233530 發表于 2017-9-16 19:38 | 顯示全部樓層 |閱讀模式
32X64全彩圖片顯示程序#include "STM32Lib\\stm32f10x.h"
//#include "stm32f10x_usart.h"
/**********************************************
**串口配置函數,這里使能了兩個串口,其中串口2使用了中斷接收模式
**
**********************************************/
u8 Uart2_Get_Flag; //串口2接收到數據標志
u8 Uart2_Get_Data; //串口2接收的數據
void USART_Configuration(void)
{
    GPIO_InitTypeDef GPIO_InitStructure;
    USART_InitTypeDef USART_InitStructure;
USART_ClockInitTypeDef USART_ClockInitStructure;

//使能串口1,PA,AFIO總線
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |
            RCC_APB2Periph_AFIO |
            RCC_APB2Periph_USART1 ,
            ENABLE);
//    /* A9 USART1_Tx */
//    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
//    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;  //推挽輸出-TX
//    GPIO_Init(GPIOA, &GPIO_InitStructure);
//
//    /* A10 USART1_Rx  */
//    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;//浮空輸入-RX
//    GPIO_Init(GPIOA, &GPIO_InitStructure);

    USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;
USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;
USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;
USART_ClockInit(USART1, &USART_ClockInitStructure);
    USART_Init(USART1, &USART_InitStructure);
    /* Enable the USARTx */
    USART_Cmd(USART1, ENABLE);


//使能串口2時鐘
/* RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2,ENABLE);

// A2 做T2X
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
    GPIO_Init(GPIOA, &GPIO_InitStructure);
    // A3 做R2X
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
    GPIO_Init(GPIOA, &GPIO_InitStructure);

USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;
USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;
USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;
    USART_ClockInit(USART2, &USART_ClockInitStructure);
    USART_Init(USART2, &USART_InitStructure);
   
    USART_Cmd(USART2, ENABLE);
//串口2使用接收中斷
USART_ITConfig(USART2,USART_IT_RXNE,ENABLE);*/
}
void USART1_Putc(unsigned char c)
{
    USART_SendData(USART1, c);
    while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET );
}
void USART1_Puts(char * str)
{
    while(*str)
    {
        USART_SendData(USART1, *str++);
        /* Loop until the end of transmission */
        while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET);
    }
}
/*void USART2_Putc(unsigned char c)
{
    USART_SendData(USART2, c);
    while(USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET );
}
void USART2_Puts(char * str)
{
    while(*str)
    {
        USART_SendData(USART2, *str++);
        // Loop until the end of transmission
      while(USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET);
    }
}*/

7 32X64全彩圖片顯示程序.7z

206.67 KB, 下載次數: 23, 下載積分: 黑幣 -5

回復

使用道具 舉報

ID:66862 發表于 2025-1-6 23:42 | 顯示全部樓層
有點亮后的效果圖嗎?
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 免费视频一区二区 | 国内久久精品 | 久久久久久黄 | 久久av资源网 | 国产精品中文字幕在线观看 | 久久精品免费一区二区 | 精品国产免费人成在线观看 | 精品一区二区在线观看 | 中文字幕高清视频 | 97人澡人人添人人爽欧美 | 精品国产欧美日韩不卡在线观看 | 免费黄色大片 | 天天拍天天射 | 99在线免费视频 | 亚洲区一区二区 | 成人a网| 最新免费黄色网址 | 亚洲精品专区 | 99热国产精品 | 成人一区二区视频 | 午夜精品影院 | 日韩一区二区三区在线播放 | 日韩在线国产精品 | 水蜜桃久久夜色精品一区 | 一区二区三区欧美在线 | 欧美一区二区三区精品 | 亚洲欧美综合精品另类天天更新 | 国产精品久久777777 | 国产高清视频在线 | 蜜桃臀av一区二区三区 | 56pao在线| 综合欧美亚洲 | 欧美一级二级视频 | 国产亚洲精品久久久久动 | 91在线资源 | 午夜欧美一区二区三区在线播放 | 国产人免费人成免费视频 | 欧美日韩福利视频 | 欧美日韩高清 | 99精品电影| 99re免费 |