摘要 采用的技术主要有: (1)、通过编程来控制小车的速度及转向; (2)、传感器的有效应用及新型芯片的采用; ( 3 )、放射式红外光电传感器ST188的使用; (4)、无线模块作为俩小车的通信工具及交替领跑。 本设计以STC12C5A60S2单片机为控制核心,STC12C5A60S2是一款16位Flash单片机,它的易用性和多功能性受到了广大使用者的好评。小车采用L298驱动芯片控制直流减速电机,用大功率、大容量的12V/6800mAh蓄电池给电机供电,通过内部程序对智能小车的左右电机进行PWM调速控制。根据题目要求,前进过程中安放在车身不同位置的检测器件对小车的周围环境进行检测,包括采用光电传感器检测黑线命令小车转弯、无线模块作为两智能车之间的通信工具以完成在行车道正常行走及交替领跑任务。其中,本系统设计的重点是控制直流电机使两小车在转弯及正常行驶;难点是实现在规定区域的超车以达到交替领跑。 关键词:STC12C5A60S2单片机;PWM调速;无线通信;交替领跑。 Abstract: This design to STC12C5A60S2 microcontroller as control core, STC 12 C5A60S2 is a 16 bit Flash microcontroller, it's easy to use and more functional by many user high praise. The L298 drive chip control motor, with high power and large capacity 6800 mAh battery to power supply, through the internal procedures motor of intelligent electric vehicles or so motor speed control PWM. According to the topic request, progressive process of the body and laid it in different locations of the detection devices to the circumstances of the car testing, including adopting photoelectric sensor test black mand module as the turning of the car, munication between two intelligent car tool to finish walk normally and lead the alternate task. Among them, the system design is the focus of the control dc motor car in turning to both on the turn and normal operation; Difficulty is to realize in the provisions in order to achieve regional overtaking alternate scorer. The technique to be used mainly has: (1), through the programming to control the speed of the car and steering; (2), sensor effective application of a new type of chip and use; (3), wireless module as two munication tools and alternate scorer. Key words: STC12C5A60S2 single-chip puter; PWM speed; munication; Alternate scorer. 目录 摘要 1 目录 I 1 设计任务与要求 2 设计任务 2 设计要求 2 2 方案比较与论证 2 方案设计 2 方案论证 2 总体总结 4 3 硬件设计 5 总体硬件框图 5 单元电路设计 5 4 软件设计 11 总体软件框图 12 13 5 系统调试与测试 13