#avr | Logs for 2017-02-03

Back
[04:16:08] <avrdude> is it sufficient to just write "SPDR;" to read the spi data buffer, or do you have to write for example "char data = SPDR;"
[04:26:30] <_ami_> avrdude: always do ch = SPDR; this is important
[04:29:29] <skz81> _ami_, surprizingly enough, SPDR; seems actually enough to READ the register
[04:29:48] <skz81> even with -O2, it just do C to ASM test
[04:30:41] <skz81> "I just did"* some C to ASM tests.
[04:32:22] <skz81> https://hastebin.com/vawoxekike.go
[04:33:51] <skz81> Unsure why GCC does not optimize this out...
[04:37:53] <Haohmaru> personally i'd do { volatile uint8_t meh = SPDR; }
[04:39:47] <avrdude> i just did a test too, SPDR; alone works
[04:46:38] <Haohmaru> i'm not good at testing, i prefer to rely on the language ;P~
[04:49:59] <Haohmaru> and afaik declaring it "volatile" like that tells the compiler that "u cant touch this, taaa-rarara.."
[05:22:37] <skz81> Haohmaru, unsure volatile helps here. Volatile means : do not optimize the reading of what as been declared volatile, as it may change 'in the background"
[05:22:51] <skz81> Here you write to volatile, not reading
[05:24:02] <skz81> Hum maybe (probably, even) SPDR is actually declared volatile, and that's why a STANDALONE readi is not optimized out even with -O2
[05:24:51] <skz81> {register uint8_t meh = SPDR;} maybe's better ?
[05:25:19] <Haohmaru> looks weird
[05:29:30] <skz81> why ?
[05:29:39] <skz81> NOTE : with avr-gcc "__attribute__((unused))" idiom can be helpful to avoid "set but not used" warning that triggers an error with -Werror
[05:41:58] <Emil> eh
[05:42:05] <Emil> SPDR is a data register
[05:42:27] <Emil> reads to it shouldnt be optimized by the compiler anyway
[05:43:28] <Emil> And usually you just wrap the access
[05:45:09] <Emil> unsigned char spi_read_write(unsigned char d){SPDR=d; while(waituntilready); return(SPDR);}
[05:46:32] <Emil> Then if you care about the return value take it
[05:46:44] <Emil> And eh
[05:47:20] <Emil> there is no need to read the SPDR out if you dont care about it
[05:50:55] <Haohmaru> Emil there is on some chips like pics, you need to read it for some associated flags to be cleared
[06:08:00] <Emil> Haohmaru: good thing we are on #avr ;)
[06:09:01] <Haohmaru> i really hope avr doesn't get pic-ified :/
[06:22:35] <Lambda_Aurigae> they are going to be
[06:26:31] * Haohmaru starts crying into Lambda_Aurigae's ear, loudly
[06:26:35] <Haohmaru> WAAAAA :~(
[06:26:50] <Lambda_Aurigae> attiny871 is the first
[06:27:00] <Lambda_Aurigae> an avr getting pic-like peripherals.
[06:27:34] <Haohmaru> will they force us to use their dumb compiler?
[06:29:09] <Lambda_Aurigae> dunno yet
[06:34:02] <Haohmaru> the future is gonna be darker and darker..
[07:14:24] <Jartza> ehh?
[07:14:28] <Jartza> how could they force?
[07:14:33] <Jartza> if it's avr core
[07:14:44] <Jartza> for pic, that might just be possible they continue forcing that
[07:18:33] <Haohmaru> they could if they want
[07:18:54] <specing> Haohmaru: just switch to stm32
[07:19:43] <Haohmaru> specing to blink a LED?
[07:19:59] <specing> sure
[07:22:40] <Jartza> Haohmaru: and how would they remove AVR core support from open source gcc?
[07:23:42] <Haohmaru> they can discontinue the avr chips, release new pin-compatible chips but somehow obfuscated on the inside just enough so that avr gcc doesn't work
[07:23:54] <Haohmaru> i don't know.. there are many ways to break something
[07:24:03] <specing> they can make AVRs with banked ram
[07:24:11] <Haohmaru> x_x
[07:24:18] <specing> guaranteed insta unsupportable
[07:24:21] <Haohmaru> specing take your words back, IMMEDIATELY!
[07:24:24] <specing> NO
[07:24:31] <specing> come to stm32
[07:25:03] * Haohmaru tapes specing's dirty mouf
[07:25:14] * Haohmaru hopes the devil did not hear that
[07:25:25] * specing uses the Schwartz to untape his mouth
[07:25:40] <specing> BANKED RAM NAO!
[07:25:54] <Haohmaru> i'll call the police!
[07:26:29] <specing> the police can't do anything against me, I have a schwartz ring!
[09:04:26] <bss36504> They aren't going to kill the AVR core because it is objectively better than the 8 bit pic core. Relax everyone, it's gonna be fine
[09:06:42] <Haohmaru> look mom, an optimist
[09:10:10] <bss36504> I'm not being an optimist, its the only logical thing to do
[09:11:13] <Haohmaru> since when do microchip only ever do logical things?
[09:11:23] <specing> can we trust creators of a PIC core to do logical things?
[09:11:52] <Haohmaru> just check their programmer.. pickit3
[09:12:02] <Haohmaru> did you say logic?
[09:12:24] <bss36504> I guess since they acquired enough loose cash to purchase another large company lol
[09:16:16] <specing> they'll make us pay for it
[09:16:36] <specing> loose cash = stinky loans
[09:17:24] <bss36504> Are you implying they borrowed the money to buy atmel? I dont think it works that way
[09:18:11] <Haohmaru> they've had a tendancy to buy their competitors before
[09:19:04] <specing> bss36504: sure it does
[09:25:56] <rue_house> the pic core that takes 4 cycles/instruction?
[09:26:21] <bss36504> yeah that's the one I was talking about
[09:26:33] <rue_house> if I want 4 cycles/instruction I'll just go arm
[09:26:40] <bss36504> at any rate, the tiny817 looks pretty neat.
[09:26:50] <bss36504> rue_house: well, exactly my point
[09:28:26] <bss36504> Does Microchip have any ARM offerings?
[09:28:50] <rue_house> dont care, stm32
[09:29:12] <bss36504> Cause if not, then the merger makes sense; they would aquire atmel's 8-bit line and their ARM line, with established tools and userbase without having to spin up their own designs and support
[09:29:52] <Haohmaru> what's so exciting about this attiny817?
[09:30:07] <Haohmaru> 512 bytes RAM dafuq?
[09:30:16] <bss36504> I wouldnt say *exciting* per se, but it's got a DAC and the pic-esque pin muxing thing
[09:30:29] <bss36504> Plus atmel's event system, which is pretty neat
[09:30:55] <bss36504> I'm guessing its intended to be a test chip for their merger
[09:31:31] <bss36504> they needed to validate that their design teams and peripherals would mesh well, so they built that series of Attiny chips as a test vehicle
[09:40:46] <specing> rue_house: arm is more like 4 bytes / instruction :p
[09:41:16] <specing> bss36504: microchip has MIPS offerings (PIC32MX)
[09:55:29] <kc2uez> that attiny817 looks interesting, but 8k flash, what is this flash for ants? I see they mention the attiny1617 any words when will that be out?
[09:58:29] <kc2uez> if they wanted to test the market, why soic and qfn? pdip is way easier to work with for testing things like that
[10:02:04] <Tom_L> not anymore. this is 2017
[10:06:13] <Emil> kc2uez: are you from the 19th century?
[10:06:40] <Emil> Wait the tiny817 has a dac?
[10:07:14] <Emil> interesting
[10:07:27] <Emil> but those ram and flash sizes are ridiculous
[10:08:09] <Emil> though they are probably not meant as a general purpose microcontroller that does a lot of computation and logic
[10:08:32] <Emil> but as one that does one or two things efficiently
[10:09:21] <Haohmaru> 0.5KB RAM .. ;P~
[10:20:56] <kc2uez> so if you guys want to try out a MCU, you guys design it in to a PCB wait for it to come back and try it out or waste a breakout board? I rather just push to a breadboard and try it. is only 24 pins
[10:22:34] <specing> kc2uez: what package?
[10:23:03] <Chillum> I make tiny breakout boards with oshpark
[10:23:14] <Chillum> that way I can breadboard with my surface mount stuff
[10:23:32] <Chillum> I have breakouts for sot-23 transistor and various chips
[10:23:41] <kc2uez> QFN 4x4
[10:23:47] <Chillum> that way I use the exact same parts on my prototype as my PCB
[10:24:32] <Chillum> something like this kc2uez https://oshpark.com/shared_projects/lT9Ckuq1
[10:24:45] <Chillum> $2.30 for 3 copies
[10:25:22] <kc2uez> i don't mind so-23 my last project used an attiny4 no issues
[10:25:23] <Chillum> a lot already exist in their public projects archive, the rest I just make in eagle
[10:25:35] <Chillum> there is also dead-bug style
[10:26:52] <kc2uez> what i was saying if they wanted hobbyist to try out the attiny817, they should have release it on PDIP
[10:26:55] <Chillum> the number of chips that just don't make a through hole version is growing rapidly
[10:27:28] <specing> because noone is using pdip in real products
[10:27:38] <Chillum> the hobby market is so tiny compared to use by professionals. And the cost of creating another package is significant
[10:27:54] <Chillum> people choose things like the attiny817 because it is small
[10:32:16] <kc2uez> i know, i like it. I think i will use it for a few things to try it out.
[10:35:19] <kc2uez> mouser has it for 93 cents and a eval board for 8.89. they even put the arduino shield headers to it.. so not for hobbyist
[10:39:46] <bss36504> kc2uez: Keep in mind the target market of these companies is not hobbyists no matter what they say. They target companies with real budgets for development. Also I can say from personal experience, the cost to package in DIP vs SOIC or QFN is the same if not more for the DIP
[10:42:56] <specing> no way is PDIP-40 cheaper than tqfp-44
[10:43:11] <specing> or PDIP-64 vs tqfp-64
[10:43:50] <kc2uez> i know, i don't mind smd, it is the only thing I use at work. what is this UPDI programming method thing
[10:44:10] <bss36504> Citing what sources, specing? Have you worked with packaging companies?
[10:44:24] <bss36504> Note how I said "From personal experience"
[10:44:24] <specing> bss36504: dude PDIP-64 IS FREAKING YUGE
[10:44:41] <bss36504> dude the die is FREAKING TINY
[10:44:51] <specing> dude plastic isn't free
[10:45:20] <bss36504> also I think you should re-read my original statement. I said the DIP was MORE expensive than QFN or SOIC
[10:45:22] <kc2uez> largest PDIP i have seen is 48 i think, but that was back in like 80's
[10:45:34] <bss36504> poorly worded, granted :p
[10:47:34] <specing> "is the same if not more"
[10:47:44] <specing> it is the first part that I disagre with
[10:47:57] <bss36504> ...for the PDIP
[10:47:59] <specing> kc2uez: I have 2 chips in PDIP-64
[10:48:05] <specing> kc2uez: they are YUUUGEEE
[10:48:10] <bss36504> meaning that the PDIP is more expensive than the SMD counterparts
[10:48:23] <specing> kc2uez: one was recovered from old TV
[10:49:20] <bss36504> poorly worded. Allow me to reiterate: From personal experience, the PDIP costs the same or more than an SOIC/QFN for the same die.
[10:49:51] <specing> so you are telling me that packaging in PDIP-64 costs the same as TQFP-64?
[10:50:10] <specing> I want an example where PDIP packaging costs as much as soic/qfn
[10:50:25] <specing> s/as much/the same/
[10:50:52] <bss36504> oh jeez youre gonna ding me on an inequality. Alright
[10:53:14] <specing> yes
[10:54:03] <bss36504> Suit yourself
[10:55:35] <specing> bss36504 can't deliver. SAD!
[10:56:05] <bss36504> lol
[10:56:24] <bss36504> "His arguments are a disaster!"
[11:01:09] <specing> you are serving alternative facts
[11:01:13] <specing> utter misinformation
[11:06:08] <skz81> alternative facts >> the MOAR interesting concept since decades
[11:06:51] <specing> it does feel good knowing that the US finaly got a taste of its own medicine
[11:15:31] <learath> specing: I have enjoyed the people who just realized last month that the government isn't something to trust :)
[11:16:41] <kc2uez> so to program UPDI you need the ICE? crap, I have a dragon, mkii and stk600
[11:19:27] <kc2uez> ah, found the work around, cool.
[11:21:05] <Lambda_Aurigae> I think tom's programmer does PDI
[11:21:11] <Lambda_Aurigae> not sure what UPDI is though.
[11:21:48] <Tom_L> phone interface protocol
[11:22:27] <Tom_L> UPDI stands for Universal Phone Device Interface (Intel Corporation)
[11:22:46] <kc2uez> unified program and debug interface.. yet another programming protocol so you have to upgrade your cheap asp
[11:23:30] <Tom_L> copyright infringements...
[11:23:38] <Tom_L> law suit
[11:24:01] <kc2uez> check chapter 33 of the attiny817
[11:24:14] <kc2uez> data sheet
[11:24:24] <Tom_L> it's probably a pic avr convoluted mess
[11:24:58] <kc2uez> I see it is 1 wire, so maybe for the best?
[11:26:17] <Tom_L> so was debugwire
[11:26:19] <Tom_L> i think
[11:29:34] <specing> learath: I hope americans face goes https://images.duckduckgo.com/iu/?u=http%3A%2F%2Ffarm1.staticflickr.com%2F211%2F479794372_35b4f4a8d7_o_d.png&f=1
[11:50:07] <learath> specing: that link is weird.
[11:50:35] <learath> and wants me to download it
[11:51:23] <specing> well its duckduckgo
[11:51:43] <learath> yes, I tried deducking it
[14:02:55] <carabia> so i hear the peace-loving muslims are staging crimes against their peace-loving religion in the ole 'murica
[14:03:09] <carabia> Lambda_Aurigae would approve
[14:03:52] <CapnJ> carabia, last warning
[14:04:21] <carabia> i haven't even gotten the first one yet!
[14:07:08] <carabia> the statement holds true on both accounts, historical and modern-day
[14:08:42] * CapnJ polishes his boot
[14:09:03] <carabia> spit on it, too
[14:11:53] <specing> carabia: CapnJ is officially putting you ON NOTICE
[14:12:47] <specing> you didn't appreaciate the kindness of previous operators. Not CapnJ!
[14:15:33] <carabia> cap'n crunch seems to be taking his sweet time polishing his boot
[14:18:47] <carabia> i can only hope for all that praying and almsgiving i have practiced for holy st. stallman, can save me from this socialist predicament
[14:28:19] <Tom_L> specing, are you tired of him?
[14:29:23] <Lambda_Aurigae> I didn' do it!
[14:29:51] <Tom_L> just checking to see if it's reached critical mass yet
[14:30:09] <Tom_L> not here enough to know
[14:30:54] <specing> tired of who?
[14:31:50] <Tom_L> i can polish the boot real shiny if you need
[14:35:47] <carabia> ooh!
[14:36:52] <carabia> look, just kick me then. or are you enjoying the erection off the powertrip?
[14:37:12] -!- carabia was kicked from #avr by Tom_L!~Tl@unaffiliated/toml/x-013812 [carabia]
[14:37:17] <Tom_L> ok.
[14:37:39] <Tom_L> (didn't ban)
[14:39:20] <specing> 0/10 no autorejoin
[14:40:12] <Lambda_Aurigae> hint taken?
[14:40:13] <Lambda_Aurigae> not likely.
[14:43:31] <specing> I thought more highly of carabia
[14:43:44] <specing> but no autorejoin...this is inexcusable
[14:44:01] <Tom_L> he could return if he wants
[14:45:02] <Tom_L> i don't think he was in the same league as flyback
[14:46:09] <Lambda_Aurigae> hehe.
[14:46:22] <Lambda_Aurigae> what was his favorite word
[14:46:23] <Lambda_Aurigae> ?
[14:46:25] <Lambda_Aurigae> Canuk?
[14:46:34] <Tom_L> just to annoy rue
[14:46:40] <Lambda_Aurigae> yup
[14:46:47] <Tom_L> rue even made his bot to reply to it
[14:46:56] <Tom_L> when it was still around
[14:47:00] <Tom_L> tobbor
[14:47:05] <Lambda_Aurigae> yup.
[14:47:08] <Lambda_Aurigae> I remember that.
[14:47:36] <Lambda_Aurigae> dang...he is still online too.
[14:47:47] <Tom_L> yeah he pm'd me a couple times
[14:48:16] <specing> where is dongs
[14:48:21] <specing> I miss that one
[14:48:29] <specing> probably still stuck in #electronics
[14:48:31] <Tom_L> i don't remember that one
[14:48:46] <Tom_L> i left electronics ages ago and never looked back
[14:48:58] <Lambda_Aurigae> I go in there once in a while for a laugh..
[14:49:03] <Lambda_Aurigae> haven't been in for over a year though.
[14:49:16] <kc2uez> but without carabia,who is going to be the channel troll?
[14:49:33] <Lambda_Aurigae> I can if necessary!
[14:49:44] <Lambda_Aurigae> use pic, not avr!
[14:50:03] <Lambda_Aurigae> we should all go back to our roots of the 8051!
[14:50:05] <Tom_L> :)
[14:50:49] <Lambda_Aurigae> sorry, but I can't vote for arm...my thumb doesn't work.
[14:51:09] <kc2uez> i think a good troll is needed to keep people on their toes. they think twice before asking silly questions or going too off topic
[14:56:07] <CapnJ> https://www.youtube.com/watch?v=MKiP-4o3cFI
[16:22:55] <Jartza> evening
[17:18:42] <rue_house> kc2uez, isn't carabina good enough?
[17:20:26] <rue_house> well, I'd have kicked him sooner than later anyhow
[17:20:46] <rue_house> if anyone annoys the channel do point it out to us
[19:12:14] <ENHering> Hi.
[20:26:35] <rue_house> low low high low high high low high
[20:27:18] <rue_house> or not
[20:27:39] <rue_house> oh sorry,
[20:27:58] <rue_house> low low high low high low high high or not low low high low high low high high
[20:29:59] <rue_house> wait, can I be typing in a window while I'm dragging it?
[20:30:33] <rue_house> oh god, I can, I feel so lame for not knowing this earlier
[20:30:47] <rue_house> god I wish I had atleast 3 arms