#avr Logs

May 07 2017

#avr Calendar

12:20 AM daey_ is now known as daey
02:01 AM Emil: LeoNerd: imho the datasheet is quite clear
05:54 AM antto: in xmega they use timer "types" to explain which timer does what
05:55 AM antto: so there's type0 type1 and type2
05:55 AM antto: it's still a bit confusing because iirc a timer of type0 can be split into two timers of type2
05:56 AM antto: but i think type0 and type1 are otherwise identical
05:56 AM antto: or something like that
08:06 AM JanC is now known as Guest4823
08:06 AM JanC_ is now known as JanC
10:11 AM daey_ is now known as daey
11:10 AM antto: https://www.pastebin.ca/3808846
11:12 AM antto: this is what i came up with, but it turns out there's one huge problem with it.. if i want to use this together with another class (which uses it to abstract the input/output) then that class must specify the exact instance (with the exact arguments)
11:12 AM antto: i thought i can just say FIFO* but nope
11:13 AM antto: using the typedef instead works tho
11:13 AM Tom_itx: dunno why you use class etc on µC anyway
11:14 AM antto: the code is huge and it turned into a mess
11:14 AM antto: encapsulation would help a lot IMO
11:15 AM antto: it's over 90KB so far
11:19 AM Tom_itx: make it smaller?
11:24 AM cehteh: the problem is C++
11:24 AM cehteh: and you know that volatile bloats shit massively and slows things down?
11:28 AM cehteh: in my code (C only) i separate the fifo from the io implementation, and when you use 'atomic' stuff then you dont need to declare things volatile (if done right)
11:28 AM antto: Tom_itx, inposhiburu
11:29 AM cehteh: for you :)
11:30 AM antto: cehteh, the code turned into a mess not because of C++
11:30 AM antto: i switched it to C++ only recently
11:30 AM cehteh: bad idea
11:31 AM antto: i really really find encapsulation very helpful
11:31 AM cehteh: and there are plent opportunits to make your code smaller, as i see
11:31 AM cehteh: i dont say you should abadon that
11:31 AM cehteh: i just say C++ is a complex mess and your code too
11:32 AM antto: the code being big is not a problem, as i have 248KB flash limit ;P~
11:32 AM antto: it just means it's a big mess to deal with
11:32 AM cehteh: but that means also its being a mess (too much code) and its getting slow
11:32 AM cehteh: yes
11:33 AM cehteh: just ugly designed/implemented
11:33 AM antto: no.. not all of the code is happening at the same time
11:33 AM cehteh: still its a mess
11:34 AM antto: yes, because in every .c file i have a ton of extern variable declarations
11:34 AM cehteh: and who is responsible for that if not you?
11:34 AM antto: i'm not saying someone else is
11:42 AM LeoNerd: Hmm.. Dilema. I'm putting an SH1106 OLED on a front panel, along with a PCF8574 to read some buttons. I could run them both on I²C for a total of 5 wires (power, ground, I²C*2, INT) but that means either a terribly-slow 100kHz display, or run the PCF technically out of spec at 400 whereas in practice it appears to run fine for me
11:42 AM LeoNerd: Oooor... I could run the OLED in SPI3 mode, giving a total of 8 wires because I have now to extend SPI up there as well, but solves the problem above.
11:44 AM Lambda_Aurigae: could go spi, use an spi port expander rather than i2c port expander.
11:44 AM Lambda_Aurigae: if this is a 1-off for yourself, go with the high speed i2c if it works.
11:45 AM Lambda_Aurigae: just need an inverter for the CS line and you don't need an extra one...when high one chip is selected, when low the other is selected.
01:09 PM ryan`c is now known as ryan-c
03:06 PM grafi is now known as Guest61335
03:06 PM Guest61335 is now known as grafi_
05:31 PM Lambda_Aurigae: There are two major products to come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.
05:33 PM Emil: hehe
06:33 PM Emil: https://emil.fi/jako/kuvat/2017-05-08_02-02-53_S67KhIc5.png
06:33 PM Emil: Becomes a bit pricey if I order from OSHPark
06:34 PM Emil: (31$)
06:35 PM Emil: Might still fucking do it, though
06:35 PM Emil: It does fit on a 10x10cm board so China would be better
06:35 PM specing: interactive Led Driver?
06:36 PM specing: mmmm VGS? what
06:36 PM specing: ah fets
06:36 PM Emil: Nah
06:36 PM Emil: Not fets
06:38 PM specing: IGBTs?
06:38 PM Emil: nah
06:38 PM specing: WHAT THEN!?!?!
06:39 PM Lambda_Aurigae: Variable Gain Synthesizer
06:39 PM Emil: It's a challenge
06:39 PM Emil: Can you figure it out before the time runs out
06:39 PM specing: Alright then
06:39 PM Lambda_Aurigae: do I care?
06:39 PM Emil: Tik tok
06:39 PM * specing gets the baton out
06:39 PM * specing starts smacking Emil with it
06:39 PM Emil: Wait wait wait we are all people here
06:40 PM Lambda_Aurigae: speak for yourself.
06:40 PM Emil: There's no reason to resort to violence
06:40 PM Lambda_Aurigae: there's every reason!
06:40 PM Lambda_Aurigae: violence is fun!
06:40 PM xentrac: when you win
06:41 PM Lambda_Aurigae: I just don't lose.
06:41 PM Lambda_Aurigae: I always play to win.
06:43 PM Emil: https://emil.fi/jako/kuvat/2017-05-08_02-13-07_3PME8O31.png
06:43 PM Emil: something is off
06:43 PM Emil: how the fuck could it be that cheap
06:43 PM Lambda_Aurigae: did you try dirtypcbs.com ?
06:44 PM specing: 15 eur? Sounds expensive
06:44 PM specing: lol shipping is 1/2 the cost
06:45 PM specing: or 3/4 in the case of faster one
06:52 PM Emil: Hmm, should I trust myself to order this
06:54 PM specing: Emil: ask r/flashlight for opinion
06:55 PM Emil: wtf? :D
06:55 PM specing: it is a LED driver, no?
07:02 PM Emil: yes
07:06 PM enhering: good night
07:06 PM Emil: Good night
07:06 PM Emil: Hmm
07:07 PM Emil: Given that oshpark shipping is free, they are not actuall much more expensive
07:14 PM Emil: welp
07:14 PM Emil: ordered
07:14 PM Emil: 30,75 usd it cost
07:15 PM specing: would have been 17 from china
07:15 PM specing: you fool
07:15 PM enhering: how much does shipping to us cost?
07:15 PM Emil: Might also order from China just for the heck of it
07:15 PM Emil: :D
07:16 PM enhering: pcbway was around 20 to ship to brazil
07:17 PM Emil: specing: that board is for driving WS2812B leds strips
07:17 PM Emil: V VCC, S Signal G Ground
07:19 PM LeoNerd: You've got a bit of silk-on-copper going on, on the rotary encoder
07:19 PM LeoNerd: If it's OSHpark they'll remove it, but not all fabs do
07:20 PM LeoNerd: Also - no component refs?
07:21 PM Emil: I mean, I could have gone all hot damn perfect on this board
07:21 PM Emil: but I didn't have the patience :D
11:57 PM rue_shop3: man I'm glad I can make my own baords
11:58 PM xentrac: because the turnarounds are shorter?
11:58 PM rue_shop3: and its 10c/square inch
11:59 PM rue_shop3: and now I have the cnc machines, havnt' tried using them for drilling yet
11:59 PM daey_ is now known as daey