Avatar for George

George

Member since Jul 2018 • Last active Nov 2018
  • 2 conversations
  • 22 comments

Most recent activity

    • 27 comments
    • 297 views
  • in Interfacing
    Avatar for George

    Do you agree with my #18 assessment

    Absolutely. Thinking on how to add one more transistor on each line there. There is enough room, but I want to minimize the mess.

    So does this board then only use hardware SPI? e.g. is it capable of software SPI?

    I have no idea. The datasheet says that there is an SPI on the B5 pin. I am using Espruino's SPI.setup function. When I use it on the B5 port it is ok. When I use it on B6 port there is an error "ERROR: Pin B6 is not capable of SPI1 MOSI". I don't know what characteristics a port should have to be capable of a software SPI. As I mentioned earlier, there is this line in Espruino's 2.0 update notes:

    Software Serial Transmit and Receive on any pin

    Isn't this an SPI? This looks very promising.

  • in Interfacing
    Avatar for George

    Yep, I've seen it. I am using my own board and I made a custom build of Espruino for it. Nothing special, it is based on STM32Discovery with the package changed to LQFP48 and some more little tweaks. I also used pin_names_direct as @Gordon offered. I have posted a link to my board PCB layout and diagram in my previous post.

  • in Interfacing
    Avatar for George

    @Robin, thanks for the encouragement) I have tried sending data as you offered with no effect. I feel that there is nothing left to try with the software part. Another reason why I was evading hardware fixes is that all my components are SMD, and transistors have the TO-236AB package. I have a soldering station with a hot air gun, so soldering these components on a factory-quality PCB is fairly easy. But I can hardly imagine how to make this "in-the-air" fix with SMD components. Resistors are SMD too, they are 0805. So here comes the tricky part.

    By the way, I have two separate lines of Neopixels. One of them is on B5 and another one on B6 port. There is no SPI on B6. I have seen, that latest Espruino version can setup SPI on every pin, but does it have enough speed to control the Neopixels?

    Here is how my whole project looks like. Just in case.

  • in Interfacing
    Avatar for George

    I tried this:

    SPI1.setup({baud:3200000, mosi:B5});
    
    // like so
    SPI1.send4bit([1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1], 0b1110, 0b1100);
    

    This should turn the first led white, but did nothing :(
    Is this wrong?

    I also found this guide showing how to control WS2812 with PWM and DMA. This is a very efficient way, as they say. This guide is far beyond my understanding. Is something like this available with Espruino?

    When I started this project, I thought that the LED part would be easy and fun. Already wasted four days on this problem, lol)

  • in Interfacing
    Avatar for George

    Thank you, I will try this tonight. By the way, if my signal is inverted, does this mean, that I should keep the pin HIGH all the time when I am not sending bits? And how can I achieve this?

  • in Interfacing
    Avatar for George

    I am running Espruino on my own nixie clock board with an STM32F100CB chip. How does SPI.send4bit method works? I mean WS2812b protocol requires 8khz rate, how can I match this with SPI?

  • in Interfacing
    Avatar for George

    Higher like 10k? I have a bunch of different resistors to pick from (1m, 10k, 5.6k, 4.7k, 3k) which one fits most? I came to Espruino from web development because of JS, and transistors are still kind of black magic to me)

  • in Interfacing
    Avatar for George

    Sorry, yes, a level shifter is exactly what I need here because I am controlling a 5v LED with 3.3v chip

  • in Interfacing
    Avatar for George

    By the way, is your fix possible with the BC817 transistors I already have?

Actions