#avr Logs

Mar 24 2022

#avr Calendar

12:14 AM WormFood: yes, that is true
12:23 AM WormFood: rue_bed2, how does who know the memory size of what?
12:23 AM WormFood: Phantom, it's funny you sould mention xyz modem, as I'm currently seeing how hard it'd be to implement zmodem.
12:23 AM Phantom: WormFood: I was thinking of simply abusing the resend protocol to confirm that the data was received intact
12:23 AM WormFood: What I loved about zmodem, is the fact that if the terminal program you're using is worth a damn, it will automatically download whatever it sent via zmodem, with any additional intervention from the user.
12:23 AM WormFood: resend protocol?
12:23 AM Phantom: NAK the packet, compare it with the previous packet, flash if identical, ACK it
12:23 AM WormFood: you mean, not calculate the crc?
12:23 AM Phantom: iirc zmodem have a mean to resend the packet if the receiver NAK it
12:23 AM WormFood: they all do that
12:23 AM Phantom: so, I was thinking to not do CRC of any sort, but just abuse that resend as a mean to make sure that the data is intact
12:23 AM WormFood: well, that really isn't an assurance
12:23 AM WormFood: and then, how do you compare them, without having 2 copies?
12:23 AM Phantom: you do have 2 copy
12:24 AM Phantom: must have been it
12:29 AM WormFood: if I remember correctly, xmodem is 128, and later 1024, but only those size. So, if your file is not a multiple of whichever it's using, then that last block is padded to make up the size difference.
12:29 AM WormFood: For my use, tha won't matter, because I'll always be on a 128 or 1k byte boundary
12:30 AM WormFood: Y modem, increased the block size, and fixed the las packet problem. I forget, but I want to say the packet size is 1k
12:31 AM WormFood: Z modem, supports some really nice features, like being able to send you the filename, and the file size, before you even start downloading it. And it uses a sliding window block size. So it starts off low, and as your get many ACKs, it will ramp up the packet size.
12:31 AM WormFood: so, zmodem may start off at 128 or 256 bytes per block, but it can increase it on the fly to much bigger sizes
12:32 AM WormFood: I remember, I had one customer, sending files from usa to uk, over a 33.6k modem. It'd start off smooth, then get really slow, then slowly ramp back up the speed, then boom, super slow again. I fixed the problem by reducing their max speed slightly, and configuring zmodem to not increase it to big packet sizes.
12:33 AM WormFood: they'd hit a bit of static, and it'd trash the block, and because it was really big, it was really slow to send it again
12:33 AM WormFood: so, configure it to a max size, of maybe 1k...more overhead, but when they hit a bad spot, and they did every call, it made it much faster to recover.
12:34 AM WormFood: so, I guess I have more experience with xyz modem protocols, than most people.
12:34 AM WormFood: also, if you're interested, I found a zmodem library for the avr.
12:34 AM WormFood: I'm taking a look at it now.
12:34 AM Phantom: those programmers/engineers back then were so much better than today's ones...
12:35 AM WormFood: What makes you think that?
12:37 AM Phantom: today... they waste so much ressources and just plainly don't care about anything
12:38 AM Phantom: back then, they found real solutions to the problem. Now, they just patch it up with chewing gum
12:40 AM Phantom: fortunatelly, most are not as... idiots like some of the previous engineers at work were...
12:41 AM Phantom: you should see what we discover from time to time...
12:43 AM WormFood: The same could be said of many fields
12:45 AM Phantom: yeah
01:01 AM WormFood: Another thing I forgot about zmodem, is the fact it does not need ACKs
01:02 AM WormFood: It will send the next packet, without getting an ACK or NAK. It assumes it sent it ok, if the other end does not NAK it.
01:03 AM Phantom: iirc, zmodem also have compression capability
01:05 AM WormFood: It does not
01:05 AM WormFood: zmodem was created in the mid 80s
01:05 AM WormFood: generally, on the fly compression was done in hardware, and some modems did support compression
01:11 AM WormFood: You're right Phantom...at least to a degree. You're right about remembering it does compression....but, that is not the original zmodem, but the later zmodem-90, and it only did run length compression, which I don't know if you know that well or not, but it's not very good compression. It's good if you have long runs of the same characters, but for random data, it does nothing.
01:12 AM Phantom: I forgot the details, but I know that the compression was mediocre at best
01:12 AM Phantom: but hey, any gain is a good gain at that speed
01:13 AM WormFood: it's not really compression per se
01:13 AM WormFood: I first encountered it, when I was taking apart my games, to change the levels in them. I had no idea what it was called at the time, but I remembered how it worked.
01:14 AM WormFood: Later, I wrote an AutoDesk Animator Studio .fli (flicker) viewer, and it also uses bytewise runlength compression, and for those types of things, it's actually quite good in many cases.
01:14 AM WormFood: But, when I was making that fli viewer, I discovered what it was called.
01:17 AM WormFood: I think I'm going to skip zmodem, and just focus on xmodem. It's slower, but fuck it, I don't care. I want reliable. It's fairly fast at 230Kbps
01:17 AM WormFood: zmodem also uses a 32-bit CRC....ugh
01:18 AM Phantom: yeah it's not like you were transfering a few megabytes at 300 baud :D
01:20 AM WormFood: I remember, years ago, it taking an hour, to download an audio clip, that was one minute long.
01:21 AM Phantom: I remember back then, downloading a single mp3 file was taking a bit over 20 minutes
01:21 AM Phantom: ... I download full movies in 1080p in... 4
01:23 AM rue_mohr: huh, I used to leave mp3's downloading over hours, how is that
01:24 AM rue_mohr: I remember waking up and freaking cause I left it connected, use up all my ISP minutes
01:24 AM rue_mohr: i dozed off waiting for downloads more than once
01:24 AM Phantom: I was unlimited
01:24 AM rue_mohr: when i got a high speed connection at my shop I would dial into it instead
01:24 AM Phantom: but they didn't liked 14 hours in a row, so had to reconnect every 12 hours
01:25 AM rue_mohr: I had a keepalive system too
01:25 AM rue_mohr: hehe
01:25 AM rue_mohr: my own worst enemy
01:25 AM Phantom: I remember trying to download diablo 1 demo
01:25 AM Phantom: 49.9MB iirc
01:25 AM Phantom: just shy of 50
01:25 AM rue_mohr: what abotu the quake demo?
01:25 AM Phantom: 12 fricking hours
01:25 AM Phantom: and...
01:25 AM Phantom: my cousin took the phone at 95% done....
01:25 AM Phantom: ... twic
01:25 AM Phantom: e
01:26 AM rue_mohr: hahah
01:26 AM rue_mohr: was that a resumable or ?
01:26 AM Phantom: that is when I discovered getright, a download manager with resume capability
01:26 AM rue_mohr: heh
01:26 AM Phantom: browsers did not supported resume back then
01:26 AM rue_mohr: I recall that being the diff between ftp and http downloads
01:27 AM Phantom: sadly, ftp download was not common
01:27 AM rue_mohr: oh I remember ftpsearch
01:27 AM rue_mohr: wow that was awesome
01:27 AM rue_mohr: what file would you like today?
01:27 AM rue_mohr: HERE IT IS!
01:28 AM rue_mohr: ok, html templating in javascript...
03:02 AM WormFood: woot! I got my AVR running at 921.6Kbps, and it seems to be reliable.
05:00 AM specing_ is now known as specing
01:06 PM execi: heya. this isn't an *avr* question per se, but i'm not sure mcp's arm line has a relevant channel. I'm confused about the atsamc21e16 datasheet ( https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/SAM-C20-C21-Family-Data-Sheet-DS60001479J.pdf ) section 36.6.2.5.3, the TCC waveform MFRQ. It says "...WO[0] toggles..." does this mean the MFRQ is only usable on the WO[0]
01:06 PM execi: pin(s)? The TCC section outlines something called "OTMX" or "output matrix" which suggests the signals can be rerouted, however I'm not sure if it's applicable here and would appreciate any help in deciphering it
01:37 PM WormFood: execi, do you have the ability to actually test it out? That'd be the easiest way to find out for sure.
01:39 PM WormFood: I would read it the same way you said it. It would appear that function is only available on that pin.
01:41 PM WormFood: as far as any output matrix goes, as long as you don't enable that feature, then it shouldn't come into play
01:45 PM execi: WormFood: thanks for taking a look! however, i'm actually interested in whether it can be rerouted as i'm IO constrained and would actually need TCC0/WO[1] pin for the output. I can test it for sure, and of course that's the most surefire way to go. I was just wondering whether I'm missing something really obvious
01:45 PM McDonaldsWiFi is now known as WiFi
01:47 PM WiFi is now known as PublicWiFi
01:47 PM PublicWiFi is now known as Maccas
01:49 PM Maccas is now known as PublicWiFi
01:50 PM WormFood: execi, I'd like to suggest, when you ask your original question, also say what you're ultimately trying to accomplish, so people answering can know which way to go when there is a direction. If that function is restricted to that pin, and you need it, then the output matrix is the next place to look, to see if you can accomplish your goal
01:51 PM WormFood: Also, sometimes by saying your design constraints, someone may have a different approach, that would solve your problem. Many times we get fixated on a particular way to do something, and forget, or overlook another way, that would actually be better.
01:54 PM WormFood: anyways, I don't want that to come off sounding the wrong way. And I'm gonna need to take off in a few minutes.
01:56 PM WormFood: Good luck with it. I don't have any experience with the output matrix stuff, and I have no idea what your design requirements are, so I'm not even going to look at it :P
01:57 PM WormFood: That is why I said those suggestions. If you had given me more information, I could have looked a little deeper, and maybe have a suggestion for you.
01:57 PM execi: the idea is is a square wave output with a variable frequency, <500 hz. duty cycle is not really a concern and MFRQ seemed like the simplest solution to this
01:57 PM execi: WormFood: with all due respect, i got the point already
01:57 PM WormFood: why would frequency be important, but not duty cycle?
01:58 PM WormFood: Sorry, gotta split. I'll be back in an hour or so, I expect.
01:58 PM execi: because the device it's driving is only triggered on one edge
02:27 PM execi: that's to say, this is PFM. 500 hz is a bit of an underestimation, it's a bit closer to <= 1 kHz, but that's neither here or there really
05:00 PM specing_ is now known as specing
09:31 PM WormFood: Does anyone have a preferred source for electronics parts? (I ask this question from a North American perspective) My preferred source was just to walk to Huaqiangbei, and buy whatever I needed....I miss that place....but I can't walk 1/2 way around the world
09:32 PM qu1j0t3: i use digikey mostly
09:32 PM qu1j0t3: mouser occasionally
09:32 PM qu1j0t3: Sphere Research, BC, occasionally
09:33 PM WormFood: any comments about them?
09:34 PM qu1j0t3: um, digikey is very fast? both mouser and digikey have free shipping after CAD $100
09:34 PM qu1j0t3: customer service has been helpful
09:34 PM WormFood: I've bought from digikey, and Jameco in the past...and I want to say there was one other place...but, that was so long ago, one of my last orders included rs-422 tranceiver ICs
09:35 PM qu1j0t3: yeah i know of jameco but would probably only order as a last resort
09:35 PM WormFood: great. I'm glad to hear they're still doing a good job
09:35 PM qu1j0t3: theyre probably great but it'd be int'l postage
09:35 PM WormFood: That's cool
09:35 PM qu1j0t3: yes digikey are super efficient
09:35 PM WormFood: I'm in usa...aren't they in usa too?
09:35 PM qu1j0t3: i mean for me. (canada)
09:36 PM qu1j0t3: digikey has a warehouse in canada i guess so it's fast and cheap
09:36 PM WormFood: Ahhh...I see what you mean there.
09:36 PM WormFood: I still have some thick digikey catalogs from many years ago (1980s)
09:37 PM WormFood: And it'd fun to flip through them, and say "damn! I wished I could buy that at that price right now!"
09:38 PM WormFood: It's been over 15 years since I've ordered parts online. Things change, so I wanted to see if there was something I was missing out on, after being out of that area of the industry for so long.
09:39 PM WormFood: For 10 years, I've lived less than an hour away from the world's largest electronics market. And prices are cheap, or sometimes free. I'm not joking. I go to get some 1n914 diodes, and they ask how many I want, and I say 10-20, and they give me like 100 of them, and say they're free.
09:41 PM WormFood: then they tell me, they can't sell them, because they're slightly tarnished, so I get em for free....a quick run over steel wool, and they're good as new. And many of those places are used to selling 1000s at a time, so if you ask for 5 or 10 of something, they don't jack up the price.