 Welcome to this lady. Hey, buddy, and welcome to my desk, which is covered in stuff It's been chilly out. So we've been working on some hardware but also going for nice walks outside a lot of stuff actually happened this week because Thankfully Timon who has been working with me on the Raspberry Pi DSi Lens kernel is like, hey, let's keep working on this and I'm like, oh, yeah Like a month went by which happens time disappears the days are long, but the months are short And so we got back to some Raspberry Pi DSi DSi Display hacking with device tree overlays a lot of DTS DBTS ICN lots of acronyms here. So let's Maybe I'll pull out the overhead a bit and then I can show my setup here because there's like There's a bazillion things on my desk, by the way. So if like as I'm doing one of these like live demos, it doesn't work just Bear with me because there's like 16 things connected together on my desk and Yeah, it's just a party. So let's go to the overhead and let's see what's going on here. So let's focus Okay, so I've got my Raspberry Pi here and I'm using a Pi 5 Not because I have to but first off it does boot very quickly And also, you know, it's good to test stuff with the latest hardware Because eventually everyone's gonna have a Pi 5 and there's gonna be more popular And so I want to make sure it works for the latest stuff I've got the cooling on here even though it's not spinning. I don't need it And I've got a 5 volt that I'm grabbing from here for this Display which I'll show in a little bit and then connected to the UART port. I've got this Pico probe I think I chatted about this last week So the Pico probe is used for SWD debugging of an RP2040 and there's two ports there's SWD port and the UART port and it turns out Not coincidentally that you can just plug this right in and use this for connecting to the serial console It's just helpful if you want to like set up the because it doesn't come with SSH on by default anymore in Bookworm So handy to have this and then I've also got Hidden behind me. This is got ethernet and a mouse connected So with this and then here's the cable. This is the display cable connected to the 22 pin DSI port And then on the other side to a 15 pin DSI port and then this is the ICN 6211 Adapter this is like rev B or C by now So it's got a little boost converter here for the backlight the ICN which converts DSI signal to RGB TTL and then Over here, you know, you can kind of see there's it'll it'll be tougher later on I'll zoom in you can see the Raspberry Pi image here This is the RGB 666 TTL display pinout, you know used by the round and square displays That I've been playing with and then over here is a breakout for all of the different I squared C ports So there's like four I squared C ports on this device There's the I squared C that comes in the DSI and the Raspberry Pi can access it. It's called I squared C number six There is the I squared C for configuring the ICN 6211. There's the I squared C for the capacitive touch and There's also hidden under here is an 80 tiny 1616 and that has an I squared C peripheral. Let me switchable. It can be either controller or peripheral and So there is it, you know a DSI I squared C Like basically you have to Configure and set up all of the hardware here and this is where like it's starting to get like kind of complicated because These displays especially like there's one display. I have that does not require SPI in it But almost all them require SPI in it and there's no SPI Pin controller through the DSI connector. So instead of got this 80 tiny which is going to Set up the display and tell it like hey, you know Here's your resolution and gamma settings and turn on And then maybe I can zoom in a little bit here so you can see Focus so this is a Okay, yes, you can see this is actually it's not synced up right. I'll explain why there's no reason for why it's like cut in Half right here, but you know, this is showing the Raspberry Pi Desktop But this display needs to be configured over SPI So I'm using the 80 tiny to do that and you only do that once so you like boot up Do a hard reset on the TFT blast the SPI initialization which is given to you with the display And then you can just pump RGB pixels through here The ICN-6211 also needs to be configured and there's two ways to do it Either you can have the 80 tiny do it or you could actually configure it through the DSI port Only thing is is that like then like you need a device driver It's actually easier if you just have the 80 tiny do it because again You only have to do it once at boot up and then like you're done then you just pipe You know differential video data over maybe connection and an outputs And then the capacitive touch definitely you want to have that come through the DSI because that way you can have touch control Although I'll say we have added it. I haven't tested it. Maybe next week. I'll show the capacitive touch So I've got all these pieces. I've got this 80 tiny. It's got to send this SPI data It's got to send the I squared C data the ICN configured. They have to match up Maybe I touched something and now I just reset turn on the Raspberry Pi again There's it like a lot of wires here they very easily get get touchy sorry, uh, you got the You get the SPI configuration of the display the I squared C configuration of the ICN-6211 Here you can see the the boot screen come up Oh interesting, why is it when I move it it shorts something is Something is definitely touching here. It should not be touching That's a bummer. All right, hopefully my live demo will work Um, sorry, SPI configuration of the display I squared C configuration of the ICN-6211 and then Also, I want to maybe have the 80 tiny ask act as a backlight controller so that I can use I squared C to control Um, how interesting it's like it's like really crashing now That's kind of cool Hold on. Maybe I'm gonna give a different power supply here. Okay, so that's the issue Let's use this Signing times, um Just said live demo And so to get all these little pieces working and I want to make sure that I've got you know Because you have to have everything working perfectly or like nothing shows up which could equal, you know, many many hours of mucking about and trying to get um Stuff to show up and like if everything's unaligned and you're like why is I'm getting this I'm getting that and like This sync rate isn't like the display is is flickering and so I thought what would be easiest is if I actually did Only, you know, one piece at a time of the configuration. So Let's go to the computer I think the power supply was bad. Now I got a good power supply. So at least it's up and running so this here is the uh, this I'm looking at the serial output of the at tiny 1616 I have that connected up to a usb serial console cable Which is really handy because it's telling me, you know, it can tell me what data it finds What spi commands it's running and to configure the display I wrote, you know, really quick spi bit banging function that will read the program memory and Send the init code basically the same kind of initialization code that we have for our other spi displays And and then I have, you know, a bunch of init codes in here for all the different displays This is actually more for convenience right now. Um, what it'll probably do is not actually ship it with every You know configuration enabled what I'll have is an eeprom and then Yeah, the eeprom is exposed to the dsi just for it. You can program in whatever init code you need You do it once it's saving the eeprom and you're good to go But regardless for now, it's just hard coded in in the flash memory Um, and so what I do is I uncomment whatever Display I want to use so I'm actually Gonna do the four inch round and then um What I did was I Have this Loop here that sends after, you know, the init code sent I send command 22 and 23 And those are mippy dsi commands that are like kind of universal and they mean all pixels on all pixels off And the reason you want to do this is that getting like the spi data set with like the data and clock bit because it's a nine bit spi And like when the when the chip suck goes high or low and is as clock, you know spi clock is high and then dropping or rising Getting all that right is like annoying and it's it's hard to know whether you initialize the display correctly So when I do displays, I always try sending once I've done the init I send those commands because it's very easy to tell if it's worked or not So what I want to do is I'm going to just quickly swap out the Two inch for the four inch display because it's going to be nice and chunky So you can go to the overhead real fast if you want to see this I should remove this This display There and I'm going to attach this display and I've I've removed the um vsi cable so it's not uh So it's not I'm not hot swapping. Well, I am not swapping, but I'm not hot swapping in the worst way possible And then I'm going to Power this up And actually what I'll do is I'm going to actually keep the dsi cable disconnected. So, you know, the dsi cable is actually not connected to this board It's just the at tiny and the um Screen how are you doing on time? Okay Um, so then this will you know if this works. I'm uploading to the at tiny over the updi connector Um, no, it's not updiing. Why is it not? Oh because it's not done. It's not powered Live demo, let's try again Live demo is exciting. Oh, man This is always Why is it not? Okay, go to the computer Trying to get the UP di to work. I have the right port Of course, I test this right before we um Started streaming. This is connected I'm gonna try one more time. Oh, this is one of the cool things. Oh, if you go to the overhead So if you don't have your screen, um set up correctly, you'd get like really cool glitch effects All right, come on. No, it's not working weird I Might have fried it somehow. It's the tragedy of the live demo. What is not working with that mysterious Mysterious mysterious or a little seated. Oh, well, it's not working. Um, okay, but pretend it did So normally I would have um This display blink on and off because I'm sending it that um data why it's like suddenly not working over It's not responding to you pdi. I don't know. I could have I could have fried it pretty easily And then um, so the next step is then I have to set up the dsi um icing configuration so Uh, let's go to the computer and I'll I'll shoot I'll show it off And then we have like, you know one minute videos that will we posted So for for folks who are still interested in that works. Um, okay So assuming that I I you know Do yeah, it's like the whole thing got fried somehow. I think I frazzled this that's a bummer So is uh This is a working thing before Um, I'll have to get a new board and everything. Uh, I am not looking forward to that 52 okay, so the next thing is um on the raspberry pi Is uh, we have a library that Um, I've had timon contract to work on and this library um Basically takes the extremely undocumented data sheet for the icn 61 1 and lets you set all the configurations with um register commands So in second, I don't know This not to overheat my line. I'm doing this demo. Okay, something did go wrong. That's weird. Um So I can set the The configuration for the icn 61 1 and This is the Oh, man, now my browser's not working. I'm having a day. All right, never mind. Um, I can have the icn 62 1 1 configured and in the example What you have to do is I was not figuring this out, but you can configure the resolution and the porches. So like all the rgbtl settings for each display Uh via i squared c. So what we do is Like I mentioned the dsi display has an i squared c port on it. Um, which is number six So actually let me go Display arrays Okay I set it up by connecting to i squared c port six and that's the port that has the Dsi connection for i squared c it goes to the icn 62 1 1 And then from here I can set up things like setting up a color bar test mode I can set up the resolution the porches and the sync widths And then like some other random math settings one thing that we have to do is um Well, one thing that's kind of interesting about the icn 61 1 is you can actually have the rg G and b dated almost any order and then you can use the registers to swap the bits around so um If you want like b gr instead of rgb for routing like I actually ended up routing it not to be Exactly like what the day she says rg and b are I think it's a db gr and you can just say swap swap The r and b Uh pixels and you also swap um Lowest pin to highest pin so like if instead of having to like route and then it you know interleave every um Pin if you have if you have to like swap all the bits from like zero to seven and seven to zero and one to six, etc You can tell it. Hey, I want you to also invert the direction Which the bits go so routing the icn 61 ones actually was a lot easier than I thought the original version like I had to Do all these like oh every pin has to go under every other pan But it turns out that's not necessary and then because these displays are 666 mode um You have to tell it how you want to convert the 8 bit output to six bit and tell me mippy lanes and uh set up the pll So if this display was working if I was my demo was working, which it's not I would uh I'm able to set up the icn 61 one and show you color bars, but sadly it's not working. Um Um Let me try be sitting Yeah, I really I really frazzled this Which is like kind of cool This is kind of to ground v in Yeah, I don't know mystery Let's try On the off chance. It was that usb cable Which it could be Let's try this um And then after this you set up the icn, which I've done over i squared c then you can load the Kernel driver. Oh, yeah, this is not working. Okay, so um Yeah, I'll just talk about this last so the kernel driver is here um Yeah, wow, this is like not even This is like totally not working um, so this uh pr is open and Hopefully will be merged soon and the trick that we're doing with this um Diff to panel simple is the original dsi Graphics display for the linux kernel only supported 800 by 480 Displays and everything. Well, sorry the original Sorry, there's a kernel driver specifically for was we pie display there's 804 80 If you want to use something else you have to use this uh driver called panel simple But the problem with panel simple is you actually have to Go in and say every single Every single Different display that you could possibly imagine has its own entry which is exactly the kind of thing I hate So like for example, like this is the fg 111 whatever It's like Defined the the porches and the active you know the display size and every flag is defined in the driver So it's hard coded So every time you add and want to add a display you have to do like a you know upstream merge to add your display which sucks and so um what I've asked timon to do um You know and we're uh contracting him to work with eta fruit to do this is to add support for Being able to change just the overlay text and have all the timing panel timing being the overlay So at least that we don't have to recompile a kernel You don't have to do an upstream thing you have to a device to overlay You set the parameters in it you compile it and you can load it and you can do that from a raspberry pi very easily so I'll try to get this demo working and maybe next week. I'll I'll show it again. Sorry It's totally working before the show, but uh, you can also watch the one minute videos that um, Mr. Lady eta and I shot and are putting up we put some up on uh youtube everywhere. All right, so let's go to Uh the great search The great search brought to you by digikey and eta fruit thanks digikey every single week Lady eta user power of engineering help you. Yes, you find the things that you are looking for this week We tuned into x formally known as twitter to Help find something that someone's looking forward. Is it this weekly data? Okay, so this week I'm gonna open up digikey um this week somebody asked for a because I actually like look for the phrase digikey and search or digikey and find or like request And um, there's always somebody who's asking. Hey, I want to it's they it's quite nice They usually have a photo of the thing they want. They're like, I have a photo of this thing and I want it Where can I get this but they want something slightly different? So this is A terminal strip and most people are familiar with terminal blocks We use a screw terminal a screwdriver to attach wires and you can solder them in So these terminal strips are kind of like an ancient technology. Um, they have these solder lugs So those three little things that stick out they have holes so you can put a wire through and wrap it from a strong We can't connection And they're meant to make it so you can attach like three or four wires So instead of a breadboard where you plug the wires in and then maybe they can come loose Or even if you have um a perf board where you know, they could you might not be able to mount it easily These are designed if you want to make multi-point connections. So normally that middle One the one that has a little tab that's ground and so you would attach that to your chassis ground And then you'd have you know, maybe a power and signal and you know ground and you could have as many As many wires you want to wrap around into the little holes and you usually get again like three or four wires um, and then you solder them in and you're good to go or you can use you know spade lugs as well to Um connect to the the terminal lugs. Um, so this person says, okay, I want something like this but I want lugs on both sides and You know, I think somebody will apply and said hey, I'm sure did you has it but let's look on digikey to prove it Don't go to the computer Okay, so first off we want uh, when we're terminal blocks I'll show to our terminal blocks to show the difference Terminal blocks look like this. They have the screws and then there's barrier blocks Barrier blocks are actually a little bit similar, but barrier blocks Um, they they start out down into something and unlike terminal blocks where well terminal the pin goes in terminates And you screw it down these can actually connect to wires like in um In the path of going right you can you can direct connect from either direction Or if you really want to you can actually get a wire underneath Even in the middle of the wire, although how you would strip it is you know a little mystery to me um So these and then what's nice is what I do like about them is they have like again that nice barrier So you don't have to worry about accidentally shorting the wire. There's like as long as you strip it as little as possible Um, there's a little risk for the wire to go through So these are just you know Explain that these if you're looking for terminal strips, these might also be good for you Um, but they're they're categorized differently and then you know, there's special terminal blocks and power distribution but we particularly want terminal drips It's actually interesting because it's it's not terminal as an ending. I think it's terminal as in it's like You from there you can go elsewhere. I don't know what the terminal strip uh phrasing is Okay, so these are called terminal strips and turret boards I'll admit. I do not know what a turret board is Oh, that's kind of cool. So I guess it's like it's a little like a wire wrapping thing here So Well, it's not kind of neat. I do not know what turret boards are for but these look kind of useful There's also binding posts. Um, these are also going to be phenolic And then you know, you can solder Um, see the little tab with the hole you solder the tab and then you can screw down to connect other wires So just another power and signal distribution Uh method this would be particularly good on an enclosure You you'd cut a strip in the enclosure. You would attach it to the outside of the enclosure with the Lugs inside you connect inside to the lugs and then Screw on the outside if you want to connect to it, you know, what are these? To be fair a lot of times where you see this is ham radio kits I remember like heath kit products often had these devices. So Um, the good news is that like, you know, this is exactly what the person was saying they didn't want Which is good means we're at least in the right category And it looks like, um keystone has a lot of Options this family. So what I would always recommend is check out the datasheet because in this case Um, keystone particular they will tell you all your configurations available And it looks like they do in fact have a couple different options Um, 35 36 and 37 Which are part numbers 834 835 836 Are all going to be double tabbed. Oh, sorry. Sorry with 33 So figure 33 832 833 and 831 so we could look for Uh keystone We'll get in stock Huh, and then if we scroll down we'll see 836. Yep. So I've got the lugs on both sides. This is five Um connections. This is the 836. So let's look for the Uh 830 Whoops, sorry 830 terminal strips 832 And that's the first one And then 833 Sorry terminal strips This doesn't have a photo and then 835 Also available to order looks like if you basically want you can either get the 832 which is like a single Or you can get the 836. So I'm sort of recommend you get the 836 It's a dollar a piece and then you just cut it down if you need something smaller, but you get Uh five double ended lugs and then one grounding lug at the end. So uh person on x congratulations It's a dollar. Did you key? You can pick some up. It's in stock right now. I've got over a thousand Okay, all right. Thank you buddy. Yeah, thanks so much. We have a little Kid who's hanging out with me in the background here. No patient do the uh engineering behind the scenes Um, we'll see everybody Next week. Thanks so much for joining us for this half an hour that we try to do every single week See y'all next week. Bye everybody