#avr | Logs for 2015-11-21

Back
[08:52:39] <sebus> okay, time to ask for some questions
[08:52:53] <sebus> another weirdo - from hardware
[08:53:20] <sebus> I need to generate few clocks or switch between them :>
[08:53:45] <sebus> i mean, 1MHz, 1,75MHz, 1,7734 and 2MHz
[08:55:26] <sebus> any ideas how to resolve it without using AD9850 or other stuff like PLL chip?
[08:55:55] <cehteh> pwm out?
[08:55:59] <sebus> avr itself can do combination of few clocks depends on crystal
[08:56:27] <sebus> but if I get something that matches 1MHz and 2MHz, it won't match 1,75 or 1,7734
[08:56:51] <cehteh> how fast does your avr run?
[08:57:03] <sebus> cehteh umm.. 40 :-)
[08:57:08] <sebus> 40MHz*
[08:57:15] <cehteh> wtf :D
[08:57:28] <sebus> overclocked, but works
[08:57:40] <cehteh> why do you need overclocking?
[08:57:41] <sebus> ADC has some issues, but I won't use it :D
[08:57:56] <cehteh> anyway .. you can do pretty much with pwm
[08:58:23] <cehteh> just do some math to calculate the parameters
[08:59:27] <sebus> cehteh yes, i meant to use OCR in timer
[08:59:39] <cehteh> yes
[08:59:44] <sebus> btw http://s7.fmdx.pl/Sciaga_avr.ods I did make this one for comparision
[09:00:18] <sebus> can change crystal in $B$2 from list and ok
[09:00:43] <sebus> but I won't get all of the frequencies using one crystal by just dividing them
[09:01:13] <sebus> 1,7734 is 1/10 of typical PAL crystal used in some video chips
[09:01:17] <cehteh> even not with adjusting the TOP value for the counter?
[09:01:18] <Tom_itx> use a flux capacitor
[09:01:31] <cehteh> you need a square wave only, not pwm right?
[09:01:38] <sebus> just square
[09:01:40] <sebus> yes
[09:01:44] <sebus> for driving one audio chip
[09:01:48] <cehteh> and doesnt need perfectly square?
[09:02:07] <sebus> duty between 30-60% is ok
[09:02:31] <cehteh> i would think thats doable
[09:02:51] <cehteh> 1,7734 maybe not but 1.75 looks sane
[09:03:01] <sebus> as for ay-3-891x datasheet says minimum duty cycle is 30% or a bit more
[09:04:00] <cehteh> which timer clkdivs are available (which timer, what avr?)
[09:04:23] <sebus> mega32, timer0 used for systicks
[09:04:29] <sebus> ~200Hz
[09:07:37] <cehteh> so timer2 is available?
[09:07:51] <sebus> yes
[09:08:02] <sebus> on 16 bit and one 8 bit is available
[09:08:05] <sebus> one*
[09:08:40] <sebus> also
[09:09:06] <sebus> if you got that .ods doc, you can pick other crystals, but still I don't want to go below 32MHz
[09:09:47] <sebus> avr is also modifying RAM content on vga card (some crappy ISA trident 8800)
[09:12:32] <cehteh> ((40 / 32) * 256) / 180 = approx. 1.7777778
[09:12:36] <cehteh> close enough?
[09:13:37] <sebus> might be okay, notes will be a bit off :>
[09:16:14] <cehteh> with the 16bit counter you can prolly do even better
[09:17:17] <cehteh> ohno .. but timer0 and timer1 share the prescaler .. you may move your systicks then to timer2
[09:25:58] <sebus> so I must load every time value / reset counter to get that freq on output pin, right?
[09:40:45] <sebus> ahhh now i get it
[09:40:52] <sebus> u calculated this one for 32 MHz
[09:48:39] <cehteh> yeah
[09:49:25] <cehteh> you can play/investigate into the different pwm generation modes
[09:50:38] <cehteh> toggle at TOP, or use compare match at halfway .. whatever suits
[11:30:42] <Shavik> Anyone mind giving me feedback on some gerbers? http://gerblook.org/pcb/nisj6YHgDBW6f4F5tvZp5o#front
[11:31:00] <Shavik> I know the silk of c10 is off the edge. working on fixing that. Looking for various other problems
[11:38:52] <Lambda_Aurigae> well, it looks like a spaceship.
[11:41:20] <cehteh> wtf one trace on the bottom
[11:43:53] <cehteh> which is even avoidable
[11:47:23] <mango_> c1 has a trace hugging tight to an 'eye'
[11:47:35] <mango_> does your manufacturers design rules allow that (cheaply) ?
[11:50:15] <cehteh> that too
[11:51:51] <cehteh> and using only solder mounted micro USB sockets suck .. they eventually come off with the traces
[11:52:11] <cehteh> surface mounted
[11:52:19] <LeoNerd> Are there any with TTH mounting holes? I haven't seen any
[11:53:09] <cehteh> yes there are
[12:22:34] <cehteh> wow zigbee security is toast .. completely
[12:23:13] <Lambda_Aurigae> this surprises somehow?
[12:23:46] <cehteh> not much .. but their gigantic fuckup surprises
[12:24:39] <cehteh> sending the private key to anyone who kindly asks for it
[12:24:52] <Lambda_Aurigae> works for me.
[12:24:53] <cehteh> err symetric key
[12:24:55] <Yoduza> :O
[12:25:17] <cehteh> completely fucked up beyond repair .. within the protocoll spec
[12:26:03] <Yoduza> need avr antivirus for crc pc
[12:26:04] <Yoduza> :D
[12:26:22] <cehteh> http://cognosec.com/zigbee_exploited_8F_Ca9.pdf
[12:26:51] <Lambda_Aurigae> I have no zigbee devices here.
[12:26:59] <cehteh> roomba?
[12:27:05] <Lambda_Aurigae> nope.
[12:27:06] <antto> i don't believe in wireless
[12:27:19] <Lambda_Aurigae> have some older nrf 2.4ghz devices.
[12:27:47] <Yoduza> without anthena < 1 mile ?
[12:28:07] <Lambda_Aurigae> without external antenna, about 20 meters.
[12:28:49] <Lambda_Aurigae> has an SMT antenna on the board.
[12:28:53] <Yoduza> with external antenna > 1000 meters ?
[12:29:08] <Lambda_Aurigae> they have all the range I need.
[12:44:40] <Casper> hmmm
[12:44:44] <Casper> I wonder
[12:44:55] <Casper> I read that they use a zigbee for the power meter here...
[12:45:05] <Lambda_Aurigae> is possible.
[12:45:08] <Casper> ... I wonder if the encryption is based on it...
[12:45:20] <Casper> or if a second layer of encryption is available
[12:45:24] <Lambda_Aurigae> one of those "everybody uses it because it's secure" thingies.
[12:45:39] <Lambda_Aurigae> kinda like windows.
[12:46:11] <antto> packets flying around in a big radius in the air, secure?
[12:46:43] <Casper> I think in this case is more: we'll use it because it is accepted by the CRTC (for a peer to peer, not mesh network), is inexpensive and can be used in a mesh network
[12:50:33] <cehteh> with 'proper' encryption even wireless can be sufficiently secure
[12:50:55] <cehteh> but convinience or just stupidity kill the proper so often
[12:51:41] <Casper> and it's "annoying" that when you repauir something... you can't see that you did anything.... just replaced some bad cap on a computer... what you notice is that I undusted it.... a 30 seconds process...
[12:52:09] <Casper> yeah, proper encryption can make clear transmission secure enought for the millitary during war time
[12:52:32] <Casper> ... when you don't screw up the implementation (ex enigma))))))))))
[12:53:48] <Casper> enigma had 2 main weakness: first, a letter once encrypted can not be itself, so any key that would have produced the same letter can be eliminated... second weakness: known message
[12:54:10] <Casper> each morning they were sending a standardised form for weather
[12:55:08] <Casper> and many ended with "hail hitler" (sp?)
[12:55:29] <Casper> so they could reverse part of the key..
[12:55:29] <Lambda_Aurigae> heil
[12:56:50] <Casper> I wonder with modern technology how hard it would be to crack the code...
[12:59:01] <Casper> it's crazy when you think about it how some tiny details can actually make something good... broken...
[13:00:19] <Casper> would they had made so a letter can give itself... all the manual key breaking would have been most likelly not done, which would have made allan turner unable to do his machine...
[13:00:30] <Casper> or atleast make it way more complicated...
[13:06:25] <mango_> I think, with the same data now they had then enigma could be broken in a day
[13:06:30] <mango_> bloody computers
[13:12:53] <Snert> there was the human factor too.
[13:13:16] <Snert> Mr. EnigmaGuy forgot to change the code wheel one day too.
[13:13:46] <Snert> or was that the japanese purple?
[13:34:03] <Casper> mango_: 1 day is too long
[13:34:09] <Casper> the encryption changed daily
[13:35:36] <mango_> sure, you wouldnt have realtime data but youd be able to read past communiques well
[13:37:00] <Casper> useless
[13:37:43] <Casper> you want to know where they will attack and mostly: where the boats and submarines are
[13:37:57] <mango_> ok
[13:39:13] <Casper> but I wouln't havfe liked to be allan...
[13:39:25] <Casper> ... he basically had to decide who live and die
[13:39:50] <Casper> if he save the wrong people, the german would have known that the code was broken
[13:41:56] <DKordic> Casper: That was not his responsibility.
[13:42:04] <DKordic> (job)
[13:42:43] <Casper> DKordic: it was
[13:43:40] <Casper> he had to statistically figure out which had to let go and which could be acted uppon as to stay within the german tought of "our code is not broken, they just have luck"
[16:03:25] <Jartza> evening
[16:04:08] <Yoduza> hello
[16:43:14] <mango_> Is there any 'standard' or decent avr lcd library?
[16:43:48] <Jartza> depends of the LCD
[16:44:09] <Jartza> there are plenty
[17:19:45] <Xark> mango_: Adafruit has a GFX library that run on a bunch of LCDs. I modified it to be much more efficient (but compatible) -> https://hackaday.io/project/6038-pdqgfx-optimzed-avr-lcd-graphics
[18:18:13] <LeoNerd> Heh.. Amazon today thinks I want to buy a bulk bag of 2pF ceramic capacitor
[18:18:33] <LeoNerd> I'm not entirely sure why anyone would buy 2pF capacitors.... Surely the wires alone have more capacitance than that to them..?
[18:18:43] <LeoNerd> There'd literally be no point mounting that on veroboard
[18:31:42] <mango_> 2pf is a good place for decoupling caps
[18:32:07] <mango_> you can place them right on top of the vcc in pin of any and every logic circuit
[20:15:22] <Lambda_Aurigae> mango_, peter fleury has a nice lib for 16x2 text lcd.
[20:15:56] <LeoNerd> mango_: 2pF won't give you much decoupling...
[20:17:30] <Snert> ya know, on my test boards I know I should be srpinkling on some decouple caps.
[20:17:42] <Snert> but what valoe? .1uF?
[20:17:49] <Snert> oe .01uF ?
[20:18:09] <LeoNerd> 100nF per chip is reasonable
[20:18:25] <LeoNerd> I usually do 100nF on each chip, and a board-level 1 or 10u.. depends how much current in total
[20:18:58] <Snert> I'll get a buttload of 100nf cuz I have 1 and 10 already.
[20:19:28] <LeoNerd> I have a boxful of 100n 0603s
[20:19:45] <Snert> ok I'll consider that form factor too.
[20:20:14] <Snert> even if I'm not doing 0603 those still fit well on protoboards.
[20:21:04] <Snert> I just do hand solder not real SMD. At least not yet.
[20:21:47] <LeoNerd> I hand solder 0603s
[20:22:04] <LeoNerd> Actually one board I managed to hand-apply paste and heatgun it on
[20:22:15] <LeoNerd> Though I'm not quite sure it was worth my time to do that
[20:22:41] <Snert> yea. I'm looking at a heat iron for my weller wes51.
[20:23:30] <Snert> heat gun I mean.