Announcement

Collapse
No announcement yet.

25 pwm pins can be used on mega2560 ? i can't add more then 20 ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    25 pwm pins can be used on mega2560 ? i can't add more then 20 ?

    Hi guys,

    i had a great idea for my workshop lights ( led panels) to make them dimmable since there 40Watts each and power is "expensive" in Europe.

    Now i am running the beta arduino version so i could use 25 pwm pins.
    not sure whats going on but here is a video where i can't add any more then 20.
    I can add the pins to outputs etc but pwm is like it has been locked.

    Did i miss something in the manual ?

    Click image for larger version

Name:	uvQ7Yv1.jpg
Views:	53
Size:	120.7 KB
ID:	1422027


    Video you can find here :

    #2
    Yep, My bad I have just looked at the code and it is limited to 20 PWM pins and I did not update the manual. I also somehow missed returning the info to tell you that in the log. It has been like this for years and you are the first to notice.

    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      Ah that's a pity.
      Can this limit easily be lifted/raised to 25 ? or is it limited in the code because of a hardware limit ?



      edit: i do see in softpwm.h this :
      #define SOFTPWM_MAXCHANNELS 20

      Going to change it to 25 and see if it really would be this simple 😀

      Comment


        #4
        Unfortunately, this is not something I can change as the size of the sketch is a problem on some boards and I need to make it universal. Do you need to control all 25 lamps independently or can you not daisy chain the drivers?
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          Originally posted by Vincenttor View Post
          edit: i do see in softpwm.h this :
          #define SOFTPWM_MAXCHANNELS 20

          Going to change it to 25 and see if it really would be this simple 😀
          If only! there are other arrays that need to change and the plugin is coded to limit the pin setup to 20 as you have found.
          Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
          X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
          Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
          Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
          Scripts =
          Various

          Comment


            #6
            no ill just take 1 board away and use a esp8266 for controller this one.
            Also let's the mega breath a bit since it isnt the fastest board as far i know.

            Thanks anyway for the fast replies, the rest works great here with your plugin as always.

            I hoped it was this easy with changing the line , as it did for taking away the flickering by raising the Hz in softpwm.cpp/h
            But after reading a threat about 20 softpwm limit it was wiser to go for a hardware solution as i understand by most of the replies instead of taking the time to rewrite a library.
            And also risking that the arduino itself couldn't handle it.

            Comment

            Working...
            X