• AVR Freaks

CLC Module - LED Buffer

Author
Designer
Super Member
  • Total Posts : 414
  • Reward points : 0
  • Joined: 2007/11/20 20:28:41
  • Location: 0
  • Status: offline
2019/06/11 20:24:47 (permalink)
0

CLC Module - LED Buffer

I'm about to write to WS2811 pixel LEDs from a CLC module PIC.I read the application note AN1606 here http://ww1.microchip.com/downloads/en/AppNotes/00001606A.pdf
 
The problem is the time takes to arrange the next pixel colour is too long.Which will conflict the data feed to the pixels.The datasheet says it has 50uS time to make them latch, but the latest WS2811 pixel batch will make latch within few micro seconds.
 
Then whats the point of using a CLC module ? Same like I feed the data using normal flow code without a CLC module....
 
;Load the 1st LED in the strip
  movf Green_Byte,W ; Load Green byte
  call Write
  movf Red_Byte,W ; Load Red byte
  call Write
  movf Blue_Byte,W ; Load Blue byte
  call Write

;get ready to load next pixel colour from a table read
;it needs some time to load G,R,B bytes
;Load the 2nd LED in the strip

  movf Green_Byte,W ; Load Green byte
  call Write
  movf Red_Byte,W ; Load Red byte
  call Write
  movf Blue_Byte,W ; Load Blue byte
  call Write
  ---
;Do this until 300 LEDs
;-------------------------------------------------------------
Write MOVWF SSP1BUF
LOOP BTFSS SSP1STAT, BF ; Has the byte been sent
        GOTO LOOP ; No
        MOVF SSP1BUF, W ; Read buff to clear flag
        return

 
#1

3 Replies Related Threads

    LdB_ECM
    Junior Member
    • Total Posts : 81
    • Reward points : 0
    • Joined: 2019/04/16 22:01:25
    • Location: 0
    • Status: online
    Re: CLC Module - LED Buffer 2019/06/11 21:53:33 (permalink)
    0
    The write speed using the hardware is determined by what clock speed you set, which is up to you !!!!
     
    The APP note for example is setup for a 16Mhz oscillator what speed have you setup your device?
    #2
    Designer
    Super Member
    • Total Posts : 414
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: CLC Module - LED Buffer 2019/06/11 23:37:45 (permalink)
    0
    Hi, The above code I did not checked yet (That is the code I'm going to write with my new PIC which has CLC as in the application note).
     
    I tested with my old software code (without any CLC module - Just writing continuously the 24bits).My oscillator is 20Mhz. So I get 200nS minimum cycle time.I can send colours the code works but,
     
    I noticed that the latest WS2811 strings get latched up if the gap between bytes get wider interval (Around 5-15uS this is the time I select next pixel colour).
    If the latch time works correctly (50uS), then we won't any CLC based chips. I have enough time to select the next pixel colour. That's my point.
    post edited by Designer - 2019/06/11 23:39:04
    #3
    Designer
    Super Member
    • Total Posts : 414
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: CLC Module - LED Buffer 2019/06/11 23:54:00 (permalink)
    0
    This is what I mean.Grabbed it from the Application note AN1890.

    Attached Image(s)

    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5