摘要
隨著移動(dòng)設(shè)備的流行和發(fā)展,嵌入式系統(tǒng)已經(jīng)成為一個(gè)熱點(diǎn)。它并不是最近出現(xiàn)的新技術(shù),只是隨著微電子技術(shù)和計(jì)算機(jī)技術(shù)的發(fā)展,微控制芯片功能越來(lái)越大,而嵌入微控制芯片的設(shè)備和系統(tǒng)越來(lái)越多,從而使得這種技術(shù)越來(lái)越引人注目。它對(duì)軟硬件的體積大小、成本、功耗和可靠性都提出了嚴(yán)格的要求。嵌入式系統(tǒng)的功能越來(lái)越強(qiáng)大,實(shí)現(xiàn)也越來(lái)越復(fù)雜,隨之出現(xiàn)的就是可靠性大大降低。最近的一種趨勢(shì)是一個(gè)功能強(qiáng)大的嵌入式系統(tǒng)通常需要一種操作系統(tǒng)來(lái)給予支持,這種操作系統(tǒng)是已經(jīng)成熟并且穩(wěn)定的,可以是嵌入式的Linux,WINCE等等。本文所要研究的就是基于ARM嵌入式系統(tǒng)的交通燈系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)。本設(shè)計(jì)采用了ARM32位的Cortex-M3 CPU的內(nèi)核的STM32作為核心處理器。
關(guān)鍵詞:嵌入式 交通燈 STM32f103 ARM
Abstract
With the popularity and development of mobile devices, embedded system has become a hotspot. It is not a new technique appeared recently, only with the development of microelectronics and computer technology, micro chip control functions more and more, more and more equipment and systems and embedded micro control chip, making the technology more attract sb.'s attention. Hardware and software of its size, cost, power consumption and reliability have made stringent requirements. The function of embedded system is more and more powerful, and more and more complicated, the reliability appears is greatly reduced. A recent trend is a powerful embedded systems usually require an operating system to support, the operating system is already mature and stable, can be embedded Linux, WINCE and so on. This paper is to study the design and Realization of the traffic light system based on ARM embedded system. This design uses the ARM32 bit Cortex-M3 CPU kernel STM32 as the core processor.
Keywords: embedded STM32f103 traffic lights ARM
目 錄
一 引言
二 相關(guān)內(nèi)容和原理 1
三 作品設(shè)計(jì)要求 1
四 作品方案設(shè)計(jì) 2
4.1 設(shè)計(jì)思路 2
4.2 總體設(shè)計(jì)框圖 3
4.3 總體方案設(shè)計(jì)參數(shù)計(jì)算 4
五 系統(tǒng)硬件電路設(shè)計(jì)及分析 4
5.1 STM32f103芯片介紹及選用 4
5.2 單片機(jī)電路原理圖及分析 4
5.3 電源電路模塊原理圖及分析 5
5.4 晶振與復(fù)位電路模塊原理圖 5
5.5 LED交通燈電路原理圖及分析 6
六 系統(tǒng)軟件設(shè)計(jì)及其分析 7
6.1 軟件設(shè)計(jì)流程圖 8
6.2 ARM交通燈控制軟件設(shè)計(jì) 8
七 系統(tǒng)軟件代碼 9
7.1 軟件設(shè)計(jì)流程圖………………………………………………… ………………………9
7.2 部分程序代碼……………………………………………………………………………10
八 Keil軟件的運(yùn)用與調(diào)試……………………… ……………………………………………16
九 實(shí)物演示照片…………………………………………………………………………………17
十 作品電路的PCB圖……………………………………………………………………… …19
十一 設(shè)計(jì)心得及體會(huì)……………………………………………………………………………20
十二 參考文獻(xiàn)…………………………… …………… ………………………………………21
/* Configure PE.07, PE.11 and PE.15 */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_11 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;//輸出上拉
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOE, &GPIO_InitStructure);
LED1(OFF);LED2(OFF);LED3(OFF);LED4(OFF);LED5(OFF);LED6(OFF);LED7(OFF);LED8(OFF);LED9(OFF);LED10(OFF);LED11(OFF);LED12(OFF);
內(nèi)聯(lián)函數(shù)定義LED函數(shù)部分:
#ifndef _LED_H
#define _LED_H
#include"stm32f10x.h"
#define ON 0
#define OFF 1
/***************內(nèi)聯(lián)函數(shù)定義LED函數(shù)****************/
#define LED1(a) if (a)
GPIO_SetBits(GPIOB,GPIO_Pin_8);
else
GPIO_ResetBits(GPIOB,GPIO_Pin_8)
#define LED4(a) if (a)
GPIO_SetBits(GPIOA,GPIO_Pin_12);
else
GPIO_ResetBits(GPIOA,GPIO_Pin_12)
#define LED7(a) if (a)
GPIO_SetBits(GPIOD,GPIO_Pin_10);
else
GPIO_ResetBits(GPIOD,GPIO_Pin_10)
#define LED10(a) if (a)
GPIO_SetBits(GPIOE,GPIO_Pin_15);
else
GPIO_ResetBits(GPIOE,GPIO_Pin_15)
#define LED2(a) if (a)
GPIO_SetBits(GPIOB,GPIO_Pin_6);
else
GPIO_ResetBits(GPIOB,GPIO_Pin_6)
#define LED5(a) if (a)
GPIO_SetBits(GPIOA,GPIO_Pin_10);
else
GPIO_ResetBits(GPIOA,GPIO_Pin_10)
#define LED8(a) if (a)
GPIO_SetBits(GPIOD,GPIO_Pin_12);
else
GPIO_ResetBits(GPIOD,GPIO_Pin_12)
#define LED11(a) if (a)
GPIO_SetBits(GPIOE,GPIO_Pin_11);
else
GPIO_ResetBits(GPIOE,GPIO_Pin_11)
#define LED3(a) if (a)
GPIO_SetBits(GPIOB,GPIO_Pin_9);
else
GPIO_ResetBits(GPIOB,GPIO_Pin_9)
#define LED6(a) if (a)
GPIO_SetBits(GPIOA,GPIO_Pin_8);
else
GPIO_ResetBits(GPIOA,GPIO_Pin_8)
#define LED9(a) if (a)
GPIO_SetBits(GPIOD,GPIO_Pin_15);
else
GPIO_ResetBits(GPIOD,GPIO_Pin_15)
#define LED12(a) if (a)
GPIO_SetBits(GPIOE,GPIO_Pin_7);
else
GPIO_ResetBits(GPIOE,GPIO_Pin_7)
void LED_GPIO_Configuration(void);
#endif
這是我近期單片機(jī)的課設(shè),查閱大約資料自己做的
燕山大學(xué)
嵌入式系統(tǒng)課程設(shè)計(jì)報(bào)告
十字路口交通燈控制系統(tǒng)
學(xué) 院:里仁學(xué)院
專業(yè)班級(jí):過(guò)控2班
姓 名:孟*坤
學(xué) 號(hào):14*1152
時(shí) 間:2017年6月
指導(dǎo)教師:
摘要
隨著移動(dòng)設(shè)備的流行和發(fā)展,嵌入式系統(tǒng)已經(jīng)成為一個(gè)熱點(diǎn)。它并不是最近出現(xiàn)的新技術(shù),只是隨著微電子技術(shù)和計(jì)算機(jī)技術(shù)的發(fā)展,微控制芯片功能越來(lái)越大,而嵌入微控制芯片的設(shè)備和系統(tǒng)越來(lái)越多,從而使得這種技術(shù)越來(lái)越引人注目。它對(duì)軟硬件的體積大小、成本、功耗和可靠性都提出了嚴(yán)格的要求。嵌入式系統(tǒng)的功能越來(lái)越強(qiáng)大,實(shí)現(xiàn)也越來(lái)越復(fù)雜,隨之出現(xiàn)的就是可靠性大大降低。最近的一種趨勢(shì)是一個(gè)功能強(qiáng)大的嵌入式系統(tǒng)通常需要一種操作系統(tǒng)來(lái)給予支持,這種操作系統(tǒng)是已經(jīng)成熟并且穩(wěn)定的,可以是嵌入式的Linux,WINCE等等。本文所要研究的就是基于ARM嵌入式系統(tǒng)的交通燈系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)。本設(shè)計(jì)采用了ARM32位的Cortex-M3 CPU的內(nèi)核的STM32作為核心處理器。
關(guān)鍵詞:嵌入式 交通燈 STM32f103 ARM
Abstract
With the popularity and development of mobile devices, embedded system has become a hotspot. It is not a new technique appeared recently, only with the development of microelectronics and computer technology, micro chip control functions more and more, more and more equipment and systems and embedded micro control chip, making the technology more attract sb.'s attention. Hardware and software of its size, cost, power consumption and reliability have made stringent requirements. The function of embedded system is more and more powerful, and more and more complicated, the reliability appears is greatly reduced. A recent trend is a powerful embedded systems usually require an operating system to support, the operating system is already mature and stable, can be embedded Linux, WINCE and so on. This paper is to study the design and Realization of the traffic light system based on ARM embedded system. This design uses the ARM32 bit Cortex-M3 CPU kernel STM32 as the core processor.
Keywords: embedded STM32f103 traffic lights ARM
目 錄
一 引言
二 相關(guān)內(nèi)容和原理 1
三 作品設(shè)計(jì)要求 1
四 作品方案設(shè)計(jì) 2
4.1 設(shè)計(jì)思路 2
4.2 總體設(shè)計(jì)框圖 3
4.3 總體方案設(shè)計(jì)參數(shù)計(jì)算 4
五 系統(tǒng)硬件電路設(shè)計(jì)及分析 4
5.1 STM32f103芯片介紹及選用 4
5.2 單片機(jī)電路原理圖及分析 4
5.3 電源電路模塊原理圖及分析 5
5.4 晶振與復(fù)位電路模塊原理圖 5
5.5 LED交通燈電路原理圖及分析 6
六 系統(tǒng)軟件設(shè)計(jì)及其分析 7
6.1 軟件設(shè)計(jì)流程圖 8
6.2 ARM交通燈控制軟件設(shè)計(jì) 8
七 系統(tǒng)軟件代碼 9
7.1 軟件設(shè)計(jì)流程圖………………………………………………… ………………………9
7.2 部分程序代碼……………………………………………………………………………10
八 Keil軟件的運(yùn)用與調(diào)試……………………… ……………………………………………16
九 實(shí)物演示照片…………………………………………………………………………………17
十 作品電路的PCB圖……………………………………………………………………… …19
十一 設(shè)計(jì)心得及體會(huì)……………………………………………………………………………20
十二 參考文獻(xiàn)…………………………… …………… ………………………………………21