#avr Logs

Aug 13 2017

#avr Calendar

12:20 AM day_ is now known as daey
12:52 AM Thrashbarg_ is now known as Thrashbarg
01:29 AM JanC_ is now known as JanC
09:31 AM LeoNerd: Does anyone have any thoughts on the practical length limit of a 6pin cable carrying AVR ISP signal?
09:32 AM LeoNerd: I have a piece of equipment with a DE9 socket hooked up to the ISP pins, so I can reprogram from outside. That cable has about 4 inches of length inside the box. If I wanted a trailing plug from there outside, to my programmer, what sort of length am I likely to get away with?
09:32 AM LeoNerd: E.g. would something like 100cm be totally out of the question, or practical?
09:37 AM antto: what could go wrong with the more cable length?
09:38 AM LeoNerd: Capacitive crosstalk. Reflective ringing due to termination effects
09:38 AM LeoNerd: Clock/data skew due to mismatched propagation delay
09:38 AM LeoNerd: MOSI/MISO roundtrip time
09:39 AM antto: yup
09:39 AM antto: so.. some of these can be "fixed" by running the SPI slower
09:39 AM LeoNerd: Hmm.. yeah I suppose most of them actually
09:40 AM antto: i think your best bet is to actually make a cable (maybe even make it twice the length you intend) and hook it to a scope
09:40 AM LeoNerd: However my silly cheap USBASP doesn't actually pay attention to the "please be slower" signal :(
09:40 AM antto: yes, in some programmers, the bitrate argument doesn't seem to do anything
09:40 AM LeoNerd: Oh.. but I do have the jumper too
09:41 AM LeoNerd: It will probably obey that one
09:41 AM LeoNerd: I'm hoping once the device is finished, that reprogramming should be rare
09:41 AM LeoNerd: so if it did have to be slow that wouldn't be so bad
09:42 AM antto: have you thought about a bootloader?
09:42 AM LeoNerd: Well that only moves the problem
09:42 AM LeoNerd: E.g. to serial
09:42 AM antto: it eliminates the programmer
09:42 AM antto: ..just sayin'
10:16 AM Emil: welllll
10:16 AM Emil: it just changes it
10:16 AM Emil: But it does double as a communication channelö
10:58 AM Lambda_Aurigae: LeoNerd, 25cm is about the limit for my stk200 programmer using a 74ls125 driver.
10:59 AM LeoNerd: Mmm
11:12 AM Lambda_Aurigae: I can go longer but it starts to have errors with other electroncs around running.
03:24 PM rue_more: ok, see who can get ahead of me
03:24 PM rue_more: tiny13 running at 4.8Mhz
03:24 PM rue_more: pwm output, 50% at 38Khz
03:25 PM rue_more: using timeer 0
03:26 PM rue_more: zippo:/morfiles/programming/c/avr/tiny13/drivewayTX/v2# calc 4800000/38000
03:26 PM rue_more: 4800000/38000 -->> 126.316
03:27 PM rue_more: so it'll be a little off key
03:27 PM rue_more: TCCR0A =
03:27 PM Emil: rue_more: check the datasheet
03:27 PM Emil: it's often not 38000 but 37999
03:28 PM rue_more: both are verry close enough
03:29 PM rue_more: lets gow ith fastpwm mode, so COM01:COM00 is 11
03:29 PM rue_more: so 0b11xx--??
03:30 PM rue_more: WGM2:WGM1:WGM0 to ...
03:30 PM rue_more: ah yes, ok, this gets interestig
03:31 PM rue_more: 111
03:31 PM rue_more: so
03:31 PM rue_more: TCCR0A = 0b11xx--11
03:32 PM rue_more: TCCR0B = 0b00--1???
03:33 PM rue_more: the divider is 126, that fits in 8 bits, so I can get away with no prescale
03:33 PM rue_more: CS02:CS01:CS00 = 001
03:33 PM rue_more: TCCR0B = 0b00--1001
03:34 PM rue_more: with that, the TOP needs to be set to 126
03:34 PM rue_more: top is OCRA
03:34 PM rue_more: OCRA = 126
03:34 PM rue_more: the pwm value needs to be set to half that
03:35 PM rue_more: 63
03:35 PM rue_more: er nope
03:36 PM rue_more: oh
03:36 PM rue_more: I have to use TCCR0B for this then?
03:37 PM rue_more: cause OCRA has to be used for the TOP
03:40 PM rue_more: ok, so
03:40 PM rue_more: TCCR0A = 0bxx11--11
03:40 PM rue_more: TCCR0B = 0b00--1001
03:41 PM rue_more: OCR0A = 126
03:41 PM rue_more: OCR0B = 63
03:41 PM Emil: Rue we know you like it
03:41 PM Emil: but please use a notepad instead ;)
03:41 PM rue_more: I'm waiting for somone to a) say if I'm right or wrong b) get ahead of me and do all the work before I have to
03:42 PM rue_more: a) or b)
03:42 PM rue_more: TCCR0A = 0b0011--11
03:42 PM rue_more: TCCR0A = 0b00110011
03:42 PM rue_more: TCCR0B = 0b00001001
03:42 PM rue_more: OCR0A = 126;
03:43 PM rue_more: OCR0B = 63;
03:43 PM rue_more: mmm, and there is only 1 timer on the tiny13
03:43 PM rue_more: so a 1ms interrupt is going to be fun
03:44 PM rue_more: maybe if I put an interrupt on the overflow and count off ... 38? events...?
03:45 PM rue_more: ok OCR0B comes out on what pin..
03:45 PM rue_more: PB1
03:46 PM rue_more: 0x33;
03:47 PM rue_more: 0x09;
03:49 PM rue_more: so, if I'm right, we have
03:49 PM Emil: https://emil.fi/jako/kuvat/2017-08-13_23-18-06_EfL8pqjJ.png
03:49 PM rue_more: void Setup38k() { // PB1
03:49 PM rue_more: TCCR0A = 0x33; // 0b00110011 fast pwm for OCR0B, /1 prescaler
03:49 PM rue_more: TCCR0B = 0x09; // 0b00001001 /1 prescaler
03:49 PM rue_more: OCR0A = 126; // 4.8Mhz / 126 = 38Khz
03:49 PM rue_more: OCR0B = 63; // 50% duty
03:49 PM Emil: Opinions?
03:49 PM rue_more: }
03:49 PM rue_more: SSL cypher error Emil
03:49 PM rue_more: find a more backwards compatible site :)
03:49 PM Emil: rue_more: really?
03:49 PM rue_more: yup
03:50 PM Emil: rue_more: can you tell me the error and what you are using?
03:50 PM rue_more: iceweasel 10.0.5
03:51 PM rue_more: http://paste.debian.net/981222/
03:52 PM Emil: Hmmmmmm
03:52 PM Emil: Can you try now?
03:52 PM Emil: I enabled tlsv1.1
03:53 PM rue_more: same
03:53 PM Emil: And now? I enabled v1
03:53 PM rue_more: I like how they provide a 'try again' button, when its obviously gonna be the same
03:54 PM rue_more: nope...
03:54 PM Emil: Alrighty, so it's about the cipher suites
03:54 PM rue_more: my clockis only out 55 sec
03:54 PM rue_more: wonder how I list what this browser has
03:54 PM Emil: I'm using mozillas suggested ssl settings, too :D
03:55 PM rue_more: I have SSL 3.0 and TLS 1.0
03:57 PM Emil: Matey T.T
03:57 PM rue_more: I'm not that worried about man-in-the-middle attacks...
03:57 PM rue_more: maybe I should be, but I'm not
03:58 PM rue_more: well, if I'm doing financial stuff..
03:58 PM rue_more: but thats all https: sites
03:58 PM rue_more: WHY is your site https?
03:58 PM rue_more: I'm gonna go see if I have a tiny13 38Khz osc..
03:58 PM Emil: what?
03:59 PM Emil: Better question is
03:59 PM Emil: why is a site NOT HTTPS
03:59 PM rue_more: Emil, why does the link to see the image need to be secure?
03:59 PM Emil: If a site is not HTTPS I'm pretty much not using it
03:59 PM Emil: rue_more: because security by default is good
03:59 PM rue_more: so, you want to make sure who isn't stealing what when looking at that image?
04:00 PM Emil: I mean if you are okay with "nothing to hide nothing to fear" then sure but I'm not like that
04:02 PM rue_shop3: I'm not saying everything in the world needs to be insecure
04:02 PM rue_shop3: but like
04:02 PM rue_shop3: http://ruemohr.org
04:02 PM rue_shop3: there is nothing there thats not public
04:02 PM Tom_L: rue_shop3, what's a good tool to edit a pdf file?
04:03 PM rue_shop3: if I wanted, I suppose I could lock it down so hard that you would have to come to my house and personally get me to hand you a key to view the site
04:03 PM Tom_L: i want to add my config notes to one
04:03 PM rue_shop3: Tom_L, dunno, I regard pdf's as write-only
04:03 PM rue_shop3: you CAN append a page somehow
04:03 PM Tom_L: somebody had to write em
04:03 PM Tom_L: i can print to pdf to clear any write protection i think
04:04 PM Tom_L: i don't think there is any
04:04 PM rue_shop3: but you have to go to the adobe office and get a key from Fred Matrix, after showing him 3 peices of picture ID, and validating your bank acount with a 1c transfer
04:05 PM rue_shop3: (and finger prints of course)
04:05 PM rue_shop3: (which(duh) go with a background check)
04:05 PM Tom_L: what about DNA?
04:05 PM Tom_L: pee test too?
04:05 PM rue_shop3: not sure, havn't done it in a while
04:05 PM rue_shop3: :)
04:06 PM Tom_L: just thougt you might know
04:06 PM Tom_L: 2nd issue
04:06 PM rue_shop3: write-only
04:06 PM Tom_L: find me a DPDT 5v logic coil relay that will switch a 90v dc motor at around 1A
04:06 PM Tom_L: oh
04:06 PM Tom_L: that's DIN mountable
04:07 PM Tom_L: i'm not finding much
04:07 PM Tom_L: coil current 50ma max
04:07 PM Tom_L: unless i add a transistor which i could..
04:07 PM Tom_L: but would rather not
04:08 PM Lambda_Aurigae: don't forget about leaving a quart of blood for a deposit.
04:08 PM antto: 50mA?
04:08 PM antto: put a bunch in parallel! \o/
04:08 PM * rue_shop3 thinks
04:08 PM * antto hides
04:09 PM Lambda_Aurigae: Tom_L, I could make you one.
04:09 PM Lambda_Aurigae: not too difficult.
04:09 PM antto: he gon' b ur dealer
04:09 PM Lambda_Aurigae: could even make it self-latching on/off.
04:09 PM antto: get addicted nao
04:09 PM Tom_L: i was using 2 SPDT but it backfired on me
04:09 PM Tom_L: one stuck
04:10 PM Tom_L: don't need self latch
04:10 PM Lambda_Aurigae: antto, you know, I had to read that four times before I understood it.
04:10 PM Tom_L: all those have 2 coils that i find
04:10 PM antto: Lambda_Aurigae then i failed.. you were not supposed to understand it
04:10 PM Lambda_Aurigae: I don't read idiot-aol-sms shorthand well.
04:10 PM rue_shop3: Tom_L, 120V?
04:11 PM Tom_L: that would be ok
04:11 PM antto: i'm not on "aol", i don't write SMS..
04:11 PM Tom_L: 90v dc
04:11 PM rue_shop3: 1A tho
04:11 PM Tom_L: i'm not quite so worried about that
04:11 PM antto: so i'm just an idiot, it seems ;P~
04:11 PM Tom_L: i switch at near 0 current
04:12 PM Tom_L: rue_shop3, i think those little motors are around .6A ?
04:12 PM Tom_L: stock sherline
04:12 PM rue_shop3: isn't the voltage isolation on a dip relay like 120V?
04:12 PM Tom_L: i was gonna go talk to my local delta supplier tomorrow
04:12 PM Lambda_Aurigae: Tom_L, I have a bunch that fit everything but the coil voltage.
04:13 PM Lambda_Aurigae: they are 24V
04:13 PM Tom_L: yeah
04:13 PM Lambda_Aurigae: but, I find that if I loosen the spring some they work at 5V
04:13 PM rue_shop3: G2V-2
04:13 PM Tom_L: i could do 24v if i had to but i'd have to glue it together
04:13 PM rue_shop3: oh, digikey is using a more secure site now, I cant do that either
04:14 PM Tom_L: Lambda_Aurigae, i've got my field voltage set to 5v for this
04:14 PM rue_shop3: huh, must be an obsolete number
04:14 PM Tom_L: i found one that was obsolete
04:15 PM Tom_L: will SSR do DC?
04:15 PM Tom_L: i'd even go for that
04:15 PM rue_shop3: G6A-234P-ST15-US
04:16 PM Tom_L: that's close
04:16 PM rue_shop3: https://www.digikey.ca/product-detail/en/omron-electronics-inc-emc-div/G6A-274P-ST40-US-DC5/Z2931-ND/114306
04:17 PM rue_shop3: yea, I'm holding ... almost one
04:17 PM rue_shop3: 250V 2A
04:17 PM Lambda_Aurigae: https://www.digikey.com/product-detail/en/omron-electronics-inc-emc-div/G6B-4BND-DC5/G6B-4BND-DC5-ND/1815912
04:17 PM rue_shop3: ah 80mA coil
04:17 PM Tom_L: just saw that
04:18 PM rue_shop3: hahaha
04:18 PM rue_shop3: thats halarious
04:18 PM Tom_L: why?
04:18 PM Tom_L: it's din mountable
04:18 PM rue_shop3: oh god and its $90, I'm SO not surpirzed
04:18 PM rue_shop3: ok CHINA
04:19 PM Tom_L: all i've found in china is latchable and little chinese girls
04:20 PM rue_shop3: what form factor?
04:20 PM Lambda_Aurigae: din rail really narrows things down.
04:20 PM Tom_L: i could mount it i suppose but most forms don't make that too easy
04:20 PM rue_shop3: https://www.aliexpress.com/item/5V-DC-1-Channel-Solid-State-Relay-Board-module-High-Level-fuse-for-arduino/32419488549.html
04:21 PM Lambda_Aurigae: also seems to double the price,,or more.
04:21 PM rue_shop3: SOMEWHERE there are din holders for the relay they have plugged into that
04:21 PM rue_shop3: https://www.aliexpress.com/item/5PCS-Relay-Module-G3MB-202P-G3MB-02P-DC-AC-PCB-SSR-In-5V-DC-Out-240V/32801472579.html
04:21 PM rue_shop3: ok...
04:21 PM Tom_L: 1 channel
04:22 PM rue_shop3: ea, yea
04:22 PM Tom_L: not DTDT
04:22 PM rue_shop3: aaah, right
04:22 PM Tom_L: i've seen those
04:22 PM Lambda_Aurigae: rue_shop3, that last one only switches AC...not DC
04:22 PM rue_shop3: aaah, right
04:22 PM Lambda_Aurigae: most SSR units are like that.
04:23 PM Lambda_Aurigae: the ones that do DC are MUCH pricier.
04:23 PM Lambda_Aurigae: AC SSR is just a heavy ass triac.
04:23 PM Lambda_Aurigae: basically
04:23 PM Lambda_Aurigae: DC ones are mosfets and other bits to make things work.
04:24 PM rue_shop3: https://www.aliexpress.com/item/2-channel-T73-AC-DC-24V-DIN-Rail-Mount-Relay-Module/32562185337.html
04:24 PM rue_shop3: I'm getting closer, I swear
04:25 PM rue_shop3: Tom_L, do you have 24VDC available?
04:25 PM Tom_L: yeah, that's 2 channel because they use 2 SPDT relays
04:25 PM Tom_L: i have 24v yes
04:25 PM Tom_L: 5 10 24 and 48
04:25 PM * rue_shop3 squints, hah those are bridges!
04:25 PM Tom_L: 24 is normal for industrial cabinets
04:25 PM rue_shop3: thought they were opto drivers
04:26 PM rue_shop3: https://www.aliexpress.com/item/100-brand-new-PCB-Mounting-Adapter-Circuit-board-PCB-Bracket-DIN-Rail-35mm-Adapter/32630557201.html
04:26 PM Tom_L: i don't want to go back down the SPDT relay road
04:26 PM rue_shop3: arg, but its just the holders
04:26 PM Tom_L: i've got mounts i can use
04:26 PM Tom_L: or know someone that will print me some :)
04:27 PM Lambda_Aurigae: digikey has relays that should fit the bill.
04:27 PM rue_shop3: :)
04:27 PM rue_shop3: where do I get the board in the picture!
04:27 PM Tom_L: rue_shop3, those are latching
04:27 PM Tom_L: 2 coils
04:27 PM rue_shop3: no, its just the holders
04:27 PM Tom_L: look at the bottom
04:28 PM Lambda_Aurigae: that last link is just the din rail holder...add your own PCB
04:28 PM Tom_L: there are dozens of those on ebay and they're all latching with 2 coils
04:28 PM Tom_L: Lambda_Aurigae if you scroll down it shows a relay even if it's just a picture
04:29 PM Lambda_Aurigae: yes...it also shows a board without anything but connectors on it...samples of what you can do with it.
04:29 PM rue_shop3: my aliexpress-foo is failing me
04:29 PM Tom_L: i'll check tomorrow locally too
04:29 PM Tom_L: i'm sure they'll be $$
04:30 PM Lambda_Aurigae: need to look through the ones on the power supply boards I have here and see if any are 5V drive.
04:30 PM Tom_L: i could go 24v but i'd need to make a transistor circuit for it to switch from 5v
04:30 PM rue_shop3: oh burn, grrrrrr
04:30 PM Tom_L: i'd like it to be self contained because i'm running out of room
04:31 PM rue_shop3: searching for soemthing I boughtg
04:31 PM rue_shop3: damn me for clearing out ancient history
04:31 PM Tom_L: transistor with a couple resistors would do it wouldn't it?
04:34 PM rue_shop3: the frustrating part is that, when I find it, you will have given up and my search will have been a waste of time
04:34 PM Tom_L: no, i'm still waiting
04:34 PM rue_shop3: WHERE IS IT
04:35 PM Tom_L: don't wanna order from dk because of the min order stuff and shipping
04:35 PM Tom_L: so local or ebay or china would work
04:35 PM Tom_L: 21900 yesterday
04:36 PM Tom_L: 525600
04:37 PM rue_shop3: I'm glad aliexpress isn't a box store I could go wander thru shopping
04:37 PM Tom_L: you might go broke
04:37 PM rue_shop3: I could just see the awkward moment at the till when the total is $36000.00 and I dont know what to put back
04:38 PM rue_shop3: 'cause everything is such a good deal
04:38 PM Lambda_Aurigae: long as it is 36K canadian you are fine...
04:38 PM Lambda_Aurigae: that's like $24.51 US?
04:38 PM rue_shop3: "CMON, WERE CLOSING IN 5 MINUTES, __FIGURE IT OUT__"
04:39 PM Lambda_Aurigae: like me as a kid when mom would send me to the store for bread and milk and give me an extra dollar or two and tell me I could spend the extra on candy.
04:39 PM Lambda_Aurigae: we had 1, 3, 5, and 10 cent candies back then.
04:40 PM rue_shop3: 1c was double-bubble
04:40 PM Lambda_Aurigae: I would spend half an hour figuring out what I could buy to the penny.
04:42 PM Lambda_Aurigae: I would avoid the NTE electronics store when I lived in kansas city for just such things.
04:42 PM rue_shop3: NTE had walk-in stores?
04:42 PM Lambda_Aurigae: I would go in with a set amount of cash...and shop for an hour or more to get as much as I could out of every dollar....usually leaving with less than a dollar out of 100 I started with.
04:42 PM rue_shop3: did ECG?
04:42 PM Lambda_Aurigae: yeah.
04:43 PM Lambda_Aurigae: dunno bout ECG
04:43 PM Lambda_Aurigae: this NTE store was a jameco store too....
04:43 PM Lambda_Aurigae: was an electrical supply store that did NTE and Jameco stuff.
04:43 PM rue_shop3: ECG catalog was better, better diagrams
04:43 PM Lambda_Aurigae: glub but I spent a lot of money in there over the years.
04:44 PM rue_shop3: back when 10 transistors cost $5?
04:44 PM Lambda_Aurigae: hell, 2n2222 I could get 10 for under a dollar.
04:45 PM rue_shop3: all I had was radioshack, and It was in the last few years they had components, nothing could be ordered in, what was on the shelf was it.
04:45 PM Lambda_Aurigae: this was in the late 90s
04:45 PM Lambda_Aurigae: yeah...rat shack went horribly downhill.
04:45 PM Lambda_Aurigae: they had franchise stores that couldn't direct order from corporate either...
04:45 PM Lambda_Aurigae: they got what they were sent for most stuff.
04:45 PM rue_shop3: I'd have a voice rec'g chip if I'd existed a few years earlier
04:46 PM Lambda_Aurigae: hehe.
04:46 PM Lambda_Aurigae: I had one of those many years ago.
04:46 PM rue_shop3: they couldn't get it
04:46 PM Lambda_Aurigae: also the text to speech chips too.
04:46 PM rue_shop3: "stop" "go" "left" "right"
04:47 PM rue_shop3: haha, I'm exhausting lists of arduino searches
04:47 PM rue_shop3: amazing
04:47 PM Lambda_Aurigae: for what?
04:48 PM rue_shop3: the board I have sitting beside me
04:48 PM Lambda_Aurigae: I bet an avr could do simple voice recognition as well as that chip did.
04:48 PM rue_shop3: that tom needs
04:48 PM rue_shop3: Lambda_Aurigae, if I understood how they did it
04:48 PM Tom_L: ok some bloak from canada gave me a canadian bak this week and my bank didn't like that much
04:48 PM Tom_L: check*
04:48 PM rue_shop3: I suspect its a multi-filter with counters and stuff
04:50 PM rue_shop3: aliexpress removed the - operator
04:50 PM rue_shop3: I cant filter out junk anymore
04:53 PM Tom_L: https://www.digikey.com/product-detail/en/omron-electronics-inc-emc-div/G6B-4BND-DC5/G6B-4BND-DC5-ND/1815912
04:53 PM Tom_L: that looks like 4 relays
04:53 PM Tom_L: is that 4 for ninety bux or one?
04:54 PM rue_shop3: AHA!!!!!!
04:54 PM rue_shop3: FOUND IT!!!!! FOUND IT!!!!!
04:54 PM rue_shop3: god I almost gave up
04:54 PM * rue_shop3 dances
04:54 PM Tom_L: you're not one to do that
04:55 PM rue_shop3: https://www.aliexpress.com/item/DIN-Rail-Mount-Adapter-Prototype-PCB-Kit-For-UNO-Mega-2560-etc/32301845751.html
04:55 PM rue_shop3: they didn't SAY arduino
04:55 PM rue_shop3: https://www.aliexpress.com/item/Prototype-PCB-with-DIN-Rail-Adapter-47-4-x-72mm-for-DIN-Rail-Projects-DIY/32409348266.html
04:55 PM rue_shop3: same price, better suited
04:56 PM Tom_L: where's the relay?
04:56 PM rue_shop3: DIY
04:56 PM rue_shop3: but you can put a header, a relay, a transistor
04:56 PM rue_shop3: opto isolate the relay coil if you want :)
04:56 PM Tom_L: unless the relay pins are too big
04:57 PM rue_shop3: remember the 80mA one?
04:57 PM Tom_L: i thought i still had it open but i closed it
04:57 PM Tom_L: but yes
04:57 PM rue_shop3: https://www.aliexpress.com/item/50PCS-RY12W-K-RY12W-K-12V-12V-RELAY-DIP-Free-shipping/32595628441.html
04:57 PM rue_shop3: (well, you know)
04:59 PM rue_shop3: huh, those are kinda pricey
05:00 PM rue_shop3: ok its yours now
05:00 PM rue_shop3: where is my tiny13
05:06 PM Tom_L: https://www.digikey.ca/product-detail/en/omron-electronics-inc-emc-div/G6A-274P-ST40-US-DC5/Z2931-ND/114306
05:07 PM Tom_L: that one?
05:07 PM rue_shop3: oh I closed chromium
05:08 PM rue_shop3: hmm $6ea dk, or $1ea china..
05:08 PM rue_shop3: how soon do you need it working?
05:08 PM Tom_L: no big rush
05:08 PM Tom_L: i'd like to test the software though
05:09 PM rue_shop3: if you use a board like that one I pointed out with a relay driver on it, you might as well go for a 24V relay, keep the noise off the 5V bus
05:09 PM rue_shop3: (or 12)
05:09 PM Tom_L: yeah i agree
05:09 PM Tom_L: 24 is more common
05:09 PM rue_shop3: I figured
05:09 PM Tom_L: draw me up a workable circuit with opto isolation :D
05:10 PM rue_shop3: hahah
05:10 PM Tom_L: i could pull the opto from these bad ones
05:10 PM rue_shop3: personally, I'd cheat
05:10 PM rue_shop3: I'd use one of those fet output optos and drive the relay directly with it
05:10 PM rue_shop3: THEN AGAIN
05:10 PM rue_shop3: the current on a 24V relay has to be __PIFFLE__ and a normal opto could prolly drive it find
05:10 PM rue_shop3: that said
05:11 PM rue_shop3: GOD I'M A SUCKER FOR THIS
05:12 PM rue_shop3: for reference
05:12 PM Tom_itx: https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/H11A817C/H11A817C-ND/253586
05:12 PM rue_shop3: https://www.digikey.ca/product-detail/en/te-connectivity-potter-brumfield-relays/C93435/C93435-ND/2398857
05:12 PM rue_shop3: haha
05:12 PM Tom_itx: i've got some of those here somewhere
05:13 PM rue_shop3: coil current = 12.5mA
05:13 PM rue_shop3: continious emitter current is 50mA
05:13 PM rue_shop3: its good for a direct drive
05:14 PM Tom_itx: the opto?
05:14 PM rue_shop3: yep
05:14 PM rue_shop3: of a 24V coil relay
05:14 PM Tom_itx: i'll have to see if i can find em
05:14 PM rue_shop3: just remember the flyback diode
05:14 PM Tom_itx: yeah
05:14 PM Tom_itx: says i have 10 here
05:14 PM rue_shop3: pretty good,
05:14 PM rue_shop3: 1 relay, 1 opto, 1 resistor, 1 diode
05:14 PM rue_shop3: 1 scotch, 1 burb....
05:15 PM rue_shop3: wait a sec, thats a different...
05:15 PM Tom_itx: dunno wtf i got them for though...
05:15 PM Tom_itx: hmm
05:16 PM cehteh: rue_shop3: https://www.reichelt.de/Reedrelais/SIL-7271-DHR-5V/3/index.html?ACTION=3&LA=2&ARTICLE=151557&GROUPID=7617&artnr=SIL+7271-DHR+5V&SEARCH=%252A
05:16 PM rue_shop3: ist nin DPDT
05:17 PM cehteh: no
05:17 PM rue_shop3: nin
05:18 PM rue_shop3: hey, this is #avr
05:19 PM rue_shop3: oh, geez, I been off topic almost all day
05:19 PM rue_shop3: thats awefull
05:19 PM Tom_L: no
05:19 PM rue_shop3: where is my tiny13!?
05:19 PM Tom_L: we're gonna drive this with an avr
05:19 PM rue_shop3: oh
05:19 PM rue_shop3: ok, all good then
07:52 PM rue_shop3: is the top speed for the tiny13 4.8 or 9.6Mhz?
07:56 PM enh: speed = space / time...
07:57 PM rue_shop3: I'm going too fast and that why I have no room?
07:59 PM rue_shop3: <rue_more> TCCR0A = 0b00110011
07:59 PM rue_shop3: <rue_more> TCCR0B = 0b00001001
07:59 PM rue_shop3: and I need to change wgm 2:1:0 to 101
07:59 PM cehteh: rue_shop3: 20mhz
08:00 PM bss36504_home: Looking for suggestions, I have this lookup challenge in an API I'm developing for ARM M0, but that's nto the important part. Basically peripherals can be muxed onto GPIOs, but of course only in certain combinations. To make the API more "user friendly", I've tried to make lookup tables that will verify that the mux option is correct.
08:00 PM bss36504_home: currently looks like this: https://pastebin.com/nN9475DJ
08:00 PM bss36504_home: Looking to see if anyone has a more memory efficient way of storing this info, that won't also incur a penalty to iterate over the list.
08:01 PM bss36504_home: The ADC example seems ok, but for the I2C muxing it is much more complicated. Two I2C channels, with independant SDA and SCL muxing per I2C...yeesh.. lots of tables.
08:01 PM bss36504_home: And, Im sucking up a huge block of data memory every time I make one of these.
08:02 PM rue_shop3: TCCR0A = 0b00110001
08:02 PM rue_shop3: so 0x31
08:04 PM cehteh: bss36504: you can store data in single bits
08:04 PM bss36504_home: True, that was one thought I had. It definitely would cut down on memory usage.
08:04 PM cehteh: and/or for that many repetitions, you may use rle
08:05 PM bss36504_home: Problem in the ADC case is that I use the lookup table to store the ADC channel.
08:05 PM cehteh: i havent followed what you are doing
08:05 PM cehteh: also put data in progmem
08:05 PM bss36504_home: I linked a short paste (looks longer than it really is)
08:05 PM cehteh: and maybe calculate it arithmetically
08:05 PM cehteh: instead storing tables
08:05 PM bss36504_home: this is ARM GCC, const will put it in flash
08:06 PM bss36504_home: or .rodata to be specific
08:06 PM bss36504_home: The MCU is a KL25Z. The mux table is not exactly linear lol
08:07 PM cehteh: ports are 32 bit wide?
08:07 PM bss36504_home: yeah
08:07 PM cehteh: err no
08:07 PM cehteh: ok
08:07 PM bss36504_home: whether they have 32 pins is another story...
08:07 PM cehteh: i dont get the thing exactly but looks like your tables have a lot redundancy
08:08 PM cehteh: and -1 on uint8_t ... bad that the compiler doesnt cry there :D
08:09 PM bss36504_home: Well yeah, they do and they dont. Basically the mux lookup allows me to pass a Port and a Pin to the function, and it will find the mux value appropriately. The AB table chooses between ADC channel A and ADC channel B
08:09 PM bss36504_home: oh yeah, forgot about that. It probably warns me...
08:09 PM bss36504_home: or I have that warning off.
08:09 PM cehteh: biggiest values in these tables is 15? aka 4 bits?
08:10 PM cehteh: except the -1
08:10 PM bss36504_home: indeed.
08:10 PM bss36504_home: I suppose I could encode my data in bits based on largest value
08:11 PM bss36504_home: That could work
08:11 PM bss36504_home: I'd need to make some macros so it's not completely unreadable :P
08:11 PM bss36504_home: This is kind of what I was heading toward, and I'm glad someone else agrees
08:11 PM cehteh: first table doesnt use 2 as value you can use that as sentinel instead -1
08:11 PM cehteh: then store data in 4 bits
08:12 PM cehteh: but still a lot redundancy
08:12 PM cehteh: porta is always -1 or do i see that wrong?
08:13 PM bss36504_home: redundancy is acceptable if I can reduce the overall memory usage.
08:13 PM bss36504_home: and yes, PORTA has no ADC on it.
08:13 PM bss36504_home: Which I guess could be hardcoded
08:13 PM cehteh: just remove it from that table
08:13 PM cehteh: well where/what memory do you want to conserve?
08:13 PM cehteh: program space or ram?
08:14 PM bss36504_home: Overall flash usage. This chip has like 128K so it's not like I'm gonna run out, its really the principle of the matter
08:14 PM cehteh: you may try to convert the whole thing into switch/case and let the compiler do the optimization and see
08:14 PM cehteh: sometimes that works pretty well
08:15 PM bss36504_home: I was hoping it would convert the table into literals
08:15 PM cehteh: esp with that sparse data
08:15 PM cehteh: literals?
08:15 PM bss36504_home: Like, not even bother keeping the lookup table around, since the function is inline
08:15 PM cehteh: look at the code it generates
08:16 PM cehteh: maybe it does but it will generate code which is perhaps more generic than you need (aka porta is always -1)
08:16 PM cehteh: but could be as well that it keeps the table around somewhere
08:17 PM cehteh: switch/case will usually be pretty good optimized
08:21 PM bss36504_home: Seems that it keeps the table around, unfortunately
08:21 PM bss36504_home: Bitfields might be the way to go.
08:22 PM bss36504_home: Anyway, time for food and Game of Thrones. THanks for the input cehteh
08:22 PM cehteh: try switch/case first
08:22 PM bss36504_home: will do
08:23 PM cehteh: otherwise or when the table would be *much* biggier i'd use bitfields and RLE
09:04 PM enh: So many people join and leave without saying a word...
09:05 PM Lambda_Aurigae: I had to turn the join/parts messages off a long time ago.
09:05 PM Casper: it happend
09:05 PM Lambda_Aurigae: I would have pages of join/part between live posts.
09:07 PM enh: Just did that
09:07 PM enh: The member list suggests avr is a male hobby.
09:08 PM Lambda_Aurigae: well, there is Jan in here once in a while.
09:09 PM Lambda_Aurigae: but i have my doubts as to the gender of that one.
09:09 PM enh: I just removed all avr tools from crosspack avr on my mac and installed osx-cross/homebrew-avr. I hope it works well.
09:10 PM Lambda_Aurigae: I went 100% mac for a month a couple of years ago.
09:10 PM * rue_shop3 shudders
09:10 PM enh: The only possible female name I see in the member list is someone called rebecc_
09:10 PM Lambda_Aurigae: the hardest part was getting neutered for the project.
09:10 PM rue_shop3: I dumped apple cause of their terrible DIY support
09:11 PM enh: I use my mac since 2010. Was a heavy linux user before that. I could migrate all to mac without much trouble.
09:11 PM Lambda_Aurigae: the mac interface just bugs the hell outta me.
09:12 PM Lambda_Aurigae: the os behind the scenes is fine.
09:12 PM enh: But most of what I do is command line, gcc, makefiles, etc
09:12 PM enh: homebrew and macports makes my life much easier.
09:12 PM Lambda_Aurigae: never was able to get menus attached to the windows like they should be.
09:12 PM enh: most of linux software can be installed with them.
09:13 PM Lambda_Aurigae: always that fucking menu bar at the top of the screen.
09:13 PM enh: Once you get used to that, windows looks very strange
09:13 PM Lambda_Aurigae: I will never get used to it.
09:13 PM Lambda_Aurigae: and I don't use windows.
09:14 PM Lambda_Aurigae: mate desktop on ubuntu or debian.
09:14 PM enh: differences make humanity stronger
09:15 PM enh: well... more or less like that.
09:15 PM Lambda_Aurigae: humanity is an infection that needs a strong antibiotic.
09:16 PM enh: I wonder when we will be able to go easily against gravity. Then cities will fly and most people will live in hovering cities or space platforms. The life there will be so cool that nobody will want to stak on the surface, where I will be.
09:16 PM Lambda_Aurigae: I have one client who is all about mac...all the computers in the office are mac...
09:16 PM Lambda_Aurigae: they have microsoft office on the macs
09:16 PM enh: So they are not all macs
09:17 PM Lambda_Aurigae: and parallels,,,running windows 7....in which they do everything EXCEPT running office apps,,which are on the mac side.
09:17 PM Lambda_Aurigae: but they have mac computers so they won't get virused.
09:17 PM enh: Amazing setup.
09:17 PM enh: I cry when I see those things
09:17 PM Lambda_Aurigae: and run this funky cad software on the windows side.
09:18 PM enh: if mac, use mac software.
09:18 PM Lambda_Aurigae: well, this software is only available for windows....
09:18 PM enh: then use windows
09:18 PM Lambda_Aurigae: my thought was, spend 1/4 the money, get the same hardware, and just run windows.
09:18 PM enh: and remove the damned thing from the network
09:18 PM Lambda_Aurigae: but, nope....otta have mac because it's more secure.
09:18 PM rebecc_: enh: i know lots of women on IRC don't use overtly feminine names in some part to avoid the tedious baggage that comes with openly being a woman in an online space
09:19 PM enh: I use mac for most stuff. For programming, I use console
09:19 PM Lambda_Aurigae: I have a mac at work for testing stuff and to train sales and techs how to work with mac drivers for xerox devices.
09:20 PM Lambda_Aurigae: I have one windows7 install in virtualbox to run internet explorer for my xerox manuals...that runs on top of a debian install on my laptop...
09:21 PM Lambda_Aurigae: my laptop and desktop are both running debian at work
09:21 PM enh: rebecc_: I can imagine how tedious this can get
09:21 PM Lambda_Aurigae: hehe..I know plenty of guys who use female names just so they can get hit on...
09:21 PM enh: Lambda_Aurigae: My mac is mid2010. I believe I need to setup a plan B soon.
09:22 PM Lambda_Aurigae: enh, I got a nice ASUS i7 laptop from tiger direct for 500 dollars about a year or so ago.
09:22 PM Lambda_Aurigae: was an open box.
09:23 PM Lambda_Aurigae: I upgraded from 4GB ram to 12GB and put a 240GB SSD in it, both of which I had laying around.
09:23 PM enh: something to think about
09:23 PM Lambda_Aurigae: moved the 1TB spinning drive to a drive bay adapter that goes int he DVD slot.
09:23 PM enh: much easier to work with
09:24 PM Lambda_Aurigae: quad core 2.8GHz hyperthreaded i7...
09:24 PM Lambda_Aurigae: dual video card system....intel/AMD
09:24 PM enh: for a quarter of the price of an equivalent mackbookpro
09:25 PM Lambda_Aurigae: was a bitch to get the video working properly but once I got everything sorted out it plays KSP at full detail level quite nicely.
09:25 PM Lambda_Aurigae: yeah.
09:25 PM enh: it is always a problem to get the video working on linux
09:26 PM enh: I had to update the nvidia drivers once a month on my hp
09:26 PM Lambda_Aurigae: only 1366x768 resolution but it's not bad for a 15 inch laptop..
09:26 PM Lambda_Aurigae: I haven't updated the drivers on this since I got it working.
09:26 PM Lambda_Aurigae: they are rock solid though.
09:26 PM Lambda_Aurigae: normal display runs on the intel video chipset
09:27 PM Lambda_Aurigae: when I go full screen for some games it switches over to the nvidia video card.
09:27 PM enh: automagically?
09:27 PM Lambda_Aurigae: yup.
09:27 PM enh: hum
09:27 PM Lambda_Aurigae: windows does it natively
09:27 PM Lambda_Aurigae: took me almost a month of futzing to get linux to do it.
09:28 PM enh: my linux experience was mostly redhat/fedora, then freebsd.
09:29 PM Lambda_Aurigae: I don't play ksp on the laptop much anymore though...flipped over to the dell poweredge t420 dual quad core hyperthreaded 2.8GHz xeon box with 32GB ram..hehe
09:29 PM enh: that is a much better toy
09:29 PM Lambda_Aurigae: I can load LOTS of mods on that one.
09:29 PM Lambda_Aurigae: and it has a bigger monitor attached.
09:29 PM Lambda_Aurigae: I really need a newer video card though.
09:29 PM enh: when I move outside brazil I'll assemble a better computer
09:29 PM Lambda_Aurigae: it hasan older ati card that only has the open source drivers...
09:30 PM Lambda_Aurigae: the t420 was free.
09:30 PM Lambda_Aurigae: came with 3 15Krpm 6GB/s dual channel SAS drives.
09:30 PM Lambda_Aurigae: I added 3 more for 40 bucks each from ebay.
09:30 PM enh: here a good computer can cost a lot of mone
09:30 PM enh: y
09:30 PM Lambda_Aurigae: the t420 is an older server...like 5 or 6 years old..
09:30 PM Lambda_Aurigae: but the xeons still kick ass.
09:31 PM enh: i can imagine
09:31 PM Lambda_Aurigae: core for core they are faster than the i7 at the same clock speed.
09:31 PM Lambda_Aurigae: and I have 8 cores/16 hyperthreads on that one.
09:32 PM enh: that must work very fast
09:32 PM Lambda_Aurigae: more computing power in my living room than existed in the world in 1970 most likely.
09:32 PM enh: probably in your cell phone too
09:32 PM Lambda_Aurigae: true.
09:33 PM Lambda_Aurigae: possibly, if I add all the laptops in this room right now I could push it to 1980.
09:33 PM enh: A cell phone today can esily guide a missile
09:33 PM Lambda_Aurigae: because the wifey has 3 i5 laptops, I have 3 i5 laptops, plus the i7 and the xeon box.
09:33 PM Lambda_Aurigae: oh hell, an AVR can guide a missile.
09:33 PM enh: depends on the missile
09:34 PM Lambda_Aurigae: an atmega1284p has more raw processing power than what was used to send the first man to the moon.
09:34 PM enh: cruise had image recognition
09:36 PM Lambda_Aurigae: the computers on the minuteman missiles are less powerful than your average atmega chip.
09:37 PM enh: That is an industry that makes a lot of money
09:38 PM Lambda_Aurigae: yup.
09:38 PM Lambda_Aurigae: radiation hardened 8086 processors.
09:38 PM Lambda_Aurigae: I think they are up to 80386-16 for current mil spec rad hardened certified processors.
09:39 PM enh: I almost worked for one of those companies. At the time, my stomach twisted when they uncovered a missile warhead. I thought I should not participate in people killing and desisted.
09:40 PM Lambda_Aurigae: I did work for one of those...only it wasn't exactly a company..
09:40 PM enh: Today I see these things as defen(s|c)e
09:40 PM Lambda_Aurigae: I was in the USAF, in nuclear weapons test monitoring.
09:40 PM Lambda_Aurigae: I learned more about nukes than I ever wanted to know.
09:40 PM enh: I cannot imagine
09:40 PM Tom_L: a friend worked in one of the silos
09:40 PM Lambda_Aurigae: when I got out in 1991 I was informed that stuff I knew was classified for 25 years.
09:41 PM Lambda_Aurigae: just before that 25 year period was expired I was informed that it was extended to 50 years.
09:41 PM enh: I would classify those things for 100 years.
09:42 PM enh: Some years ago a brazilian wrote a book about nuke technology
09:42 PM Lambda_Aurigae: I know how they are built, how they function, what is needed, what ISN'T needed.
09:42 PM enh: he worked with that. People all over the world came here to ask him questions.
09:42 PM Lambda_Aurigae: how hard and how simple it would be to detonate a nuke if I had one to hand.
09:43 PM Lambda_Aurigae: the different kinds of warheads, different technologies used in the production.
09:43 PM Lambda_Aurigae: all so I would know just what weapon was actually used when I saw the signals that showed a nuke was detonated.
09:44 PM enh: Unfortunately this is necessary to be known.
09:44 PM Lambda_Aurigae: I can look at seismic readings from multiple stations, and, if I know the details of the station, I can point you to the location of the blast, depth below ground(more or less), and yield of the weapon.
09:45 PM Lambda_Aurigae: yield being somewhat variable by the rock type and density where it is set off...but, with a little geological research that can be narrowed down.
09:45 PM Lambda_Aurigae: the news sources that say they don't really know the exact size of the korean weapons set off....BULLSHIT!
09:46 PM Lambda_Aurigae: they know to the kiloton, probably to the quarter-kiloton.
09:46 PM enh: Do you think your president will vaporize north korea?
09:46 PM Lambda_Aurigae: and from that information, along with air samples taken shortly after the detonation, they can tell you how the weapon was made, what type of warhead, and even where the fissionable material came from.
09:46 PM enh: I think he will
09:46 PM Lambda_Aurigae: not as a first strike.
09:47 PM Lambda_Aurigae: but if they launch something against us, north korea will become a nice glassy reflective surface.
09:47 PM Tom_L: fear is a good deterent
09:47 PM Lambda_Aurigae: hell, it's small enough we don't even need nukes....we can smooth over that country with conventional weapons in a matter of days if we really wanted to.
09:48 PM enh: i believe that guy is crazy enough to try. Do you have radars pointed upwards too?
09:48 PM Lambda_Aurigae: it would be much easier to just take out the fearless leader and 100 of his closest friends with a few surgical strikes.
09:48 PM Lambda_Aurigae: of course.
09:48 PM Lambda_Aurigae: pointed up and down.
09:48 PM Lambda_Aurigae: we can see any launch from that country before it leaves the ground.
09:48 PM Lambda_Aurigae: just like we did during desert storm/desert shield.
09:49 PM enh: With enough power a parabolic launch can come almost vertical over US
09:49 PM Lambda_Aurigae: we moved 2 IR sats over the area with a 1 meter resolution and 2 degC sensitivity
09:49 PM Lambda_Aurigae: guaranteed they have at least 2 over north korea area now.
09:49 PM enh: I hope they do
09:50 PM Lambda_Aurigae: and north korea can barely reach guam with their current technology.
09:50 PM enh: I would have a thousand agents there too.
09:50 PM Lambda_Aurigae: no way they can reach continental USA
09:50 PM Lambda_Aurigae: would need sub launches for that with their current tech.
09:50 PM Lambda_Aurigae: and the bombs that they have set off so far are most likely waaay too big for anything they can fire from a sub.
09:51 PM Lambda_Aurigae: their technology level is a bit more advanced than Iraq's tech level in 1990.
09:51 PM enh: Do they have subs?
09:51 PM Lambda_Aurigae: yes.
09:52 PM Lambda_Aurigae: old russian diesel subs most likely.
09:52 PM enh: US uses their money wisely.
09:52 PM Lambda_Aurigae: not really
09:52 PM Lambda_Aurigae: but we spend a lot of it.
09:53 PM Lambda_Aurigae: and have some fun toys.
09:53 PM enh: You live in a well driven country
09:53 PM enh: Which knows how to handle force
09:53 PM enh: and technology
09:53 PM Lambda_Aurigae: I know the tech level we had in the military in 1991 intimately....I can extrapolate a lot of what the military has these days from what I know of technology in the civilian world and what I know of how the military works.
09:54 PM _ami_: american president is STUPID
09:54 PM Lambda_Aurigae: I know that some of the tech I saw in 1991 didn't hit the civilian market until almost 2010...and some of it never has.
09:54 PM Lambda_Aurigae: _ami_, he is a spoiled brat...
09:54 PM enh: I can only imagine the gap between military and civilian technology in your country
09:55 PM _ami_: i am currently living in s. korea.
09:55 PM _ami_: i can tell you one thing.. he is creating unnecessary tensions
09:55 PM Lambda_Aurigae: enh, we had 1TB harddrives in desktop computers in 1986, for starters...along with optical mice.
09:55 PM _ami_: who runs govt. on twitter.
09:56 PM Lambda_Aurigae: _ami_, as I said, a spoiled brat...
09:56 PM Lambda_Aurigae: daddy gave him a bunch of money then he turned it into more money, went bankrupt, then borrowed money and turned that into a shitload of money...then ran for president.
09:56 PM enh: I'm not talking about Trump. I'm talking about people who contructed a forward thinking country
09:57 PM Lambda_Aurigae: socially inept, yeah...spoiled, yeah...stupid? Not so much as George Bush Jr was.
09:57 PM enh: Lambda_Aurigae: Do you think 11/09 was an inside job?
09:57 PM Lambda_Aurigae: that fucker went to war with doctored documents as proof that were outdated when I got out of the military.
09:57 PM Lambda_Aurigae: not an inside job but someone fell down trying to stop it.
09:58 PM Lambda_Aurigae: mostly the sheeple on the planes that let some towelheads hijack the planes with BOX CUTTERS!
09:58 PM enh: Did you wath loose change? Those arguments make sense?
09:58 PM enh: watch
09:58 PM Lambda_Aurigae: never heard of it.
09:58 PM enh: available on youtube
09:59 PM Lambda_Aurigae: a lot of conspiracy theories available on youtube.
09:59 PM enh: that one is quite interesting
09:59 PM enh: but still, changes nothing
09:59 PM Lambda_Aurigae: _ami_, I'm afraid that we will be going to war in the next 2 years...no doubt in my mind..
10:00 PM Lambda_Aurigae: and a lot of people will get hurt.
10:00 PM _ami_: Lambda_Aurigae, i heard that war will happen after olympics gets finished in s. korea
10:00 PM enh: I bet in a world war in less than 5 years.
10:00 PM Lambda_Aurigae: I feel sorry for the people in that area.
10:01 PM enh: world is a chess board. slamic state, north korea, putin...
10:01 PM Lambda_Aurigae: enh, won't go worldwide...russia won't get involved directly...it will be N. Korea and usa with china stepping in.
10:01 PM Lambda_Aurigae: once all hell breaks loose then the arabs will jump in with both feet.
10:01 PM enh: and ISIS?
10:01 PM _ami_: s. korea will also involve.
10:01 PM _ami_: i think n. korea will attack s. korea in case usa attacks them
10:02 PM Lambda_Aurigae: japan will blow the shit out of N. Korea if they drop so much as a firecracker in japanese territory.
10:02 PM _ami_: Seoul would be first target. 10m people lives here.
10:02 PM Lambda_Aurigae: and, yes, japan has nukes.
10:02 PM Lambda_Aurigae: made by the USA.
10:02 PM enh: japan with nukes is amazing
10:02 PM * Tom_L thinks he joined #wargames instead of #avr
10:03 PM Lambda_Aurigae: Tom_L, I can shut up if you want.
10:03 PM Lambda_Aurigae: nobody has anything else to discuss....sorry.
10:03 PM Tom_L: i don't care
10:03 PM Tom_L: just usually don't find much ot discussion here
10:03 PM Lambda_Aurigae: hehe
10:04 PM _ami_: war started by USA had created more problems.
10:04 PM Lambda_Aurigae: yes.
10:04 PM _ami_: i hope they learn from history.
10:04 PM Lambda_Aurigae: we started a couple in the middle east that we are still licking our wounds over.
10:04 PM Tom_L: history repeats
10:04 PM enh: they wont, _ami_
10:04 PM Lambda_Aurigae: same in vietnam
10:04 PM _ami_: same in iraq/seriya
10:05 PM _ami_: ISIS borns because of this.
10:05 PM Lambda_Aurigae: _ami_, that's the two in the middle east.
10:05 PM enh: US even intervened here in brazil
10:05 PM Lambda_Aurigae: ISIS was there before..they just grew bigger shoes because of the power vacuum we left.
10:05 PM _ami_: Lambda_Aurigae, because saddam used to fuck them before they come out of shoes
10:05 PM enh: ISIS should stop destroying ancient history sites
10:06 PM Lambda_Aurigae: ISIL...
10:06 PM _ami_: he used to burn them in chambers
10:06 PM Lambda_Aurigae: ISIS is the name given by the american television.
10:06 PM enh: what means ISIL?
10:07 PM Lambda_Aurigae: just like they can't fucking pronounce Al-Qaeda
10:07 PM _ami_: :)
10:08 PM Lambda_Aurigae: https://www.washingtonpost.com/news/the-fix/wp/2015/01/20/isis-vs-isil-vs-islamic-state-the-political-importance-of-a-much-debated-acronym-2/?utm_term=.b44b266b443e
10:08 PM Tom_L: i went with the 24v relay
10:08 PM Lambda_Aurigae: enh, that gives the differences.
10:08 PM Lambda_Aurigae: Tom_L, good for you...succumb to the masses.
10:08 PM Lambda_Aurigae: [:
10:09 PM Tom_L: i have an opto to drive it already
10:10 PM enh: hum... Interesting difference.
10:15 PM Tom_L: if the coil resistance is 1440 ohms i shouldn't need a resistor in series should i?
10:15 PM Tom_L: that's about 16-17ma
10:16 PM Lambda_Aurigae: maybe throw a 100ohm resistor in there just for funzies?
10:16 PM Tom_L: yeah that's what i was thinking, that and a diode
10:16 PM Lambda_Aurigae: and on that note,,,chaos, panic, disorder...my job here is done!
10:16 PM Lambda_Aurigae: I'm off to bed.
10:16 PM Tom_L: wake up refreshed
10:17 PM Lambda_Aurigae: not gonna happen..I have to wake up and go to work...hehe
10:17 PM Lambda_Aurigae: nighters.
10:17 PM enh: good night
10:17 PM enh: midnight here
10:35 PM enh: Anybody else here does C++ on AVRs?
10:36 PM _ami_: enh, i have done C++ on avrs
10:36 PM enh: _ami_: Have you tried virtual methods?
10:36 PM enh: Mine are not being well accepted
10:39 PM _ami_: enh, the vtables are stored in .data section.
10:39 PM _ami_: check if you have correct addresses stored there.
10:39 PM _ami_: enh, btw what do you mean by well accepted?
10:39 PM enh: MCU is hanging
10:40 PM _ami_: enh, did u disable exception?
10:40 PM enh: nope. I read about that but did not understand why
10:40 PM _ami_: -fno-exceptions
10:40 PM _ami_: try adding this as avr-g++ options
10:40 PM _ami_: exceptions are not supported in avr
10:41 PM enh: trying
10:41 PM enh: still hanging.
10:42 PM enh: I believe I will change all virtual methods for simple callbacks
10:42 PM enh: callbacks need wrapping, but work well.
10:43 PM _ami_: enh, did you try with simple virtual function test?
10:44 PM enh: you mean a test class? Nope. But when I disable the virtual methods the mcu restart blinking the led
10:45 PM _ami_: enh, did u check the .data section?
10:45 PM _ami_: how big is it?
10:45 PM enh: I don't know how to do it in comman dline
10:45 PM enh: hex size is around 15k
10:46 PM _ami_: enh, which mcu are you trying this?
10:46 PM _ami_: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43745
10:47 PM _ami_: i wonder if vtables can be stored in flash instead of SRAM
10:48 PM _ami_: enh, are you using pure virt functions?
10:48 PM enh: I am. Good link.
10:48 PM _ami_: enh, remove pure virtuals
10:49 PM _ami_: its not supported at all
10:49 PM enh: I tried virtuals instead, but got the same behaviour.
10:49 PM _ami_: make it virtual function only. not pure one.
10:49 PM enh: retrying now
10:52 PM _ami_: also look for any linking warnings in case you are getting one.
10:52 PM enh: Not working. Controller hangs. I'll move the code from virtuals to callbacks
10:55 PM _ami_: enh, i would try this at home. added into my todos.
10:55 PM _ami_: i think it should work..
10:56 PM _ami_: my cpp flags are -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=${MCU}
10:56 PM enh: https://bitbucket.org/enhering/yauvc/src/3f63986ce3fb6787fcfb9928c9a04cbe6bcb25fc/firmware/src/?at=default
10:56 PM _ami_: -w -Os -Wl,--relax -Wl,--gc-sections
10:57 PM enh: -Wall -g2 -gstabs -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -fno-exceptions
10:58 PM enh: I
10:58 PM enh: I'll try your flags, _ami_
10:59 PM enh: The link points to my repo. ModuleBase, on modules, is the base class. COM, on modules, is the derived class
10:59 PM enh: If you have curiosity or time to look at
11:00 PM enh: Sorry, _ami_. The repo was updated just now.
11:00 PM enh: You must refresh the link