day 11 Let's do submit files So this is how CPM does scripting. It's just a simple batch processor Here is one I made and All it does is it runs the commands in the file in order. There's some simple Parameter substitution, but that's about it. Now the way this works is to run it You use this command called submit And you give it the script and any parameters and when you run it it will then generate a $$$.sub file on drive a and then the CCP reads the commands from that file Into the keyboard buffer and just does that rather than you know reading from the keyboard and It's a pretty simple set up if we dump it Each command takes up a complete record. That's the size of the keyboard buffer With the size in front so it can just be loaded directly into the keyboard buffer instead of calling the BDoS read string function and It's in reverse order So in order to execute the script all you do is you open the file you find the last record which in this case is this one shove that into the keyboard buffer and Reduce the size of the file by one record Which actually happens through a bit of a nasty hack now the submit command here I Actually got from my other cpm project cpm ish Which is a open-source cpm distribution for the 8080 and z80 how I hear you ask Was I able to use a version of submit written for the 8080 on this 6502 system? Well The answer is fairly straightforward It's written in C because I have a C compiler for the 6502 I'm actually using LLVM MOS, which is a port of LLVM to the 6502 it generates decent enough code the 6502 is notoriously difficult to generate code for so the That file is too big to be honest I'm gonna make some changes later there you go 3k for submit 8k for stat, which is huge so I Recon that one of the reasons why it's so big is that the program is not really well tailored for the 6502 So, you know, it's got like division and modulus in it and so on so I'm gonna do some fiddling later But for now, let's just try and make submit work So all the code for this actually lives in the CCP and We'll be here so What we want to do is First let's put a Do I actually have Don't actually have a Define CCP here. Let's let's make one. So that's going to be one byte for the drive two three four five six seven eight That's for the file name like so and on entry We get the bios we get the drive Try and open the Sub file now in real CPM the the loader the bios Actually, hang on. Let me get that right in real CPM. The CCP will reset the BDOS here and The BDOS will then reply with a hint as to whether this file exists this avoids needing to scan the directory when the CCP starts up But we're going to do it easy way for now. So low byte of submit FCP Jgsr to Xfcb open So this will set carry on Error so if the carry is Set we need a way to figure out whether the Whether the submit file is actually open. We're just going to overwrite Drive byte with an invalid value Yeah Okay fill This should be dot res. I've been using a Different assembler Okay, so that will open it now here So we want to read it from the submit file so to do that We are going to Get the record count If the record count is zero Let me think how this works if the record count is zero then we actually want to delete the file and Go back to the keyboard. I am going to list stuff out. I think Command keyboard and we're also going to have a read command from submit file. So if the Record count is zero delete it mark the file as Used We are going to Say To there so this means that the next time through we won't try to read from the submit file and Actually read the command from the keyboard so that here we have Exes the record count to me. No, it's not zero so Decrement set the current record to the last Record in the file We now want to go to Muddly commode line We're now going to set the DMA address then Read one record Into the command line We now want to We now want to shorten the file by one So we've already We have not updated the record count So we are going to do this again so load the record count decrement it and Write it back and because we're fiddling with the FCB directly We will also want record count mark FCB as modified and Then It's FCB close and Then we're going to close the file and remember that this actually just syncs the FCB to disk So this will write the updated record count to disk and we'll need to import that Okay, so we now want to Print the command so we're going to do that By We are going to need a counter for this. It's not going to be right Because this is testing at the end of the loop and we want to test at the beginning of the loop So that a zero length command will do the right thing like so and do a new line and Exit back to the system. Well exit back to the code above Okay, so let's give that a try and in fact Because that file already exists on the system then as soon as I start up CPM it will try start trying to execute it And it didn't do anything. Oh No, it's been it's probably been deleted. Yes, it was deleted because I changed something Right that did not do anything Because the CCP only looks for this file on A warm boot so now if I type control C Then nothing happens It's not working So First let's Check this Okay, that looks right This is backwards if the drive is ff. It's invalid therefore it's negative So we do the keyboard Okay, now, let's try it test sub. I got it worked So now if I do a dir The submit files gone. Wow that actually worked. I'm amazed Awesome. Okay. Um, I was expecting that to take way longer We should probably put some error handling in Let's finally cannot open file Sub and then we want to Warm boot the system that goes wrong because this isn't a syntax error. So Actually, we're going to do that. That was my phone Because here we actually want to make sure the file is deleted. Yeah, I'll leave that up here. Okay, so BDOS exit is undefined Did I call it warm boot by any chance? I did not exit program it was Ah wordy symbols the best kind Okay, that seems to work the The way these work is really cunning by taking the last record from the file The state is as it that is how far through the file. We're currently executing Just happens automatically. We just keep going until we run out of lines and then you know, everything is fine um We can do a warm boot halfway through running the submit file and the next time round It'll resume from where it left off. It is very elegant It also involves a lot of disk access So let's fire up the the other emulator. Whoops. That's not what I wanted to do just one And just see how horribly slow this is okay, so This is now running a bbc master with lots lots more memory So we start So we can type test sub Not too bad The The acorn moss disk system is actually caching write Updating Running these commands is only ever modifying it's only ever accessing the directory So And we're using two directory records Which is 256 bytes which is the size of a moss sector So this is all fitting within mosses disk buffer. So it should actually be slower if If these were doing anything else like running transient commands, then it would be slower But it works Yes, it's removed the sub file Fantastic Okay, well that was easy Oh, yeah, I will fire this up again So the other c program that I have is stat Which is an all-purpose program that does all sorts of things in dubious ways So the simplest things it just tells you the status of the current disks Uh, you can ask it for help using the world's worst user interface And it will dump everything it can do here you can Get the size of files except that doesn't work and I'm still trying to figure out why Something about my c cpm bindings aren't working You can show the current device mapping using the iobite Which in our system is constant. So you can't actually change this even though Like you should be able to end up at my equals sign. There we go so I can say that the console is on the printer It should have done something but it hasn't You can see Extender disk information So this shows you shows us that we have, you know, this many records 63 kilobyte drive capacity is wrong I think we should have twice that 256 records per extent I am not convinced about Uh, so an extent is 16384 bytes A record is 128 bytes. Yes, that is also wrong Okay, there's some bugs. I need to fix here Um, I didn't understand the cpm file system as well as I did when I wrote this Anyway, let's get rid of that. Okay. Uh, we have a few more commands we need to do One of which is rename So let's do that So first we need to implement the The ccp command for doing it So this is going to It's going to parse an fcb For the first one Hang on a second. What are we doing? Okay, parse the first fcb We now want to So this is really annoying. It's not our fault. It's just the way cpm works The rename system call takes some very special Uh Parameters So parse valid user fcb will parse an fcb into user fcb We are now going to parse the second one into user fcb2 Which is in the second 16 bytes of user fcb So this is actually overlapping the allocation map of user fcb And it's worse than that. There's actually some more work we need to do Uh, yes, sorry. We're going to have to do this elsewhere parse valid user fcb2 Because this needs to be within jump range in valid file name. That's why And we're just going to rename a theme for consistency Like so So now we are going to load user fcb and Call bdos rename and exit Nothing much to it We do need to implement bdos rename which will go somewhere So the rename system call then takes the two fcbs one after the other overlapping This is in fact the same syntax That transient commands use And I think there is actually something else we need to do Um, I think we need to take equals out of the list of invalid file name characters Make it make it a Terminator That's going to be irritating. It's going to have to be it needs to be there and there and there and there and Now this file is too big So this is trying to go to exit which is here. I think this wants to be So if we do this Then We can call that when we need to test for a terminator character And then it will set carry if it is Actually actually Let's have it set zed when it is so Then here all we need to do is to set non z Which we wanted to do without Changing any of the registers Uh, no, there is in fact no easy way to do that. So we are in fact going to Do it like hang on a second if we if If this compares equal Then we know that carry is set because we figured out earlier that a subtracting One value from itself Gives you zed and c set So that we know that carry is set here So we just clear carry there. Okay So is terminator character branch if carries set to exit And this is valid file name character branching to invalid fcp. That's an error Oh, oh, we have this handy Okay, I think that will work Yeah, and it's now fits Uh, I hate doing this kind of flag mangling. Okay rename through bar It calls rename rename food That's sure to produce an error Oh, it doesn't produce an error because a empty Um Fcp is valid, but we don't want to allow that so So we're actually going to user fcp plus xfcp First byte of the file name Cannot be a space. It must be a valid file name If it is Then this is an error and if you want to do that as well for user fcp2 Okay, right Right Not right Right So I believe that in our parse fcp code. I have forgotten to change all the terminators All the terminator code So wipe check for drive read the file name. Here we go Uh gsr is Terminator char branch if carry set to exit That means it is no longer We be stop the fcp here Is valid file hr bcs exit Terminator char This terminator char bcs exit brand foo equals bar bad file name gr I'm not convinced I'm getting that right. So Let's just do it like that Okay, that has in fact done the thing Um, but it's done it kind of badly It has overwritten Something Yeah, I did not So that's tried to wipe user fcp2's allocation buffer And the stuff after the end of it, but I did not allocate space for that So that's actually going to want to be Um size of x fcp minus 16 No Size of yes Well, this was wrong anyway, but that hasn't helped So it has overwritten the current user But why The current user Is not stored in the ccp's variables. It's stored in the bedoss So I would expect I would not expect that to overwrite it at that point So let's just These out put in a return there I'm not convinced this is actually running it No, it is if I put an rts there That should be doing nothing at all, right She's doing something Has this got nothing to do with rename at all? Yeah, it has it's got nothing to I'll try that again with a command that's not user actually Right I have just broken something that's what's wrong And I bet I've broken parse fcp So This will be the terminator stuff That should be clear carry. That's what's wrong That's better Okay, Ren Fu bar unimplemented good Ren Fu equals bar By file name again Ha clear Check for the drive Is it a colon? Yeah Dot It's term is terminated character If yes exit Is terminated character if yes exit Is terminator if yes exit in fact We should be hitting this one So If it's space Set carry return if it's an equal sign Set carry return otherwise clear carry return That should work But it isn't So we're gonna have to debug this We are at 7 8 e 4 Okay, Ren Fu equals bar So the first one will be Ren The second one will be Fu. This is the one we want to debug So We skip the white space Set the user field number in the fcb We get the current user Which is zero and 8 a is Where the pointer for the fcb is 7 b 9 5 is the fcb 7 b 9 5 is here down here This is the top of video memory. So we're right up at the top of memory Yeah, which is correct. That's what we wanted So let's store that Wipe the fcb We can skip this Are we we are at 7 8 f 4 We've just done this. We've loaded Loaded the drive dyi ld 20 overall our cpy 20 that must be yeah, that's that one Uh, so This line 7 iob is where the where we actually start parsing. Okay, we're here Command offset is 4 as we expect our Buffer is at 7 af1. You can see it contains Ren fu equals bar So get the drive letter There is no drive letter Or rather it's not zero Look for a colon No colon. We just leave that unset Uh Here is our fcb being filled out. We now read the file name I know what's going on that Okay, I think it is working. I think it's stopping at the equal sign Then uh, it's trying to read the next fcb And that is succeeding too It's seeing the equal sign as the first character of the next fcb And now that's producing an empty fcb and then it's failing validation later Because it doesn't let like having two fcbs. I will continue to step through this So we've read the character is 46 Is terminator character is to space no is it an equal sign? No clear carry return Asterisk it's not an asterisk Is it a valid file name character? Yes, it is store And again, this is the last time through this is this is the last correct character for f store Okay, and this one is 3d. It's the equal sign Is it a terminator? Carry is set. Yes, it is So we go to the exit routine We write back the command Offset which is 7 and exit with a valid Yeah, that is actually working So what we actually want to do is This is the only place where A equals Sign is this the only place where an equal sign is valid I think that We want to um I think we want to reuse this to be honest But this is inside This is to find inside this procedure above. I think we can do this Yeah, that's kind of this is all kind of terrible, but Is I'll do cleanup later. Is that a valid file name character? Uh Is it? No, we can't do that there. That's a pain Okay, if it's a space Then we actually we want to continue So if it is not a space Is it an equal sign? If it's not an equal sign It is then it must be neither a space or an equal sign Otherwise continue Good Good, that's working. Okay. We've done the ccp side of things We now need to do the actual implementation in the bedos So we need to add the Entry point Here Okay, now I need to look something up at this point the rename instruction The rename command in the ccp Actually takes the parameters Backwards So you it takes the new file first and the old file second right, but The rename system call takes the old name first So We want to It's largely the same code as in the as for delete Find all directory entries That match The file name part in the first 16 bytes of the fcb then We are going to Replace the Well the file name in the drent with the one in the The second 16 bytes of the fcb, so This is more annoying than it should be So we are going to load One byte from the fcb That's irritating we need um We need two pointer In the c's and there's only one register So And we're using a So it's not like we can just move shuffle things around through a we are in fact using all three registers So Do we do this the answer is annoyingly And with temporaries So x is the counter So this gets the pointer Into the fcb No, no, that's not what we want to do you want to add 16 at this point This gets the byte from the new file name We now want to Get x plus 1 into y Now this will work, but it just makes me really miserable. So we're not going to do it like that at all drent index So this is going to be a simple current drent comma y Ink 10 plus 0 ink 10 plus 1 lda 10 plus 0 and this can be fcb f1 compare with fcb t3 plus 1 meaning that we've reached the end of the file name Okay, that's not that bad right And there is in fact a bug here Which is I haven't inverted the names of the Files So this is actually taking old file new file, which is wrong So i'm going to have to flip that but uh, why are we getting invalid file name? See this was working and also shouldn't this be Shouldn't this be a hard error this should indeed Be a hard error. This should be Rewinding the stack and going back to the Uh I'm going back to the main loop So t transfer the stack pointer into x store that in stack pointer Wait a minute the message in x a And Return to the main loop So this will be call that print a new line Rewind the stack and Jump back to the main loop. So this then becomes jump error And we are printing a new line here because these cost three bytes So by taking off this and this We actually save one byte Jump abs across page border. Why is it warning r? um cause I believe that some versions of the 6.02 have a bug Where if the address being loaded by the jump Is across a page border. Let me jump in then Bad stuff happens But it's not documented in this file as far as I can tell Well, it's going to move as soon as we put some more code in so let's just Right Okay, so I think that just tried to rename something but there was no foo test sub bar Why am I getting an invalid file name there? Have I broken? The fcb parsing no that works fine. So that works that doesn't work I think it's the extensions. It doesn't like but that works Even deleted it Okay more debugger Yeah, looking at the time. I suspect that this is going to be the Last thing I do today I think that's bailed here. Sometimes if I use a question mark Like equals sign Yes, that's not even reaching this code Okay, it's the second file. It doesn't like test sub test bars That worked test sub test That didn't work. It's insisting that the second file has a Uh extension So read the file name skip non dot character Skip non dot file name characters. Yeah If the character we see is a terminator character this Needs to be here Because we want to do this before we call inks not after Because we want to be left looking at the dot Or Uh, hang on hang on At this point, we don't want to break If we're looking at a terminator Put that back the way it was Okay, the order of this code is weird Right, we look at If the character we're currently looking at is a dot Is not a dot Move on to the next one Was it a zero then stop Is it a terminator? Then stop Is it a valid file name character? What we want to do here is consume bytes Until we reach the end of the file name So this is the diffs of what we've actually done So yeah, this all looks fine. That's the wrong piece of code Yeah, I don't think there's anything particularly Uh, wait a minute. Wait a minute This doesn't look right We are here branch if equal to exit Uh, we I don't believe we were properly testing for the end of Line Okay, Ren Test dot sub to foo Bad file name. That's a different error Okay, we want to check to see whether The remaining characters are valid, but then we discard them if they're not valid then we fail That's right. That's right That's right. This is why you should always be using the version control system It's not so much of preserving changes And your revision history It's more about being able to look at what you've done today and find the stupid bugs That produces bad file name So I think that when we reach the end of the line We are Not parsing things correctly. Okay, I'm gonna have to hit the debugger again I'm trying to rather trying to avoid that really Okay, um Okay, right. So seven b a a is where our Well seven b Nine oh ish is where our fcb is And we can see it right there So we have that's at seven b a a six Seven b a six seven eight nine Okay, here are scbs. Those are both fine So we are looking at seven b a a Nine a so we're looking at the first fcb It is not a space now. We look at seven b b a that should be this one It is also Not a space. So now we go into bdos rename Did I just forget to rebuild? I think I forgot to rebuild Now I get a bad file name Right, it's more extensions.  That's the problem Also, I'm thinking that I want to change some of this stuff. So the parse code doesn't wipe the allocation Table, I think the parse code should just set the 16 bytes of the Uh, the top half of the fcb Then the xfcb library that we're using will Wipe the rest of it When you call create or open But I will do that later Okay, that's time Let's go for the debugger. Okay, so seven nine five f Six oh so a contains two e. We're looking at the dot So is it dot? Yes, it is we go to here. We read the extension So skip the dot Set up y seven b o eight Here is our input buffer Is nine One two three four five six seven eight Nine. Yep. We're on the the byte after we're on the s of sub So Load it Yes Not the end of the line Not the After the third extension character Is it terminator character? carry is clear is not Is it another dot Why is that there? But that's kind of irrelevant a file name with two dots and it is actually actually a file name with two dots And it is invalid character set to Return with carry So we're not a dot Uh, is it a star? It's not a star Is it a valid file name character? Yes, it is so we store it Go around again We get the u exactly the same thing should apply here. We're on the b Okay, this is the first interesting one. We have read a space is Hang on a second We missed something compare and see Break if ah Ah, okay We've hit this condition because we this that was the third extension character So we now skip over to here was the thing we just read a Okay, I know what's happening Do I yes, I do know what's happening So we are looking at The Yes This code is wrong We are currently looking at the character after the file name That's that space there This code is expecting to find an extension Which there isn't one Because I just cut and pasted all this stuff from further up So that's why this is here So in fact, we're going to ignore this We're going to ignore an extra dot at this point Uh What we want to do is to skip valid file name characters until we get a terminator So Break if carry is set Otherwise Naturally, we want to do Is valid file name char If it's not a valid file name char Fail with the yes, this is an invalid fcb otherwise Fetch the next character And this code We actually want this to be Here see how does this work If we're looking at a space If we're looking at a dot Then Stop scanning If it's a terminator character Then we've reached the end of the fcb so Exit successfully if it's not valid fail Otherwise Go around again And I think that this only Is causing a problem because this is the first time we're actually using two Parameters To a command. So let's try this Okay, that passed but it didn't actually do anything Which is, you know, not so great, but at least it passed Okay, that's correct And that's correct So now we go into the bdos code e1 3 4 5 6 Okay, we're here We are reading Sure want to go around this again We are reading bytes We did indeed find a file Oh, I know what the problem is I'm not writing this back to disk. That's what I'm not doing It's renamed it So let's move and put it back again And that didn't work Why didn't that work? That failed to find a file called foo. That's why it didn't work So is 7b9b the fcb? Yes, it is Well, that looks fine F00 not for spaces So why is Look at find first. Why is that not finding it? a is c So zero one two three four five six seven eight nine abc That's should be correct So home drive reset dear pause read dear entry check dear pause No more files. We do have files That's the user want to see deleted files Just hadn't thought did I remember did I erase the metadata part of the file when I did the rename? No, I didn't I only replace the file name characters. Okay, we're here so We load a byte from the fcb Is it a question mark? Okay compare characters. We're here So here is the drn to we're looking at So we actually want to go four times to get to the next directory entry I didn't put a break point there f7 five Uh one two three Four who should be on the second sector Yep, and now we want to go on to the third sector. So we go another four two three four Four that was five times It's late. Okay One two three four One two three four right Here is the directory buffer It put the file name in the wrong place. There is a zero byte before the f. So obviously nothing matches That's why that's not working So we are actually copying from We're copying like that Oh the foos that is invalid. So can I do Star dot yes that matches So I should be able to do ren star dot bar Okay, let's use the power of wildcards to rename it and now I should be able to put this back to test.sub the way it was good Okay, in fact, we shouldn't be able to use wildcard there. I should be checking and not letting the user do it uh it doesn't say anything here but Renaming with a wildcard doesn't actually make any sense because it will rename all directory entries of all files that match To be the same and you'll end up with duplicate directory entries Which is wrong Traditionally, it's the ccp that does this Speaking of which We need to fix this So Paa's fcb needs to change We don't want to wipe all the fcb We actually want to wipe up to The four bytes of metadata The rest of it we leave untouched In fact, I forgot to update the comment from last time. So uh These what we're dealing with here are x fcb. So we do have the user number But I think we also want No, no This is all the job of clear So this has cleared Uh Ex and cr but we actually want to do all the rest. So ldy sfcb Uh We're actually going to wipe everything up to their r2. So we're going to want to go all the way up to r2 plus one until Equals and we want the sif library Okay So we run it test.sub to foo. Did that work? It did It's like foo that works Okay, I think that's working fine. Let's just do Yep, that's working too In fact, if I go to user one do dump test.sub uh I haven't done any of the parse codes to parse a user number on the front of a drive Because it should eventually work like using file names like This but I haven't done that. That's an extension. That's not part of core cpm As I said earlier cpm actually handles user bytes very badly, which is why I'm putting these xfcb things in Okay, so that works. So this allows me to go to Entry Rename And we just swap these two round We also no longer need this So So that should be ren foo equals test.sub And it works ren test.sub equals foo And that works Okay, I think that's better now Took long enough, but I think it's better and it's 22 47 my local time so So next time I need to do update file attributes, which is actually it's essentially the same code as Rename in the bedos, but there isn't a command for it in the ccp We actually now have implementations for all of these which is nice You're supposed to be able to set attributes using stat and stat doesn't work So I will do some investigation to figure out how that works But we've got two more system calls to do Yeah, nothing It's supposed It's supposed to list the For each file that matches the wildcard. It's supposed to list the number of records the size in bytes and Whatever these are I can't remember what these are This is supposed to be a byte for byte Port of the original cpm version written in plm But I'm not sure I got it right Yes, and the last system calls are the random access ones That should actually be reasonably straightforward Set file attributes is here Random access Oh, and there's this one That'll be nice Then it's done Apart from the bugs and the missing features


