Author Topic: Audio volume controller (PT2258) questions  (Read 586 times)

0 Members and 1 Guest are viewing this topic.

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: ca
Audio volume controller (PT2258) questions
« on: June 17, 2022, 10:26:55 pm »
Hi
I want to drive a PT2258 with a stm32f401 MCU. So far I wrote bare metal I2C driver, but I have some question about the bit format I'm going to use. In my project, I'm using only 2 channels (1 and 2) and I want to control them simultaneously  using -10db step. My first question according to datasheet (attached pic2) for channel#1 -10dB attenuation the value should be 10010001(91H) and 81H respectively right! But, I saw online that people are using 90H and 80H respectively instead! Why?

The second question is related to how the bit format is sent to the PT2258. According to the datasheet(pic1), they say that I must send -10 dB followed by -1db. So, what if I want to send only -10dB  then  0dB, is that going to work?

Thanks in advance
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15340
  • Country: fr
Re: Audio volume controller (PT2258) questions
« Reply #1 on: June 17, 2022, 11:31:09 pm »
From what I get, there is a separate setting in 10dB increments and in 1dB increments, and the DS says you should always send both in sequence for the chip to internally set the proper attenuation. It says nowhere that the values you set for each increment can't be zero. So If you want only a multiple of 10dB, you can set the 1dB increment to zero. You just need to send it even if it's just zero in order for the chip to set the attenuation properly. It's just probably because its internal state machine works this way and will "validate" the new value of attenuation only when both increments have been set in sequence - which makes sense. This way, it probably *directly* sets the attenuation as n*10+m, and not as n*10 dB, and later on (depending on speed of communication) an additional m dB.
 
The following users thanked this post: kgavionics

Offline kgavionicsTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: ca
Re: Audio volume controller (PT2258) questions
« Reply #2 on: June 18, 2022, 08:07:45 pm »
Thank you very much for your input SiliconWizard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf