I'm working on a super simple SPI library for the TI-8[34]\+( C?SE)? calculators. The goal is to be able to control some Adafruit DotStar individually addressable LEDs with my calculator. I have the basic SPI part done, but the LEDs haven't come yet, so I haven't got a way to test it. I'll post updates once they arrive.
Update time! The LEDs came yesterday and I've managed to bang out a "library" for controlling up to 256 of them from the linkport. Here's a picture of it running on my 84+ SE:


The code can be found here: https://github.com/Ivoah/z80DotStar
I see two Arduino-compatible boards there, while I'd expect zero (unless you're using them for 5V supplies). What are they doing there? Anyway, this is a really awesome project, and I hope you'll be packaging up your SPI library as something useful for any sort of hardware project. Keep us posted on your progress on this!
KermMartian wrote:
I see two Arduino-compatible boards there, while I'd expect zero (unless you're using them for 5V supplies). What are they doing there? Anyway, this is a really awesome project, and I hope you'll be packaging up your SPI library as something useful for any sort of hardware project. Keep us posted on your progress on this!


The one on the bottom is an Arduino Micro and is indeed only being used for 5V, and the one on the top is an ESP8266 + FT232H breakout (uart/gpio/i2c/spi to USB) that just happen to be occupying the other half of the breadboard. You can see the edge of ESP8266 on the far left of the image. The spi.asm file is easily usable in another project, just #include it at the bottom of you code.
Neat that those LEDs have built-in constant current drivers. They're a bit easier to work with than an external driver, but probably cost more in any reasonable quantity.

Something I worked on that's similar:
I made this for 4th of July
I'm trying to update this program by adding a DCS GUI to it. I've managed to get the GUI to display properly, but for some reason my test only lights up the first 4 LEDs. Anyways, here's a screenie:
Looks great, Ivoah! Is that using assembly and the DCS GUI API, or the TI-BASIC version of the GUI API? Can we do anything to help you debug why only the first four LEDs are lighting up?
KermMartian wrote:
Looks great, Ivoah! Is that using assembly and the DCS GUI API, or the TI-BASIC version of the GUI API? Can we do anything to help you debug why only the first four LEDs are lighting up?


Assembly all the way Very Happy

The last LED not lighting up is probably just something stupid on my part, because I'm using the exact same code. But, I should probably make sure that my LED data isn't overlapping with the GUI ram.
Bump

After messing around with it last night on HCWP, I'm pretty sure the error is either with my wiring or in the dotstar.shift function. If anyone wants to help debug, here's the source: https://github.com/Ivoah/z80DotStar
Ivoah wrote:
Bump

After messing around with it last night on HCWP, I'm pretty sure the error is either with my wiring or in the dotstar.shift function. If anyone wants to help debug, here's the source: https://github.com/Ivoah/z80DotStar
You mentioned at one point on HCWP that you were considering swapping the last LED with another one to see if it was faulty or burnt out. Did you get a chance to test that? Assuming that your shift function is supposed to shift upwards, you'll be overwriting at least two bytes above the leds array. Try something like this:


Code:
shift:
    push bc
        push de
            ld hl, leds + NUM_LEDS*3 - 4
            ld de, leds + NUM_LEDS*3 -1
            ld bc, NUM_LEDS*3 - 3
            lddr
        pop de
    pop bc
    ret
KermMartian wrote:
You mentioned at one point on HCWP that you were considering swapping the last LED with another one to see if it was faulty or burnt out. Did you get a chance to test that?

I did test that and it wasn't the issue.

KermMartian wrote:
Assuming that your shift function is supposed to shift upwards, you'll be overwriting at least two bytes above the leds array. Try something like this:


Code:
shift:
    push bc
        push de
            ld hl, leds + NUM_LEDS*3 - 4
            ld de, leds + NUM_LEDS*3 -1
            ld bc, NUM_LEDS*3 - 3
            lddr
        pop de
    pop bc
    ret


The shift function is supposed to move led #5 into oblivion, #4 -> #5, #3 -> #4 etc. I just tried your code and it's still not working, I'll have to take a better look at it later.
Okay, I'm glad that you tested the LED itself. Yep, that description of the shift function matches my implementation, but not yours. I'd certainly believe that it's not what was wrong, though.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement