2013年11月30日 星期六

Stepper Motor Driver (Full Step).v

// File        : Stepper Motor Driver (Full Step).v


module stepper_motor_full_step ( start ,clk ,dout );

output [3:0] dout ;
reg [3:0] dout ;

input start ;
wire start ;
input clk ;
wire clk ;

reg [1:0] m ;

initial m = 0;

always @ (posedge (clk)) begin
if (start)
m <= m + 1;
end

always @ (m) begin
case (m)
0 : dout = 8;
1 : dout = 4;
2 : dout = 2;
default : dout = 1;
endcase
end

endmodule

沒有留言:

張貼留言

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ     https://console.hivemq.cloud/clusters 當您進入 HiveMQ Cloud Console 的 Clusters 頁面時,您的目標是取得能讓 MQTT W...