程序和proteus的仿真在附件
Arduino源程序如下:
- #define DIRB1 13
- #define DIRA1 12
- #define ENABLE1 11
- #define DIRB2 10
- #define DIRA2 9
- #define ENABLE2 8
- void setup() {
- pinMode(DIRA1,OUTPUT);
- pinMode(DIRB1,OUTPUT);
- pinMode(ENABLE1,OUTPUT);
- pinMode(DIRA2,OUTPUT);
- pinMode(DIRB2,OUTPUT);
- pinMode(ENABLE2,OUTPUT);
- Serial.begin(9600); }
- void loop() {
- digitalWrite(DIRA1,LOW);
- digitalWrite(DIRB1,HIGH);
- digitalWrite(ENABLE1, HIGH);
- digitalWrite(DIRA2,LOW);
- digitalWrite(DIRB2,HIGH);
- digitalWrite(ENABLE2, HIGH);
- }
复制代码
Keil代码与Proteus仿真下载:
按键部分还未编写代码,望大家集思广益,补全代码
293D仿真和程序.rar
(104.44 KB, 下载次数: 17)
|