Hello and welcome to this session in which we would look at market ratios, which is the last tools for our financial statement analysis, which is recording part seven of seven. In the prior session, we looked at all these tools as financial statement analysis. So what are market ratios? Well, they measure the attractiveness of the companies for potential investors. Here as an analyst or as a potential investor, you are looking at these ratios to determine whether you should invest in the company or not. Now, the best way to do this is to actually look at the numbers, look at the figures to see how they are computed and how they are interpreted. And what can we conclude from that information? Once again, we're working with the same set of financial statements, balance sheet and income statement. For the purpose of this example, we're going to assume that we have one million shareholders because that's important. And we're going to assume there are no changes throughout the year. So it's one million shareholders throughout the year. The dividend per share we paid 15 cents per share for the whole year and the dividend payout, the whole dividend payout was 150,000, which is simply put, we paid 15 pennies in total for the million shareholders, which had up to be 150,000. We're going to start to look at earnings per share and earnings per share is computed by taking net income, the profit, then deducting preferred dividend and dividing everything by the weighted average common shares. Now, on the prior session, I failed to mention something when we looked at the profitability ratios and that is when you compute return on equity, return on equity, you will take net income minus any preferred dividend, but we assume for our example, there are no preferred dividend. And the reason we deduct preferred dividend because we have to find out how much the common shareholder are getting because the preferred dividend, they need to be paid first. They have a preference. And that's why we always deduct them when we're looking at those stockholders, equity related, related ratios. So simply put, for our company, earnings per share, which is we earned 398,950 and we have 1 million shares. And here we can maybe go with two decimals. So earnings per share, each shareholder, I'm just going to round it, but you guys get the point. I just want to make sure we don't, so we see where point four is coming from. So approximately each shareholder would receive 40 pennies. This is earnings per share. Now the company, again, don't distribute all the earnings, but that's the computation. Earnings per share is very important. Why it's very important? Because it's going to determine, it's going to help determine the stock price. Because when you buy a company, what you care about is the earnings of the company. And especially you're looking at future earnings, but based on the current earnings, you can predict the future earnings. So if we're looking at the earnings of the company, this is 40 pennies, now we're going to do some what-if scenario. So let's assume, again, I just make up this number, eight dollars. Let's assume the stock price today is eight dollars. Then we can compute something called PE ratio or price earning ratio, which is taking the price per share divided by basic earnings per share. So if I take the price divided by the basic earning, what I find out is the PE ratio is 20. Now we need to interpret, what is this PE ratio? What does that mean? Here's what it means. It means this company is making 40 pennies for every shareholder, for every share, for each share. So each share is making 40 pennies, because if I take all the earnings and I distribute it to the shareholders, each one will get 40 pennies. The investors are willing to pay 20 times this earnings. What do I mean by 20 times? Well, let's see, let me get my calculator here. And if I took 0.4 times 20, I'm going to get eight dollars. So hold on a second, what are you saying? But you already gave me the stock price. True, I did give you the stock price, but what I'm trying to tell you is the investors, the investment community will do what? The investment community will determine this PE ratio. So the investment community will say, we should pay. This is also called the multiple. What is the multiple or the PE ratio? It tells them how much they should pay. What's the multiple per earnings? Now, if the company has a lot of bright future, a lot of prospect, what we do is we take the earnings of that company or the future earning and we multiply it by the multiple. Now, historically, historically, again, this is over a long period of time. If we're looking at the S&P 500, usually companies are priced 15 to 25. Now, this could be sometimes they go higher, sometimes they go lower, but this is what's called normal. What does normal mean? Normal, make sure you have it in quote. Normal means when the company makes a dollar in EPS, we multiply it by, let's assume we're going to give it a 20 multiple. We should pay $20 for this company. It means for every dollar and share, we're paying 20 times that. So the earnings, what I'm trying to say, the earnings drive the stock price. I'm going to make a small experiment to show you how if the company fudged their sales, what would happen to the earnings per share? What would happen to the PE ratio? And what should happen to the stock price? But here we are assuming that this company is fairly priced. And it deserves a 20% multiple. So the community, the investor community believe this company deserve a 20% multiple. Now, how that multiple comes out with? Well, that's what the market basically agreed on in a sense that this is what other companies are being priced at the industry overall. So let's assume for the sake of illustration, the company was able to fudge the numbers and able to add $300,000 in fake income. So if we add $300,000, now the bottom line now it's $635,000. Notice what happened. Earnings per share becomes, earnings per share becomes 64 pennies. Well, what does that mean if the earnings per share becomes 64 pennies? Remember what we said. We said if we all agreed that we should pay 20 times the earnings, 0.64 times 20, this stock price should be priced at 12.8. So notice what's going to happen is 12.8, what's going to happen? The stock price, I'm going to change this because I told you if we say, if this is what we all agree on, so the price should be 12.8. And as a result, the multiple becomes 20. So let me just do two decimal point. So what did I do? What I showed you or what I tried to illustrate, the fact that if you fudge the numbers and accounting, if you reduce your expenses or increase your income, you're going to increase your earnings per share. If the investment community says you deserve a 20 multiple or 40 multiple, some companies, they have high multiple. Let me just show you what few companies will have. For example, Apple computer, let me show you their PE ratios. Their PE ratios is 30. Their earnings, so their EPS is $5.61. So today, the investment community think the 30 is a fair multiple. So if we take 5.61 earnings per share times 30.84, that's going to give us the stock price of Apple, which is 173, which is 172.99. If Apple increased their earnings per share and still everybody thinks the PE ratio is 30, then you will take that additional earnings per share. Let's assume somehow they were able to increase their earnings per share to 8, 8 times 30.84. The stock price should be, it doesn't mean it's going to be 246 if they can increase their earnings per share to 8 dollars, which is that's a huge increase. But the stock price would reflect this if the investment community, Apple is has a 30% multiple. So that's what I'm trying to show you. So what I said, I said, let's assume that this company deserves a 20% multiple for every dollar they make. The investors are willing to pay $20. And this is what I was trying to show you that if you increase the earning, if you increase the revenue, then you would change the perception of the market and the stock price will react. Let's go back to the original data. OK, so this is the PE ratio, and this is a very important figure, very important figure in the real world. Before I proceed any further, I would like to remind you whether you are an accounting student or a CPA candidate to take a look at my website, farhatlectures.com. I don't replace your CPA review course nor your accounting course. I'm a supplement, I'm a useful addition to your resources. I can help you do better. So you are ready to succeed on your CPA exam, focus on your career and do well in life. This is a list of my course catalog, lectures, multiple choice resources that's going to help you succeed. Invest in yourself. My CPA resources are aligned with your Becker, Wiley, Roger and Gleam. So it's very easy to go back and forth between my material and your CPA review course. I also give you access to all the AI CPA released questions. And we're talking about 1500. Those are actual CPA questions that appeared on the previous exam in addition to thousands of additional CPA questions. If you have not connected with me on LinkedIn, please do so. Take a look at my LinkedIn recommendation, like this recording. Share it with other connect with me on Instagram, Facebook, Twitter and Reddit. So let's discuss the dividend payout. The dividend payout measures how much the company is distributing in dividend to the investors. So what we do is we take the cash dividend, how much they pay cash dividend relative to their net income. And I said, let's assume they paid 150,000. We'll take this number, divide in it by net income. And it seems they distribute 37.6. Now the retention ratio is the difference. So if you take one, if you take one minus this ratio will tell you how much they keep in retained earnings. Because what they don't distribute, they keep. So one minus 0.376, they keep 62.4% of their earning for future investment. Now, if you are looking for dividend, you want to invest in a company with a high dividend payout. For example, certain companies, like for example, that's called real estate investment trust or called REIT, they have to pay 90% of their earnings in dividend. Otherwise they would lose a certain tax status. So if you are looking for income, if you're a retiree, you would invest in companies that would have a high dividend payout. Now, not all companies pay dividends. Certain companies, they don't pay dividend. Why not? Because they want to keep that high retention to reinvest in the company. And sometimes it's in the best interest of the investors because the company will have many projects to do. Now let's take a look at Apple. Apple has a, they don't tell us the dividend rate, but we could have a dividend yield. How much they pay per, how much they pay as a dividend yield? I believe they do. Let's look at their statistics. Let's see if they have a payout ratio. So this is their profit margin return on asset. Let's see if they have a payout, payout ratio. So notice Apple, they pay 15%, this is their payout ratio. 15% of their earnings is paid out, which is, it's, you don't think that's a lot, but they pay billions and billions of dollars in dividends or they're very generous. But the point is you want to look for those companies that have high dividend payout ratios. Dividend yield is another measurement, but this tells you how much you are earning for one share in dividend. So you're going to look at you, if you buy the stock today and you paid $8 and the company is paying 15 pennies per year in dividend, while you'll take 15 pennies divided by eight, you are earning 1.88%. Again, the higher this number, the better off you are. How do you improve this number? Well, hopefully if the company makes more profit, they will increase their dividend yield or you want to wait until the stock drops. You buy it, if you buy it at, let's assume rather than eight, you buy it and it drops to 6.5, then you buy the stock, your dividend yield will increase to 2.31. So this is how you can improve your yield, wait until the stock price drops or the company will make more, will company make more and they will distribute more. So this is the dividend yield. At the end of this recording, I'm going to remind you to visit farhatlectures.com, work multiple choice questions to learn more and be confident in this topic. If you're studying for your CPA exam, don't short change yourself, subscribe, invest in yourself, good luck and stay safe.


