How To Write A Driver (Audio CODEC & I2C) - Phil's Lab

  Рет қаралды 21,904

Phil’s Lab

Phil’s Lab

Күн бұрын

Пікірлер: 59
@dazai7669
@dazai7669 3 ай бұрын
Wake up babe, new Phil's lab video. Perfect timing! I just bought a stm32f4 discovery board to start my audio dsp journey. Thank you for uploading these videos!
@PhilsLab
@PhilsLab 3 ай бұрын
Awesome, hope all goes well with your new board!
@guitarbass95
@guitarbass95 3 ай бұрын
I was literally just hitting a crossroads where existing libraries weren't useful and I find you uploaded this at a perfect time
@PhilsLab
@PhilsLab 3 ай бұрын
Awesome, hope this helps!
@kiprof4350
@kiprof4350 3 ай бұрын
Thank you so much for this video, Phil! It is an amazing video! and I am eagerly awaiting your next outstanding Zynq videos. 🙂
@PhilsLab
@PhilsLab 3 ай бұрын
Many thanks - planning on making more Zynq videos as well!
@AntonioBarba_TheKaneB
@AntonioBarba_TheKaneB 3 ай бұрын
you don’t need to convert all those binary values to hex manually, just enter them directly as 0b10101010 and let the compiler do the conversion.
@leifefrancisco7316
@leifefrancisco7316 3 ай бұрын
Just as I'm building the same thing using the 4272 you come to save the day!
@perceptron9834
@perceptron9834 3 ай бұрын
Just finished the bme280 i2c driver for the ble-pill 😊. Fits good to the topic
@PhilsLab
@PhilsLab 3 ай бұрын
Awesome! :)
@tonyfremont
@tonyfremont 3 ай бұрын
GitHub link?
@eleclab4244
@eleclab4244 3 ай бұрын
Amazing video, as always! I wonder if you can make a video about class-d amplifiers, some basic PCB layout guidelines related to the topic, as there is almost nothing on KZbin for years explaining "scientifically" how to do it the right way! A good example would be an IRS-based amplifier.. cheap .. and simple! Thank you for your content!
@PhilsLab
@PhilsLab 3 ай бұрын
Thank you! I have a basic Class-D amplifier design on the channel, but nothing terribly in-depth. Something I'd definitely like to make some more content on though!
@phill__6239
@phill__6239 3 ай бұрын
top 5 technical design EE channels on youtube
@PhilsLab
@PhilsLab 3 ай бұрын
Thank you very much!
@karama300video
@karama300video 3 ай бұрын
Hey, can you tell me the other 4?
@bobby9568
@bobby9568 3 ай бұрын
what are the other 4?
@hoangvanthanh2201
@hoangvanthanh2201 3 ай бұрын
what are the other 4?
@zero7523
@zero7523 3 ай бұрын
What are the other 4?
@AmmarH413
@AmmarH413 3 ай бұрын
unbelievably great
@crosswick
@crosswick 3 ай бұрын
You're amazing Phil. Thanks again
@PhilsLab
@PhilsLab 3 ай бұрын
Thank you!
@crosswick
@crosswick 3 ай бұрын
@@PhilsLab I think part of what makes this format so great is the speech pause editing. I wonder how far you've automated that :)
@TomLeg
@TomLeg 2 ай бұрын
I wish you designed things using components which were not discontinued. There are still some at Mouser, and of course there will be some supplies out there.
@SergiuszRoszczyk
@SergiuszRoszczyk 3 ай бұрын
I’m not sure about just plain write 0 to reserved bits. Back in the old times of AVR, before Arduino even existed I was always reading register and only altering bits I need. It takes a bit of extra effort but in (quite likely in a longer term product) the event of swapping CODEC for something pin compatible (ie due to lack of parts) it may save you a day if a manufacturer just added new features in those bits
@PhilsLab
@PhilsLab 3 ай бұрын
Agreed - and as was alluded to in the video, although in not terribly much detail. Additionally, the driver here in the video is meant to be incredibly basic (for simplicity and time constraints of the video). Thus, I linked to the 'extensive' CODEC driver in the Linux Git repo, for a more thorough implementation after having covered the essentials.
@awocrf
@awocrf 3 ай бұрын
Hi! I have an unrelated question. I'm making a project where i need to supply a few different voltages to my circuit (Let's simplify that to 3,3V, 2,8V and 2,0V). My power source is 2S Li-Ion battery pack. I want to use a switching regulator because battery life is important in this but i'm concerned about noise since some of the circuitly would be analog. Would it make sense to combine a switching regulator that would step down the voltage from 6-8,4V to about 3,6V and then use a linear regulators to make all the different voltages from that?
@catalinm756
@catalinm756 3 ай бұрын
Yes. Use switchers for digital and ldos for analog and noise sensitive circuits
@awocrf
@awocrf 3 ай бұрын
@@catalinm756 I was talking about a different approach but this solution would be fine too. I meant something like this: Li-Ion -> switching reg. -> LDOs -> everything else where Li-Ion outputs 6-8,4V, switching reg. 3,6V and LDOs 3V3, 2V8 and 2V0. In this case a switching regulator doesn't power anything directly, only through linear regulators. I've seen this approach in some high power lab power supply to combine high efficency of switching regulators and low noise of linear regulators. In your approach what would be better: connecting everything to the same ground or having 2 grounds connected in a single point somewhere?
@tariqsingh3747
@tariqsingh3747 3 ай бұрын
@@awocrf Use one ground. Make sure that you have good PSRR at the switching frequency, and you'll be all good unless you need some ultra-low-noise power.
@rafaelbertacchi
@rafaelbertacchi 3 ай бұрын
It would be great if you make a video about the analog parts that come before and after the codec... What filters and buffers to use, impedances. Differences between instrument, mic, phone and line signals. How to deal with Balanced and unbalanced inputs and outputs... That kind of stuff 😉
@PhilsLab
@PhilsLab 3 ай бұрын
Definitely some topics to come in future videos!
@Kmnri
@Kmnri 3 ай бұрын
Nice video, will you make a tutorial similar but without using their HAL? I would love to get into H7 series but stm32 hal is big nono
@cjb89
@cjb89 3 ай бұрын
Great video, as always! But when you define the CS4270_REG_CONFIG_SETTINGS, why do you write them in hex? Can't you just write 0b00110001 for the mode, for example?
@PhilsLab
@PhilsLab 3 ай бұрын
Thanks! Yep, you can do that - just an (odd) habit of mine.
@cjb89
@cjb89 3 ай бұрын
@@PhilsLab I just did a bit of research and it seems that the 0b... is technically not in the C standard, but most compilers still support it since it's relatively common. So I guess converting to hex is not a bad habit and I've been living dangerously, haha 😎
@PhilsLab
@PhilsLab 3 ай бұрын
Ah that's good to know, thank you!
@casualnoises2808
@casualnoises2808 Ай бұрын
The CS4270 seems to be deprecated and can be replaced with the newer CS4272.
@Tonikiller10000
@Tonikiller10000 3 ай бұрын
I like all your videos!!! You make some real stuff content. I have 3 questions: - for the SPI drivers, where the IC has I2C and SPI comunication (EX: BMA400 accelerometer) the register addresses are the same ast the I2C ones? Otherwise, can you make a video where you connect a device with SPI to the STM32 and make a driver for it? - can you make a video about the SPI or I2C HAL drivers? I am curious to make my own HAL comunication drivers thinking that is like in the arduino ide where is much faster to write dirrectly on a register than to use digitalWrite, where it checks various things, like if the port is on OUTPUT mode and so on. - can you make a video about stm32 flash memory? ...basic writing, reading and constrains. I am writing some lora code on the STM32 and one nonce variable is stored in the flash, but is reseted somehow at reset with the same random value. I think somehow it is stored inside the first FLASH addresses with the code, and the code somehow is written on that address. Anyway, I saved the variable again at the end of the flash memory, and seeing it on the ide memory browser, it is saved correctly. This variable is has to be incremented at each join request, and if I restart the STM32 it starts back to 0 and it can`t connect again with the values already used.
@bobby9568
@bobby9568 3 ай бұрын
Phil took the blue pill #Matrix
@Tron56850
@Tron56850 3 ай бұрын
Great video! Maybe an obvious question but what's the order in which you implement your driver, before or after designing your custom PCB ?
@PhilsLab
@PhilsLab 3 ай бұрын
Thank you! I reference the datasheet several times during part selection, schematic, and PCB design. Also in relation to the software implementation to see if there are any 'gotchas' (such as specific pin settings, modes, etc.). The actual driver implementation I only really start after I receive the boards.
@ameenibrahim7519
@ameenibrahim7519 3 ай бұрын
Sir I have project it is for straightness measurements by psd laser sensor, can you please help me designing the PCB layout?? Also I have the major electronic parts needed like analog multiplayer and amplifier but I have an issues for making the power circuit, I am a mechanical engineer not electrical.
@felmtony1277
@felmtony1277 2 ай бұрын
Nice
@RiwenX
@RiwenX 3 ай бұрын
Hey Phil, as an embedded developer, what's your take on Rust?
@PhilsLab
@PhilsLab 3 ай бұрын
Never used or explored it (or seen a reason to), so can't really comment I'm afraid.
@projectsspecial9224
@projectsspecial9224 2 ай бұрын
Over the years, I have done numerous embedded projects using only ANSI C, C++, Assembly, and Python. Never had the need to use Rust. I'm sure there are probably good use cases that it can benefit from. But for me, I never had to use Rust professionally or required to.
@tamaseduard5145
@tamaseduard5145 3 ай бұрын
👍🙏❤️
@nonfortuneuser
@nonfortuneuser 3 ай бұрын
❤❤♥
@samuelemmettbray
@samuelemmettbray 3 ай бұрын
Phil. We don't use C, anymore.
@PhilsLab
@PhilsLab 3 ай бұрын
😅
@bobby9568
@bobby9568 3 ай бұрын
xD
@rajimordecai1099
@rajimordecai1099 3 ай бұрын
C still remains the bedrock for embedded programming
@abo1428
@abo1428 3 ай бұрын
fukumean „we don‘t use C, anymore“?
@scottfoulk7480
@scottfoulk7480 3 ай бұрын
C is it.
STM32 + LCD Display (FMC) Firmware Tutorial - Phil's Lab #146
36:02
Mixed-Signal Hardware/PCB Design Tips - Phil's Lab #88
18:20
Phil’s Lab
Рет қаралды 45 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 9 МЛН
But what is digital audio? (The FLAC Codec #1 - (Digital) Audio and PCM)
11:26
kleines Filmröllchen
Рет қаралды 12 М.
Product Showcase: SparkFun Audio Codec Breakout
13:14
SparkFun Electronics
Рет қаралды 9 М.
Learn RAG, LangChain, Vector DB's, with this project, FULL COURSE
1:29:21
SPI Hardware & PCB Design - Phil's Lab #134
33:22
Phil’s Lab
Рет қаралды 30 М.
I Saved an Electron Microscope from the Trash
34:54
ProjectsInFlight
Рет қаралды 524 М.
STM32 Bluetooth Firmware Tutorial (Bring-Up) - Phil's Lab #129
33:41
3 engineers race to design a PCB in 2 hours | Design Battle
11:50
Predictable Designs
Рет қаралды 446 М.
The RS-232 protocol
26:10
Ben Eater
Рет қаралды 858 М.