#avr | Logs for 2016-06-09

Back
[03:26:56] <_abc_> With reference to: http://www.ulrichradig.de/home/index.php/avr/avr-ether-8-i-o which is a very cool project, I am surprized that so much fits into a mega644, I thought it uses an ARM until I looked. Is there a website for a network stack on mega644? I am almost sure Mr. Radig got inspiration from a net stack SDK, writing all that from scratch for a relay controller is overkill.
[03:34:29] <_abc_> There seem to be several projects with atmega+enc, most seem to use Adam Dunkels's tcp/ip stack.
[03:34:54] <_abc_> There's also https://code.google.com/archive/p/avr-uip
[03:35:03] <Jartza> why wouldn't there be networking with it
[03:35:10] <Jartza> there's tcp/ip for commodore 64 too :)
[03:35:38] <_abc_> Hm? Please read what I wrote? I assume Mr. Ulrich was inspired by one of these things or by several.
[03:36:45] <_abc_> https://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/jdf226_ag537/index.html predates that project by about a year.
[03:36:50] <_abc_> mega644+enc
[03:37:24] <_abc_> I mean, is there a standard/boilerplate/sdk thing out there which people use for this?
[03:38:51] <_abc_> Specifically, the cornell project uses the uip stack
[03:39:18] <_abc_> wrt /topic: ENCOURAGE PEOPLE OR WE WILL SQUASH YOU, REALLY!
[03:39:34] <_abc_> -- does this also apply to lost souls coming here from #arduino by "mistake"?
[03:39:36] <Jartza> http://www.dunkels.com/adam/tfe/
[03:39:39] <_abc_> Just asking
[03:40:11] <Jartza> no idea about any sdk as such
[03:40:24] <_abc_> Yes, crazy people even added tcp/ip to cp/m machines.
[03:40:37] <_abc_> Hard disk interfaces too, and sd card.
[03:40:39] <_abc_> I know...
[03:40:50] <_abc_> Well uisp seems to be popular
[03:40:57] <_abc_> -s
[03:41:05] <_abc_> https://www.sics.se/~adam/uip/ hah.
[03:42:15] <_abc_> https://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/jdf226_ag537/index.html see @Intellectual Property, it is nicely attirbuted
[03:42:22] <_abc_> *attributed /me needs much more coffee
[03:43:16] <Jartza> heh yea. my friend just connected his cp/m to wifi
[03:43:32] <Jartza> although that's not really a retro computer as such, it's home-built z80 cp/m machine
[03:47:12] <_abc_> http://www.findbestopensource.com/product/ethernut useful, see links
[03:50:47] <_abc_> Neat https://www.mikrocontroller.net/articles/Monitorprogramm_Bamo128
[04:42:20] <twnqx> Jartza: i only ever used cp/m on my commodore 128 :D
[05:16:45] <_abc_> http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en562787 oh fun. Some APPnotes are only available in LANG=CN
[05:17:33] <_abc_> http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en567016 another. I don't think Mr. Chris Murphy is a native Chinese speaker.
[05:18:35] <_abc_> Ok, the document name is misleading, it is in English!
[06:26:45] <LeoNerd> Ugh.. ATmega32U4 chip straight from Farnell: £4.72. Arduino Pro Micro cheap Chinese clone board (which contains a 32U4) on eBay: £2.50
[06:27:00] <LeoNerd> Is it worth £2 to me to just buy the board and heatgun the chip back off it? Seems mad
[06:27:02] <Lambda_Aurigae> _abc_, or avr and enc28j60 I like tuxgraphics tcp/ip stack myself...
[06:27:33] <_abc_> LeoNerd: for one offs, definitely.
[06:27:37] <Lambda_Aurigae> _abc_, as far as a "standard sdk" goes,,,for the enc28j60 you have to go to microchip for documentation and port said to avr which isn't too awfully difficult.
[06:28:10] <_abc_> Lambda_Aurigae: true. But it has already been done umpteen time, so am looking for the well trodden path through the tall grass ;)
[06:28:22] <LeoNerd> _abc_: I dont' have a -lot- of luck heatgunnign bigger things back off again though... so it might be risky. Plus I /really/ hate the Pro Micro boards because they have really stupid pinouts.. so I wouldn't use the board alone
[06:29:23] <Lambda_Aurigae> _abc_, in the whole microcontroller hobby world, standard SDKs seem to be very slippery. For any kind of widespread standard most people seem to go for arduino these days.
[06:29:27] <_abc_> Let's just say I make my living through electronics and the imbalance between off the shelf parts and assembled modules, price wise, has been insane for a long long time now.
[06:29:59] <Lambda_Aurigae> I suppose if you could buy in 100000 quantity you could get the price down some.
[06:30:19] <_abc_> Lambda_Aurigae: I am one who does not. I also read the forum posts on a specific library or project usually. This yields such gems as "it works for a few hours then resets. Dunno why maybe I'll fix it later (2013)"
[06:40:36] <cehteh> arduino? :)
[06:41:00] <Lambda_Aurigae> arduino has become what the basic stamp was 20 years ago.
[06:41:14] <cehteh> i known it but never used it
[06:41:15] <Lambda_Aurigae> ok...15 years ago.
[06:41:25] <Lambda_Aurigae> yeah...I played with it..found it very,,,,lacking.
[06:41:48] <cehteh> quality on arduino is so diverse .. many things just suck
[06:41:59] <cehteh> and most bloat
[06:42:14] <Lambda_Aurigae> yes.
[06:42:20] <Lambda_Aurigae> bloat is the biggest issue I have with it.
[06:42:22] <liwakura> at least a way to get that flash full
[06:42:52] <liwakura> it sorta feels like a waste when i upload an 500 byte program to an 32kb flash
[06:42:54] <cehteh> error handling in most cases is just nil
[06:43:21] <Lambda_Aurigae> cehteh, we should port the microsoft BSOD to the ardweeny!
[06:43:35] <cehteh> things are awfully specified, works somewhat like some people may expect it to work
[06:44:54] <cehteh> well .. i am going to hunt some food .. bbl
[06:51:02] <Jartza> I've been lately playing with xmegas
[06:51:12] <Lambda_Aurigae> pic32 here.
[06:51:13] <Jartza> many of them are cheaper than megas
[06:51:29] <Jartza> Lambda_Aurigae: for 32bit, I use arm :P
[06:51:42] <Jartza> cortex m-series for cheap
[06:51:43] <Lambda_Aurigae> I like having a 32bit processor in a dip package.
[06:51:50] <Lambda_Aurigae> and they send me free samples.
[06:52:06] <Lambda_Aurigae> having hardware usb in the same package is nice too.
[06:52:38] <Jartza> free samples is always good
[06:52:48] <Jartza> I like stm32 nucleo boards, especially those small ones
[06:53:06] <Jartza> they can be plugged to breadboard still
[06:53:12] <Jartza> http://www.mouser.fi/ProductDetail/STMicroelectronics/NUCLEO-F303K8/?qs=sGAEpiMZZMufdu5QM0tCwQiNi3uibWhZJHvSBeGn4%252bY%3d
[06:53:16] <Jartza> like those
[06:53:55] <Jartza> programmer/debugger on board and all that
[06:55:29] <Lambda_Aurigae> pic32 chips I work with seem to be overall more powerful than the stm32 chips on those boards.
[06:55:51] <Jartza> they might be
[06:56:01] <Lambda_Aurigae> fewer i/o though.
[06:56:05] <Lambda_Aurigae> different peripherals.
[06:56:18] <Jartza> yeah. and less software support, I would presume
[06:56:26] <Lambda_Aurigae> overall speed,,,just slightly less than the stm32 chips there.
[06:56:43] <Lambda_Aurigae> 83dmips for the 50mhz pic32.
[06:57:00] <Lambda_Aurigae> 256K flash, 64K sram.
[06:57:01] <Jartza> I mainly use attinys, xmegas, cortex m
[06:57:20] <Jartza> with the exception of some atmega328s
[06:57:28] <LeoNerd> Everybody loves the '328
[06:57:32] <Jartza> as I have those cheap arduino clones
[06:57:32] <Lambda_Aurigae> I mostly use attiny85 and atmega1284p chips.
[06:57:59] <LeoNerd> The 328 would be basically perfect if it had a second UART.. Oh.. is that a 328PB I see coming over the hill?
[06:58:00] <Lambda_Aurigae> but, I got a pile of atmega1284p chips for $3.50 each a few years back.
[06:58:14] <Jartza> atmega328pb actually looked pretty neat
[06:58:21] <Lambda_Aurigae> normally they are 7 to 10 dollars each.
[06:58:35] <LeoNerd> Yah - I'm waiting to see if anyone makes a nice breakout board for it, or if I'll have to
[06:58:36] <Lambda_Aurigae> ok...must head for worky...
[06:58:42] <Lambda_Aurigae> laters.
[07:00:00] <Jartza> might be that my next vga-controller test features atxmega32a4u and microchip sqi flash :)
[07:00:14] <Jartza> umm. not flash, sram
[08:04:18] <_ami_> timer counter runs even though AVR sleeps?
[08:04:37] <liwakura> depends on the sleep mode
[08:11:32] <_ami_> liwakura: PWR_DOWN shut down timer counter also?
[08:11:58] <_ami_> i am sure IDLE does not shutdown it but does PWR_DOWN. i might need to experiment on it today
[08:12:12] <liwakura> its in the datasheet of your device
[08:15:35] <liwakura> in the Section for Power Management, there is usually a nice table depicting whats shut off in which sleep modes
[08:18:55] <_ami_> liwakura: power management and sleep modes section, yeah!
[08:18:56] <_ami_> thanks
[08:19:02] <_ami_> looking into it.
[08:19:52] <_ami_> POWER SAVE is the most suitable for me.
[08:19:53] <_ami_> thanks
[08:21:35] <_ami_> liwakura: Mastering in reading DS is an art. :) i am sure you have a master degree in it. i certainly need to practice this DARK art. :)
[08:21:58] <liwakura> _ami_: try the intel x86 datasheets
[08:22:27] <liwakura> hm, dont even know if those are public
[08:24:12] <_ami_> :P
[08:24:18] <_ami_> time to go home!
[08:24:21] <_ami_> bye
[09:18:56] <Haohmaru> does anyone know how to automate avrdude in terminal mode?
[09:19:57] <Haohmaru> i mean.. i know how to put a few avrdude calls into a .bat file, but.. how to do terminal mode? .. like setting two fuse bytes to specific values and the "quit"
[09:20:50] * cehteh uses a makefile for that
[09:21:33] <Haohmaru> for some reason, when i call avrdude with -U arguments, fuse4 programs properly, but fuse5 always fails to program (and remains 0xFF)
[09:21:50] <Haohmaru> but i can set fuse5 to the desired value via terminal mode
[09:23:04] <cehteh> looks more like you call it somehow wrong
[09:23:31] <Haohmaru> avrdude -c avrisp2 -P usb -p x32a4 -u -U fuse4:w:0xF3:m -U fuse5:w:0xF7:m
[09:23:59] <Haohmaru> fuse4 turns into 0xF3, but fuse5 remains 0xFF
[09:24:01] <cehteh> avrdude has this 'safe mode' which backs up fuses and checks against overwrites
[09:24:19] <cehteh> what happens when you change the order?
[09:24:39] <Haohmaru> hm
[09:25:01] <cehteh> thats xmega?
[09:25:10] <Haohmaru> yes
[09:25:15] <cehteh> never used them
[09:25:24] <Haohmaru> they rock \o/
[09:25:31] <cehteh> yes
[09:25:48] <cehteh> but i had no need for them yet
[09:28:25] <bss36504> Haohmaru which xmega(s) are you familiar with?
[09:28:49] <Haohmaru> 32a4u, 128a3u
[09:29:52] <bss36504> For the event system setup, you select event sources with the actual event system "peripheral", right? But in order for those sources to work, do you need to enable the corresponding interrupt in the source peripheral?
[09:30:21] <Haohmaru> no idea, haven't used the events yet
[09:30:34] <bss36504> haha ok. Well when I find out I'll let you guys know
[09:30:55] <Haohmaru> just spi, timers, usart, reset..
[09:31:18] <bss36504> I *think* you just mux to the event source from the event system channel mux registers and you're good, but nobody seems to know for sure.
[09:31:18] <cehteh> Haohmaru: anyway .. under unix you could prolly use a heredoc for interactive mode avrdude -t <<EOF ...
[09:31:50] <cehteh> but i'd try to fix it that it works normally first
[09:36:44] <Haohmaru> okay, cehteh, turns out i needed -u before the second -U too
[09:36:48] <Haohmaru> thanks
[10:10:44] <cehteh> ah
[10:24:04] <LeoNerd> I have a design for an ATtiny841-based peripheral, which exposes 6 IO pins, including the 4 in the SPI/I²C-slave/UART block, plus 2 more. If I manage to work out a way to get HVSP ability on the board, I could add one more to that being PB3/RESET
[10:24:45] <LeoNerd> However, to do that I'd need to get all the HVSP-related pins out. All but one of them would be covered by theabove already; the last one remaining being PB0 which is one of the XTAL pins, which currently I didn't plan to take out of the board.. it being attached to my timing crystal
[10:25:24] <LeoNerd> How much does anyone think it might be worth it, to try to find a way to get that one out too? It'd probably need some annoying switch/solder bridge pads/... to disconnect the xtal when doing HVSP
[10:39:51] <bss36504> Not to be a downer, but why not use a chip with more IO?
[10:41:00] <LeoNerd> Eh; it's a matter of drawing the line. I'm not really sure how many I'd need anyway. It's a sortof general purpose offload board
[10:41:16] <LeoNerd> Maybe these 6 are fine
[10:41:19] <bss36504> Ok fair enough
[10:41:31] <LeoNerd> But quite often you think "well.. this is great and all but if I just had one more line ..."
[10:41:36] <bss36504> in that case it's probably more trouble than it's worth to add HVSP
[10:41:53] <LeoNerd> I think the next chip up from a tiny841 would be the 1634, only that only has one UART :/
[10:42:14] <LeoNerd> I was hoping for two, because the application side needs one and it might be nice to expose the other on the breakout pins
[10:42:47] <LeoNerd> Ohwait it has two
[11:22:50] <LeoNerd> So unrelatedly: I'm still looking for some sort of technical contact email address or similar for someone competent at Atmel. Does anyone have suggestions? I asked last time and someone mentioned something about "arrow" and field-engineers, but I didn't get any sort of clarification of what that was.
[11:35:01] <twnqx> arrow is probably the distributor
[11:58:13] <bss36504> Got my $13 digital picture frame yesterday and immediately ripped the LCD out of it. Sees like it will work just fine, they even splurged for using a real FFC connector instead of just soldering the lcd to the board.
[12:14:38] <CasperAtWork> I think the connector ends up cheaper
[12:15:22] <bss36504> Than soldering the FFC? I've seen that loads of times
[12:15:38] <carabia> yeah, you can solder the flex straight
[12:15:39] <CasperAtWork> the part itself is cheap, the pick and place machine can install it, then the human that assemble just need to slip and clip instead of messing with the alignment and the hotbar...
[12:15:57] <carabia> i don't think you need to solder it by hand
[12:16:04] <CasperAtWork> so less human labor and less reject
[12:16:45] <bss36504> I mean, I'll be buying a connector obviously, I was just surprised that such a cheapo product would have "splurged" for an actual connector. Actually the board appeared much better designed than I expected.
[12:16:57] <carabia> anyway, bss36504 good to hear it worked out
[12:17:18] <bss36504> Yeah, we will see when I actually try to use it, but overall, not a bad investment
[12:17:29] <bss36504> certainly better than buying a new one
[12:18:07] <carabia> on the other hand i'm still struggling with ups monkeys with my component delivery. I'm quite behind on my schedule because of this. And this is probably the 10th time I've got problems with UPS
[12:18:21] <carabia> fedex and dhl have both been better. especially fedex.
[12:18:57] <bss36504> Interesting, usually the USPS just fucks me over. Fedex/UPS have always been alright
[12:19:00] <CasperAtWork> late delivery?
[12:19:57] <carabia> CasperAtWork: yeah, well late. I'm not gonna go into the details but basically that, yeah. They were supposed to be delivered on tuesday, now I'll be lucky to get them tomorrow
[12:20:27] <CasperAtWork> ew
[12:20:28] <carabia> yeah, fedex has been amazing and on point. just not ups.
[12:20:44] <CasperAtWork> here they are all on time, except canada post...
[12:20:59] <carabia> unfortunately, digi-shit only ships via ups
[12:21:01] <CasperAtWork> CP are the one that screwed me badly once
[12:21:12] <CasperAtWork> I mean, how can a next day delivery be next week?
[12:21:41] <CasperAtWork> every single truck missed their deadline
[12:21:49] <Lambda_Aurigae> complain and get a refund
[12:21:55] <carabia> or i'm actually not sure on that. I always order a big lot so I get "free shipping"
[12:22:06] <Lambda_Aurigae> unless it's a residential address, in which case you are likely screwed.
[12:22:25] <carabia> no, it's not a residential address
[12:22:43] <Lambda_Aurigae> I have all my stuff shipped to the office.
[12:22:50] <Lambda_Aurigae> never had a problem getting delivered on time.
[12:23:07] <Lambda_Aurigae> specially as it's a major company..they see Xerox on the delivery label and they handle it right.
[12:23:08] <bss36504> I ordered some parts for a company I used to work at, and USPS delivered my package to another company on the same road as ours once. It was a bulk mail dropoff or something, because the other place was pretty large. Anyway, my tracking read as "delivered" so I went to the post office and the post master actually had the nerve to try and claim it
[12:23:08] <bss36504> was somehow my fault for not making the address clear enough. A typed address. on a shipping label.
[12:23:30] <carabia> well, after tomorrow i'll file a complaint.
[12:23:48] <CasperAtWork> store -> closed hub... hub missed the truck, truck missed the next hub, hub missed delivery truck, truck missed the post office... mailman failed to deliver the "we got your package" card
[12:24:24] <carabia> Ha.
[12:24:44] <CasperAtWork> what should have been a 12-18 hours from order to delivery took a week, and could ahve been longer if I hasnT' checked the tracking and saw it was ready to be picked up
[12:25:06] <Lambda_Aurigae> I always have tracking email me at every point.
[12:25:10] <CasperAtWork> and... surprise! the store forgot to pack something...
[12:25:18] <Lambda_Aurigae> so if it's something I need, I get on them right away.
[12:27:08] <CasperAtWork> the best order is still the one I did at digikey once...
[12:27:23] <CasperAtWork> 7:30pm... ding dong at the door at 7:30am
[12:27:37] <CasperAtWork> the package crossed the border and 3 provinces
[12:27:40] <Lambda_Aurigae> got you beat....but not in time.
[12:27:43] <CasperAtWork> 12 hours!
[12:27:48] <Lambda_Aurigae> orderd 100 1MB 30pin simms.
[12:27:58] <Lambda_Aurigae> got the order, started putting them in computers.
[12:28:03] <Lambda_Aurigae> they were 4MB simms!
[12:28:12] <Lambda_Aurigae> this was when memory was close to 100 dollars per meg.
[12:28:24] <Lambda_Aurigae> so, I ordered another 100.
[12:28:26] <CasperAtWork> lucky!
[12:28:30] <Lambda_Aurigae> got 1MB the next time...
[12:28:36] <CasperAtWork> hehe
[12:28:40] <CasperAtWork> can'T be lucky all the time
[12:28:40] <Lambda_Aurigae> never said anything but held on to them for several months.
[12:28:52] <Lambda_Aurigae> they never came back to say they shipped something wrong.
[12:29:01] <Lambda_Aurigae> so I sold them at "half price" and made a fortune.
[12:32:48] <Lambda_Aurigae> big thing back then was,,,4MB simms were few and far between and hard to get even if you did want to pay for them.
[12:34:35] <neuro_sys> for atmega88, what do you think the point of a code like this: "CLKPR = 0x80; CLKPR = 0x80;"?
[12:35:05] <LeoNerd> That's the clock prescale register
[12:35:16] <LeoNerd> I'd suggest reading about it in the data sheet
[12:35:29] <Lambda_Aurigae> I think he means having it twice on one line.
[12:35:32] <neuro_sys> Yes
[12:35:40] <neuro_sys> in the sheet there's a curious line that says: Rewriting the
[12:35:40] <neuro_sys> CLKPCE bit within this time-out period does neither extend the time-out period, nor clear the
[12:35:50] <neuro_sys> CLKPCE bit.
[12:36:08] <neuro_sys> It is like saying, "do not do this, it won't work", but here is a code that does it nevertheless.
[12:36:11] <neuro_sys> so I'm confused
[12:36:18] <LeoNerd> It doesn't say it doesn't work
[12:36:27] <LeoNerd> It simply says it doesn't extend the period, nor does it clear the bit.
[12:36:46] <neuro_sys> oh yes my mistake
[12:37:25] <neuro_sys> so maybe it's a mistake in the code to write the statement twice?
[12:37:31] <neuro_sys> or could it have a purpose?
[12:37:58] <neuro_sys> by the way, the code is from this link: http://www.linusakesson.net/hardware/chiptune.php
[12:38:02] <Lambda_Aurigae> it could...would have to read the datasheet myself.
[12:38:12] <LeoNerd> Surely the first one is to set the enable bit, the second is to actually set the clock prescaler
[12:38:44] <Lambda_Aurigae> I am, unfortunately, remoted into my home computer through a slow internet link from an all-you-can-scarf-n-barf restaurant.
[12:39:28] <neuro_sys> ah, yes. I get it now.
[12:41:00] <Lambda_Aurigae> that's good..the rest of us are confused...or at least I'm lost in the quagmire of life.
[12:41:22] <Lambda_Aurigae> but the choclate cake and icecream are good!
[12:41:40] <neuro_sys> haha
[12:42:23] <neuro_sys> Lambda_Aurigae: the sheet clearly said: The CLKPCE bit (bit-7) must be written to logic one to enable change of the CLKPS bits ([3:0] bits).
[12:42:51] <neuro_sys> so the code first sets bit 7 with 0x80 to enable CLKPS bits to be written (to zero).
[12:42:57] <Lambda_Aurigae> so you write bit 7 first then within a certain time you rewrite the lower 4 bits...makes sense.
[12:59:53] <_ami_> cehteh: what is clk/ASY in AVR datasheets.
[13:00:09] <_ami_> i can find this in Power management & Sleep mode section
[13:00:45] <LeoNerd> Possibly the clock generated by the async timer module?
[13:00:53] <LeoNerd> e.g. timer 2 on a 328P
[13:02:20] <_ami_> LeoNerd: aha, only timer2 is async?
[13:02:36] <LeoNerd> On a 328P, yes
[13:02:56] <_ami_> gotcha,
[13:03:10] <_ami_> is there any bit i need to enable to make timer2 async?
[13:03:40] <LeoNerd> Most likely.
[13:03:43] <LeoNerd> Read the DS
[13:04:08] <LeoNerd> Timers, doubly so more than any other AVR periph; they tend to vary a lot from chip to chip
[13:06:58] <_ami_> LeoNerd: indeed. they vary a lot across the chip. actually i was trying to write a power sleep code in which mega16a mcu sleeps until timer0 overflow and then wakes up and do the job then sleep again. Only ADC and IDLE sleep mode are working fine. Rest are not. After reading the DS, it seems async timer2 can bring back MCU from dead in PWR_SAVE mode. https://github.com/amitesh-singh/amiduino/blob/master/avr/avr_programmming/pwm/powersleep/sleep.c
[13:07:31] <LeoNerd> Right. But only if its clock is running
[13:07:48] <LeoNerd> Typically you put a 32kHz watch crystal on it
[13:08:13] <LeoNerd> I forget if it gets its own xtal IO pins, or if they're shared with the main ones
[13:08:31] <LeoNerd> Some of the bigger AVR chips have two sets, so you can have e.g. a 16MHz main clock and also a 32kHz RTC
[13:10:27] <_ami_> LeoNerd: ext. 32Khz crystal? where? on XTA1 and XTA2?
[13:12:31] <LeoNerd> Again you'll have to read the DS
[13:12:41] <LeoNerd> I don't have it in my head right now... it's ~300 pages long :P
[13:13:52] <LeoNerd> So specifically you want to look at section 18.9 which talks about "asynchronous operation of timer/counter 2"
[13:14:46] <_ami_> got it, looking into it.
[13:16:40] <LeoNerd> Ahyes, the timer2 xtal is across TOSC1/TOSC2, which happen to share pins with XTAL1/XTAL2
[13:16:43] <LeoNerd> Annoyingly so
[13:19:28] <LeoNerd> Mmm whereas for example the mega128A has different pins for either
[13:20:17] <_ami_> oh boy, so we put 2 crystals? cpu 16Mhz xtal and timer2 xtal parallel ?
[13:20:30] <LeoNerd> No, you can't use them both at once.
[13:21:39] <_ami_> hmm, ok. btw, what will happen in this case if i add two xtals parallel? what would be the final value? min one or max one?
[13:22:19] <_ami_> 32.768 is indeed a important number. :D
[13:22:20] <LeoNerd> Er.. complex
[13:28:34] <_ami_> LeoNerd: thanks for the tips. i learned something new. i thought i knew timers before. will experiment with async in future when i get xtals. need to buy this during weekend.
[13:28:52] <LeoNerd> Every time I look at a new AVR chip, I read about the timers first
[13:29:09] <LeoNerd> UARTs, SPI, I²C, ADC,... all these things are largely identical from chip to chip. But timers vary so much more
[13:29:16] <LeoNerd> I really don't know why :/
[13:30:11] <_ami_> valid q, ask this to some Atmel mcu hw engineer when you meet them. :)
[13:30:30] <_ami_> LeoNerd: is this case for only atmel chips? or
[13:31:40] <LeoNerd> I don't really know any other kinds of chip in enough depth to compare
[13:31:41] <carabia> eeheheh, screw atmel, sold out to microchip 'cause the poor bastards don't know how to keep a company in the black
[13:34:36] * LeoNerd unrelatedly, dispairs at termios(3)
[13:34:43] <LeoNerd> Can we kill it please and instead lets have a PF_TTY?
[13:34:54] <LeoNerd> I'd so much love to have sendmsg/recvmsg, instead of the *CRAZY* that is break conditions
[13:35:43] <_ami_> carabia: :)
[13:36:16] <_ami_> i wonder if we still shall see atmel chips in market after 5 years.
[13:36:39] <_ami_> to be honest, i like atmel 8 bits chips
[13:36:43] <_ami_> actually i love them.
[13:43:10] <_ami_> nn
[13:57:10] * CasperAtWork throws "Bon" before "ami"
[13:57:27] <CasperAtWork> that make a good window cleaner
[14:10:39] <CasperAtWork> reference: https://sealedair.com/sites/default/files/CB312634-WEB_Bonami_180x250.png
[17:42:09] <LeoNerd> Anything easy I can do with an AVR UART receiver to properly check that there really were 2 stop bits?
[17:42:31] <LeoNerd> The UART itself will check the first but then ignores the second
[17:48:21] <CasperAtWork> LeoNerd: there is no real way to know if there is 2 stop bit
[17:48:33] <LeoNerd> Hrm.. :/
[17:48:36] <CasperAtWork> uart idle at "stop" voltage
[17:48:51] <LeoNerd> Right; but you can at least be alerted if it was wrong
[17:49:02] <Snert> set it to 1 stop bit. If it quits working, then it was previously set at 2 stop bits most likely.
[17:49:04] <CasperAtWork> on RX, the second stop bit is ignored
[17:49:11] <LeoNerd> Yes, I'm aware
[17:49:34] <CasperAtWork> you could, however, somehow find out how long there is between the stop and start
[17:49:41] <CasperAtWork> and mesure the shortest time
[17:49:57] <CasperAtWork> might need to use another pin...
[18:16:33] <LeoNerd> Ohcrap. I've just remembered now what the problem is with trying to write a DMX controller on an ATtiny841
[18:16:44] <LeoNerd> DMX-512 has 512 8bit slots of data.
[18:16:48] <LeoNerd> The ATtiny841 has 512 bytes of RAM
[18:17:19] <LeoNerd> That leaves me with precicely.. er... zero bytes spare for application use
[18:22:04] <carabia> I just checked attiny841 page, actually says 256b ram
[18:22:08] <carabia> 8)
[18:23:14] <LeoNerd> Huh
[18:23:18] <LeoNerd> Ohwell, that's me totally screwed then
[18:25:12] <carabia> well i mean, i'm sure you could do some clever math in order not to buffer all 512 bytes...
[18:26:19] <carabia> is the 1284 the only other tiny/mega -line mcu with 2x uarts?
[18:27:03] <carabia> cause i guess that was your prerequisite for this?
[18:27:50] <LeoNerd> Well, if the choice is otherwise not fitting a DMX master on it, then I'll take a single-UART chip
[18:28:03] <LeoNerd> I mean, I might even find a small ATmega would do
[18:31:35] <carabia> anywho, screw that. Apparently the product page lists 441 specs for 841. Even though the title clearly states 841. Go figure. 841 should have 512 b RAM
[18:31:49] <carabia> Sowwy. But atmel's site is screwy.
[18:36:14] <cehteh> LeoNerd: you have registers still for your app :D
[18:37:17] <LeoNerd> Yeah true.. it's a matter of whether I can write an entire SPI-driven DMX master in only the registers plus the three GPIORs though
[18:37:30] <LeoNerd> It sounds a liiiiittle tight
[18:37:45] <cehteh> plus a lot unused hardware registers
[18:38:15] <cehteh> ask Jartza he'll do that .. and generating VGA
[21:41:45] <veek> what is he doing here: http://storage1.static.itmages.com/i/16/0610/h_1465524759_4934637_232fe124ea.png 'E' is the opcode for LDI; k is split into 2 nibbles k_0 and k_1; and the register is a nibble; so how does he get 'E205' for LDI R16, 0x25??
[21:51:17] <veek> O nm LDI starts at 16
[22:46:30] <Casper> I'm surprised that the nibbles for the data is messed up like that
[22:58:07] <veek> hey Casper nahh that book is great but deranged in places
[22:59:08] <veek> as in badly presented, i'd have started with the arch but he draws it out making me want to strangle him
[22:59:30] <veek> he explains that stuff more cleraly later on
[22:59:46] <Casper> so they messed up the 1110 DDDD KKKK DDDD and it is not how it is saved in flash right?
[23:00:51] <veek> umm nope that's how it's saved.. k and d are bits
[23:00:57] <veek> every k is one bit
[23:01:36] <veek> LDI Rd,k is a byteish
[23:01:57] <veek> that's what was so frigging confusing!
[23:04:33] <veek> anyway LDI = E (nibble) and Rd(nibble) and k(byte-split into 2 nibbles). It's stored as E k1(high nibble) d k0(low nibble)
[23:12:04] <veek> much better than the make avr book.. it's like a light refresher course on assembly language
[23:13:08] <Casper> man how stupidly made
[23:13:46] <Casper> thanks (insert whoever divinity you prefer, or anybody else, or me), we don't write in machine language
[23:13:48] <Casper> sl
[23:13:57] <Casper> so don't have to deal with those stupidity