#avr | Logs for 2016-12-29

Back
[00:10:40] <Tigzee> Does someone know the preprocessor command to turn on the xth bit. ie. x=5 y =0. y something x, y = 0b00010000
[00:21:02] <theBear> the umm, i bet they do, if you can form the question so it makes sense
[00:21:31] <theBear> oh, dunno bout pre-process-land, but i'd be thinking like <<5
[00:22:41] <Tigzee> #define INIT_TCCR1B (1<<2) IS NOT #define INIT_TCCR1B 0b00000010
[00:23:16] <Tigzee> nvm, I think I got it
[00:23:49] <Tigzee> I guess (1<<2) means start with 1 and shift over twice...in this case (1<<1) was the answer
[00:24:57] <Tigzee> I hope it understands (1<<0) to not shift then
[00:25:21] <theBear> the umm, i pretty sure it does, which makes me re-question your blah != 0bBLAH (yep, even non-hex characters where hex characters don't belong, i went there) statement a mminute ago
[00:27:16] <theBear> tho i would tend to ask, do you really need to do such pre-compile mathery ? i struggle to eventhink up theoretical cases for baremetal-programming to use such trickery, useful as it is in more complicated situations (which are the only examples i usually think up for doing it in avr/microland too, complex/bigger/multi-file projects)
[00:30:19] <Tigzee> I am using it like: #define INIT_GIMSK (1<< PCIE0) instead of #define INIT_GMSK 0b00010000
[00:32:21] <theBear> oh, without reminding myself what a Gmask is, maybe you want logical & or similar, you can decide, the consideration being when you wanna change some bit(s) in a byte/reg but not alter others that you may have already set or do not know the current value of
[00:33:00] <theBear> generally that "common everyday" stuff can be picked up from the code fragments thruout the long-version of the datasheet
[01:27:55] <rue_shop3> theBear, what was your last avr project, I dont think we hear about everything you do
[01:30:02] <Casper> everything? anything!
[01:33:54] <_ami_> Casper: were you doing something based on vusb?
[01:36:33] <Casper> no
[01:37:00] <_ami_> oh ok.
[01:37:17] <Casper> currently, I'm trying to make snow
[01:37:19] <Casper> ... I fail
[01:37:31] <_ami_> i have been doing a open source hardware gpio/spi/i2c over usb board based on vusb.
[01:38:00] <_ami_> https://github.com/amitesh-singh/usb-gpio-board
[01:38:14] <_ami_> spi/i2c needs to be implemented.
[01:38:22] <_ami_> gpio over usb works pretty fine.! :)
[01:38:36] <_ami_> it exposes 12 GPIO pins
[01:41:07] <_ami_> Casper: i heard its snowing there. my friend was telling this yesterday.
[01:41:18] <Casper> will snow tomorrow
[01:41:24] <Casper> but I want way more snow
[01:48:12] <Tigzee> I'm liking the preprocessor stuff. It's making my code a lot more legible
[01:57:23] <_ami_> Tigzee: doing some macro hacks? ;)
[01:59:06] <_ami_> Tigzee: i am proud of this macro hack i did few months back. https://git.enlightenment.org/core/efl.git/tree/src/lib/eina/eina_inline_modinfo.x?id=d88f08f7e92a06ce114466da41886463be58c8d8 :D
[02:58:41] <rue_shop3> hmm
[03:02:44] <Casper> rue_shop3: hmm indeed
[03:02:56] <Casper> I was thinking about why my snow making fail...
[03:03:01] <Casper> ... and I can't figure it out at all
[03:56:06] <rue_shop3> snow is made from really tiny particles that are really slowly crystalized
[04:12:36] <theBear> rue_shop3, mmm, ask me again in a day or so, keep getting distracted between having handsfull today, and i suspect yer kinda right, like i been doing bits and pieces, but as is my modus du operac`ion, as i do re: educat` du parles le nationale, nothing even close to functioning AND polished, tho i suspect a little from either column has snuck outta the workshop, slim as the chances of doing so may be <wink>
[04:13:42] * theBear hopes he didn't accidentally remember or guess any actual foreign words there, that'd ruin the whole effect, bring the motivation behind my poker-face into question, and that's the last thing i need !
[06:28:25] <mcastillo> is there something like Serial.available(), but for winavr (avr-gcc)?
[06:30:37] <specing> what does it do?
[06:32:28] <mcastillo> it returns a false if data is not available, or a true if there is data available to be read
[06:34:26] <sabor> on the bare hardware it would be ( UCSR0A & (1<<RXC0) ) != 0
[06:34:44] <mcastillo> thanks sabor :)
[06:35:15] <sabor> along the lines of: if( UCSR0A & (1<<RXC0) ) got_a_byte( UDR0 );
[09:27:37] <Tigzee> I can't figure out how to do an or in preprocessor
[09:28:18] <Tigzee> #define INIT_TCCR1B 0b00000000 $ #define INIT_TCCR1B (INIT_TCCR1B | 0b00000010)
[09:28:33] <Tigzee> ^it doesn't like that |
[09:30:07] <sabor> try 0x02 instead of 0b..
[09:33:20] <Tigzee> same error: main.S:347: Error: invalid operands (*UND* and *ABS* sections) for `|'
[09:37:49] <sabor> i guess you have to show the whole code to see where it's making problems...
[09:38:19] <Tigzee> It seems to not like calling on the variable at that point
[10:01:27] <carabia> merry christmas and a happy new year, fags
[10:05:39] <specing> nigga you are late to the party
[10:06:21] <carabia> so it seems
[10:06:31] <specing> fyu new year was 8 days ago
[10:06:34] <specing> fyi*
[10:07:15] <carabia> so it appears i am even late...r to the party, then
[10:07:34] <Lambda_Aurigae> http://www.somacon.com/p125.php for Tigzee
[10:09:19] <Lambda_Aurigae> oh, duh....you are trying to create a macro with the same name as a constant it looks like.
[10:09:47] <Lambda_Aurigae> err.
[10:09:58] <Tigzee> I read you can redifine them if they are the same size, so i thought I could get away with it
[10:10:03] <Lambda_Aurigae> duh...nevermind...forget that one...but still, you have two defines of the same name
[10:10:11] <Tigzee> still bookmarked that page as it is pretty handy
[10:11:05] <Tigzee> the redefining works. The self referencing part does not.
[10:11:14] <Lambda_Aurigae> https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html
[10:11:29] <Lambda_Aurigae> yeah...self referencing of a macro can cause problems I would think.
[10:21:10] <_ami_1> Tigzee: you can't self reference a macro.
[10:21:58] <_ami_1> Tigzee: check this file. https://git.enlightenment.org/core/efl.git/tree/src/lib/eina/eina_inline_modinfo.x?id=d88f08f7e92a06ce114466da41886463be58c8d8
[10:22:06] <_ami_1> #define __EINA_MODINFO_CONCAT(a, b) a##b #define _EINA_MODINFO_CONCAT(a, b) __EINA_MODINFO_CONCAT(a, b) #define __EINA_MODULE_UNIQUE_ID(id) _EINA_MODINFO_CONCAT(__EINA_MODULE_UNIQUE_ID_, id)
[10:22:11] <_ami_1> arg,,
[10:22:19] <_ami_1> #define __EINA_MODINFO_CONCAT(a, b) a##b
[10:22:22] <_ami_1> #define _EINA_MODINFO_CONCAT(a, b) __EINA_MODINFO_CONCAT(a, b)
[10:22:25] <_ami_1> #define __EINA_MODULE_UNIQUE_ID(id) _EINA_MODINFO_CONCAT(__EINA_MODULE_UNIQUE_ID_, id)
[10:24:06] <Tigzee> I was trying to set it up where I could have modules of code in libraries and as the were incuded, could add bits to io register
[10:24:58] <carabia> _ami_1: that's a bit of a long way around it don't you think :)
[10:25:29] <_ami_1> i wanted the variable names to be unique
[10:26:28] <carabia> sure
[10:29:08] <_ami_> carabia: have you done 3d modeling? for 3d printing
[10:29:35] <_ami_> i am thinking of buying an affordable 3d printer.
[10:31:13] <carabia> _ami_: no, haven't
[10:31:49] <carabia> 3d modeling as in, designing?
[10:32:17] <dunz0r> _ami_: Those chinese prusa-clones are pretty good for the price
[10:32:20] <dunz0r> Wanhao?
[10:32:40] <_ami_> dunz0r: aliexpress link?
[10:32:42] <carabia> to be fair, in work or private, i have never focused on any aspects of end-user friendliness. I don't have to deal with end-users, so I don't give two fucks.
[10:33:12] <carabia> and this little factoid makes me super happy :)
[10:33:45] <dunz0r> _ami_: https://www.aliexpress.com/item/China-wanhao-prusa-i3-open-diy-3d-printer-kit-with-a-free-filament/32355663768.html?spm=2114.01010208.3.1.oBBPs6&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10000009_10084_10083_10080_10082_10081_10060_10061_10062_10056_10055_10054_10059_10099_10078_10079_427_426_10103_10073_10102_10096_10052_10050_10107_10051_10106,searchweb201603_2,afswitch_5&btsid=f3d0e9e8-84
[10:33:51] <dunz0r> 75-4893-9301-bf7f5f9db981
[10:33:54] <dunz0r> Wow.
[10:33:55] <dunz0r> That's an ugly link. God damn it aliexpress
[10:34:10] <dunz0r> _ami_: http://bit.ly/2ibJRZ7
[10:34:19] <carabia> chill out hax0r
[10:34:35] <dunz0r> There's another version of that printer though, that's newer and has some improvements.
[10:34:47] <carabia> if you're gonna keep going at it like that you're gonna hax #avr
[10:34:49] <_ami_> carabia: a few of my electonics inventions need casing :)
[10:35:04] <_ami_> dunz0r: thanks. do you own this printer?
[10:35:27] <dunz0r> _ami_: Not me, but a friend of mine has one. I've got the slightly larger model with two printerheads
[10:35:36] <carabia> _ami_: yeah, so do mine. thankfully at work i don't have to worry about that. and at home, i do things prettier but only for myself and i'm not too vain of a person
[10:35:47] <_ami_> hmm.
[10:35:48] <Lambda_Aurigae> 3D printer...bah...I would rather have a 5D eraser.
[10:36:02] <_ami_> US $175.39 to India via EMS :/
[10:36:14] <_ami_> the shipping is huge
[10:36:22] <_ami_> the shipping cost*
[10:36:29] <carabia> I would rather have some 75DD
[10:36:38] <carabia> how about you, Lambda_Aurigae?
[10:37:08] <Lambda_Aurigae> I built my own 3D printer from scratch and old impact printer parts..only thing i bought was the heater for the extruder head.
[10:37:20] <Lambda_Aurigae> it works but is expensive to run in my opinion...filament is pricy.
[10:37:28] <Lambda_Aurigae> I prefer 3D erasing.
[10:37:35] <Lambda_Aurigae> aka milling machine.
[10:38:30] <_ami_> sabor has suggested this one. https://www.aliexpress.com/item/2016-Free-shiping-Flyingbear-DIY-3d-Printer-kit-Full-metal-Large-printing-size-High-Quality-Precision/32677798453.html
[10:38:33] <Lambda_Aurigae> I want to build a 5D milling machine next...collecting parts in progress.
[10:38:34] <_ami_> looks promising
[10:39:05] <carabia> Lambda_Aurigae: i am interested, how exactly are you going to tap into these extra dimensions?
[10:39:24] <Lambda_Aurigae> 2D angleable head
[10:39:44] <Lambda_Aurigae> instead of the cutting head pointing straight down...put a pan and tilt on it.
[10:40:11] <Lambda_Aurigae> same way the commercial ones do it.
[10:40:18] <carabia> The term 5D seems awfully misleading as you're still only going to operate on x, y and z axes
[10:40:43] <Lambda_Aurigae> hence the term 5 dof or 5 degrees of freedom.
[10:40:49] <Lambda_Aurigae> X, Y, Z, pan, tilt
[10:41:03] <carabia> the D is for spatial dimensions, not "degrees of freedom"
[10:41:16] <Lambda_Aurigae> carabia, yes,,a play on words...sorry.
[10:41:52] <carabia> you have been forgiven
[10:41:53] <Lambda_Aurigae> I still prefer my 3D eraser to my 3D printer.
[10:52:34] <Jan-> hihi avr people :)
[10:54:17] <carabia> hiho
[10:56:47] <Jan-> ooh, Tom_L still exists
[10:56:51] * Jan- is a Tom_L customer
[14:54:04] <PLC> Hello :)
[14:54:31] <Lambda_Aurigae> olleH
[14:54:36] <PLC> :)
[14:55:27] <antto> there's something familiar here, but i can't tell what yet
[14:55:32] <Jan-> me!
[14:55:43] * Lambda_Aurigae is just strange, not familiar.
[14:56:35] <Jan-> is 3 millisieverts per hour a lot
[14:56:54] <antto> milli-wat?!
[14:57:00] <Jan-> sieverts.
[14:57:03] <Jan-> it's a measure of nuclear radiation
[14:57:11] * antto runs
[14:57:22] <Lambda_Aurigae> yes.
[14:57:24] <Lambda_Aurigae> it is a lot
[14:57:28] <Lambda_Aurigae> 8 is lethal
[14:57:32] <Lambda_Aurigae> 8 total.
[14:57:47] <Lambda_Aurigae> oh, wait
[14:57:51] <Lambda_Aurigae> milisieverts
[14:57:59] <Lambda_Aurigae> 8 sieverts is lethal
[14:58:32] <antto> 8/0.003 = that's how many hours you have
[14:58:49] <antto> ..before x_x
[14:59:41] <Jartza> plop
[15:00:05] <specing> How many bananas before you die?
[15:00:31] <Lambda_Aurigae> if you eat them all within an hour, about 1000
[15:00:41] <antto> use the same formula and but with the banana factor
[15:00:45] <specing> https://en.wikipedia.org/wiki/Banana_equivalent_dose
[15:01:37] <PLC> I've got a problem to wake-up ATMega2560 from pwr_down mode with a PCINT … I don't understand what wrong …
[15:01:40] <specing> wiki says 8000000 bananas produce 8 sieverts
[15:02:10] <Lambda_Aurigae> yeah, but eating 1000 bananas in one hour...imagine the stomach ache!
[15:02:31] <Lambda_Aurigae> PLC, need a bit more information.
[15:02:37] <Lambda_Aurigae> you sure the PCINT is firing?
[15:02:44] <theBear> eating 8million bananas would be lethal
[15:03:33] <PLC> yes … oh ohhhhhh Phone time :/
[15:03:50] <PLC> 2mn …
[15:04:02] <specing> no, 80 million bananas
[15:05:52] <PLC> I'm working on Arduino, but I wrote directly with name register … I'm going to paste the code …
[15:06:40] <PLC> http://uu.zoy.fr/p/KcLZSg#x=LKFOAI8trgAE2XUA&lang=cpp
[15:07:10] <PLC> I finish my phone comm … 5mn finally
[15:07:13] <Jan-> that's what I tend to do
[15:07:18] <carabia> what specing said, better not to have slept through your math classes
[15:07:20] <Jan-> work on an arduino board, but just treat it as an AVR dev board
[15:08:07] <Jan-> this means that real ale AVR users shun me :(
[15:08:46] <carabia> count me in on that, i shun all "avr users"
[15:08:52] <Lambda_Aurigae> I see no main()
[15:09:01] <Jan-> There is no main()
[15:09:09] <Jan-> there is only loop()
[15:09:13] * Jan- awaits the scorn :(
[15:09:33] <carabia> there is no loop()
[15:09:37] <Lambda_Aurigae> must be an arduino thing.
[15:09:45] <carabia> don't try to bend() the loop()
[15:09:57] <specing> kindergarden is in #arduino
[15:10:20] * Jan- pokes specing in the eye with a pencil :)
[15:10:40] <PLC> main is loop()
[15:11:09] <Lambda_Aurigae> sorry, I don't work with arduino
[15:11:14] <Jan-> I'm not sure if there's any way to replace the arduino main() when you're using their IDE
[15:11:28] <Lambda_Aurigae> someone else can help you I'm sure.
[15:11:37] <Jan-> but I don't think it really affects anything much
[15:12:02] <Jan-> sometimes you want to disable the timer zero interrupt which they use for their millisecond timer
[15:13:34] <Jan-> remove training wheels etc :)
[15:15:05] <Jan-> maybe someone should make a removetrainingwheels.h which switches off the arduino stuff!
[15:15:51] <carabia> maybe someone should tell italians to stop meddling with these kinds of things. namely the only thing they're good at is producing cheese that both smells and tastes like vomit
[15:15:58] <Jan-> teehee
[15:16:06] <Lambda_Aurigae> stinkyfeet cheese!
[15:16:17] <Lambda_Aurigae> that's what my family called parmesean
[15:16:23] <Jan-> I guess it's possible to just replace the arduino headers in the IDEA
[15:16:25] <Jan-> er, IDE
[15:16:32] <Jan-> it's just a convenient and cheap way to get a dev board
[15:16:45] <carabia> Jan-: what the hell is the point in using the ide then in the first place
[15:17:00] <Jan-> because it's easy
[15:17:09] <LoRez> you can use Arduinos as AVR dev boards without using the IDE.
[15:17:12] <Jan-> you just buy a supercheap board on ebay, get the free IDE, etc
[15:17:26] <carabia> free ide as in atmel studio. Yes.
[15:17:28] <Jan-> then you can get straight down to writing code without lots of BS
[15:17:33] <carabia> bin the arduino
[15:17:48] <Jan-> also if you want to "ship" anything in any sense it's super nice to have USB firmware updates possible.
[15:17:55] <Lambda_Aurigae> http://pastebin.com/dSRSxgax
[15:18:08] <carabia> and for commie linux / fag mac nerds it's time to get out of their nodejs bubble and start using proper tools
[15:18:29] <Lambda_Aurigae> nodejs?
[15:18:45] <carabia> whatever is trendy, everyone does web
[15:18:49] <Lambda_Aurigae> is that what the ardweeny thing is written in?
[15:18:54] <PLC> I use Atom IDE (platformio)
[15:19:07] <carabia> no
[15:19:18] <Lambda_Aurigae> I write web in html and do cgi scripts in C
[15:19:33] <carabia> afaik it's that processing thing it's written on, no? Not sure, haven't screwed around with it.
[15:19:40] <PLC> sorry I'm on phone yet … :/
[15:19:46] <Jan-> I've used node
[15:19:52] <Jan-> it's handy if you want to do something very cross platform
[15:20:11] <Lambda_Aurigae> that leaves me out.
[15:20:34] <antto> look mom! my processor burns sooo many callories!
[15:21:21] <Jan-> if it makes you think I'm any less of a loser, I am quite interested in writing code to send data using nordic rf radio modems
[15:21:26] <Jan-> and I'm told they're super complicated
[15:21:54] <Lambda_Aurigae> not really.
[15:22:03] <carabia> Jan-: and as i have used nordicsemis rf links before, i can tell you, they are super simple.
[15:22:23] <carabia> which is huge props for nordic, really
[15:22:26] <PLC> http://uu.zoy.fr/p/KcLZSg#x=LKFOAI8trgAE2XUA&lang=cpp
[15:22:41] <PLC> My sleep mode start line 100
[15:24:05] <carabia> the configurator tool that gives you the init data with the pipes etc, makes it really easy to get anything up and running relatively fast
[15:24:47] <Jan-> I'm interested in figuring out how much delay there is, end to end
[15:24:53] <LoRez> Jan-: if it's any consolation, I hate the Arduino IDE, but I have to build stuff that was written in it, so I spent hours this weekend mashing an existing Makefile into building the project.
[15:25:21] <Jan-> I just like it because it's easy
[15:25:25] <Lambda_Aurigae> PLC, again I ask, are you certain the pcint is firing?
[15:25:37] <Jan-> I'm not a real ale linux person who feels the need to show how clever I am by making everything difficult
[15:25:46] <Jan-> I like plugging it into a USB cable :)
[15:26:36] <LoRez> Jan-: I did all that so it would be _easy_ later.
[15:26:58] <LoRez> I too enjoy the plugability.
[15:30:37] <PLC> Yes i'm sure for PCINT
[15:31:04] <carabia> how exactly does the pluggability differ when using the arduino ide or just uploading "by hand"?
[15:31:49] <PLC> my setup pre-sleep start at line 218..236
[15:32:01] <Jan-> well, on an arduino you just plug it into USB, select the right port and device type, and go
[15:32:10] <Jan-> with avr studio you need a programming widget
[15:32:54] <Lambda_Aurigae> there are other usb bootloaders
[15:33:19] <carabia> Jan-: a what?
[15:33:26] <Jan-> a widget!
[15:33:28] <Jan-> Tom_L makes them!
[15:33:46] <Jan-> we got ours from him.
[15:33:55] <carabia> oh, a programmer
[15:34:35] <antto> a "programmer" is a very scary thing to a noob
[15:34:43] <antto> so don't laugh!
[15:34:46] <Jan-> well, with an arduino you just plug in.
[15:34:53] <Jan-> this is good
[15:35:13] <antto> it's not
[15:35:54] <antto> that's how u get viruses!
[15:36:11] <carabia> not having ever done it in atmel studio, but i'm quite sure you could upload the code via the bootloader in atmel studio just changing the parameters passed to avrdude
[15:36:24] <Jan-> um, er
[15:36:36] <carabia> but that's like fucking next level
[15:36:47] <antto> isn't the arduino bootloader stk500v2 based?
[15:37:08] <PLC> yes
[15:37:29] <antto> then why do you need the silly ide?
[15:37:45] <Jan-> write code, press button
[15:37:47] <Jan-> good
[15:38:19] <antto> my device over here also has an stk500v2 based bootloader, appearing to the computer as an (FTDI) virtual serial port device
[15:38:34] <antto> in my IDE of choice i also press one button
[15:38:59] <carabia> antto: you don't need it, just that it was implied an ide was wanted
[15:39:32] <Jan-> I think you can use avrdude to upload to arduino hardware.
[15:39:43] <Jan-> it's a way of packaging firmware updates for users
[15:39:46] <carabia> Jan-: no shit?
[15:40:03] <Jan-> well, I don't know, I've never done it.
[15:40:43] <antto> Jan- do you think the arduino authors wrote the stk500v2 protocol themselves for their "arduino" stuff?
[15:40:56] <Jan-> I have no idea.
[15:41:00] <antto> ;]
[15:41:26] <antto> i think they've just taken ready working things from other places and glued them together
[15:42:54] <Jan-> sure. fine.
[15:43:38] <antto> anyways, the IDE is not why i'm alergic to arduino tho
[15:43:46] <specing> sometiems the glue smells nicer than the stuff it holds together
[15:43:59] <antto> stop sniffing glue!
[15:50:27] <Jan-> er
[15:50:29] <Jan-> specing?
[16:06:45] * Jan- creeps up on specing
[16:06:51] * Jan- paints specing a vibrant shade of taupe
[16:07:14] <Jan-> Hmm. Covers well.
[16:07:17] <Jan-> No need for undercoat.
[16:10:19] <PLC> That's it, I came back :)
[16:12:04] <PLC> sorry for this long phone time … :/
[16:13:36] <antto> PLC ur fired!
[16:15:20] <PLC> rhoooo :p
[16:15:40] <PLC> I'm not McFly ^^
[16:18:01] <PLC> In Arduino World, you can see that …
[16:18:02] <PLC> http://uu.zoy.fr/p/W06FpQ#x=It8TAMkZTgCRNCUA&lang=cpp
[16:19:03] <PLC> it's auto-included by default
[16:24:11] <specing> Jan-: you came three days early
[16:24:19] <specing> I really like Neostick brand glue, it smells nice and is real stronk
[16:25:12] <Jan-> stronk!
[16:26:06] <specing> yes, stronk!
[16:32:33] <Emil> Hmm
[16:33:02] <Emil> Do you reckon there a plusses or minuses to dedicatng multiple pins to driving distinct sets of ws2812bs?
[16:36:04] <Jan-> don't those things have to be sent data very fast
[16:37:15] <Emil> Jan-: yes?
[16:37:30] <Emil> Either I dedicate two pins or 1 pin
[16:37:50] <Emil> Hmm
[16:38:09] <Emil> Actually, I think that with two pins I only need to send half the data if I update just one strip
[16:38:27] <kre10s> hi. I am looking for the cheapest 8bit avr that can do 16Mhz at 3.3v, with spi and ~32 ios.
[16:39:28] <Emil> kre10s: use the part picker
[16:39:50] <Emil> but I'm afraid that afaik no 8 bit avr does 16MHz at 3.3v
[16:39:54] <Emil> unfortunately
[16:40:19] <Emil> Sure, they might work, but that's beyond their specification
[16:40:27] <Emil> what's with needing it to run at 16MHz?
[16:45:13] <kre10s> Emil: I did but all the results it give can do 16Mhz at 4.5v not 3.3... there is no option to find those.
[16:46:01] <Lambda_Aurigae> there are no 8bit avrs that run at 16mhz at 3.3V
[16:46:02] <kre10s> the atmega48 does it but doesn't have enough pins. I need 3.3v for some ICs i'm using
[16:46:19] <Lambda_Aurigae> mega48 does?
[16:46:23] <Lambda_Aurigae> didn't see that one.
[16:46:35] <kre10s> atmega48PB to be exact.
[16:46:47] <Lambda_Aurigae> but, you need to specify things like number of pins when asking such questions.
[16:47:30] <Emil> Lambda_Aurigae: he did
[16:48:04] <Emil> kre10s: what's the GPIO for?
[16:48:12] <Emil> Why not just add gpio expanders
[16:48:28] <Lambda_Aurigae> or level shifters
[16:49:35] <Lambda_Aurigae> oh..missed that, sorry.
[16:50:36] <Lambda_Aurigae> still not seeing any that fit the bill.
[17:30:07] <specing> kre10s: or take a stm32
[17:46:28] <DKordic> FAIK xmegas can go to 32MHz on 3.3V.
[18:10:13] <antto> xmegas are much nice
[18:16:29] <Jan-> woohoo! I'm in communication with the AVR and I can make it flash alight!
[18:16:35] * Jan- is a coding god, obviously
[18:18:38] <DKordic> Jan-: Care to elaborate?
[18:19:30] <Jan-> I could, but everyone would scorn me :(
[18:20:20] <DKordic> :) How could they. They all use C :) .
[18:20:21] <Lambda_Aurigae> it seems Jan- has discovered BLINKY LIGHTS!
[18:20:24] * specing opens the torch and pitchfork armory
[18:20:30] <Jan-> aargh
[18:20:33] * Jan- flees
[18:20:39] <Lambda_Aurigae> blinky lights is goodies.
[18:20:54] <Lambda_Aurigae> they is what makes computers compute.
[18:20:58] <specing> I have two flashlights with AVRs inside now
[18:21:03] <Lambda_Aurigae> if they didn't have blinky lights they wouldn't work.
[18:21:12] <specing> one t13 iirc and one with t25
[18:21:29] <specing> first is 900 lumen, second 1600
[18:21:39] <Jan-> weirdly enough we have a project involving blinkenlights
[18:21:48] <Jan-> but we'd really like it to be like a 100W LED strobe.
[18:21:54] <Jan-> So we'll need, I dunno, a big giant fet.
[18:22:11] <specing> yes
[18:22:17] <specing> the 1600 is 20W
[18:22:33] <specing> driven by a fet
[18:22:34] <Jan-> I'm not sure if it's OK to switch between the LED driver and the LED itself.
[18:22:46] <Jan-> or if that'd cause the driver to overshoot.
[18:23:31] <specing> also Jan- http://www.banggood.com/100W-Warm-Pure-White-High-Brightest-Save-Power-LED-Light-Lamp-p-84975.html?rmmds=search
[18:23:37] <specing> step up your LED game
[18:23:51] <specing> make the neighbours notice your progress
[18:24:38] <Jan-> oh they will
[18:24:44] <Jan-> the project is an LED strobe
[18:24:45] <Jan-> teehee
[18:25:35] <specing> lol thats annoying AF
[18:25:41] <Jan-> af?
[18:25:48] <specing> both flashlights have strobe
[18:25:54] <specing> As Fuck
[18:26:17] <Jan-> oh hey wel
[18:26:25] <Jan-> the idea is to make one that can be synchronised with a video camera
[18:26:31] <Jan-> so as not to get torn frames on rolling shutter cameras
[18:26:43] <specing> torn frames?
[18:26:44] <Jan-> it's quite a simple project so long as I can figure out how to drive the LED
[18:26:56] <specing> you take a pre-built driver
[18:27:03] <Jan-> oh well, LEDs (and xenon flash tubes, and so on) are fast enough to illuminate or go out during the time the sensor is being read
[18:27:04] <specing> chinese have tons of those
[18:27:12] <Jan-> so you can get the top or bottom of the frame illuminated
[18:27:15] <Jan-> google "flash banding"
[18:27:18] <specing> not if they are constand current driven
[18:27:56] <Jan-> what d'you mean
[18:28:04] <specing> have them on 100% of the time
[18:28:12] <Jan-> well, the point is to have a strobe
[18:28:16] <specing> but why?
[18:28:21] <Jan-> usually you'd just use a xenon strobe light, but they cause flash banding
[18:28:38] <specing> why not run it nonstop?
[18:28:46] <Jan-> because... strobe.
[18:28:50] <Jan-> as in flashing light
[18:29:02] <specing> But why?
[18:29:10] <specing> Why not have it on nonstop?
[18:29:23] <Jan-> because then it wouldn't be a strobe light? sorry I don't understand the question
[18:29:51] <specing> seems like you want to avoid partial illumination due to pwm, but want to do so by synchronising pwm with the sensor
[18:29:58] <Jan-> no, not PWm
[18:30:11] <Jan-> the idea is to build a strobe light, as you'd have with a xenon flash tube
[18:30:22] <Jan-> but to synchronise it with the sensor timing so it doesn't cause flash banding
[18:30:52] <specing> sounds complicated when you could just have the light on 100% at all times
[18:31:34] <Jan-> Yes but then it wouldn't be a... I mean...
[18:31:37] <Jan-> ...huh?
[18:32:22] <Jan-> the point is that the light turns on and off
[18:32:45] <specing> constant current driven LED ones do not
[18:32:51] <Jan-> yes, I know.
[18:34:40] <specing> so why do you want strobe again?
[18:34:51] <Jan-> errr because it's a useful lighting effect
[18:34:57] <Jan-> to simulate lightning, photo flashes, gunfire
[18:35:22] <specing> wouldn't be easier to add those in postprocessing?
[18:35:43] <specing> or idk
[18:35:48] <Jan-> short answer: not really.
[18:36:12] <Jan-> you sort of can, but a proper simulation of the play of light on arbitrary objects and surfaces is... very hard.
[18:37:22] <Jan-> OK I got an example of the effect in use: https://www.youtube.com/watch?v=MZWvsIBrfxM#t=0m45s
[18:46:24] <specing> how many lumens do you need btw
[18:46:33] * specing is becoming a flashaholic
[18:49:32] <specing> yay Aliens
[18:50:09] <Jan-> well
[18:50:20] <Jan-> we built a rough one a while ago which was only about 20 watts worth of sticky LED strip
[18:50:28] <Jan-> that was nice and easy because it only needed 12 volts
[18:50:32] <Jan-> but it wasn't powerful enough
[18:50:50] <Jan-> we have some 100 watt leds lying around but they're hard to drive
[18:51:05] <specing> also lol at reinforced doors and then they leave unprotected ceiiling
[18:51:20] <Jan-> heh I'm not the person to talk to about movies really
[18:51:22] <Jan-> I'm just the codebot
[18:52:30] <specing> Jan-: you could buy the BLF a6 and mod it to suit your needs
[18:52:35] <Jan-> the whatnow?
[18:52:45] <specing> http://www.banggood.com/BLF-A6-CREE-XPL-1600LM-7-4modes-EDC-LED-Flashlight-p-991823.html
[18:53:02] <Jan-> we got a 100w led driver that has a PWM input
[18:53:05] <Jan-> which seemed like a good idea
[18:53:08] <specing> instead of the battery use a constant current 3V PSU
[18:53:17] <specing> ok
[18:53:37] <Jan-> I think it was DOA, thouhg
[18:53:41] <Jan-> we can possibly get another
[18:53:42] <specing> Lol
[18:54:15] <Jan-> what's funny
[18:54:27] <specing> it being doa
[18:54:32] <Jan-> oh, well thanks
[18:54:39] <Jan-> $20 down the drain
[18:56:03] <Jan-> it's type DCCP100
[18:56:09] <Jan-> 24V in
[18:56:55] <Jan-> I hoped we'd be able to use the PWM input to control it flashing, but I'm not sure.
[19:01:11] <specing> ask here maybe for advice? https://www.reddit.com/r/flashlight/
[19:03:43] <Jan-> I think I know roughly what it needs to do
[19:03:54] <Jan-> it may be easier just to get a crapton of sticky strip, and stick it to something
[19:04:05] <Jan-> efficienct is a non big deal
[20:46:28] <Tigzee> Jan I use a boost converter to run mine
[20:47:19] <Tigzee> ie. http://www.ebay.ca/itm/Boost-Converter-Dc-Dc-Step-Up-Power-10-32V-To-12-35V-150W-Voltage-Charger-6A-D-N-/332048812514?hash=item4d4fa6c9e2:g:aicAAOSw4GVYHfPF
[20:47:47] <Tigzee> I use those and the down converters all over the place
[20:48:36] <Tigzee> buck converter http://www.ebay.ca/itm/DC-DC-LM2596-power-Supply-Buck-Converter-step-down-module-GM-/262136732989?hash=item3d08911d3d:g:XoYAAOSw6dNWSu3o
[20:49:34] <specing> that tiny cheap thing?
[20:49:42] <specing> i?s legit
[20:50:01] <Tigzee> I use both of them for a lot of things
[20:50:37] <specing> well then
[20:50:41] * specing opens wallet
[20:51:12] <Tigzee> My attiny with esp2866 run off the lm2596 + what ever lost its power adapter (ie router's, wifi access points)
[20:51:47] <Tigzee> the boost converter, typpically has just been for leds 10w to 100w
[20:52:31] <Tigzee> As for the pwm, you could pwm after the output or replace the blue box with something that can be controlled directly
[20:54:03] <specing> tempted to get that 100W COB LED for shits&giggles
[20:54:54] <Tigzee> I have a few of those :) I think 2 warm whites and 2 cold whites
[20:55:07] <specing> I have a few spare cpu coolers
[20:55:16] <specing> can they be attached nicely?
[20:55:20] <Tigzee> They do surprisingly get warm
[20:55:27] <specing> lol no kidding
[20:55:42] <Tigzee> if you have drill, they can attach real easy
[20:56:04] <specing> the 1600 lumen flashlight I have gets too hot to handle after about 30s
[20:56:23] <Tigzee> do you have an attiny running it?
[20:56:29] <specing> yes, t25
[20:56:37] <specing> the code is open for it
[20:56:45] <specing> https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/ToyKeeper/blf-a6/
[20:56:47] <Tigzee> does it have a internal thermal temperature?
[20:56:57] <specing> afaik no
[20:57:25] <Tigzee> yes it does :)
[20:57:31] <specing> it does?
[20:57:39] <Tigzee> attach that to the case and pwm it when it gets to warm
[20:57:55] <Tigzee> probably ADC8
[20:59:00] <Tigzee> I guess it's a smaller chip because for you it's adc4
[21:01:38] <Tigzee> Also, I read it is more effiecnt for an led to reduce current/voltage then to pwm. so ultimately you would want to replace the blue box on those converters. btu thats more work then a simple mosfet for pwm
[21:02:08] <specing> yup
[21:02:20] <specing> needs constant current driver
[21:02:44] <specing> so pwm via inductor+cap?
[21:03:08] <specing> which is exactly what that boost converter is, change current with voltage
[21:03:13] <Tigzee> I can't see how a pwm hurts the led. Just power effiecncy.
[21:03:38] <specing> add enough capacitors to stabilise the voltage
[21:03:44] <specing> or something
[21:03:45] <Tigzee> would probably work
[21:03:57] <specing> basically add stuff till it works good enough
[21:04:08] <specing> approach of someone without EE education
[21:05:22] <Tigzee> not sure, I'm not that advanced either. just a tinkerer
[21:06:36] <specing> usually these things are used for lower power leds: https://www.fasttech.com/product/1124200-amc7135-350ma-advanced-current-regulators-sot-89
[21:21:04] <rue_shop3> ok, tiny13 based cnc spindle speed regulator
[21:21:08] <rue_shop3> anyone already done this?
[21:21:18] <rue_shop3> ok 500rpm to 10krpm
[21:21:39] <rue_shop3> which is 16hz to 360Hz if I put 2 lines on the shaft sensor
[21:21:47] <Tigzee> I haven't, but isn't it a stepper motor?
[21:21:57] <rue_shop3> which is 62.5ms to 2.7ms
[21:22:13] <rue_shop3> no, its a series wound motor
[21:22:27] <rue_shop3> so, no voltage feedback
[21:22:44] <rue_shop3> I'm gonna put a 2 line rotation sensor on the shaft
[21:23:01] <rue_shop3> I'll have the t13 take in 0-5V on an analog pin for control
[21:24:10] <rue_shop3> hmm the tiny13 only has a 8 bit counter
[21:24:57] <rue_shop3> k, so I could either ditch it, or count overflows
[21:25:32] <rue_shop3> at 16 bits,
[21:25:44] <rue_shop3> maxxing out at 62.5ms
[21:25:48] <Tigzee> you could always make a 32bit counter
[21:26:32] <rue_shop3> 0.000953689ms would be the 16 bit resolution
[21:27:12] <rue_shop3> so 2.7ms would be 2800 or so counts
[21:27:17] <rue_shop3> at 8 bits
[21:27:24] <Tigzee> How did you get 16hz?
[21:27:34] <rue_shop3> 0.244141ms resolution
[21:27:50] <Tigzee> Isn't this just to time between the two pulses to ensure its going the proper rpm?
[21:27:57] <rue_shop3> Tigzee, 500rpm is 8.3rps, which is 16Hz
[21:28:01] <rue_shop3> yea
[21:28:34] <Tigzee> why even worry about it on a per second basis...why not be quicker reacting at like 10ms or so?
[21:28:39] <rue_shop3> so at 8 bits 2.7ms would be 11 counts, which should work
[21:28:56] <rue_shop3> I'm looking at counting the time between the pulses
[21:29:06] <rue_shop3> or the rotation of the shaft
[21:29:15] <rue_shop3> 8 bits would work,
[21:29:36] <Tigzee> 8 bits should more then be fine (more so with the clock divider)
[21:30:04] <Tigzee> I would rather count the time between pulses
[21:30:12] <rue_shop3> 4Khz would be the counter clock rate
[21:30:18] <Tigzee> *sry, missed that line fo yours
[21:30:20] <rue_shop3> well 4100, whatever
[21:30:33] <rue_shop3> hmm
[21:30:45] <rue_shop3> I think the t13 defaults to 1Mhz?
[21:31:21] <Tigzee> I am not familiar with the t13, I think in general things are 1mhz until you change the fuse bit (could be wrong)
[21:31:22] <rue_shop3> 9.6Mhz/8
[21:31:44] <rue_shop3> so 1.2Mhz, k
[21:31:52] <rue_shop3> so, the prescaler for that would need to be..
[21:32:24] <rue_shop3> 293
[21:32:34] <Tigzee> your using a 9.6mhz crystal?
[21:32:44] <rue_shop3> no, internal osc
[21:33:01] <rue_shop3> "therefore the Internal RC Oscillator running at 9.6 MHz"
[21:33:54] <Tigzee> I didn't know you could get the internal oscillator at that speed. I know it has a correction, but didn't know you could push it that far off
[21:34:11] <rue_shop3> they say thats the default
[21:34:20] <rue_shop3> well, 1.2Mhz with the default divisor
[21:35:03] <rue_shop3> available dividers are 1, 8, 64, 256, 1024
[21:35:26] <rue_shop3> if I use 256, the count rate would be high
[21:35:35] <Tigzee> I learned something new...I thought it was generalized at 8mhz
[21:35:53] <rue_shop3> :) see, I knew I should do this here
[21:35:58] <rue_shop3> at 256
[21:36:10] <Tigzee> the device is shipped with 9.6mhz, but it can run at 4.8mhz
[21:36:19] <Tigzee> then you can divide it
[21:36:21] <rue_shop3> 4687.5 Hz count rate
[21:37:18] <Tigzee> yep, i can confirm with you that default is 9.6mhz/8
[21:37:32] <rue_shop3> yea, cause the div8 bit
[21:37:52] <Tigzee> you do get a lot of play with the divisors and the initial clock speed
[21:37:53] <rue_shop3> so, at 4687.5 what rate do I hit 256 counts?
[21:38:24] <Tigzee> so you need a counter large enough to deal with 8.3cps and small enough to do with 167cps
[21:38:28] <Tigzee> *pps
[21:38:40] <Tigzee> wait, that would be double because 2 wires
[21:38:48] <rue_shop3> 54.6ms
[21:39:56] <rue_shop3> I got 1000 rpm... as my 256 counts
[21:40:09] <rue_shop3> ....
[21:40:18] <Tigzee> I got 0.3ms to 6.25ms between pulses
[21:40:31] <rue_shop3> oh, I forgot the factor of 2
[21:40:47] <rue_shop3> so that would be 500rpm, but that would be abs min speed
[21:41:12] <rue_shop3> I'm just gonna go work out 500rpm, back in a min
[21:44:27] <rue_shop3> 500 rpm is stupid slow, so if I cant make it that low, I'm ok
[21:44:33] <rue_shop3> ok so here's my math for that
[21:44:33] <rue_shop3> 1.2Mhz / 256 =
[21:44:33] <rue_shop3> 4687.5 Hz
[21:44:57] <rue_shop3> which is 0.000213333 sec
[21:45:14] <rue_shop3> 255 counts of that
[21:45:35] <rue_shop3> 0.0543999sec aka 54.4ms
[21:46:03] <rue_shop3> which is 18.38Hz
[21:46:13] <rue_shop3> now, thats 2 lines/rev
[21:46:24] <rue_shop3> 9.1912 rps
[21:46:42] <rue_shop3> 551.47rpm
[21:46:52] <rue_shop3> is min. speed
[21:46:59] <rue_shop3> thats 255 counts
[21:47:37] <rue_shop3> maybe I'll bring the min design speed up to 600rpm so leave some room for proportional error
[21:47:50] <rue_shop3> k, so, 10krpm
[21:48:12] <rue_shop3> 166.66667 rps
[21:48:27] <rue_shop3> 333.333 hz (2 lines)
[21:48:45] <rue_shop3> .003 sec = 3ms
[21:49:04] <rue_shop3> count rate is 0.000213333 sec
[21:49:11] <rue_shop3> aka .213ms
[21:49:26] <rue_shop3> means 14 counts
[21:49:54] <rue_shop3> seems close enough, not gonna bother working out the +-1 count error speeds
[21:50:06] <rue_shop3> ok
[21:50:08] <Levitator> Anyone know a good channel for 8266 development?
[21:50:13] <Tigzee> This is what I would do: have you 2 sensor wires generate an interrupt. on that interrupt, you calculate the time difference from the last interupt and make your correction
[21:50:15] <Levitator> These things seem awesome.
[21:50:26] <Levitator> They're next to free, and they have power to spare.
[21:50:33] <rue_shop3> 1 wire, 1 lines on a optic counter
[21:50:38] <rue_shop3> 2 pulses/rev
[21:50:43] <Tigzee> If the overflow interupt goes off...the motor isn't moving and generate an error
[21:51:14] <Tigzee> so it's about getting the proper divider of the clock to be safe
[21:51:15] <rue_shop3> oh, you mean measure a slice?
[21:51:32] <Tigzee> ya. measure the time of the 180 degree
[21:51:41] <rue_shop3> the 1 lines will be 180
[21:51:44] <Levitator> Ok, what about LCD touchscreens? The ILI9341 seems promising.
[21:52:01] <Tigzee> yep
[21:52:09] <rue_shop3> THO, I could make a window as wide or narrow as I want, and measure the window time
[21:52:18] <rue_shop3> which would help adjust for the count rate
[21:53:18] <Tigzee> at 0 degree line1 triggers interrupt. at 180 degree line 2 triggers interrupt. analyze time & make correction. at 360 degree (0 degree) line 1 interrupts again. measure time & make correction .......
[21:54:13] <Tigzee> You can then use the timer in normal mode (free counting), so it's possible to still have it avaiable for other things
[21:55:17] <Tigzee> ie. output compare for the pwm
[21:58:45] <Tigzee> ^also doing it that way, you could use a 16bit counter value so you could have a really REALLY big range
[21:58:47] <rue_shop3> I was thinking that I do a capture/reset of the counter on a rising edge trigger of int0
[21:59:00] <rue_shop3> and use 0 and rollover as out-of-range
[21:59:13] <rue_shop3> there is no 16 bit on the tiny13
[21:59:28] <Levitator> Nobody knows where to find other ESP/8266 developers on IRC?
[21:59:41] <rue_shop3> Levitator, I'll ask you when mine arrives
[21:59:48] <rue_shop3> try the chaps in #microcontrollers
[21:59:55] <rue_shop3> (?)
[21:59:57] <Tigzee> everytime the counter reaches 0 it can generate an interrupt. use just add 1 to a register (now you have 16 bit timing)
[22:00:25] <rue_shop3> yup
[22:00:33] <Levitator> I have one, but it's in module form, with just a few pins connected. It's awesome, but I don't want to solder the miniscule pins. Going to get a module with full pinouts.
[22:00:39] <rue_shop3> tho, it looks like 8 bit is spacious enough
[22:01:08] <rue_shop3> mine is stuck in canada post with 39 other packages
[22:01:26] <rue_shop3> prolly on the floor under a conveyor bel
[22:01:27] <rue_shop3> t
[22:01:29] <Tigzee> canada post is slow when it comes to the borders
[22:01:29] <Levitator> From what I gather, it should be possible to build a wireless touchscreen computer for about $15.
[22:02:35] <Tigzee> Levitator, I have played a bit the last couple days with an 8266. they are pretty amazing. I haven't programmed it directly though (been usign an atmel)
[22:02:46] <Levitator> Same.
[22:03:06] <Levitator> Atmel has nice manuals, I'll give them that. And the hardware is robust and flexible.
[22:03:18] <Levitator> Bit lean on performance, though.
[22:03:22] <rue_shop3> ok, the control value is the adc
[22:03:23] <Tigzee> I have mine configured in transparency mode with default settings. so the atmel thinks it's just talking rs232 to the other end
[22:03:40] <rue_shop3> what port do you connect to?
[22:03:57] <Tigzee> Levitator, I was able to get that thing to do 1megabyte/second of data from the wifi side
[22:03:57] <rue_shop3> and how do you get the ip? (mac address?)
[22:04:20] <Levitator> I thought about doing it in transparent mode, but then it technically surges the USB port out of spec if you don't use a separate power-enable line for the 8266.
[22:04:40] <Levitator> rue_shop3: The 8266 has a DHCP client.
[22:04:43] <Tigzee> rue_shop3, it can be tcp or udp. station AND /OR access point. client and/or server
[22:04:53] <carabia> Levitator: depends really on what you qualify as a "touchscreen computer"
[22:05:14] <rue_shop3> in transparent mode? it takes any connection and pushes it thru?
[22:05:51] <Levitator> Once the connection is established, you see the raw TCP/IP data on the UART.
[22:06:03] <Tigzee> rue_shop3, transparent = save settings in flash to go transparent. then every byte fromt he atmel automatically gets forwarded through a tcp connection tot he other end
[22:06:09] <Levitator> There is a hayes-style +++ escape sequence to pop out of that mode.
[22:06:15] <Tigzee> rue_shop3, it removes the controlling protocol
[22:06:42] <rue_shop3> wow
[22:06:58] <carabia> Levitator: for one, there's no way you'll do that in low qty, and two, it'll be for some niche-application or just fucking around with it, i assume.
[22:07:24] <Levitator> I don't like to push the envelope, so I have a DIO line that drives an NPN transistor to turn on a dedicated 3.3V regulator for the 8266.
[22:07:46] <Levitator> That way, you have two separate filter cap surges within spec instead of one large one.
[22:07:55] <carabia> i.e. figure out a niche application for it or it's useless
[22:08:10] <Tigzee> rue_shop3, I really love how well the esp8266 works. It has good wifi range. good speed. multiple ways to use. etc...
[22:08:27] <Levitator> Well, the main draw to me, to transparent mode, is the prospect of wireless firmware updates.
[22:08:37] <Tigzee> rue_shop3, I have mine configured as clients that just connect to a server I have running
[22:08:56] <Tigzee> Levitator, everywhere I read...you don't want to do that
[22:09:02] <Levitator> Instead of an NPN transistor, you could use a flip-flop to remember the on-state. You reset the AVR, and now it can update from wireless as if it were serial.
[22:09:27] <Tigzee> Levitator, lots of failed firmware updates and you have to do it manually anyways
[22:10:08] <Levitator> Yeah, that's true. Best option might be to stick with the transistor-based enable and use a custom boot loader to update from radio.
[22:10:23] <Levitator> But that's if you're going to use an AVR in the first place.
[22:10:30] <carabia> Levitator: seems stupidly over (or under, really) engineered to use a fucking 100+mhz wifi chip (with available io) to update avrs?
[22:10:38] <Levitator> AVRs are really slick for GPIO, but I'm not seeing the draw beyond that.
[22:10:50] <Levitator> 8266s kick their ass in pretty much every other area.
[22:11:27] <Levitator> carabia: I'm assuming that your application needs wifi anyway.
[22:12:00] <carabia> point still stands, where the hell do you still need the avr
[22:12:46] <Levitator> No, it doesn't. You might want the AVR for A/D or D/A, or for the sheer number of DIOs, or for the relatively high drive current, etc.
[22:13:25] <Levitator> AVRs are very flexible IO-wise. It's their main strength, that I can see.
[22:13:49] <carabia> "high drive current", use small trannies
[22:14:08] <Levitator> Obviously depends on your application.
[22:14:09] <Tigzee> I agree with levitator. the 8266 is a very very powerful chip and some applications can remvoe the avr, but in others....it lacks the IO ability
[22:14:16] <carabia> ad, da take your pick. use a chip. don't complicate the design
[22:14:41] <carabia> or both. for io, serial io expanders
[22:14:52] <rue_shop3> I'm gonna go do some welding before it gets stupid-late
[22:15:13] <Tigzee> carabia, for the price of an io expander, you can get an atmega 128 for $1.33
[22:17:16] <Tigzee> ^thats 53 io lines plus everyhting else the chip can do
[22:18:01] <carabia> i'm looking at 24 io expanders in singles @ $.7
[22:18:08] <carabia> that's in singles
[22:19:08] <Tigzee> double that and you can have 2 io expanders or a powerful chip that could do more...or not
[22:20:23] <carabia> or a stupidly complicated design. or not.
[22:22:26] <Tigzee> do those io expanders do adc? comparing? pwm? you are losing those. I also don't feel it becomes a more complicated design
[22:22:27] <carabia> depends on the design, doubtful on requiring that many plain digital io, however
[22:22:48] <Levitator> Because I dislike complexity, that's exactly why I'm expecting to ditch AVR.
[22:23:09] <Tigzee> you do have to make the program for it, but a simple io layout should be bad
[22:23:19] <rue_shop3> 74595?
[22:23:29] <carabia> yeah, obviusly they don't. But you scale based on what you need and not because "you can"
[22:24:09] <Levitator> AVR is great for prototyping when your hardware options are still open-ended, but 8266 wrecks it in terms of processor power, memory, and storage. Probably doesn't have the crippled Harvard architecture either.
[22:24:33] <rue_shop3> dude, the stm32 boards are $3 ea
[22:25:11] <carabia> rue_shop3: yes they are!
[22:25:15] <Tigzee> rue_shop3, $1.34cdn on ebay
[22:25:34] <Levitator> AVR is nice if you don't know what you're doing and your' just jury rigging random bits of hardware together. It's the BASH shell of MCUs, that I can tell.
[22:25:50] <carabia> Levitator: no not really
[22:26:08] <Levitator> It does more than that, in addition, but it's kind of a bad tradeoff unless you actually need that.
[22:26:12] <Tigzee> Levitator, its the raw control of timing that is nice with avr
[22:26:15] <carabia> they have their application. It's your approach that's flawed
[22:26:35] <Levitator> You don't know what my application is, so you can't tell me that my approach is flawed.
[22:27:10] <carabia> your approach is fucking flawed if you expect an avr to do something that a chip with dma and a clock running at 100mhz or so, can match
[22:27:24] <carabia> minus "can match"
[22:27:28] <Tigzee> Levitator, the more computer direction you go, the less raw timing is there
[22:28:02] <carabia> i remember you Levitator rigging up some elaborate arduino-like framwork with all kinds of stupid ass abstractions for avrs
[22:28:25] <Levitator> You don't even know what I'm doing and you're sitting here judging my methodology.
[22:28:29] <carabia> i knew it back then already that you were doing it wrong by a margin.
[22:28:52] <Tigzee> I'm pulling out of this conversation
[22:29:27] <Levitator> Anyway, yes AVR, has its strengths, but not for what I'm doing. It might be very nice for some other project.
[22:30:03] <carabia> good that we got that one cleared then.
[22:30:09] <rue_shop3> right now i have a t13 pulsing a valve for 200ms every 10s i wouldn't want to be using any other chip
[22:30:21] <rue_shop3> maybe a t10, not set up for them
[22:30:50] <rue_shop3> point being its not an stm32 or esp8266 job
[22:31:09] <Tigzee> I agree with rue_shop3. avr is awesome for raw timing
[22:31:24] <Levitator> That's probably true.
[22:31:32] <carabia> stm32s are a dime a dozen. you can really use them for anything, for that matter.
[22:31:50] <carabia> if you go for a production run anyway. you can also prototype with them relatively easy in tqfps.
[22:32:23] <carabia> Tigzee: i can beat your avr timings on an cm7 any day of the week
[22:32:34] <carabia> a cm7*, even
[22:32:43] <Tigzee> I don't know what a cm7 is...is it $1.33?
[22:32:50] <rue_shop3> but avr beats the stm32's io rate
[22:33:03] <carabia> rue_shop3: doubt it
[22:33:22] <carabia> Tigzee: just saying, you're only going to lose real-time capabilities, if you want to.
[22:33:53] <Tigzee> I can't find cm7 with google
[22:34:48] <Tigzee> carabia, the second you go to an muti-processing OS, you lose accurate timing (this was my response to levitator with bash)
[22:35:05] <carabia> cortex-m7, it was just an example of the extreme end of the cm arm line.
[22:35:05] <Tigzee> carabia, yes, you can put things real time etc...but it won't ever be perfect
[22:35:18] <rue_shop3> it does
[22:35:26] <rue_shop3> the max io rate on the stm32 is 10Mhz
[22:35:31] <carabia> Tigzee: of course
[22:35:35] <Levitator> Tigzee: That's fine and well, but it happens that I don't need real-time signalling.
[22:35:37] <rue_shop3> a 16Mhz avr can operate its io at 16Mhz
[22:36:26] <rue_shop3> welding, bbl
[22:36:44] <carabia> rue_shop3: i'm not sure on what part of your ass you pulled that tidbit of info out of
[22:36:51] <Tigzee> carabia, thats a $18 chip. I wouldn't use that to control cnc motors
[22:37:16] <carabia> Tigzee: yes, but hey, i'll beat your timings tenfold
[22:37:40] <Tigzee> ya, but the price of your device went up 10 fold
[22:37:56] <rue_shop3> look it up, the stm32 io is limited to 10Mhz, and when the 72Mhz core writes to io it suffers a 10Mhz wait state
[22:38:34] <carabia> i'm kind of restricted in terms of looking anything up on this ghetto computer i'm on at this very moment
[22:39:07] <carabia> but i'm quite certainly sure that's not true. Probably true for some makes, but "stm32" is a very very large range of mcus.
[22:39:18] <rue_shop3> it is
[22:39:42] <rue_shop3> unless your using someing things the isp, or another subsystem, the pin io rate is 10Mhz
[22:40:14] <rue_shop3> AND wait states, which if you dont want to suffer from, you have to employ the dma to do your io
[22:41:50] <Tigzee> I'm not doing anything ic complex enough to require that m7. if I need timing accuracies I use avr. If I need complex stuff done, I use pc. If I need both....I use an avr with pc
[22:42:11] <carabia> rue_shop3: so what exactly are we talking about here?
[22:42:46] <Tigzee> pc = raspberry pi -> intel i7 pc
[22:43:18] <carabia> "io rate" as in maximum dio toggling freq?
[22:45:32] <Tigzee> The m7 does have a high speed adc that can be 5-7MSPS...that is nice
[22:50:39] <carabia> rue_shop3: for f1, the ds specs maximum toggling frequency of 18mhz, not 10
[22:51:14] <carabia> for f4, off a quick google maximum toggle freqs are specced at 60mhz or over
[22:51:49] <carabia> and i really can't do extensive googling on this computer. I merely googled those two.
[22:52:19] <carabia> for m0/+ they are probably specced different. and no idea of the m7. All within the stm32 line.
[22:52:32] <carabia> Tigzee: the m7 really has everything.
[22:55:43] <carabia> chances are it's not a long-lived line as you can more than easily justify using an a-line arm instead of that.
[22:59:23] <rue_shop3> on the stm32 the raw pin io bus rate is 10Mhz
[22:59:55] <carabia> okay, source?
[23:00:38] <rue_shop3> datasheet
[23:01:03] <carabia> which datasheet, which chip? Seriously?
[23:01:05] <rue_shop3> as microchip screws up avr I'm gonna migrade to arm
[23:01:19] <rue_shop3> hmm whats the cheap chip on the bardos from china?
[23:01:39] <carabia> i don't know you know, there are tons. And they are all differnet
[23:01:50] <rue_shop3> 32F103C8T6
[23:02:11] <rue_shop3> no, if you look on aliexpress or ebay, there is a really cheap board, they all have the same chip
[23:02:16] <carabia> afaik the ios are hooked onto the peripheral bus and the max freq of said bus depends on the m-family
[23:02:23] <rue_shop3> https://www.aliexpress.com/item/Arm-cortex-m3-stm32f103c8t6-stm32-core-board-development-board/1539984258.html
[23:02:53] <Tigzee> is the avr line dieing?
[23:03:07] <rue_shop3> ok frame is assembled for new cnc, next task tonight is to cast some aluminum
[23:03:19] <rue_shop3> Tigzee, microchip will screw it up, I'm sure of it
[23:03:20] <Tigzee> where doy ou live rue?
[23:03:22] <carabia> rue_shop3: i suggest you read the ds again
[23:03:24] <rue_shop3> canada
[23:03:34] <rue_shop3> carabia, what did you find?
[23:03:35] <Tigzee> rue_shop3, downtown canada, eh?
[23:03:56] <carabia> rue_shop3: the ds specs the apb2 bus at max 72mhz, and the maximum toggling frequency of io hooked to that bus, at 18mhz
[23:04:08] <rue_shop3> thats not the io bus
[23:04:08] <carabia> and this is not true for all chips in the fucking stm32 line.
[23:04:12] <Tigzee> rue_shop3, I didn't mean specifically. Just meant which town/city
[23:04:24] <rue_shop3> ok, there is ANTOHER bus, for raw io
[23:04:43] <rue_shop3> the 18Mhz is for the advanced perph bus
[23:04:54] <rue_shop3> but the raw io iirc is on another bus that maxes out at 10Mhz
[23:05:00] <carabia> no
[23:05:05] <rue_shop3> hmmm
[23:05:12] <carabia> there's two peripheral buses in cms
[23:05:18] <rue_shop3> look at it later then
[23:05:26] <carabia> the highspeed apb2 and the lowspeed apb
[23:05:47] <Tigzee> rue_shop3, I'm going to guess on the west coast
[23:05:49] <carabia> whatever io is on the apb2, can toggle at 18mhz
[23:05:57] <Tigzee> rue_shop3, or a really late night welder
[23:06:09] <rue_shop3> its only 8
[23:06:22] <rue_shop3> I WAS gonna weld this at 3:3am this morning
[23:06:36] <rue_shop3> I thought the neighbours might now appreciate the late night lightshow
[23:06:57] <Tigzee> very few curatins would keep that light out
[23:07:00] <Tigzee> *curtains
[23:07:02] <rue_shop3> suppose if I'm gonna fast something I should get started now
[23:08:46] <carabia> rue_shop3: yeah. take a look at it again.
[23:10:28] <carabia> though, i should say, in f1 there's two peripheral buses. In other m-family chips there can be more, depending on additional peripherals such as sdio etc. But none of them have a separate bus for just "raw io"
[23:10:40] <Tigzee> I guess I shoul dget back to my project...I have sat on it for 2 days
[23:14:08] <carabia> and it also seems all of the f1 gpios are on the highspeed bus, which ds specs max toggle 18mhz
[23:16:19] <rue_shop3> I wonder if I can cast a bed for this cnc
[23:18:23] <Tigzee> rue_shop3, what are you using for casting?
[23:19:17] <carabia> rue_shop3: and i think mcp can only enhance avrs. Chances are you avr fools might actually get a decent avr with actual dma! Hooray, only how many years too late?
[23:19:19] <rue_shop3> sand
[23:23:24] <rue_shop3> carabia, avrs dont need dma and they aren't for running operating systems
[23:23:35] <rue_shop3> they are for controlling smart io
[23:24:16] <carabia> dma is not really equivalent to running an operating system
[23:25:31] <Casper> DMA is for unloading the cpu while the peripherical do it's job
[23:25:42] <theBear> or dumb io when i feeling lazy :)
[23:25:54] <Casper> it put the data in memory instead of waiting for it to pool it up and fetch the data as it come in
[23:26:38] <theBear> mmm, and until you got multiple independant "smart" peripherals doing that dma/bus-mastery stuff, it's kinda pointless, if anything it'd add unnecesary overhead/bus-contention
[23:27:23] <rue_shop3> no, but your asking for features on a small car for pulling semi trailers
[23:27:38] <rue_shop3> you dont pull semi trailers with 2L cars
[23:27:57] <carabia> theBear: it depends on your application
[23:28:30] <carabia> and it also depends on how you employ it
[23:30:19] <theBear> mmm, i thought we were giving rule-of-thumb tips to someone who hasn't done this stuff at all, don't worry bout me tho, i always look at the absolute nuts and bolts of anything i doing before i assume/pre-decide anything like that
[23:31:17] <carabia> no, we were contemplating on why avrs suck
[23:31:52] <theBear> dude ! the only possible reason is cos they just got bought <grin>
[23:32:10] <Tigzee> who bought avr?
[23:32:14] <carabia> avr line is not that versatile when you count out the failed xmega-line that really failed so fucking hard it's not even funny
[23:32:15] <Tigzee> and is this good or bad?
[23:32:25] <theBear> pic did, and i dunno
[23:32:27] <carabia> Tigzee: mcp
[23:32:58] <theBear> carabia, surely someone wanted to use some external bussey old ram and was glad they existed ? <grin>
[23:34:03] <carabia> theBear: no, but pics also come in models of large memory while being .1" dip, for MAKERs and prototyping, in case you still live in the 80s
[23:35:31] <theBear> way i see it, we went from bnuilding a discrete many-chip whole-computer, or paying $100 fer an effing basic interpreter mounted on a dip-pcb, or pics that needed hassley programming voltages and one or two extra discrete somethings to deal with that, to dirt-cheap avrs that do a bunch of useful/essential stuff built-in, had VERY sane/simple programming interface/approach, and just changed my effing world literally overnight when i discovered them... oh, an
[23:35:31] <theBear> the awesome very open toolchain stuff is "nice", but not really relevant
[23:35:59] <carabia> but yeah, if we only ever blink leds and equivalent applications, surely we don't need anything but god damn flip flops
[23:36:37] <theBear> i still like to use dip for most stuff, mostly habit and exxcessive stock of everything from old jobs when i got good prices and could buy bulk, and all thoose various vero-esque board scraps i seem to have an endless supply of
[23:37:22] <theBear> got no problem with even the smallest smd in town, just don't seem to find myself making stuff with it unless i need to be super-tiny
[23:37:58] <theBear> course i only got my very first usb-serial adapter/chip a few weeks ago, and think the only machine i own without a parport is my eee netbook :)
[23:38:30] <Tigzee> theBear, I like smd because...no drilling. One thing I have to figure otu in the future is hwo to order those pre-made cheap pcb boards
[23:38:55] <carabia> printed circuit board board
[23:39:01] <_ami_> rue_shop3: microchip loves AVR. i have asked this to a microchip employee. he said that mc loves avr
[23:39:04] <carabia> and premade!
[23:40:10] <_ami_> mc has released new AVR chips
[23:40:32] <carabia> Tigzee: asian fab houses, cheap prices. google is your friend. the more money you wanna throw at them the faster turnarounds you can expect. With proper shipping, too
[23:40:37] <theBear> Tigzee, my vero and similar strippey style boards already got more holes than i could ever use <grin> and once yer done more than a couple yer find some quick and not-hassley way to cut/break the tracks that suits yer manual/workbench hand-styles
[23:41:06] <carabia> theBear: you really like <grinning>, <grin>?
[23:41:07] <theBear> Tigzee, tho i bet if/when i get into making my own boards again one day, i'll quickly feel the same way
[23:42:21] <theBear> carabia, if i didn't smile i'd have to cry, and i'm a jackass, easily entertained, and try to me my irc text represent how i would be speaking/appearing if we were actually talking in person, cos i feel that's just the kinda tone that irc should be ;-)
[23:43:24] <theBear> carabia, and of course some more-serious persons seem to assume that more than 1 in 50 things i type aren't tongue-in-cheeky or just plain terrible one-liners/near-wordplay, and i hate people to be miscomprehending what goes on aroudn the,
[23:43:28] <theBear> m]
[23:43:32] <theBear> eff this keyuboard !
[23:44:20] <carabia> personally, i read out loud all the messages with a christopher walken voice
[23:45:19] <theBear> lol, sounds like an intelligent approach to my ears, yes sir, hehe, now my head is doin it too... mmmm, i could get used to this
[23:46:34] <carabia> yes, it is the only thing keeping me from breaking down, giving up and taken to the psych ward
[23:48:06] <carabia> being taken, rather
[23:48:09] <theBear> mmm, i got a few techniques that been working in that area for me last few years of housebound-ness and no disposable income,but i'm sick in the head AND an acid casualty from the turn of the century, so ya know, i wouldn't recommend them to ANYONE
[23:50:33] <carabia> me and many others would beg to differ on how appropriate the word "casualty" is for what you're describing there