Shop OBEX P1 Docs P2 Docs Learn Events
Another chance for the Propeller to shine! — Parallax Forums

Another chance for the Propeller to shine!

I just saw this article on Hackaday about a binary clock running on 2 Arduino Nanos because the IR Remote usage was causing interrupt issues with the LED code. I immediately thought how the Propeller is the perfect solution to this problem. Also, rather than an MP3 board, just plant the audio file as WAV for the Propeller to play directly. Heck, there is even soft RTC SPIN code on the forums that is accurate very accurate, so use that too to eliminate the RTC.

https://hackaday.com/2018/07/02/driftwood-binary-clock-is-no-hollow-achievement/

Comments

  • That would not be difficult for the Propeller. At all.
  • It would also have much lower power consumption requirements
    (big plus if is battery operated)
  • JonnyMac, awesome that you posted first. I originally had in my post that "JonnyMac could whip this up in 10 minutes" but deleted that part as to not offend others capable of good code.
    I figured this would be a cakewalk on a Prop. I have all the parts to make this up, I may take a swing at it this weekend.
  • jmgjmg Posts: 15,140
    MrBi11 wrote: »
    It would also have much lower power consumption requirements
    (big plus if is battery operated)

    With all those LEDs, MCU current demands are not likely to be much of an issue :)
    More of a challenge could be to get the Icc at 3V low enough, to allow some power outage carry over.
  • I'm sure it would take longer than 10 minutes, but I still might do it. Today I started a new job on a team of really smart people; one of them is another former Parallaxian (Ryan Clarke). In the next month we're building a "hacker cave" for R&D and inter-group training, and this might be a fun project for me to teach embedded coding to the networking guys.
    It would also have much lower power consumption requirements
    Maybe. For WS2812s you have to run at 80MHz. If one switched to the 2-wire APA102Cs then you could run a slower clock.
  • LOL when I built my Nixie clock I did use a Propeller, and didn't have this problem :-)

    https://hackaday.com/2014/01/02/once-twice-three-times-a-nixie/
  • tonyp12tonyp12 Posts: 1,950
    edited 2018-07-03 23:41
    WS2812B could you not use hardware-uart to create the 1/3 and 2/3 bit-timing needed, so the irda IRQ will not cause a hickup.

    1, x, 0, 1,x, 0, 1, x, 0

    x= insert the high/low bit here.

    Using uart 7bit mode the start bit and stop bit would just fall in place naturally for a 9bit stream, but if uart 8bit mode is only available double 0 in the end is no harm






  • jmgjmg Posts: 15,140
    edited 2018-07-03 20:24
    tonyp12 wrote: »
    WS2812B could you not use hardware-uart to create the 1/3 and 2/3 bit-timing needed, so the irda IRQ will not cause a hickup.
    You could, if you have a HW UART able to go up to the right baud rate.
    A HW SPI port can do similar HW based timing, usually to higher clk speeds.
    That buys you a little bit of time, but you still need to avoid pauses larger than the reset/load time. Tough on an Ardunio with no interrupt priority.
  • jmgjmg Posts: 15,140
    JonnyMac wrote: »
    .. For WS2812s you have to run at 80MHz...
    Could RCFAST manage WS2812's ?
    Then you could use a mix of RCSLOW for waiting for IR/RTC pulse, and RCFAST for LED update.
    RTC can calibrate the RCFAST, and you could use RCFAST as a thermister to track / correct heap clock crystals.
    For simplicity of timing, at low powers, I like the look of a lowered voltage 74AHC1G4214 (SOT23-5) + 32kHz xtal. - or the older/larger HEF4060 / HEF4521 + 32kHz xtal ?
  • tonyp12tonyp12 Posts: 1,950
    edited 2018-07-03 23:30
    Datatransfertime: TH+TL=1.25µs ±600ns
    using 1/3 slices = 0.42µs per bit or 2.4Mbps




  • If I wasn't busy with other things I'd knock this over with a few lines of Tachyon code and play the wav files :)
  • Can't you load small WAV files to the upper 32k in EEPROM? Or just generate the sounds with the Prop directly?
  • evanhevanh Posts: 15,126
    edited 2018-07-04 06:13
    tonyp12 wrote: »
    Datatransfertime: TH+TL=1.25µs ±600ns
    using 1/3 slices = 0.42µs per bit or 2.4Mbps

    Yeah, I suspect on the 20 MHz RCFAST the 200ns instructions bit-bashing would work. That would make:
    T0H=400ns
    T1H=800ns
    T0L=1000ns
    T1L=600ns

    Alternatively, use the Prop1's hardware pixel shifter. That can do a crafted serial output port. That'll breeze along on 20 MHz.

Sign In or Register to comment.