Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Simulide 0.4.15 Sr9 lin 64 arduino uno analogWrite(PIN_PWM,0) error

2 posters

Go down  Message [Page 1 of 1]

feri



Simulide 0.4.15 Sr9 lin 64 arduino uno analogWrite(PIN_PWM,0)
Most of the time the pin stays at 5v only a few times it goes to 0v as it should be.
Version 1.0.1 works fine.
I attach diagram and schetch.
Greetings
Attachments
Simulide 0.4.15 Sr9 lin 64 arduino uno analogWrite(PIN_PWM,0) error Attachmentprova.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 3 times

arcachofo likes this post

feri



One way around this problem is to use an "analogWrite" function for testing with Simulide 0.4.15 example:

Code:

viod analog_write(byte pin, byte pwm) {
  #ifdef SIMULIDE
    if (pwm > 0) {
      analogWrite(pin, pwm);
    }
    else {
      analogWrite(pin, 0); 
      pinMode(pin, INPUT);
      pinMode(pin, OUTPUT);
  }
  #else
      analogWrite(pin, pwm);
  #endif

}

arcachofo

arcachofo

I tried to find a solution for this, but seems like it is not possible without major changes in Mcu Pins.

And doing major changes in version 0.4.15 is not in the plans, this would create more problems and take a very long time testing debugging and fixing new problems for ALL Mcus.

So this issue will not be fixed.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum