Shop OBEX P1 Docs P2 Docs Learn Events
Help modifying the 74HC595 PWM Object — Parallax Forums

Help modifying the 74HC595 PWM Object

kevin@cachia.comkevin@cachia.com Posts: 23
edited 2011-01-20 19:09 in Propeller 1
Hello,

I'm working on an LED Cube project. I found Dennis Ferron's great 74HC595_MultiPWM driver object. But I'm having trouble understanding the assembly part to modify it, it's way over my head. It only supports 32 bit long shift register lengths, and my project uses 3 MAX 6969 16bit registers. So I would like to convert/modify his to go from supporting 4 8bit shift registers to 3 16 bit ones. Would anyone be willing to help me modify the assembly code. I can loose some resolution and frequency to compensate.

I contacted Dennis, but was hoping to get some help here also, so I don't pester him to much. :P

I think I need to expand the long bitmasks? in addition to changing the 32 to 48 references.

Any help would be greatly appreciated.

Thank you,
Kevin

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-19 23:45
    Kevin, Firstly welcome to the fabulous prop forum. Don't hesitate to ask for help here :)

    Now, it is best to post the snipperof the code using the code tags (keeps the indents) or the whole project file zipped up by PropTool. This way we don't have to go find the object.

    This should work but is not tested. I have not verified the MAX6969 is identical levels for the clock, etc.
  • kevin@cachia.comkevin@cachia.com Posts: 23
    edited 2011-01-20 19:09
    Hi Cluso99,

    Thank you so much for the quick and warm response.

    I looked at what you attached and used it and the assembly manual to try and learn from them. I'm still kind of lost on the pasm stuff though. :frown:

    I was interested in modifying the multiPWM version, so I made an attempt to adapt your changes to that version best I could. It looks more complicated, but would work perfectly if I could add support for an additional "Long" like the sample you did.

    I attached what I tried so far, but it's missing code and probably very wrong. I was hoping you or someone else could maybe help me with it. I also attached my test spin file of how I'm tried to call the SetPWM function in order to multiplex the four levels of LEDs together, hopefully it will make more sense.

    74HC595_MultiPWMb.spin

    rgbledcube3.spin

    I hope I did a better job this time posting on here.

    Thank you very much for any help.
    Kevin
Sign In or Register to comment.