helo again,
I think I found the reason why the robot didn't responed to the commands
Can I inside a component create a constant and caculate its value from generics constans like this:
generic (
DC: time:= 17 ms;
clock_period: time:= 20 ns;
max_pulse: time:= 1 ms;
min_pulse: time:= 2 ms;
);
constant duty_cycle: integer:= DC/clock_period; --850000
constant min_cycle: integer:= min_pulse/clock_period; --50000 constant max_cycle: integer:= max_pulse/clock_period; -- 100000
constant neutral_cycle: integer:= neutral_pulse/clock_period ; --75000
and then ask
if (Counter = duty_cycle) then
I think I can't and that the value of the constant duty_cycle is zero
thougts?