This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCA6507: One shot mode - Application note ?

Part Number: TCA6507

Hi,

I would like to understand the one shot mode of the TCA6507.

The datasheet is very poor about this.

What is the sequence to start a one shot led of registers SELECT0, SELECT1, SELECT2 and ONE-SHOT register (0x09) and INITIALISATION register (0x0A) ?

What is the registers sequence to restart a one shot led ?

Please give me more information about INITIALISATION register.

  • Hi Sebastien,

    The application note written here explains in a little more detail how to program the LEDs. I'm going to give a general overview but feel free to ask more questions if it doesn't make sense.

    There are two ways to program the device, you can do it in auto increment mode where the Master just sends a data byte to a register address and then the device automatically increments that address to the next one. Then the Master sends another data byte. This continues until a STOP condition occurs. This means that you can increment through any number of registers. You can also start at any register that you want.

    The second way to program the device is to write to one register at a time.

    In either case the first thing the Master must send is the device (slave) address (7 bits) and a R/W bit. The slave address is 1000101. Then the Master sends the Command Byte which selects auto-increment mode or selects the register address you want to program. Finally the data is sent. Once this is all complete the Master sends a stop condition.

    To start off you have to program the 3 select registers of the device.

    If you would like to set for instance P2 to be at the brightness set by the One Shot you would program

    • Bit 2 of Select0 = 1
    • Bit 2 of Select1 = 0
    • Bit 2 of Select2 = 1

    The rest of the modes can be found here 

    If you set the Pin to be at the brightness set by the One Shot/Master then you can skip configuring registers 0x03-0x07. These registers set the data for the PWM.

    You can program registers 0x08 and 0x09. Register 0x08 will set the Maximum Intensity of the leds. In register 0x09 the "One-Shot / Master Intensity Register" you can set the Master intensity value with bits 0-3. This value is a percentage of the Maximum intensity that you set in Register 0x08. You can also set PWM0 and PWM1 to operate in One-Shot mode.

    Finally the Initialization register just determines where the PWM will start based on the regions that you set in registers 0x03-0x07. If you do not care about these registers you can leave this register as it's default and just not write to it.

    Hopefully, this cleared some things up, let me know if you have any further questions.

    Best,

    Chris

  • Hi Chris,

    Many thanks for you reply.

    But all write is well explained in the datasheet.

    My questions might not clear enough :

    First question :

    What is the register sequence to use with P0 one-shot mode using BANK0 starting from the beginning of A2 (figure 20 of the datasheet) to the end of B2 ?

    Second question :

    When I want to use fading PWM mode, how can I be sure the pwm will start a the beginning of A1 ?

    Regards,

    Sebastien

  • Hi Sebastien,

    What is the register sequence to use with P0 one-shot mode using BANK0 starting from the beginning of A2 (figure 20 of the datasheet) to the end of B2 ?

    • You would follow the steps I detailed above to put the pin in one shot mode. To configure where the PWM starts you need to configure the Initialization Register (0x0A). This is the last register you would configure after you set the pin to be in one shot mode and you set the brightness of the LED.
    • To start at the beginning of A2 in Bank 0 you would write 00001100 to register 0x0A. There is no way to configure where the pwm will stop.
    • If there is a specific shape of PWM that you are after you can draw it out and we can talk about how to achieve that using the necessary registers.

    When I want to use fading PWM mode, how can I be sure the pwm will start a the beginning of A1 ?

    • You can set both BANK1 and BANK0 to start at A1 by writing 10001000 to register 0x0A.

    Best,

    Chris