#avr | Logs for 2017-01-25

Back
[01:26:52] <rue_bed> pushbuttons, use an IR TV remote
[01:27:15] <rue_bed> use blue or violet 7 segment displays that are slightly italic
[01:27:36] <rue_bed> use aluminum for the panel cover
[01:32:38] <CapnJ> ?
[01:50:48] * _ami_ yawns!
[04:39:25] <specing> 7-seg? what is this, 1950?
[04:39:57] <_ami_> specing: haha :)
[04:47:27] <specing> also something about pushbuttons in the age of touchscreens
[04:49:15] <Haohmaru> the age of rubbing glass
[04:49:56] <Haohmaru> how much rubbing will it take for them to realize that buttons are better
[04:56:58] <specing> I really want a resistive and matte touchscreen phone :(
[08:53:10] <yids> im trying to use progmem and was wondering how to use it correctly
[08:53:26] <yids> i have for example: const char PROGMEM clear_message[] = "Blaat blaat";
[08:54:24] <yids> now to use that message in my code, do i _need_ to use pgm_read_* functions? because using the var as i would normally do also just seems to work
[09:07:22] <Haohmaru> yids just like normal
[09:07:34] <Haohmaru> afaik the compiler will deal with it
[09:10:57] <bss36504> yids: Check this out http://www.nongnu.org/avr-libc/user-manual/pgmspace.html
[09:18:29] <yids> so if i understand tat
[09:18:40] <yids> that correctly
[09:18:57] <yids> i do need to use the pgm_read functions
[09:20:16] <bss36504> It seems so
[09:20:34] <Haohmaru> hm.. so i was wrong then
[09:20:55] <yids> but actually, i tried to just use that var clear_message like normal, and that worked somehow
[09:22:44] <Haohmaru> i guess the real way to know is to check the asm output and see what instructions were generated.. that requires ASM knowlage tho
[09:23:42] <yids> okay another question, i have a unsigned char array like this unsigned char pubkey[KEYSIZE]= {0xFF, 0x99, 0Xetc} and im trying to copy that some were using memcpy(keypair->pubkey, pubkey, KEYSIZE), which works as expected on x86, but it seems like its going wrong on avr
[09:24:29] <Haohmaru> in what way does it go wrong?
[09:25:32] <yids> well im not sure because debugging on avr is alwyas kinda difficult but after loading the keys in this way my decryption function fails, and i really have the idea that somehow the key is not in there correctly
[09:26:41] <Haohmaru> so you suspect memcpy() is not doing what it should?
[09:27:23] <Haohmaru> you could always replace that with direct code for doing byte-by-byte copy
[09:27:49] <yids> hm yeah
[09:28:18] <Haohmaru> is the endiannes the same?
[09:28:27] <Haohmaru> ..the byte order i mean
[09:29:04] <yids> hm lets see
[09:29:57] <yids> what is the endianness of avr
[09:31:08] <yids> oh yeah okay
[09:31:15] <yids> depends on how i write the code i suppose
[09:33:29] <carabia> yids: if you have a spare pin, or easier yet an unused uart module, use that to debug
[09:35:59] <carabia> if not, have you tried just storing a pointer to pubkey instead of copying it?
[09:36:50] <Haohmaru> if he sends that stuff out into a FIFO or so - he'll probably need to copy it
[09:38:30] <carabia> just for debugging purposes
[09:38:40] <carabia> that it is in fact the copy that fails and not something else
[09:38:49] <yids> hhm i will try that
[09:39:57] <carabia> it's highly recommendable though if you have that spare pin to spin a soft uart lib for debugging (or grab one of the millions around in the internets), or use the module if it's free
[09:40:21] <LeoNerd> Yah; I find a TX-only soft UART quite useful for that
[09:40:39] <yids> you mean using the u uart to send debugging messages?
[09:40:44] <LeoNerd> Most of the proper soft-UARTs try to be interrupt-driven and nonblocking, but we don't mind blocking the CPU during debug prints, so such a module is nicely simple
[09:40:49] <Haohmaru> yids yes
[09:40:53] <yids> yeah thats what im doing
[09:41:04] <carabia> how come "debugging is hard" then?
[09:41:08] <yids> but then still i cant inspect the memory check vars etc
[09:41:29] <carabia> diff the pubkey to keypair->pubkey, difficult?
[09:41:58] <yids> hm
[09:42:21] <carabia> debugging is /hard/
[09:45:50] <bss36504> What exactly is the struggle? Are you just trying to verify that the data actually goes into flash or are you concerned it is not being read properly?
[09:46:32] <carabia> < yids> okay another question, i have a unsigned char array like this unsigned char pubkey[KEYSIZE]= {0xFF, 0x99, 0Xetc} and im trying to copy that some were using memcpy(keypair->pubkey, pubkey, KEYSIZE), which works as expected on x86, but it seems like its going wrong on avr
[09:46:41] <carabia> ^ i'm trying to help w/ that
[09:54:13] <carabia> *follows an intense debugging session*
[09:54:35] <carabia> *ultimately, it is revealed that the problem existed between the chair and the keyboard, all along*
[09:55:02] <yids> thats usually the case
[09:57:56] <learath> :(
[09:58:55] <bss36504> Ok so is the pubkey array in progmem?
[10:00:17] <carabia> well in that case use memcpy_P
[10:02:22] <carabia> his silence suggests there are ongoing revelations
[10:05:33] <carabia> https://hackaday.io/project/19493-quick-jump-to-nodejs-on-ltps-boards
[10:05:37] <carabia> it has begun.
[10:06:36] <carabia> i don't know what ltps is, but clearly nodejs is the future.
[10:07:06] <carabia> bss36504: change of plans, project name needs to be changed
[10:08:40] <bss36504> What the actual hell is a tibbit?
[10:09:26] <carabia> i don't know, but toiletio has to be changed. introducing toilet.js
[10:09:36] <bss36504> hahahaha yesss
[10:10:08] <bss36504> We can reserve toilet.io as the website for it, but yeah, the software stack will have to be toilet.js
[10:10:20] <carabia>
[10:11:15] <carabia> toilet.prototype.squeezeTurd().recordData().flush().recordMoreData().append.innerHTML = "done";
[10:11:18] <carabia> or something.
[10:12:33] <bss36504> lol
[10:13:38] <carabia> We can integrate mongoDB (it's hip) for storing eh... the shitty data
[10:13:55] <carabia> and google v8 because it sounds cool
[10:14:12] <bss36504> Oh yeah it uses the newfangled Data Warehouse design pattern. Very hip
[10:14:17] <carabia> :D
[10:14:33] <bss36504> It's gotta be deployable on docker instances in the cloud
[10:14:54] <carabia> yes, instant heroku deployment
[10:16:07] * sabor prefers a toilet without any clouds of any kind
[10:16:52] <carabia> It has to follow SOLID-principles for writing proper Modern(tm) and Simple JavaScript
[10:17:30] <carabia> Therefore, in the company orientation sessions we shall watch that one guy who talks about programming by drawing analogues to human anatomy and cosmology, hours on end
[10:17:45] <carabia> I forgot his name.
[10:17:48] * bss36504 is severely lacking in web dev terminology
[10:18:41] <bss36504> But, will it also have a RESTful API for our power users to take advantage of?
[10:18:46] <carabia> yes!
[10:18:49] <carabia> REST.
[10:19:12] <carabia> SOLID is some thing the c++ people came up with. I have no idea of it, because those OOP paradigms come and go every few years
[10:19:24] <bss36504> We don't need none of that SOAP bullshit on our platform
[10:19:42] <bss36504> Don't forget dependency injection/inversion
[10:20:14] <carabia> yes
[10:20:41] <bss36504> god I fucking hate software
[10:20:43] <carabia> i'm gonna have to run off this design meeting, but we shall focus on the details later on
[10:20:46] <carabia> bss36504: amen.
[10:25:32] <Chillum> gawd at my old work we would have meetings to plan the design meetings
[10:49:59] <rue_bed> C, man, plain ole C
[10:50:19] <rue_bed> organized libraries
[11:39:14] <skz81> <bss36504> We don't need none of that SOAP bullshit on our platform >> just $0.02 : REST is no SOAP. Both are RPC protocols though
[11:41:12] * bss36504 doesnt understand web dev
[11:42:29] <LeoNerd> It's a strange place
[11:42:38] <Lambda_Aurigae> <p>put text here</p>
[11:42:41] <Lambda_Aurigae> web dev...
[11:42:48] <LeoNerd> Totally dominated by a language made up by three guys locked in a meeting room over a weekend because they had to have something to demo on Monday
[11:43:05] <LeoNerd> So you can imagine how well that went ;)
[11:43:19] <Lambda_Aurigae> LeoNerd, they did NOT spend two whole days on it. I think it was over friday lunch period to demo before they went home that afternoon.
[11:43:30] <LeoNerd> Ah :)
[11:44:06] <Lambda_Aurigae> however, the million monkeys theory is slowly being disproven by the internet.
[11:44:36] <Lambda_Aurigae> yes, totally unrelated..hehe
[11:44:56] <Chillum> is it? Surely the various memes have out paced Shakespeare by now
[11:45:15] <Lambda_Aurigae> yeah, but nothing intelligent comes from the internet.
[11:45:18] <Chillum> Hark, is this a kitten I see?
[11:45:46] <Chillum> by that reasoning, nothing you have said on this IRC channel is intelligent
[11:45:55] <Chillum> therefore I should question your assertion that nothing intelligent comes from the internet
[11:46:00] <Lambda_Aurigae> prezaktly!
[11:49:57] <rue_house> you spelled prezactly wrong
[11:51:51] <Chillum> stikler
[11:53:44] <Lambda_Aurigae> on purpuse!
[11:53:48] <Lambda_Aurigae> :}
[11:57:22] <rue_house> I'd not have commented if it were any more common a word
[11:59:13] rue_house changed topic of #avr to: 8 bit atmel microcontrollers. suggest a hilight for the day to Rue_house. Todays hilight: http://digital-wizard.net/avr_projects/remote_controlled_robot
[12:07:17] <Lambda_Aurigae> rue_house, no schematic for the transmitter
[12:07:39] <rue_house> geez, leave room for imagination would ya?
[12:07:43] <rue_house> :)
[12:07:56] <rue_house> good links are hard to find ya know!
[12:08:29] <Lambda_Aurigae> and no code for the atmega8
[12:08:35] <Lambda_Aurigae> not even a hex file at first glance.
[12:08:42] <rue_house> arg, I thought I checked that one
[12:08:53] <rue_house> you dont need a hex...
[12:09:30] <Lambda_Aurigae> don't see a source link either.
[12:10:16] <rue_house> ok well maybe its hopeless inspiration...
[12:11:22] <rue_house> bah, they were prolly selling the code
[12:11:47] <rue_house> ooh I wonder if thats that same NIT as the other page
[12:12:03] <Lambda_Aurigae> or, selling an 8051 based system.
[12:12:14] rue_house changed topic of #avr to: 8 bit atmel microcontrollers. suggest a hilight for the day to Rue_house. Todays hilight: http://www.societyofrobots.com/member_tutorials/node/309
[12:12:19] <rue_house> there!?
[12:13:07] <rue_house> didn't think I was working today, but the calls are stacking up
[12:13:29] <Lambda_Aurigae> site offline
[12:13:33] <Lambda_Aurigae> :}
[12:15:30] <rue_house> wtf I get for preselecting pages
[12:16:30] <rue_house> should I just put it back to carabias spelling error?
[12:37:30] * Lambda_Aurigae shrugs.
[12:38:01] <Lambda_Aurigae> I should do up another microcontrollers page some day.
[15:27:57] <carabia> skz81: thank you for your input
[15:28:14] <carabia> we shall take that into account while designing toilet.js
[15:28:41] <carabia> we might have to implement flush.js too
[15:44:29] <shangul> i got a serial port programmer which work(someone else gave it to me), said it works fine with BASCOM-AVR, but i don't know the name of it to tell to avrdude, what i see on the board is 3 150 ohm resistors, a 100uF capacitor, a led and a BC547 transistor, what is the name of the programmer?
[15:44:42] <shangul> s/work/works/
[15:46:03] <shangul> maybe C547
[15:47:07] <carabia> bascom? really now?
[15:47:09] <carabia> :D
[15:47:26] <shangul> carabia, ?
[15:47:38] <carabia> it's basic, yes?
[15:47:42] <shangul> yes
[15:47:57] <shangul> i don't use bascom but the one who used the programmer
[15:48:03] <carabia> back to the 70s
[15:48:07] <carabia> 60s even, let's go
[15:49:55] <carabia> this is the third day you're fiddling with a fucking programmer
[15:50:02] <carabia> isn't it getting quite tiresome already?
[15:54:00] <shangul> well i got a prepared programmer which works
[15:54:01] <theBear> what, bascom ? oh, it was dontronics that were parport, bascom just made the incredibly naieve and bug-ridden compiler/assembler.... to the point where you end up shuffling blankspace (basic compiler we talking here, BASIC, no whitespace rules, etc) and changing a letter or two in a variable name while observing the asm it spits back out, to clean up those few odd glitches and faulty corner cases you notice appearing as your program goes from simple
[15:54:01] <theBear> single-liner/single-conditional early dev/electrical interface testing stuff, to somethign useful, perhaps having as much as a 1 layer deep nested loop and/or conditional involved, and fwoof, perhaps as many as 6 or 8 short unsigned int variables (at the high/basic code level at least) invovled ! heh
[15:55:01] <theBear> but i don't blame em, without bascom and a buddies "idiot" housemate that fateful night, i would still think you need to buy discrete cpus and ram and peripheral drivers and crap if you wanted to do what a couple bucks of avr or pic could do even then over 10 years ago :)
[15:55:40] <shangul> i just said bascom know this serial port programmer.
[15:56:06] <carabia> theBear: acid again?
[15:56:50] <shangul> i forgot, it also has a diode
[15:57:00] <carabia> this is very informative
[15:58:29] <shangul> ok let's think it's ponyser
[15:58:49] <carabia> let's play name the board! i have this board, it has a couple of 10k resistors, a bunch of caps, a qfp and a few bjts
[15:59:04] <theBear> shangul, when i had to translate a programmer to avrdude or similar, i tend to just think/trace it out ... with a basic serial programmer like that most likelly is, the rx/tx lines and speeds/delays etc are pretty much set in stone between an avr and a rs232 or similar port, so you can compare a couple other serial programmers already in the default config list to get that basic skeleton sorted out, then you refer to others just for syntax/"special
[15:59:04] <theBear> names" like pfft, maybe reset, pgm led if yer programmer got one, umm, i forget the other pins tonight, all that left then is to look/meter which physical pins those various lines go to on the pc port end, back to where they go straight thru, or more likely get buffered by a micro or 74245 or similar multi-straight-thru-buffer chip, or maybe for leds a tiny tran/fet at your programmer pcb/end, enter appropriate pin number/def's to fill out those last
[15:59:05] <theBear> bits of your avrdude config, doneski
[16:00:02] <shangul> i should go sleeping now but i will return.
[16:00:03] <carabia> shangul: you're probably better off ignoring theBear, very rare indeed is the occasion on which he provides any useful information, or even sensible sentences
[16:00:27] <theBear> carabia, heavy painspine week, new oral steroids mid-high dose for acute short term treatment, and general exposure/testing in case of future needs, which seem to really have most of the sideeffects they claim, unlike 99% of all other prescription med warnign
[16:00:27] <theBear> gs
[16:01:06] <carabia> theBear: thank you, now you can go tell someone who's actually interested even the tiniest bit
[16:01:18] <theBear> carabia, aww c'mon <grin> that was only 6 lines and it explained how to reverse any random serial programmer you come across into an avrdude config, and with minimal extrapolation, the same for all "parallel port" programers too <grion.
[16:01:46] <carabia> pain spike must've hit right as you were grinning for the second time.
[16:01:49] <theBear> carabia, the story was cos you asked about acid, jusat saying "no" would have seemed a bit curt, almost rude <grin>
[16:01:51] <theBear> i'm out
[16:02:01] <theBear> enjoy yerselves
[16:02:26] <carabia> thanks i've got rum and coke and it's only wednesday (I think), so yeah I will
[16:02:40] <shangul> good night
[16:02:55] <shangul> i will return
[16:03:08] <carabia> what do you return?
[16:03:49] <carabia> yids: did you ever sort out your problem=
[16:03:53] <carabia> *?
[16:06:24] <theBear> it's 'strayyyyaa day + national holiday today, just sunup time about now, so if you got drinks, ya know, every little helps <wink>
[16:07:16] <carabia> what a waste of breath