滚动广告牌
单片机课程设计
报
告
: 机电汽车
学院 学院
班级:
指导教师: 王东兴教授
2011年7月14日
目录
1.课程设计任务
课程设计任务:
基于单片机的自动滚动广告牌的设计
广告牌有四张宣传彩页,卷入一卷轴,依次来回显示每一页,每一页显示的时间相同.本设计以MCS-51系列单片机为核心,采用常用电子器件设计,自行设计电源,设计广告彩页的显示时间长度,时间一到就用直流电动机旋转控制彩页切换,用一台直流电动机控制广告彩页的旋转(正/反转),用一个光敏电阻传感器测量光强度,当光线较暗的时候启动背景灯.设置三个按键:手动/自动切换、手动正转和手动反转,用一个发光二极管显示手动/自动状态。设置三个行程开关,设置彩页的显示位置。
2.设计项目简介
通过单片机对系统进行控制,实现系统的自动、手动运行,电动机的正反转。在运行过程中,由红外线传感器1做位置行程开关。当一页完全显示时,红外线传感器输出低电平,没有完全显示时,输出为高电平。彩页的第一页的首端和第四页的末端都有红外线传感器。当第一页完全显示时,此时红外线传感器2输出低电平,电动机将在下一次动作时正转;当第四页完全显示时,红外线传感器3输出为低电平,电动机将在下一次动作时反转,因而实现广告彩页的完全显示。
模式控制按钮按下时,系统进入自动模式。在自动模式下,系统自动实现翻页、停留。当正转完成后,自动进行反转,在没有再按按键时,广告彩页周而复始的实现自动循环
显示。当再按按键时,系统进入手动模式,由两个正反转按键控制电动机的正反转,从而实现广告牌的正反转。
当光强低于一定的值时,光敏电阻阻值将增大,比较器将输出1,再通过上拉电阻和电源的作用,向单片机输入0,将0输出给光电隔离器,背景灯将启动。
3.电路主要元器件简介
AT89C51单片机
Features
, Compatible with MCS-51, Products
, 4 Kbytes of In-System Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles , Fully Static Operation: 0 Hz to 24 MHz
, Three-Level Program Memory Lock , 128 x 8-Bit Internal RAM
, 32 Programmable I/O Lines , Two 16-Bit Timer/Counters , Six Interrupt Sources
, Programmable Serial Channel , Low Power Idle and Power Down Modes
Description
The AT89C51 is a low-power, high-performance CMOS 8-bit
microcomputer with 4 Kbytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmel’s high
density nonvolatile memory technology and is compatible with the industry standard MCS-51, instruction set and pinout. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C51 provides the following standard features: 4 Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters ,serial port and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
Pin Configurations
TA8050P
1.5A MOTOR DRIVER WITH BRAKE FUNCTION
The TA8050P is a 1.5A motor driver which directly drives a bidirectional DC motor. Inputs DI1 and DI2 are combined to select one of forward, reverse, stop, and brake modes. Since the inputs are TTL-compatible, this IC can be controlled directly from a CPU or other control system. The IC also has various protective functions.
FEATURES
1(Bidirectional DC motor driver
2(Current capacity: 1.5A
3(Four modes :Forward, Reverse,Stop,and Brake
4(Protective functions:Thermal ,Shutdown,Short Circuit Protection,
and Overvoltage Shutdown
5(Built-in diode for counteracting counter electromotive force
6(Plastic HSIP-7 pin
MOC3043