and welcome to Just a Lady Aida. Hey everybody and welcome to Just a Lady Aida. We've got fun filled Saturday night. Tomorrow we're going to see a friend. So it's Sunday night. So we thought we would stream tonight. Why not get it done a little bit early? When we say friends, you know, sometimes our friends have the Prince Floppy from 30 years ago. Sometimes they make interesting 3D printed things and they're designers. Other times they run things at Twitter. Who knows who our friends are? Do you like, actually, could you like tell, cause it's shining right into my face. What? The computer, that light, sorry. What? Yeah, it's a little better, sorry. It was like right into my eye. My eye had blinded. Great, back to the show. Okay, so we're doing that tomorrow. So we're doing this show tonight, Saturday night. So let me just take care of some biz real quick, okay? Biz, okay. All right, first up, go to aidabox.com and sign up. We only have a few slots open. We shipped the winter edition in January, February. You will regret if you don't do it. Next up, people were like, hey, I saw that you got that Prince Floppy, but what was on the disc? I know there's a font, there wasn't. It's just two tiffs. That is all that's on there. Really, there was only two tiffs. One big tiff and one small tiff and they were both tiffs. And someone, you know, it's Twitter. So people were snarking on us and they're like, you don't have a trackball on your PowerBook 180 that's pristine. I'm like, okay, well, I have a replacement on the way. Like, I don't know. And you got it. I got it. Yeah, that did work. Anyways, so here you can see me opening up the tiff that was on the Floppy. But Phil, was there like a true type font? No. Was there a Postgre font? No. Was there like a font suitcase thingy? No. Or was there just a tiff? Just a tiff. Two tiffs. So here you go. And so this is the piece of history. It's now on archive.org. And so it's there. So you just see office behind the scenes. There's me, master back on in New York City and indoors so we were doing the right thing. And then I've been doing some behind the scene stuff. Just publishing some of the things that ate our fruit and more. This is our Mona Lisa OctoCat Puppet that I hope that we'll be doing a show, a kid's show maybe about coding and more one day. And then speaking of the reason why I had this out is because this is your GitHub contributions and then this is just like, you know. You can see we're in the summer. I kind of took like two months and I was like, I was a little trying to go outside a lot because I was like, if this winter is another COVID spike I wanna make sure that I get outside as much as possible when it's nice in New York, which is June, July, August. Okay. And then I've been taking photos and putting it on my personal account, twitter.com forward slash peteron. And you could see some of the experiments I've been doing. I'm hoping to do a little video show of my own but I wanted to do a max. Wait, what's the video show gonna be about? Well, you know, stuff and things. But I wanted to do this max syndrome like thing and I wanted to have it black and white and I wanted to do a lot of things. So this is kind of complicated because I can't just like do a normal thing. But I got it working. So anyhow, that's some of the stuff that's going on in the scene. So just a little bit of a reminder, Tuesday, JP's product pick Wednesday is gonna be 3D Hangouts with Noah Pedro. We may or may not do show and tell and ask an engineer because Lauren was invited to an event I can't talk about yet but it's a big deal. It's on Wednesday. It's on Wednesday, so we'll see. And so we have a few things that we've been up to. The first thing is here's these hacker CDs. These are, this is hacker soundtrack one, two and three. And what I wanted to do is see if I can use my power CD from Apple, which you could see you want to put it a little bit underneath there. So you can see this is a CD player and I have a little video that went along with it. So I got it to work with the AirPods Max. I just wanted to do some repair work that we need to do on this thing. But anyways, I got it working. Here's a little clip. Your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should. Dinosaurs and man, two species separated by 65 million years of evolution have just been suddenly thrown back into the mix together. How can we possibly have the slightest idea of what to expect? Okay, lots of public culture references there. And then I guess the bigger news is we tried to get the limited edition Arduino's but you can only just buy them as a person. So I got 10 and I looked through all of them and one of them, the lowest serial number was 16 and we're gonna do an unboxing right now. We're gonna do it. And I already opened it up earlier.  I will, you can just put it down for now. I did it, you know, I just wanted to put some photos up on Twitter. So they have all the founders, they added the new CEO, Fabio and Arduino had a little bit of a history. So one of the original founders on there, Fabio the new CEO is on there.  And I thought, so I thought you do a little bit of an unboxing and then I'm gonna show where we're adding this. We have an Arduino museum in Adafruit and we have a collection of things and all and I'll go over that in a second. But how about we go to you and you show us. Here we go. Yeah. So this is. Want me to shrink you down more? No, it's okay. This is fine. I agree. Yeah. This is fine. Yeah. We just, we organized this for a moment. So, okay. So there's the box and so it's got this nice gold thing. So they're going black and gold, which I'm digging. There's a little hologram here. Okay. Oh, it's so cute.  Yeah, this pops out. And there's a little foam protector and then I don't think there's anything underneath it, right? No, but if you take the box out, you could see the signatures and more. Where? The other side. Oh. Yeah. Oh, sorry. So the only person's missing is Gianluca, who was part of the original Arduino team, but there was a split with Arduino. So I get why they did this. Yeah. And these are too little. I think these are probably 0.05 inch headers. So they're, this is, you know, one quarter size maybe of an Arduino UNO. And then this is the Arduino UNO for scale. So yeah, it's like one quarter size, almost exactly. Again, that kind of fit inside. This is a little carrier. So this is like when you have a yacht and then you have a little jet ski in the yacht that can go out and then it's like, hi. Yeah, so people were asking how big it is. Well, there it is. It looks like a miniature UNO. Yeah. So, do you have anything else you want to show us? Because I have some history stuff to show about the Arduino.  But you can solder pads and it's got this cool gold. I don't know if people are going to use it or collect it. I mean, I'm collecting it. I mean, I'm just collecting it because it's cute. And it's, you know, it's got the cast-related pads.  I do like the black and gold.  And I'm sure this is functional. Yeah, I think USB-C and like, USB-C and there's the Arduino. Everyone's gone through a chip shortage. This might have been something that they needed to do, just to, you know, hey, we get 10 million boards out there. Yeah, and we will talk about this later. So this has an ATMEGA 16U2 as the co-processor for USB to serial, which we'll chat about. But anyways, this is very cute. So, it's history time. So we're adding this to our Arduino Museum. And let me just be really super, super duper clear. We've been doing stuff with Arduino for over 10 years. Here's Lady Eda with blonde hair. So there's Jen Luca. Left. Lady Eda, Masimo, Tom Aigo, Diver Coutelius, and David Mellis. They were at our apartment when they do for its apartment. And I have, I think, the only original Arduino team signatures. And I'm selling this on QBC next week. For $99 million. And so then I wrote an article about why Arduino won, why it's here to stay. I have to do an update because it is now 10 years old. And we have some history because Lady Eda was working on a thing where it was Arduino-like at the time. It was an FTDI thing, Masimo. He said this event that he saw, the Morris Design. So, you know, open source is kind of neat. And one of the things that we did, and the reason why I bought this little mini Arduino, is because I have a collection. So this one's going to go with our collection when Eda Fruit was asked to help out when there was the arduino.cc split. And there was arduino.org. And we were working with the US team, Masimo and team, and we wanted to help them out. So this is the panel. And Eda Fruit was manufacturing the UNOS. And I'm going to show you the first 18 seconds when Masimo was on site at Eda Fruit as it came off the assembly line with Lady Eda. And here's 18 seconds. And this is from 2015. No, I have the dates. I am an archivist. It's Lady Eda Masimo. They are putting together the first arduinos from arduino.cc in New York, USA. The first arduino UNOS manufactured in the US. Yeah. Great. Legally. Now you just have to make sure they work. OK, all right, get your testers out. Next step. And you're probably wondering, hey Phil, so Masimo and Lady Eda are holding up the very first arduino made in USA. Where is it now? Well, I got them to sign the back of it at the time. And it's in the Eda Fruit Arduino Museum. And it is a rare thing to find out in the world now. But we were making them in the USA. Here's our team. We were boxing them up. We were sending them off. And later on, they made the micro. And it says code design with Eda Fruit. They based it off one of our designs. It was nice that they put some credit on the back. Thank you. And then we made the Gemma. And that was the Arduino Gemma. We still have the Gemma. And then over time, what happened was libraries and software and code really is what drives a lot of the things that goes on with Arduino. And Arduino at one of their events said, congratulations, Eda Fruit, for being the most downloaded library. So still to this day, they don't publish them anymore. But Eda Fruit stuff is the most downloaded, most used. And people love our libraries. And we're very proud of it because we wanted to be part of this big community. You know, Arduino's in our community. We're in their community. It's one big community. And it's kind of cool that this is a lot of history here. So joining the Arduino's and the Eda Fruit Museum of all things, Arduino related and more, you'll be able to see all these things. And congratulations, Arduino, on shipping out this cool little board just in time for the holidays. Yay. OK, yeah, we got some. And that's the news. OK, cool. All right, well, for me, I got a couple things going on. I'm going to check my notes now because I was so amazed by it. OK, so we did the mini unboxing. OK, so yes, let's go to the overhead and I'll show off. I've got the Uno. So I got my prototypes in. So I started making. I made this Feather M4, Eda Lager, which I was excited about. And you can see if you look really carefully, I got a couple transistors flipped up. It's actually something that I make a mistake on a couple times. So I'm going to like this is the second time I think I've made this mistake where I have the P-channel FET on backwards because I have it in as like the ideal diode configuration, not as the high side switch. So you can kind of bend the pins over and solder it and twist it around to get the drain in the source. Swapped. And otherwise, it pretty much worked. The other thing I changed is I was using a, like I said, a high side switch for the STEMI QT connector, but which worked fine as long as the STEMI QT sensor was not a high current sensor. But the minute I tried to connect something like a CO2 sensor or a big OLED, something that used a significant amount of current on startup, the capacitors on the board would drain the 3.3 volt regular because there's not a lot of 3.3 volts. I mean, there's a lot of 10 microfarad capacitors. And if I could replace them all with 22 microfarad, it was kind of marginal. But the more you add the bigger that load is when you switch on that high side switch, you have to dump current into the capacitors. And it was browning out the chip. And the brown out on the SAMD 51, we have quite strong. We have it on at 2.7 volts because the SAMD 51 we found if the voltage dropped too much, it actually had a high risk of corrupting the boot loader. So we always set the brown out detect to 2.7 volts. So upshot is that we're replacing this high side P-channel FET with a regulator. And I'm just turning the enable on and off. And that's going to be perfectly fine. And since that is sucking power from the USB or battery, you're not going to have that risk of a brown out. Because even if it dips 0.6 volts, it's still well above the LDO voltage. So I think they'll fix it. So I ordered another set of prototypes. But otherwise, the design worked quite well. And what's funny is the chip I'm using on the SAMD 51 J20 is a bigger one than this one on the Feather M4 now. When I first designed the Feather M4, I believe it could not get J20s. I think J19s were the best chips that were available. There was something up that made it so that I didn't use the J20s. But ironically, when we booked a year ago, we booked two years' worth of chips because there was a chip shortage. So we're going to book them all. Our J20s all came in before the J19. So ironically, it's the other way now. It's like I can get the bigger chip faster than the smaller chip. So great, the Feather M4's going to get an upgrade. Congratulations. There's one bright side to this silicon shortage. But so I'm excited for this design. So I ordered another set of prototypes pretty quickly. Another prototype that I'm doing that I thought was interesting because you don't see this too often is I'm going to redesign the Vemmel 7700, which is a light luck sensor. It's an I-squared C light sensor. And what's interesting about this is that the light sensor, you see the package here, the chip itself, the sensor, actually comes in two variants on a reel. The first variant is upward and the other variant is sideways. You can actually see that this is a sideways-focused sensor like the direction which it's reading light is from the side. And it's the same sensor, right? It's just how is it packaged in the tape and reel? So one way is upright, so that would be like, so sorry, this is hard to do over the overhead. Without tweezers.  Okay, so one is upright and the upright one, it's like this. And you can see the chip up top. And the other way, the way that this particular strip comes in, the sensor is to the side. Same package, but just rotated. And I've seen this in a couple of light sensors actually. This is the alternate orientation. I've seen this in a couple IR sensors and light sensors. I've seen, they come in two versions. Basically, just really watch out. If they have two versions on a tape and reel, it's the same part number, but there would be like one slight difference in the ending numbers.  No, sometimes that letter means it's flipped in the tape and reel and like, it's really useless. So that's why, watch out for that. I mean, in this case, I'm doing it on purpose, I'm gonna carry both. Because I think it's useful to have a right angle light sensor that's not a very common orientation. Usually light sensors are, you know, they point up from the board, but this one is, they're orthogonal and this one is parallel, right? From the other parallel, yeah. Anyways, so this is a version of the, you know, I'm stomach QTF-ing this that I'm gonna make one PCB two versions for it. Another thing is you go to the computer. One thing that's fun, I try to do this every year, but this year I'm really doing it is advent of code. It's super fun little puzzles that you can program. Oh, if you want to learn Python or you wanna get better at Python, it's excellent with Python. If you wanna get better with C, it's terrible for C. I mean, you could write all of these in C, but it would, I personally think it would be a nightmare. It's a lot of text parsing, a lot of like list iteration and mapping and reducing. And it's just like C is not good for that. But it's great in Python. Help you get these puzzles going. And the data sets are big enough that you're actually doing computation, but they're not so big that in Python, like I'm quite lazy, like I'm just, I'll just use list comprehension, list comprehensions. Comprehensive comprehensions. We know what you're talking about. I'll use those and I'll just kinda throw them around and you know, you're just using a ton of memory and then I throw away the data afterwards and it's fine. Do you think it'd be good for people who wanna learn JavaScript? I think so. I don't know how good JavaScript is with string parsing, but I'll tell you just to get the data in, you know, one of the biggest challenges so far, it's only been four days, but the one of the biggest challenges we noticed is like, you wanna get the data in cleanly and like that's not the hard part. So if you're like dicking around, you're like trying to parse out these strings and numbers and convert binary to decimal and vice versa and if you're like dealing with that, I just feel like you're not gonna have as much fun whereas, again, what's nice about Python is you're just, you do like file that read line, dang, you have all the data and then you strip, take off the new line, split, you've parsed it out into an array and then you can actually start working on the data once you have it in format and whatever language you use, just don't pick one that sucks at string parsing and see really sucks at string parsing. So that's why I recommend, it's great for Python learning, especially if you know a bit of Python and you wanna get better at it, which is me, I find that this is good because it'll kind of make you think like, oh, there must be like a Python built-in that does this and you know, or especially NumPy, this is great if you want to like get better at NumPy and you wanna have a little bit of exercise for it because there's a lot of like matrix flipping and inverting and like you wanna slice it, there's a lot of this data manipulation. So that's the other thing I'm doing for fun, for fun main. So that's, that's all I got for Desk of Lady Aida. Okay, you wanna do the research? Yes, let's go to the research. Okay. Where? Okay, the great search is brought to you by Digikey and Interpreer. Lady Aida uses her powers of engineering to find stuff on digikey.com. Lady Aida, what are you going to show? Okay, so let's go to the overhead because I'm actually gonna show off just the things that I've shown off. But again, in brief. To enter this word. A blurry segment? Yeah, I don't know. Whoa, whoa, so much, too much. Okay, so once upon a time, there were computers that had serial ports on them. Can you show the serial port image? Which one? Right, and then down two, down one. This one? Yeah, close that. So once upon a time, computers had serial ports and this is a 25-port serial port, maybe it's a parallel port, but they had nine pin or 25 pin ports on the back and you could send and receive eight-bit serial data plus or minus 12 volts, but then you could convert that to zero to five or zero to three volts and use that to send and receive data from your electronics. And this was amazing and wonderful and we were in the garden of Eden.  And for like about 10 years, microcontrollers did not have USB ports but they did have serial ports and so we were in this weird murky period. Nowadays, more chips have built-in USB ports and I'll show one, but if you go to the next image, you can use something called a USB to serial converter and this is one of the first circuits I made because it's very handy. It takes USB, on the left you see a USB-B type and on the right you see, there's a chip and then a crystal, two LEDs and then a couple of pads. The pads are not labeled because this is before you could get silk screen on PCBs for free. Ground, power, RX and TX. And so the chip in the middle there, which is the FT232BM, I believe, was a chip that all it did was connect to USB and present a USB port peripheral and convert that to serial and go to the computer. A lot of microcontrollers now have native USB so actually I'll show, I'll just show you this. Can you get it overhead? So a board like this, Sanity 51-based board, it's the Cortex M0 and it has USB and you'll notice there's no chip in between, it's just this chip in USB. It has a native USB converter. Compare that to the UNO, which is earlier and so, you have the mic controller and then this little chip here and it's the USB serial converter and on the Metro Mini, we also have two chips, chip USB converter and the micro bit actually also basically has a USB to serial converter, although it's USB slash serial slash JTAG, whatever, but it has a little converter chip and they're not incredibly expensive, but they're an added cost, but if you're dealing with something like a RISC-5 chip, it doesn't have native USB or some chips just don't have it and you might be stuck with the chip you have to use or you're upgrading some old design using USB serial converter and so I showed the image of the FT232BM, that one's actually no longer made. It was replaced with the FT232RL, which I also think is possibly close to being discontinued. So this, I think uses a CP, yeah, this is a CP2104 and that's another popular, SILabs also makes USB serial converters. Of course, the CP2104 was discontinued as chips are wont to do and it was okay for three or four years because it was discontinued because you still get it, but now it's really discontinued. It's been, they're no longer making the 04Y, I don't, maybe there's a little mistake in it, maybe they want to update it, so it's been replaced and then for Arduino, what they do, which I think is interesting, is they use actually a different mic controller. The At Mega 16U2, the U stands for USB. It's one of the first USB native chips that Atmel made. Now you might say, well, wait a minute, if this is, and mic controller is basically the same as this, why not just have one? Well, the Leonardo does, it kind of combines both of them, but there are reasons why you might want to have separate. We know mostly because there's a ton of code for this chip out there, like tens of thousands of projects, maybe 100,000 projects, and this is just a way of keeping it alive. And I think one of the reasons that Arduino did this, with a mic controller, is to avoid that like, oh, the parts discontinued, or we don't have control over it, or we don't want to customize it a little bit, also it can act as a generic CDC device under your special driver, a couple of reasons. But, and I'll say this is always a valid thing to do, you can always take a mic controller and make a converter. That said, I kind of like, for this instance, I do sort of like to use chips that are off the shelf that just kind of do one thing and one thing only. I'm always a little nervous when you combine two microcontrollers. I always feel like you can do it, but there's always a little bit of risk. So let's go to Digi-Key, and I'll show you the CP 2104, which is again the chip I have loved and used. And, you know, it says that it's available, but it's NRND, you know, not recommended for new designs. And having talked to Silabs, you know, it's a good idea when this comes up, talk to the company and ask them like, what do you mean by that? Because believe me, companies have very wide ranges of what they mean by not recommended. It could be, I mean, I would have the, from Silabs, the SI, I think 1143, you know, light sensor, and it's been NRND for like eight years, and I can still get it, right? But it's, they're like, we prefer use a different chip, which they also discontinued. Anyways, so the Silabs chip, it's not available, believe me, I have like the last shipment that they're making. They're like, we're done, but they do make others. And I'll say that it was, trying to search for like USB to UR, I wasn't, it wasn't as easy to find the category because it's a little, it's a weird location. So what I think I found easiest to do is just to click on the function, because it's a very specific function, and let's just view all the similar ones. There's a couple, some of which are a little bit, like this is a bit intense, but we just want active ones because we don't want to get stuck again, I think. Yeah, and so there's a couple options. So I'll say that of the chips, there are a few families. So Microchip makes MCP22, you know, they have a series of chips. PsyLabs, like I said, Cypress, maximum I've never tried, FTDI, I've used a lot. So my personal opinion is the Microchip ones are good, but they really are a microcontroller that they are reprogramming to act as USB to serial converter, which I'm not against, but I just haven't used it as much. The one time I used Cypress, it was also a microcontroller that they basically just reprogrammed and they package it programmed with USB as a serial converter code on it. And I found it was a little flaky. What do I mean by that? So USB serial converters, it's like, you'd think it only has one job to do, how hard can it be? But there's actually a lot of little details. For example, when you open up the serial port, what happens to the control lines, the DTR and the RTS and the CTS lines? And some chips toggle them back and forth or some of them they don't have, when you try to set the control lines, it doesn't quite work. Some of them only support a certain number of bot rates. So they only support 1200 to 115K. They don't support the ultra-high bot rates, like three megabot. And you're probably like, well, when would I ever need three megabot? But you will, right? There's always that once in a while that chip that's like, it really wants to be run at one megabot or higher. And that's really high. You need pretty good precision to be able to do serial at that bot rate. So that's another thing. Or weird bot rates, like 31 to 50. 31 to 50 isn't a multiplier of 9,600 or 2,400, but it's used for MIDI. And that is also pretty useful too, once in a while. You need something that takes USB serial and can convert it to a MIDI bot rate. Or on the ESPA266, I think they use like 77K bot or 77.4, something, something.  And so I will say, I've tried a lot of converters and they're not all equivalent. They're not all drop in. You definitely want to use it in the weirdest cases that you expect to use it, especially weird bot rates, high bot rates. And control line, you know, noodling. Any questions? Yeah, we'll do a question during the great search if that's okay. Yeah. What's the drawback of using a chip as a controller in a converter? You know, it's actually probably okay these days because I think if you use like TDUSB, it's really solid. There's just, just make sure again, it does control line stuff. Make sure that it does the bot rates you want.  I just think it's riskier if you use your own chip, although you might be able to save a couple cents. You know, it depends on the quantities you're purchasing. Of course, it's another programming step you have to take care of. It's like another part of your production process, which might be annoying. There's also the chance that it gets erased somehow. You know, chips, if you don't set like your brownouts or if there's a boot loader, it can actually get damaged. You know, once in a wear-wear while, you know, people would get arduinos that we manufactured and they'd say, oh, the chip has, it's coming up as the DFU, the 16U2 got erased. And we can never figure out why because it would never have made it through the test procedure if it hadn't gotten programmed but something, it was really rare. Again, it was like one out of like 10,000. And we just replaced them and we, you know, we eventually did, I think, figure out we just kind of like added a secondary check or something. But it's just another thing that can fail, basically. So that said, you know, the FT series are really good. Doesn't look like there's a lot of these in stock. One thing that is in stock is the, again, I haven't tried the mix linear although I'm curious to. But the CP-2102s, I found to be very good and reliable. I like these chips, you know, and I'm revising the CP-2104 to use them. They're not fully pink compatible with the CP-2104. They're really close, but they do need an extra resistor divider, which I think is what changed. I think what made them switch from the 04 to the 02 was probably something with the voltage detection, you know, maybe there was some risk of damage. And so, yeah, the CP-2102 is maybe a little bit more reliable, right? Cause it's like, these are installed in so many devices. But these are pretty good chips and they come in, I'll say they come in a different, couple of different flavors. This is the 20 pin. And they also come in, I think a 28 pin. This is the 28. And then I think they come in a 24. And the 24 is like the default, is the default maybe? I don't remember. But look at the data sheet. Yeah, there's the 20 and the 24 and the 28. And each one is of course a larger package, but it has more like control lines and LEDs and GPIO type things. So that said, I do like the SILabs ones and like the FTDI ones. Those have been the most reliable for me. And the ones that can do the highest bot rates, you know, flawlessly pretty much. Okay, that's a great search. Okay. Oh, can you pull up my Twitter page? Cause I was telling folks, so the black and white photos, behind the scenes stuff that we're doing, and just like art stuff, cause it's been 18 months of... This one? Yeah, I mean not doing art and more. So I'm going to go to your computer. Can you scroll up to the top? Go back to the top. Go back to the top, yeah. So if you wanted to see like what's going on at Adafruit or some past art stuff, it's all in black and white. And I don't do any text. I'm using Twitter in ways you're not supposed to do, like a good hacker does. Bad tweets. Yeah, and I'm like, you know, using it to show some of the things that goes on in a day-to-day basis at Adafruit and more. There's my desk that has hack on it, a Radio Shack sign. There's a trackball. Oh, look, trackball. Yeah, and more. And so you get a chance to see.  Yeah, and then here's Anil and Lamore. Is it a photo? And then, you know, we're around New York City and there's a pick-and-place machine. There's Central Park and there's called Little Island. So there's a lot. And this is, you know, just a few blocks from Adafruit. So you get a chance to see through my eyes all the shades of gray and more. All right. So that's a nice show, everybody. Thanks, everybody. Thank you so much. We'll be here next week. There might be a weekend where we're not here, but I'll talk to Lady Aida about that because we're gonna be out of town, but we'll see. Maybe we'll try to do a broadcast from somewhere else. We'll see how it goes.  And then special thanks to Arduino for shipping the thing. We bought it, don't worry. We didn't get anything from Ray. So we have 10 of these. I think we're gonna put them in the, the rest of them in the store to sell them at cost. Yeah. Because I don't know, you know, they said you can order them and I'm like, okay, well, I'll try to get them for the store and do that. So anyways, we'll see how it goes, but this goes to our collection of other Arduinos that we have throughout history, throughout time and space. Lots of things that's happened in Arduino land over the last 10 years. And really happy that we could be part of the community. And we are still and probably always gonna be producing the best type quality open source libraries. And one thing you can know for sure is if Adafrit does it, it's open source. All right, goodbye everybody. All right, thanks everybody. Later.