#avr | Logs for 2016-07-08

Back
[07:17:28] <Emil> What crystal oscillator should I use for the atmega328pb?
[07:17:44] <Emil> Digikey gives me nothing with "low power crystal oscillator"
[07:22:07] <_ami_> Emil: u can use upto 20 MHz crystal osc.
[07:22:17] <_ami_> for m328p
[07:22:52] <Emil> _ami_: notice the pb
[07:28:26] <Lambda_Aurigae> low power crystal oscillator is not the same as a crystal.
[07:28:58] <Lambda_Aurigae> but, pretty much any crystal in the frequency range should work.
[07:30:16] <Emil> ah
[07:30:20] <Emil> Okay :D
[07:30:40] <Lambda_Aurigae> the low power crystal oscillator in the datasheet refers to the onboard oscillator that needs an external crystal.
[07:30:49] <Lambda_Aurigae> you should look for one that says parallel cut
[07:32:35] <Lambda_Aurigae> also, ceramic resonator is not the same as a crystal.
[07:32:47] <Lambda_Aurigae> I think the ceramics tend to be cheaper but they also drift more.
[07:34:41] <Lambda_Aurigae> and I find that 22pF caps work well for just about all crystals...ceramic resonators need a bit more precision and the manufacturer gives exact values...some ceramics are even 3 pin devices with the caps built in.
[07:35:16] <Lambda_Aurigae> aaand, time to go to worky.
[09:54:08] <NicoHood> how was the compile option for sections (code size improvement)
[10:00:25] <_ami_> NicoHood: write ur code in asm ;P
[10:01:58] <_ami_> NicoHood: use -Wl,--gc-sections
[10:02:09] <_ami_> it should reduce the code size by 5 %
[10:02:15] <_ami_> 50%
[10:06:17] <_ami_> Also if u want to reduce the size further, use -Wl,--relax
[10:07:01] <_ami_> i don't know why arduino ide does not use it. i use it and never faced any problem yet.
[10:12:24] <LeoNerd> -ffunction-sections is the one I find matters
[10:12:36] <LeoNerd> Without that, there's a program Ihave that builds too big for the target flash
[10:33:46] <_ami_> my Cflags: -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD
[10:33:58] <_ami_> linker flags: -w -Os -Wl,--relax -Wl,--gc-sections
[12:08:32] <inkjetunito> good evening
[12:19:16] <inkjetunito> with pullups enabled on digital inputs of a tiny, what is a reasonable resistor value for dragging the line low?
[12:20:06] <inkjetunito> in relation to the ~10 k internal pullup i guess
[12:21:16] <LeoNerd> You probably don't want to do that with a resistor then
[12:21:31] <LeoNerd> If you want a resistive pulldown, put that externally and don't use the internal pullup, then it won't matter
[12:23:45] <inkjetunito> i mean, i'm using mechanical buttons between an input and ground and will use a series resistor to avoid damage in case of pin misconfiguration
[12:23:59] <LeoNerd> Ohright
[12:24:12] <LeoNerd> I usually use 220R for that kind of thing if at 5V, or 100R at 3.3V
[12:24:41] <LeoNerd> At worst it allows about 3mA of current to flow, which is tiny and not going to break anything
[12:25:56] <inkjetunito> ok, so a few milliamps are ok
[12:26:40] <LeoNerd> Certainly I don't know of an AVR chip that can't source/sink at least 10mA, but that's a nice margin of safety
[12:27:00] <LeoNerd> I've seen other chips that are down in the 3 to 5mA range... e.g. I think the ESP{mumble} wifi chip
[12:28:00] <inkjetunito> yeah, being able to drive big leds directly is a nice feature
[12:28:06] <LeoNerd> Mmm
[12:28:20] <LeoNerd> Some of the newer chips now have "high current" drive support on the PWM output pins at least
[12:29:36] <inkjetunito> 8-bit or 32-bit range?
[12:29:52] <LeoNerd> tiny1632 I believe is one
[12:30:42] <LeoNerd> 1634
[12:31:57] <LeoNerd> Ahyes, here we go. PA5 PA6 PB3 PC0 have "asymmetric high-sink capacity". Those are the OCnx output pins
[12:36:32] <inkjetunito> hmm. bbl
[13:10:56] <inkjetunito> is there a formula for determining the appropriate caffeine dose for design and programming tasks?
[15:35:37] <inkjetunito> nvm. figured it out
[15:36:33] <bss36504> Was it just drink as much coffee as your body could handle, then drink one more cup?
[15:37:01] <inkjetunito> two less than that
[15:37:17] <bss36504> Oh ok
[15:37:20] <bss36504> good call
[15:41:53] <LeoNerd> fewer
[20:12:43] <Lambda_Aurigae> caffeine intake can not be properly calculated or calibrated until one chugs a bottle of Super Jolt Cola.
[21:08:32] <carabia> Lambda_Aurigae, I think they don't make it anymore. It tasted horrible.
[21:08:42] <carabia> Any jolt cola.
[22:01:16] <eszett> hmm
[22:01:44] <eszett> I just browsed Conrad for a simple 1206 diode, and all i can find is one for 0,3€, which isnt even in stock, is this a joke?
[22:24:44] <carabia> eszett, no. smd diodes aren't usually in those packages.
[22:28:06] <carabia> there's a reason the SOD-package exists.
[22:28:14] <carabia> well, packages rather.
[22:36:24] <eszett> well but the price is ridiculus
[22:36:26] <eszett> https://www.reichelt.de/SB-SKE-4F-Dioden/TS-4148-1206/3/index.html?ACTION=3&GROUPID=2991&ARTICLE=95430&gclid=COne0qKw5c0CFfMV0wod8-UCcg
[22:36:42] <eszett> almost ten times lower price at reichelt
[22:37:57] <eszett> carbia: which SOD package resembles in size approx. 1206?
[22:41:08] <carabia> off the top of my head, no idea. Shouldn't be too hard to figure it out
[22:41:16] <eszett> ye..
[22:55:08] <eszett> what i found here https://www.amazon.de/200Pcs-SOD-123-1N4148-SMD-Schaltung-Diode/dp/B01EZZLDWY#detail_bullets_id seems to be Minimelf (judging from the picture) package. However, the product description says "SOD-123"
[22:55:15] <eszett> whats that?