CNT0 Countetd Value write via I2C

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Hardy
Offline
Last seen:1 month 4 weeks ago
Joined:2019-12-19 16:02
CNT0 Countetd Value write via I2C

Are the counted value registers of CNT0 /2 /4 read only or can they be written by I2C byte write to the respective address?

Purpose: I2C variation of duty cycle in oneshot mode...

Device:
Device Number:
SLG46826
olehs
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2018-02-07 11:40
Hi Hardy,

Hi Hardy,

Thank you very much for your appeal!

Please don't mix upCounted Valuewith theCounter Data. If you want to change the duty cycle using the CNT/DLY block you have to change theCounter Data.Counter Datacan be read and written. For the CNT/DLY blocks there are the dedicated registers:0xA5 0xA6(CNT/DLY0),0xAA(CNT1/DLY1),0xAF(CNT2/DLY2),0xB3(CNT3/DLY3),0xB8(CNT4/DLY4),0xBC(CNT5/DLY5),0xC1(CNT6/DLY6),0xC6(CNT7/DLY7). By changing these registers you will be able to change the duty cycle in your design. You can also refer to the Cookbook section, where a similar approach has been used:

//www.wsdof.com/greenpak-cookbook/led-control-i2c

//www.wsdof.com/greenpak-cookbook/setting-constant-duty-cycle

Or you can find many interesting designs here:

//www.wsdof.com/sites/default/files/the_greenpak_cookbook_4q2020pdf.pdf

TheCounted Value附加选项是可用的吗three counters CNT0, CNT2, and CNT4, which allows reading the internal DFFs' state.

Please let me know if have more questions about the GPAK.

Best regards,

olehs