#avr | Logs for 2016-03-31

Back
[00:52:58] <eszett> cehteh, too bad then..
[00:52:59] <eszett> bbl
[02:49:06] <eszett> My operating voltage is 5.12v, and when I make a pin high, it's 3.88v, is that normal?
[02:55:46] <cehteh> do you have a usable multimeter meanwhile?
[02:56:03] <cehteh> if not .. then thats normal :D
[02:59:39] <eszett> not yet
[02:59:51] <eszett> my neighbour is in the hospital coz of cancer..
[03:00:42] <eszett> is there a chart in datasheet that gives me the output voltage of GPIOs?
[03:00:52] <eszett> depending on whatever factors..
[03:02:05] <cehteh> i am quite sure it should be close to 5V .. little drop because of the drivers
[03:02:24] <cehteh> *but* you cant measure that with your crappy stone-age multimeter
[03:06:38] <eszett> probably, right, i better pause all my testing until i have a better DMM at hand
[03:06:58] <Palsson> cehteh maybe chemotherapy is part of the solution.
[03:07:07] <Palsson> For your neighbour that is ofc
[03:07:32] <cehteh> its eszett neighbour not mine
[03:08:00] <Palsson> Oh, your names got mixed up in my head. soz
[03:08:59] <eszett> chemotherapy is a very doubful treatment. As far as i experience it, people die in many cases with chemo, and if they survive, they would perhaps survive without chemo as well. The effect of chemo is doubtful. Even more doubtful when looking at the expenses (100 000$ and above for a treatment)
[03:11:21] <cehteh> really depends, a lot people are saved by it
[03:11:38] <cehteh> but last year i lost a friend too because if chemotherapy complications
[03:11:59] <cehteh> no one can forsee the future "what if..."
[03:12:05] <Palsson> eszett it's insane that it costs that much, i live in sweden and we get almost everything covered.
[03:12:31] <cehteh> Palsson: getting it covered means still it has to be paied
[03:13:13] <Palsson> cehteh yeah but it sucks that people might not afford it in some countries that don't cover those costs.
[03:13:23] <Palsson> I would never be able to get my hands on those kinds of money.
[03:14:34] <WormFood> My step-dad had chemotherapy, and they gave him about a 10% chance that he'd be cured, and 90% chance he'd be dead within the year. He made it about 9-10 months.
[03:14:55] <eszett> yes, of course i dont want to do the mistake speaking up in a too general manner. it depends, but i think the efficacy of chemo has to be reviewed and verified in a higher degree
[03:16:59] <chipsMonstret> My sister was on chemo a couple of years ago, got a full recovery. But then again, she was young, I'm guessing the body is more likely to be able to handle that kind of strain then.
[03:17:02] <eszett> in other words, a more critical view could be usefull. for example many patients have a exaggerated faith into chemo, leaving out other alternative treatments: "i dont need alternative treatment, i do what the doctor says, that is chemo"
[03:19:02] <chipsMonstret> It is still one of the most effective alternatives tho
[03:20:30] <eszett> chips: well, one reason my neighbour is in trouble is, that he had presymptoms of cancer, they were removed, and the doctor said "ok, done, come back for a aftercheck in 1 year". He did that. Then thhe doctor said "alright, now there is no concern anymore. And he gave no further appointment for a aftercheck. but after 2,5 years the cancer came back in final stage. If my neighbour would have attended
[03:20:31] <eszett> a body check every halfyear, he wouldnt be in that trouble now
[03:21:37] <eszett> its a blunder by the doctor, that he suggested "everything fine now"
[03:21:59] <eszett> and to call it "blunder" is politely spoken
[03:22:42] <eszett> so I wish your sister all the best, and that she doesnt trust doctors, and goes for a body check as frequent as reasonable, and not "come back in 3 years"
[03:23:12] <eszett> ok my english is declining, it is too late.. cu later
[06:51:09] <anton02> if you use avr studio and import the arduino library and then begin coding using plain avr C as well as a couple of arduino libraries, is it possible that imcompatibilities between your plain C and the arduino functions you use could arise?
[06:52:16] <Tom_itx> could?
[06:52:20] <Tom_itx> will...
[06:53:58] <anton02> so if doing this then I guess you must be careful to ONLY use the arduino functions and never change any of the atmegas register values manually
[06:54:32] <twnqx`> i'd rather do the opposite and scrap arduino...
[06:54:56] <LeoNerd> Arduino tries hard to shield you from the actual hardware, meaning you don't really know what registers it's going to touch and when
[06:55:00] <LeoNerd> So best to avoid it entirely
[06:55:12] <LeoNerd> The one time I ended up using it anyway, was when I needed USB-HID in a hurry
[06:55:33] <LeoNerd> Hrm that reminds me. Now I'm not in a hurry I should go rewrite that properly.
[06:57:17] <anton02> you know what'd be really nice? paying a few extra bucks and getting a 200mhz ARM chip and let those extra megahertz take care of all that extra arduino overhead.
[06:57:44] <LeoNerd> Eh.. it's more the idea of arduino that I dislike
[06:58:18] <LeoNerd> It's Duplo. It's deliberately cut-down to absolute minimal... it hides things
[06:58:45] <LeoNerd> It's not really a "stepping stone" as it's so much a walled garden it's hard to step outside into the real world again
[06:59:02] <anton02> what do you think of TI's ARM processors versus atmel's?
[06:59:27] <LeoNerd> I haven't really looked at them. I've not done any ARM stuff
[06:59:54] <Lambda_Aurigae> arm is arm is arm...just different fingers connected at the end.
[07:01:33] <anton02> an atmega 20mhz RISC processor cost about $5. TI's ARM processor costs $10 and runs at 200mhz. so you get way more bang for buck
[07:01:56] <LeoNerd> Sure. I'm aware they're faster. :)
[07:02:23] <LeoNerd> They're also bigger, more expensive, require more tooling steps, more code to achieve things, and so far I've not needed to go anywhere near that level of performance
[07:02:50] <LeoNerd> Right now I'm using an ATtiny84 to make three LEDs flicker in some sort of simulated fire effect
[07:02:54] <LeoNerd> I don't need an ARM for that
[07:03:26] <Lambda_Aurigae> each processor set has its uses.
[07:03:47] <Lambda_Aurigae> yes, you can get high speed arm, even multiple core multiple GHz arm processors.
[07:04:01] <Lambda_Aurigae> and you can flash an LED really fast with those.
[07:04:24] <Lambda_Aurigae> I still like small 8bit processors for things here.
[07:04:48] <Lambda_Aurigae> and work with low end 32bit pic processors as well for a next step up.
[07:05:25] <Lambda_Aurigae> for anything more than I can get out of those I go with an rPI or full x86 PC.
[07:06:11] <LeoNerd> Yah.. I just have trouble seeing what I'd be doing that would be so big as not to fit on even a 20MHz ATmega w/ 8Ki of RAM, but for which a full PC attachment would be "overkill"..
[07:07:38] <anton02> 32bit stuff I guess. im sure there's plenty of things where you could benefit from floating point calculations as well as the mobility and size of an ARM
[07:07:59] <Lambda_Aurigae> anton02, generally, if I need more power then I use a small microcontroller to make an interface to a faster device like a PC or even an old cellphone.
[07:08:27] <LeoNerd> Yup, that. :)
[07:08:34] <Lambda_Aurigae> if I need high speed floating point, I go with a full computer.
[07:08:51] <twnqx`> given that bloody ARMs come in 70ct prices
[07:08:54] <Lambda_Aurigae> I'm not building a gps processor from scratch on an 8bit micro,,,although it is doable.
[07:09:05] <twnqx`> whereas atmegas are daaaaaamn expensive in comparison...
[07:09:27] <twnqx`> for a fraction of clock, bit width, flash, and ram...
[07:09:30] <Lambda_Aurigae> twnqx`, but arm requires me to go surface mount.
[07:09:36] <twnqx`> what
[07:09:39] <anton02> maybe you way for the highly legible datasheets moreso than the hardware itself
[07:09:42] <Lambda_Aurigae> where avr generally doesn't, for the avr chips I play with.
[07:09:44] <twnqx`> you still do through hole?
[07:09:48] <twnqx`> wow.
[07:09:49] <Lambda_Aurigae> of course.
[07:09:52] <LeoNerd> The most expensive part of the ARM is my having to learn the entirity of it; the chip, the programming tooling, ...
[07:09:59] <Lambda_Aurigae> even do through hole with pic32.
[07:10:00] <twnqx`> the avrs i use are exclusively SMT
[07:10:05] <anton02> pay i mean
[07:10:22] <twnqx`> anton02: that depends on the chip
[07:10:34] <LeoNerd> Heh.. yes; the newest and most interesting AVRs don't come in DIP form any more.. ATmega328PB, ATmega32U4, ATtiny841, ATtiny1623,...
[07:10:38] <twnqx`> but all the NXP LPC* have open datasheets for the lower end m0 cores
[07:10:55] <twnqx`> also, NXP has DIL arms.
[07:11:11] <Lambda_Aurigae> twnqx`, yes,,,very small ones.
[07:11:12] <LeoNerd> The 810 for example
[07:11:16] <LeoNerd> That crazy 8pin thing
[07:11:44] <LeoNerd> I will say one thing in its favour; it does have an IO peripheral crossbar switch. ATMEL TAKE NOTE!
[07:11:50] <anton02> whats the difference between ATmega328PB and ATmega328P
[07:11:51] <Lambda_Aurigae> hehe.
[07:12:00] <Lambda_Aurigae> anton02, added peripherals mostly.
[07:12:17] <Lambda_Aurigae> pic32mx270f256b has a crossbar LeoNerd !
[07:12:40] <Lambda_Aurigae> 50MHz with cpu cache and hardware usb in a dip package even!
[07:12:40] <anton02> whats a perpipheral in this context?
[07:12:50] <twnqx`> well, personally, i don't do through-hole any more, unless i have a VERY compelling reason
[07:12:58] <Lambda_Aurigae> peripheral is something not part of the cpu....i2c, spi, usart, usb, etc.
[07:13:02] <LeoNerd> Lambda_Aurigae: Yah. Atmels don't. :(
[07:13:13] <Lambda_Aurigae> LeoNerd, yeah..they don't have usb in a dip package either.
[07:13:14] <twnqx`> like... i REALLY want some specific component that ONLY comes in through-hole.
[07:13:21] <Lambda_Aurigae> maybe that will change with the buyout though.
[07:13:23] <LeoNerd> anton02: The PB has five (seriously count them five) timers, two SPIs, two I2Cs, two UARTs,..
[07:13:24] <anton02> Lambda_Aurigae, well it doesn't have more SPI or USB either.
[07:13:42] <anton02> oh, so just extra timers
[07:13:52] <LeoNerd> and other peripherals
[07:13:53] <twnqx`> i don't really think chip makers care about hobbyists
[07:13:59] <Lambda_Aurigae> anton02, the atmega32pb doesn't have usb at all..but it does double the spi, i2c, and usart ports.
[07:14:00] <twnqx`> and the industry doesn't want through-hole
[07:14:12] <LeoNerd> Also youknow those two really weird analog-only pins of ADC6/ADC7? They've been given digital IOs too, on a new PORTE
[07:14:18] <anton02> Lambda_Aurigae, nah, spi is the same for both
[07:14:45] <LeoNerd> Oooh.. Yes; I remember now
[07:14:57] <LeoNerd> The chip has two actual UARTs, but the SPI and I²C modules are just moveable
[07:15:09] <Lambda_Aurigae> ok....
[07:15:13] <LeoNerd> The chip still doesn't have a full crossbar, but some peripherals can be moved to *an* alternate location
[07:15:22] <Lambda_Aurigae> the biggest difference is a change in device signature.
[07:16:15] <Lambda_Aurigae> http://www.atmel.com/Images/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_Application%20Note_AT15007.pdf
[07:17:10] <Lambda_Aurigae> according to that it does have additional spi and twi interfaces.
[07:17:15] <liwakura> uhm
[07:17:23] <LeoNerd> I still want Atmel to do a lot better with documenting the chips, in particular chip *differences*
[07:17:26] <liwakura> is it atmega32pb or 328p ?
[07:18:07] <LeoNerd> It's all very well to have a ~300 page datasheet that copies all the pages, but what I want also is a document that just says "So here's how *an* AVR UART unit version 1 works", and then the mega328P can just say one line saying "Yup, this chip has a UART v1"
[07:18:18] <LeoNerd> And then they can document the v2 UART, and so on...
[07:18:31] <Lambda_Aurigae> LeoNerd, that's how microchip does the pic chips.
[07:18:33] <LeoNerd> I hate having to re-read 50 pages of PDF to discover that "ohyes, this is the same UART unit that I know"
[07:18:42] <liwakura> agree
[07:18:44] <Lambda_Aurigae> 54 documents currently for the pic32mx series.
[07:18:57] <LeoNerd> UARTs, SPI, I²C aren't so bad.. The absolute worst thing in my opinion is timers
[07:19:14] <Lambda_Aurigae> yeah,,they keep futzing with timers and screwing things up.
[07:19:24] <Lambda_Aurigae> anyhoo,,,time to go to work and complain about xerox for a few hours.
[07:19:26] <LeoNerd> I swear for every single chip, Atmel rolls some dice and fills in a 17-point character stats sheet to design every timer
[07:20:06] <LeoNerd> 8 or 16bit? Can it do async from the PLL? ICP? Can it do CTC to an arbitrary value? Fast PWM? Phase-corrected PWM? Does it have a third OC unit? Does it have deadtime generation units?
[07:21:18] <anton02> Lambda_Aurigae, boy am i glad i came here. I was just about to make a PCB that relied on the fact that 328P has 2 SPIs
[07:21:27] <LeoNerd> *grin*
[07:21:36] <LeoNerd> I can't imagine a situation you'd need two SPI units
[07:21:44] <LeoNerd> It's a bus.
[07:22:00] <twnqx`> for slaves that don't have chip select
[07:22:09] <LeoNerd> That's what a 74HCT1G125 is for
[07:22:21] <LeoNerd> Stick a '1G125 as a gate on the slave's SCK line
[07:22:22] <anton02> LeoNerd, what is a SPI 'unit'?
[07:22:30] <twnqx`> the peripheral on the chip
[07:22:31] <LeoNerd> Peripheral. Module. Thingy
[07:22:46] <twnqx`> anton02: though i admit i kinda think leonerd is right
[07:22:55] <LeoNerd> "SPI chips that don't have a chip select" <== don't exist. If they don't have an SS pin they're not SPI
[07:23:02] <LeoNerd> They're just serial clocked shift registers
[07:23:08] <twnqx`> well, there are enough protocols that are close enough
[07:23:35] <LeoNerd> Hell, I don't call a thing an SPI-compatible chip unless it can hiZ its serial output pin when deselected YES 74'165 I AM LOOKING AT YOU
[07:23:57] <anton02> well I'm going to be connecting an RF module and a matrix LED display to a single microcontroller. Both of these devices will be connecting to it via SPI. Do i need two SPI units?
[07:24:06] <twnqx> no
[07:24:18] <LeoNerd> No. Each chip likely has an SS pin, yes?
[07:24:25] <twnqx> you need one SPI unit, and two GPIOs to select the chip you weant to talk to
[07:24:36] <LeoNerd> Randomly guessing: max7219 (or 7221), and nRF24L01
[07:24:57] <anton02> LeoNerd, what is an SS pin?
[07:25:08] <LeoNerd> It might be called CS or something.. terminlogy varies
[07:25:19] <LeoNerd> "slave select" or "chip select" or "chip enable".. something like that
[07:25:22] <anton02> ill go check
[07:25:31] <LeoNerd> What chips are these?
[07:27:27] <anton02> LeoNerd, page 63 of this pdf doesn't have such a pin https://www.sparkfun.com/datasheets/Wireless/General/RFM22B.pdf
[07:28:36] <LeoNerd> " A standard 4-pin SPI bus is used to communicate with an
[07:28:37] <LeoNerd> external microcontroller"
[07:28:48] <LeoNerd> nSEL
[07:29:36] <LeoNerd> In this chip it's called nSEL, short for "not SELect". As is usual in SPI devices, the SS pin is active-low
[07:29:40] <LeoNerd> Hence the leading n
[07:30:19] <LeoNerd> Nordic use the notation CSN; Chip Select (negated)... most sensible people put an overbar on it. But that's harder to type on IRC ;)
[07:31:10] <anton02> oh, ok, thanks
[07:31:24] <anton02> the other device is this http://cdn.shopify.com/s/files/1/0045/8932/files/DMDCON_DMDConnector.pdf?100730
[07:32:21] <LeoNerd> It's even labeled it SS for you there
[07:34:56] <anton02> so would i connect both of those device pins to the same pin on the atmega?
[07:35:26] <LeoNerd> No, different pins. That's the point
[07:35:47] <LeoNerd> Each SPI slave has a "select" pin, that you wire /individually/ to the MCU, so it can select each device by pulling that device's select pin low
[07:36:04] <LeoNerd> Then that device alone is using the SPI bus (SCK/MOSI/MISO) and the others all ignore it
[07:36:47] <anton02> theres only one SS on the 328p though
[07:37:09] <LeoNerd> That doesn't matter. The 328P's SS pin is for when you're using it as an SPI slave
[07:37:37] <LeoNerd> It just wants to be any sort of digital output, you're just pulling it low to talk and then putting it high at the end. Literally any PB, PC or PD pin will suffice
[07:38:09] <LeoNerd> Especially on the 328P, I find I'm rarely using all (or even any) of the analog inputs, so I tend to put SS pins up on the PC pins
[07:38:43] <LeoNerd> It keeps them out of the way of the PD and PB areas, which tend to have more useful peripherals that I might actually be using
[07:42:42] <anton02> by the way, 328p only has 2 SPIs if you're using USART MSPIM
[07:43:19] <LeoNerd> Yes.. we were discussing the 328PB above.
[07:43:29] <LeoNerd> That's the "new in the past couple of months" update to the 328P
[07:44:38] <anton02> do you think it would be problematic to use MSPIM mode for these two devices?
[07:45:06] <LeoNerd> I think it woudl be best just to use the SPI unit like it's supposed. :)
[07:45:29] <anton02> so you think I should go with 328PB instead?
[07:45:47] <LeoNerd> No.. the 328P is fine
[07:45:49] <LeoNerd> Seriously.
[07:46:12] <LeoNerd> One SPI bus. Two GPIO pins to control the SS lines. You're all set
[07:46:51] <anton02> oh, i got mixed up with terminology
[07:47:05] <anton02> you set a register bit to change from MSPIM mode to SPI mode
[07:47:16] <LeoNerd> Yes. Ignore that. It's unrelated
[07:47:41] <anton02> I'll still need to do it since the default mode is MSPIM
[07:48:49] <LeoNerd> I think you're overcomplicatign this by getting confused
[07:50:48] <LeoNerd> MSPIM ("Master SPI mode") is a mode bit of the USART, to turn the USART module into a sortof second SPI unit. You don't need that. It's also unrelated to the main SPI unit
[07:51:23] <LeoNerd> That's occasionally useful if you want to do high-speed data streaming from one SPI device directly to another via the MCU, and you don't want to be buffering data inbetween times.
[07:51:35] <LeoNerd> But it's really rare to need that.. I've never seen it actually done
[07:52:06] <LeoNerd> Normally you can get away just fine with a single shared SPI bus on the main SPI unit, and as many GPIO pins as you need to connect one per slave
[07:54:49] <anton02> LeoNerd, do i connect RX and TX to the MISO and MOSI pins of the slave devices?
[07:57:35] <LeoNerd> RX and TX are usually names of UART pins. Unrelated here
[07:58:01] <LeoNerd> Aren't there SPI tutorials with diagrams and words and stuff you can go learn from?
[07:58:25] <LeoNerd> I don't feel particulalry inclined to teach -eeeeeeverything- from scratch
[07:58:29] <anton02> LeoNerd, there's only one miso pin on a 328P
[07:58:39] <LeoNerd> Indeed there is.
[08:01:09] <anton02> LeoNerd, okay sorry if this is annoying, but one last question: how are you supposed to connect both of the devices if there's only 1 miso and mosi pin on the atmega?
[08:02:51] <LeoNerd> They're a shared bus
[08:03:00] <LeoNerd> go read wikipedia's article if nothing else
[08:03:06] <LeoNerd> there's pretty diagrams there
[08:03:11] <LeoNerd> That should help
[08:04:26] <anton02> Oh, i see. Cheers. https://upload.wikimedia.org/wikipedia/commons/f/fc/SPI_three_slaves.svg
[08:05:01] <LeoNerd> Yes, that's the one
[08:23:37] <anton02> "Two of each USART, SPI, and I2C serial instead of one of each. Good when you use I2C devices that have limited address spaces, or when you need to push the bits out really fast over SPI.
[08:23:38] <anton02> "
[08:23:53] <anton02> i dont see why it would be 'faster' per-se
[08:26:35] <LeoNerd> So you can use multiple at once
[08:27:04] <anton02> the cpu has only a single core so that doesn't make sense
[08:27:29] <LeoNerd> Right, but the CPU clocks faster than SPI does
[08:27:57] <LeoNerd> Talking SPI involves some idle waoting for it to finish a byte; you can do other things in that time
[08:28:07] <LeoNerd> Like talking to the other SPI unit
[08:34:16] <anton02> i wonder if my display matrix board will expect to have a continuous connection. This is how those boards word after all - by updating each row at such a rapid rate that it creates the illusion of the LEDs being persistantly lit
[08:34:33] <LeoNerd> I doubt it
[08:34:43] <LeoNerd> What does "continuous connection" even mean?
[08:34:57] <LeoNerd> The documentation specifically talked about using nSEL like this
[08:35:11] <LeoNerd> It further says it is 4wire SPI interface compatible
[08:35:18] <LeoNerd> I really would expect it to be fine
[08:37:41] <anton02> What does "continuous connection" even mean? pushing data through the SPI to that particular device persistantly.
[08:38:08] <LeoNerd> That's not particularly meaningful
[08:51:19] <lorenzo> http://i.imgur.com/4bdA9t6.jpg <3
[08:51:44] <cehteh> free samples?
[08:52:02] <lorenzo> nah, 8 eur on mouser
[08:52:11] <lorenzo> there's the attiny version too (4 eur, atmega32u4 + attiny104)
[08:53:15] <cehteh> are the 328pb 100% pin compatible with the 328p?
[08:53:34] <cehteh> i'd like to have some arduino nanos with them
[08:53:53] <cehteh> will prolly take some time until china clones show up
[08:54:33] <lorenzo> cehteh: depends on the package, I think GND -> PE0, VCC -> PE1
[08:54:35] <lorenzo> and a few minor differences
[08:54:38] <lorenzo> http://www.atmel.com/Images/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_Application%20Note_AT15007.pdf
[08:54:50] <lorenzo> anyway, shouldn't fail if you drop in replace that
[08:56:00] <cehteh> what is PE?
[08:56:41] <cehteh> ah port e
[09:52:16] <LeoNerd> They decided to move them onto a new Port E, rather than using the last two bits of Port D
[09:52:18] <LeoNerd> I don't know why
[09:52:37] <LeoNerd> I've never worked out why Atmel seem to sprinkle pins around ports, rather than just densely pack them
[09:52:42] <LeoNerd> 32U4 is rediculous
[09:53:14] <rue_house> heh
[09:53:26] <rue_house> there is some degree of board layout routing
[09:53:36] <LeoNerd> 32U4 has a port E with two pins, and port F with two pins
[09:53:42] <LeoNerd> Why not put them all on port E with four?
[09:53:57] <rue_house> features by port
[09:53:59] <LeoNerd> rue_house: I'm referring to having lots of named ports which are not empty
[09:54:02] <LeoNerd> er,.. not full
[09:54:35] <rue_house> I think they are modular
[09:54:59] <rue_house> its easier to drop in a port module that has these features than to make one that has a mix
[09:55:18] <LeoNerd> 32U4 has no port A; port B 0-7, port C only 6-7, port D 0-7, port E 2 and 6, port F 0,1, 4-7
[09:55:21] <LeoNerd> WTF?
[09:55:23] <rue_house> every avr is just a different mix of features
[09:55:40] <rue_house> does the u4 have any adc?
[09:55:42] <LeoNerd> But there's never really any consistency with the peripherals anyway
[09:55:50] <LeoNerd> Yes. Its ADC pins are shared on port F
[09:55:58] <LeoNerd> Rather than shared on port C like e.g. the 328P
[09:56:09] <rue_house> oh, I'v not got an F on any of mine :)
[09:56:37] <rue_house> why do I recall adc always on port A...
[09:56:44] <LeoNerd> and I *really* don't get port E. PE2, PE6, no other port E pins
[09:56:54] <LeoNerd> *some* of the original ATmega chips used ADC on port A yah
[09:56:59] <rue_house> what featrues are on them?
[09:57:22] <LeoNerd> PE2 == HWB#, PE6 == INT6/AIN0
[09:57:25] <rue_house> ugh running late for work
[09:57:35] <rue_house> huh
[09:57:52] <rue_house> maybe they had a university newb in and didn't catch his flubs
[09:57:58] <LeoNerd> So yeah it's quite likely you'll have the fuse set to allow PE2 to be HWB so you wouldn't even use that pin
[09:58:33] <LeoNerd> But why port E even exists, rather than say, using the holes in port F - these bits could easily have been PF2 and PF3
[09:58:37] <LeoNerd> Or maybe any of PC0 to PC5
[09:59:40] <LeoNerd> And the "consistency with other chips" argument doesn't fly here. E.g. 328P uses PC4/PC5 for I²C, whereas those pins don't exist here and I²C lives on PD0/PD1
[09:59:52] <LeoNerd> Again, I suspect more random dicerolling by Atmel here
[10:01:00] <rue_house> did a U3 ever exist?
[10:01:16] <LeoNerd> 16U2 exists
[10:01:19] <LeoNerd> Not sure about a 3
[10:01:21] <rue_house> or they going up by twos
[10:01:25] <rue_house> cause I'm sure there is a 6
[10:03:48] <LeoNerd> I don't see any 6
[13:18:37] <d3_> Adolf Hitler, a great man.
[13:18:49] <d3_> you just gotta love good ole adolf hitler
[13:19:35] <d3_> !ops
[13:19:36] <d3_> @ops
[13:39:22] <lorenzo> wtf
[13:41:37] <WormFood> heh
[13:44:19] <WormFood> Actually, Hitler did a lot of good things. Of course, he is 99.99% remembered for the bad things, that everyone knows about.
[13:46:03] <twnqx> www.ti.com/analogrefguide that's a nice document for the analog world of electronics
[15:03:48] <inkjetunito> any good web sites with formulas for calculating things?
[15:04:04] <twnqx> tons. about one per thing :P
[15:06:58] <inkjetunito> i'm looking for basic three phase power things. i'm a bit suspicious about my formula collection and would like to compare it with other sources
[16:47:32] <rue_house> well, state a formula you want to check
[16:56:12] <Jartza> if at first you don't succeed... make abstract art!
[16:56:18] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxLVpydG9rTkNvdUE/view
[17:18:06] <eszett> hi leonard
[17:48:03] <lorenzo> https://github.com/lcafaro/avr-ada7seg aaand this one is done too
[17:51:52] <liwakura> lorenzo: while reading your code i was a bit disappointed that it was over i2c
[17:51:59] <liwakura> thought of manual multiplexing or somthing
[17:53:37] <liwakura> but still nice
[17:53:44] <liwakura> no idea how i2c works tho
[17:54:07] <lorenzo> ht16k33 is a nice LED driver imho
[17:54:34] <lorenzo> can address 128 LEDs in multiplexing
[17:54:58] <eszett> i always thought TQFP is "thin quad flat pin" and TQFN "thin quad flat no-pin"
[17:56:12] <eszett> lorenzo: why not use WS2812B which need no LED driver at all?
[17:56:35] <lorenzo> eszett: that's the single LED right?
[17:56:45] <eszett> ye
[17:56:45] <lorenzo> ah nice, they make strips out of them
[17:57:17] <twnqx> because they are fugly
[17:57:30] <lorenzo> I don't think they come in 7-segment configuration
[17:57:33] <twnqx> colors don't blend, you see all the invidual LEDs
[17:57:35] <lorenzo> though I've seen LED matrices out of them
[17:58:22] <eszett> yes i agree they are abit low in aesthetics
[17:58:36] <eszett> but you may use them as background lighting
[17:58:37] <twnqx> lorenzo: does that holtek have more than 4bit/color PWM?
[18:00:06] <twnqx> also, does any of you know if multiplexing affects maximum (perceived) brightness?
[18:00:41] <twnqx> if an LES is only "on" for an 8th of the time, i have no idea if the perceived brightness is peak brightness, or if it will be dimmed down :X
[18:00:43] <twnqx> LED*
[18:04:08] <lorenzo> twnqx: not sure about the brightness thing, but in the video I've had to turn it all the way down to 1
[18:04:18] <lorenzo> so, if it affects brightness it doesn't affect it massively :p
[18:04:32] <twnqx> turning DOWN is not the problem
[18:04:38] <lorenzo> twnqx: sometimes you can feel the multiplexing though
[18:04:58] <lorenzo> it's not as "smooth" looking as a non-multiplexed 4x7-segment LEDs
[18:05:20] <twnqx> that should be more of a question multiplexing frequency
[18:05:27] <twnqx> of*
[18:05:55] <twnqx> i also just earlier today wondered if adding an ungodly amount of capacitors in parallel to each LED could help
[18:06:06] <lorenzo> twnqx: https://github.com/lcafaro/pic8-dsp7s04 here's a non-multiplexed example
[18:06:10] <lorenzo> the gif
[18:06:17] <lorenzo> to the eye it's much more pleasant, especially scrolling
[18:06:52] <lorenzo> but part count is much higher of course :/
[18:07:15] <eszett> and another question is will multiplaxing decrease the life span of LEDs more than without multplexing?
[18:07:29] <twnqx> no
[18:08:05] <Evidlo> I'm trying to generate a square wave on OC1A on an attiny85, but nothing is happening: https://dpaste.de/J5jv
[18:08:07] <twnqx> https://youtu.be/VVPJWznOR-o lorenzo: this is what i want to build with multiplexed standard LEDs instead of these individual addressable
[18:08:21] <eszett> twnqx: alright then..
[18:08:37] <lorenzo> nice :D
[18:10:23] <eszett> mirror mirror at the wall, who is the fairest one of all? and the mirror answers, " well im supposed to say its snowwhite, but actually, i think im the fairest" ;-)
[18:12:45] <Evidlo> anyone take a look at the above? im in a bit of a hurry
[18:14:13] <eszett> is the hardware running, the crystal running?
[18:14:21] <eszett> maybe its a hardware problem
[18:14:30] <eszett> @Evidlo
[18:14:59] <Evidlo> it's been working fine all day
[18:15:11] <Evidlo> I have a misconfiguration in my code
[18:16:29] <twnqx> OC1A: Output Compare Match output: The PB1 pin can serve as an external output for the Timer/Counter1
[18:16:29] <twnqx> Compare Match B when configured as an output (DDB1 set). The OC1A pin is also the output pin for the PWM
[18:16:29] <twnqx> mode timer function.
[18:16:41] <twnqx> hm you did
[18:19:22] <twnqx> did you try separate values for ocr1a/ocr1c?
[18:19:36] <Evidlo> yes, same thing
[18:19:42] <Evidlo> OCR1A < OCR1C
[18:48:47] <anton02> if you use resistor voltage dividers to give mcus their required voltage, how badly will the higher input impedance affect its operation?
[18:49:52] <lorenzo> anton02: depends on how high the impedance is of whatever you load the divider with
[18:50:16] * twnqx blinks
[18:50:56] <anton02> i wonder what the input impedance is to an atmega328
[18:51:35] <lorenzo> anton02: to what kind of input?
[18:51:57] <lorenzo> the ADC is in the 100 MegaOhm range iirc
[18:52:02] <anton02> vcc
[18:52:08] * twnqx blinks again
[18:52:12] <twnqx> it's vcc
[18:52:22] <lorenzo> anton02: you can't power it via a voltage divider
[18:52:23] <twnqx> first of all, that's a dynamic load
[18:52:43] <anton02> so dynamic input impedance
[18:52:49] <twnqx> and thus presents a dynamic resistive load
[18:53:10] <twnqx> which means, the input voltage would fluctuate with processing, IO, etc
[18:53:17] <lorenzo> anton02: grab one of the thousand fixed voltage regulators out there
[18:53:58] <anton02> i never wanted to do this, my computer professor who doesn't know much about electronics did this and i was wondering how that would work
[18:54:25] <twnqx> probably thanks to pretty wide supply ranges on AVRs
[18:55:31] <lorenzo> not sure what's worse between IT guys playing electronics, or electronics guys playing IT :p
[18:56:22] <twnqx> :(
[18:56:32] <twnqx> i'm an IT and electronics guy, so ehere does that put me :(
[18:56:43] <Lambda_Aurigae> in the leaky boat.
[18:57:27] * twnqx puts on life vest
[19:02:35] <jacekowski> anton02: the issue with input impedance is that it varies
[19:02:52] <jacekowski> anton02: depending on output states
[19:03:53] <jacekowski> anton02: if your load is quite constant and the uC tolerates wide voltage ranges (most AVRs do)
[19:04:08] <jacekowski> anton02: then it might work
[19:04:13] <jacekowski> but it's not a good idea
[19:21:05] <anton02> thanks
[20:47:34] <cehteh> voltage divider, huge capacitor, brownout enabled .. maybe
[21:11:29] <eszett> do i need a timer for PWM?
[21:12:13] <eszett> ah no, its built it, fine
[21:32:42] <Casper> PWM need timer if you want it to be hardware
[21:32:52] <Casper> else you can do it in software, but it is not as precise
[21:35:44] <eszett> so the internal timer of the atmega32u4 is not that precise? does that matter in practical terms, when i, say plan to dim a LED?
[21:36:36] <twnqx> Casper: don't confuse him :P
[21:36:44] <twnqx> no, it doesn't
[21:36:44] <Casper> internal timer is precise
[21:37:43] <eszett> k..
[21:37:52] <Casper> but doing pwm in software (ex: while(1) { output(1);`_delay_ms(1); output(0); _delay_ms(1);} <==== that is not precise
[21:38:55] <eszett> ah, but for a LED even the software method would do it?
[21:40:55] <Casper> yes, maybe
[21:41:06] <Casper> the issue is when you have other things happening
[21:41:23] <Casper> the software method can get interrupted by, you guessed it, an interrupt
[21:41:55] <Casper> which can cause the on or off time to get extended
[22:01:22] <eszett> Yes..
[22:03:37] <Valen> if you have assloads of interrupts firing all the time then a software PWM isn't going to work well for you
[22:03:55] <Valen> if all you are doing is dimming a LED and you don't have any interrupts then it'll work fine
[22:04:14] <Valen> in saying that, use the hardware timers for everything you can ;->
[22:04:28] <Valen> as to precision they are as precise as your crystal is
[22:04:43] <cehteh> you can assist software pwm with hardware timers .. best compromise
[22:06:39] <Valen> if you are wanting to have lots of PWM's you can do it that way
[22:07:09] * twnqx needs 192 channels
[22:07:29] <Valen> most of my avr software has a main loop consisting of { if interrupt_set_flag {do a thing} sleep}
[22:07:36] <Valen> then a jillion ISR's lol
[22:07:41] <cehteh> lol
[22:07:59] <Valen> that is more than a few, twnqx, using a phat AVR or a dedicated IC?
[22:08:00] <cehteh> thats the sledeghammer method
[22:08:32] <twnqx> looking into a holtek chip that can handle it on its own (with multiplexing)
[22:08:51] <cehteh> pwm for what?
[22:08:53] <cehteh> leds?
[22:09:01] <twnqx> you know what ;)
[22:09:07] <twnqx> yes, LEDs
[22:09:34] <cehteh> just use this neopixels / ws18xx things
[22:09:44] <twnqx> price thing
[22:09:46] <Valen> those aren't cheap
[22:09:58] <cehteh> yep
[22:10:12] <cehteh> but dedicated pwm for that much channels wont be cheap either
[22:10:25] <twnqx> well, 24x 8 is 1.5€
[22:10:34] <twnqx> 24 channels, 8x multiplexed, that is
[22:10:45] <twnqx> 48 channels, 4 times multiplexed is like 3€
[22:10:59] <cehteh> also sometimes a sum-pwm is good enough (do you need to drive all leds independently?
[22:11:08] <twnqx> yes. every single one.
[22:11:17] <twnqx> 64 RGB LEDs.
[22:11:17] <cehteh> ok .. sounds like fun
[22:12:09] <cehteh> some dedicated atmels which only do software pwm on hard timing would do the job too
[22:12:18] <twnqx> faaaaaar too expensive
[22:12:32] <twnqx> really, AVRs are badly too expensive for their performance
[22:12:43] <cehteh> maybe
[22:13:15] <cehteh> wasnt there some atmega with shitloads of pwm channels?
[22:14:10] <twnqx> i'd rather take 4x TLC5955, which would even say "no multiplexing"
[22:14:18] <twnqx> of just one and 4x multiplexing
[22:15:53] <twnqx> but i already have some holtek chips here
[22:16:08] <twnqx> hope i get my breakout PCBs for testing tomorrow or the day after
[22:19:35] * Casper is bored...
[22:21:04] <Valen> 2x 100 pin AVR's then just bash it out in software job done ;->
[22:21:13] <Valen> HW assisted software that is
[22:27:06] <cehteh> yes but these AVR's cost $15-$20 a piece
[22:51:27] <lorenzo> the atmega2560 is insanely overpriced
[23:01:57] <cehteh> i wonder if one can pwm a lot leds with shift registers and uart/usi only
[23:04:10] <cehteh> and if there are shift registers with plenty drive strength
[23:06:26] <cehteh> http://www.ti.com/product/tpic6b595
[23:06:59] <lorenzo> tlc5926/tlc5927 ?
[23:08:14] <cehteh> dunno i never looked for those, no need yet
[23:08:27] <cehteh> but seems there are some possibilities