#avr | Logs for 2016-05-05

Back
[02:06:43] <PolishProgrammer> how does a segfault look on an avr?
[02:07:05] <PolishProgrammer> does it just stops working?
[02:08:10] <PolishProgrammer> or is there any way to catch it in code so i can light up some status leds
[02:26:04] <cbrpnk> Anybody here?
[03:11:06] <inflex> no
[03:14:42] <cbrpnk> hehe, I have a question concerning AVR C functions
[03:17:03] <cbrpnk> I have no experience with AVR so this might be a really noob question but there it goes.
[03:17:21] <dsal> cbrpnk: http://www.catb.org/esr/faqs/smart-questions.html
[03:18:26] <mohsen__> Hi does anybody have an equaivalant of the arduino's blink example?
[03:18:56] <mohsen__> For avr-gcc
[03:20:28] <dsal> mohsen__: you can look through the history of this dir: https://github.com/dustin/snippets/tree/master/c/avr/blink
[03:20:49] <dsal> I've done several variations. The most recent is using the watchdog timer.
[03:21:38] <mohsen__> Thanks
[03:22:09] <dsal> This is pretty basic: https://github.com/dustin/snippets/blob/78390c4b57b463863ae7183af2f76596be7fd9d5/c/avr/blink/blink.c
[03:24:03] <mohsen__> Doesn't avr-gcc have some kind of doc?
[03:24:51] <mohsen__> I don't know what those operators mean ( |= ~ << ).
[03:25:01] <dsal> Yeah, it comes with a bunch installed. That plus chip datasheet are helpful.
[03:25:07] <dsal> Well that's standard c
[03:25:29] <dsal> You've got to at least know c pretty well before proceeding. :)
[03:25:51] <mohsen__> I know C++
[03:26:08] <mohsen__> Are they eliminated in C++?
[03:26:09] <dsal> Nobody knows c++
[03:26:20] <dsal> No, that's used heavily in c++
[03:26:46] <mohsen__> I see.
[03:27:34] <mohsen__> Isn't there any online documentation for avr-gcc?
[03:28:34] <dsal> The first two Google search results seem relevant.
[03:29:54] <dsal> What are you hoping to get from the docs?
[03:30:22] <dsal> It's mostly just GCC with a couple different platform specific options.
[03:31:27] <mohsen__> Shouldn't I learn these PORTB and DDRB from the docs?
[03:32:26] <dsal> No, that's in the data sheet for your chip
[03:33:15] <mohsen__> I see.
[03:33:25] <inflex> ja, have to know your AVR datasheet well
[03:33:44] <inflex> seems like a dry/boring bit of document but it's paramount and exceptionally well written really
[03:33:55] <dsal> Sometimes, things are consistent across chips. I've accidentally run into that a few times.
[03:33:59] <inflex> ( some more examples would always be nice in the datasheet but they do a good enough job )
[03:34:15] <inflex> yes, that's the nice thing about the AVRs, they've got a lot of commonality
[03:40:38] <mohsen__> So I need to know what those operators mean.
[03:41:50] <dsal> You need to know basic c and binary logic, yeah. You'll be doing a lot of bit operations.
[03:44:22] <inflex> C is quite simple really.
[03:44:33] <inflex> ( but it can lead you to complex outcomes ;) )
[03:44:34] <mohsen__> Are those binary operators?
[03:44:45] <inflex> Which operators?
[03:45:01] <mohsen__> "!=" "~" "<<"
[03:45:21] <inflex> well, first is a comparison
[03:45:30] <inflex> second is bit-invert, third is shift-left
[03:46:13] <mohsen__> Sorry the first operator is |=
[03:46:30] <inflex> oooh, that's a shortform of a = a | b
[03:46:44] <inflex> much like += is short for a = a + b
[03:46:55] <mohsen__> Why aren't they included in java books?
[03:47:02] <mohsen__> Because they're binary decisions?
[03:47:12] <inflex> so when you see PORTB |= (1<<PB6); // PORTB = PORTB | (1<<PB6)
[03:47:16] <inflex> because it's not java
[03:47:18] <inflex> It's C
[03:48:28] <mohsen__> but they also didn't teach them to us in C++...
[03:50:12] <sabor> java and C++ and some other languages know these things too with the same syntax
[03:50:34] <sabor> maybe they didn't teach that because the focus was on other things
[03:51:41] <mohsen__> Perhaps
[03:53:22] <mohsen__> Is this link okay to study: http://www.tutorialspoint.com/cprogramming/c_operators.htm ?
[03:53:46] <mohsen__> To learn those operators.
[04:03:12] <sabor> looks like a nice tutorial
[04:22:50] <mohsen__> Does C|=2 mean it performs an or operation between the bits of C and 2 in binary format?
[04:26:35] <mohsen__> So If C = 0011 1100, it first converts 2 to binary which will be 0000 0010 , then does an OR operations which will be : 0011 1110 ?
[04:26:45] <mohsen__> Am I correct?
[04:43:10] <mohsen__> I'm not?
[04:45:47] <mohsen_1> Sorry, will you tell me what was my last message sent to the group?
[04:45:50] <mohsen_1> channel*
[04:47:26] <LeoNerd> Your IRC connction is working fine. Just nobody replied
[04:48:11] <mohsen_1> Have I asked a wrong question?
[04:48:54] <LeoNerd> You're asking odd questions that I'm not sur emake sense. Or at least, seem to suggest you don't really understand what's happening
[04:48:58] <LeoNerd> "it first converts to 2 binary2 ??
[04:49:00] <LeoNerd> No..
[04:49:56] <mohsen_1> Okay, will you please correct me then?
[04:50:11] <LeoNerd> C |= 2 performs a mutating bitwise-or operation
[04:50:17] <LeoNerd> I'm not really sure how to word it better than that
[04:50:28] <LeoNerd> It mutates the C lvalue, setting extra bits in it from the 2 value
[04:51:26] <Emil> Anyone know where B115200 and so forth are defined?
[04:51:38] <LeoNerd> One of the many variants on termios.h
[04:51:41] <Emil> I have come to understand why linus hates typedefs
[04:51:46] <LeoNerd> Possibly the higher bit rates require some #define first
[04:51:51] <Emil> they are just typedefs for unsigned int
[04:52:20] <Emil> LeoNerd: ah, they were in the termios.h file
[04:52:49] <LeoNerd> You might want to use cfsetspeed() also
[04:52:55] <LeoNerd> WEll, "instead"
[04:53:13] <LeoNerd> It's a nicer interface, apparently. Giving /actual/ baud rate as a number instead of those silly pseudoenumeration flags
[04:53:42] <Emil> LeoNerd: no, I AM using that function
[04:53:58] <Emil> or is it different from cfset(i/o)(speed?
[04:54:07] <Emil> apparently yes
[04:54:19] <LeoNerd> It's a shortcut; for setting both to the same
[04:54:53] <LeoNerd> Oh.. huh.. It still uses those flags.
[04:54:53] <Emil> ah
[04:54:58] <LeoNerd> Well that's rubish :/
[04:55:26] <Emil> Anycase, it compiles just fine if I put in 500000
[04:55:34] <Emil> so even though it is undocumented, let's see if it works
[04:55:35] <LeoNerd> Well sure it would
[04:55:45] <LeoNerd> Your program will compile. I expect the behaviour won't work
[04:55:48] <LeoNerd> you'll just get EINVAL
[04:56:06] <LeoNerd> Or worse; you'll get some random other speed set. Or who knows
[04:56:12] <LeoNerd> But anyway, dont' expect that the compiler can tell you about this
[04:56:33] <Emil> LeoNerd: You didn't happen to have a good way to get this working?
[04:56:39] <LeoNerd> What's "this"?
[04:56:46] <Emil> higher bitrates
[04:57:00] <Emil> 250000, 500000, 1000000 and 2000000
[04:57:02] <LeoNerd> No. I'm not aware of a standard POSIX API for doing it
[04:57:08] <LeoNerd> The whole B* system sucks IMHO
[04:57:08] <Emil> baudrates*
[04:57:14] <mohsen_1> LeoNerd: Can you provide an example ?
[04:57:32] <LeoNerd> mohsen_1: of?
[04:57:57] <mohsen_1> Well the |= operation
[04:58:36] <LeoNerd> You just showed one
[04:58:42] <LeoNerd> Gah.. I'm not sure what's so complicated here
[04:58:45] <LeoNerd> take some bits. Add some more bits
[04:58:51] <LeoNerd> Any bit that was set in either thing is now set
[04:59:01] <LeoNerd> C |= 2 means the same as C = C | 2
[04:59:04] <LeoNerd> Do you know what C | 2 means?
[04:59:05] <Emil> mohsen_1: unsigned char a=0b00000001; a|=0b10010010; // results in a==0b10010011;
[05:00:06] <LeoNerd> Emil: OK so nothing too standard, but there's a few ideas on http://stackoverflow.com/questions/4968529/how-to-set-baud-rate-to-307200-on-linux e.g. the might-be-lucky IOSSIOSPEED ioctl
[05:00:37] <mohsen_1> LeoNerd: No, I just know | can be used with boolean values, like we do in java
[05:01:04] <LeoNerd> Ah; well that'd be the problem then :)
[05:01:11] <Emil> LeoNerd: I mean, it is possible because the driver for cp2102 supports the mentioned baudrates and arduino ide can use those baudrates
[05:01:19] <LeoNerd> It's a bitwise operator. It works with every bit simultaneously
[05:01:49] <LeoNerd> Emil: Sure; the hardware chip in silicon supports it. USB itself doesn't care. It's a question of whether a userland Linux program, given a TTY handle, can ask the driver to do it.
[05:01:55] <LeoNerd> I'm not sure if that is possible, or if it is, how.
[05:02:02] <LeoNerd> There might be nonstandard ioctl calls for it. See theabove
[05:02:09] <LeoNerd> I don't have anything better to hand at this time
[05:02:18] <Emil> LeoNerd: thanks, I'll try to manage :D
[05:04:18] <mohsen_1> LeoNerd: Was the result of my calculation in my example correct?
[05:04:32] <LeoNerd> Seems fine
[05:04:40] <LeoNerd> I was just objecting to the wording of the question itself
[05:04:45] <LeoNerd> The word "convert" doesn't belong in there
[05:06:10] <mohsen_1> But 2 doesn't have any bits itself
[05:06:20] <LeoNerd> Huh?
[05:06:35] <LeoNerd> Sure it does
[05:06:44] <LeoNerd> Otherwise it would be zero :)
[05:07:57] <mohsen_1> It is integer, doesn't | operator operates only on binaries?
[05:08:07] <LeoNerd> ??
[05:08:11] <LeoNerd> I think you're still confused
[05:08:14] <LeoNerd> 2 is a numbe
[05:08:38] <LeoNerd> 2 can be written as 2 or 0x02 or 0b00010 or "two" or "II" or ".." or "the number that comes after one" or any of several other notations
[05:08:49] <LeoNerd> The way you write it on paper doesn't matter
[05:42:33] <mohsen_1> Does PORTB correspond to a specific pin or a group of pins?
[05:44:34] <LeoNerd> All the PBx pins, yes
[05:44:38] <LeoNerd> PB0 to PB7
[05:45:47] <Emil> Wgatäs the difference between TXCn and UDREn?
[05:46:06] <Emil> USART Transmit Complet and USART Data Register Empty
[05:46:44] <LeoNerd> DRE happens when the USART has -started- transmitting that final byte; it's moved the byte from the DR into its internal shift register
[05:46:54] <LeoNerd> At that point it's safe for you to put another byte in there to be transmitted later
[05:47:10] <LeoNerd> TXC happens at the time the USART sends out the STOP condition
[05:47:29] <Emil> Oh, so it would allow me to continuously transmit data, while with TXC there would be a slight delay
[05:47:35] <LeoNerd> Yah
[05:47:36] <Emil> Thanks
[05:48:44] <mohsen_1> LeoNerd: Is this a hex value 0x01 ?
[05:48:55] <Lambda_Aurigae> mohsen_1, yes..
[05:49:10] <Lambda_Aurigae> it corresponds to 0b00000001 or 1
[05:49:55] <Lambda_Aurigae> I thought you said some hours ago that you knew C++
[05:51:16] <mohsen_1> Lambda_Aurigae: Well, I thought I know...
[05:51:48] <Lambda_Aurigae> read Teach Yourself C
[05:52:00] <Lambda_Aurigae> the best C book ever written in my opinion.
[05:52:37] <Lambda_Aurigae> anybody who has learned C++ will know enough about C to jump in with both feet. C++ is just C with some extensions after all.
[05:53:43] <Lambda_Aurigae> you should also learn how to convert between hex(base 16), binary(base 2), and decimal(base 10),,,and octal(base 8) isn't a bad thing to learn either.
[05:54:20] <mohsen_1> Hmmmm
[05:54:46] <Lambda_Aurigae> in decimal you have 10 digits, 0-9
[05:54:48] <inflex> *COUGH*
[05:54:56] <Lambda_Aurigae> in binary you have 2 digits, 0-1
[05:55:05] <Lambda_Aurigae> in octal you have 8 digits, 0-8
[05:55:19] <inflex> C and C++ are entirely distinct really... just that thanks to the compilers we've had a glorious love fest of crap splattered mixes of C/C++ code
[05:55:23] <Lambda_Aurigae> in hexidecimal you have 16 digits, 0-9 and A-F
[05:56:15] <Lambda_Aurigae> inflex, the syntax for C++ is the same as C...C++ adds a lot of functionality and such...they are similar enough that learning C++ should give you a good start at C...
[05:56:16] <mohsen_1> Lambda_Aurigae: I've actually passed logic-design course, but never thought I'd use the concept, so buried them somewhere deep in my mind, now I see they're useful.
[05:56:42] <Emil> Were I able to pass a register as a function argument?
[05:56:49] <Emil> like uart_putc(ADCH)?
[05:57:17] <mohsen_1> concepts*
[05:57:19] <Lambda_Aurigae> http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_port_pass.html
[05:57:21] <Lambda_Aurigae> for Emil
[05:57:34] <Emil> Lambda_Aurigae: no
[05:57:39] <Emil> I just need the value
[05:57:52] <Lambda_Aurigae> you didn't say value...you said passing the register.
[05:58:05] <Emil> Wellthen, sorry :D
[05:58:09] <Lambda_Aurigae> but that page references both.
[05:58:34] <Emil> so the answer is yes
[05:58:53] <mohsen_1> Well, in the tutorial I'm reading the writer says this line PORTB = 0x01; will set the pin PB0 to high, but how does compiler distinguish between pins since PORTB represents all the PBx pins?
[05:59:40] <Lambda_Aurigae> mohsen_1, each bit represents one pin.
[06:00:00] <Lambda_Aurigae> 0x10000001 would set pins 0 and 7
[06:00:38] <Lambda_Aurigae> which would be 0x81
[06:01:02] <Lambda_Aurigae> or 129 decimal
[06:01:26] <Lambda_Aurigae> grr...not 0x10000001...0b10000001
[06:01:53] <Lambda_Aurigae> any of those (correct ones) can be used
[06:02:29] <Lambda_Aurigae> 0b10000001 0x81 129
[06:08:08] <mohsen_1> Lambda_Aurigae: Sry, what does 0x mean?
[06:08:33] <Lambda_Aurigae> in C or C++ it defines a number as hex.
[06:08:38] <Lambda_Aurigae> 0b defines it as binary
[06:09:49] <Lambda_Aurigae> 0b10000001 = 0x81 = 129
[06:10:34] <Lambda_Aurigae> standard notation that I've used on computers since,,,,,1985.
[06:12:06] <mohsen_1> So 0x01 means set pin 0 high?
[06:12:13] <_ami_> mohsen_1: buy Make: AVR programming book. i find it good. although i know C/C++ very well. (experienced programmer)
[06:13:09] <Lambda_Aurigae> yes.
[06:13:18] <Lambda_Aurigae> and 0x81 means set pins 0 and 7 high
[06:13:50] <mohsen_1> _ami_: I see, If I find it in our local stores.
[06:13:50] <Lambda_Aurigae> and 0xFF means set all 8 pins from 0 to 7 high.
[06:14:47] <_ami_> mohsen_1: what i don't like abt this book is that it does not tell about Registers well.
[06:14:53] <_ami_> but u can google abt it.
[06:15:04] <_ami_> but yeah, u do n't get everything in this book.
[06:15:15] <_ami_> you need to research/google a bit
[06:17:17] <mohsen_1> Yeah you're right.
[06:19:09] <_ami_> mohsen_1: you could refer this one too: http://maxembedded.com/index/
[06:19:09] <Lambda_Aurigae> learn the basics first
[06:19:20] <_ami_> i think author did the good job in explaining the basics
[06:19:20] <Lambda_Aurigae> learn C and binary/hex/decimal conversion
[06:19:25] <Lambda_Aurigae> then read the datasheet too.
[06:19:34] <Lambda_Aurigae> the datasheet has code examples throughout
[06:19:46] <_ami_> Lambda_Aurigae: reading avr datasheet is an ART too "_
[06:19:49] <_ami_> :)
[06:20:04] <Lambda_Aurigae> yes, but unless you are going to use arduino, learning the datasheet is a must.
[06:20:31] <_ami_> Lambda_Aurigae: arduino sdk is bloated
[06:20:36] <Lambda_Aurigae> no shit.
[06:20:40] <_ami_> not good for serious project
[06:20:54] <Lambda_Aurigae> I wasn't suggesting actually using arduino.
[06:21:06] <_ami_> ah, got the point :)
[06:22:16] <Lambda_Aurigae> my suggestion was, either learn the chip or use an abstracted abstraction like arduino.
[06:22:58] <_ami_> Lambda_Aurigae: indeed. btw, do you agree a newbie (who does not know C well) to start with arduino first?
[06:23:14] <_ami_> i think it will confuse him/her more later
[06:23:32] <Lambda_Aurigae> no
[06:23:34] <Lambda_Aurigae> NEVER!
[06:23:42] <Lambda_Aurigae> arduino is a plague, as bad as windows.
[06:23:47] <_ami_> first question would be what the heck is int main() {} :P while coming from arduino background
[06:24:11] <Emil> mohsen_1: pls
[06:25:20] <mohsen_1> For what?
[06:25:39] <Emil> _ami_: if people used a bit of common sense a lot of problems would go away
[06:26:48] <Lambda_Aurigae> Emil, why is it called common sense if it's so damned rare?
[06:26:56] <_ami_> mohsen_1: btw, i am also learning AVR programming these days. i got few atmega16a with me. although the book tells about Atmega168p. but i figured out the difference with the help of awesome people at #avr :) since some registers are different across 168p and 16A
[06:27:44] <Emil> Lambda_Aurigae: because people pander to others
[06:27:45] <_ami_> mohsen_1: i am referring both internet and the book. The book is kind of bloated.. i skip lot of things since i don't need to read it again
[06:28:09] <Lambda_Aurigae> Emil, guess I'm not people..that's good. ;}
[06:28:22] <mohsen_1> _ami_: I see.
[06:28:50] <Emil> Lambda_Aurigae: you were definitely pandering ; )
[06:28:59] <_ami_> hangout here and ask questions and yes, help others too :)
[06:29:13] <Lambda_Aurigae> oh, I suppose.
[06:29:36] <Lambda_Aurigae> but I still say, learn how to learn then learn by reading the datasheet!
[06:29:54] <Emil> Reading the datasheet feels like cancer when people get started
[06:30:11] <Emil> but after a while you learn to love the register descriptions <3
[06:30:20] <_ami_> Emil: True :)
[06:30:25] <Lambda_Aurigae> I still don't see what a ballsack means there.
[06:31:34] <_ami_> Emil: i faced the similar dilemma when i was trying to write pins_arduino.h for atmega16a. I was looking for PWM pins in data sheet because its not written at one place in datasheet. :)
[06:31:56] <_ami_> you need to Search "PWM" in the pdf to know which pins are PWMs :)
[06:31:59] <mohsen_1> _ami_: Sure, #avr is a such a nice place.
[06:32:11] <Lambda_Aurigae> mohsen_1, no, I'm just a bastard.
[06:32:50] <Emil> _ami_: and that, yeah
[06:33:02] <Emil> when you start you don't know what to look for
[06:33:30] <_ami_> mohsen_1: have a thick skin while dealing with Lambda_Aurigae :P
[06:33:41] * _ami_ kidding ..
[06:33:50] <Lambda_Aurigae> more like armor.
[06:33:57] <_ami_> :)
[06:34:11] <Emil> I have never seen Lambda_Aurigae saying anything that would warrant any sort of thick skin :D
[06:34:38] <Lambda_Aurigae> your scrollback buffer doesn't go far enough.
[06:35:11] <Emil> Eh
[06:35:21] <Emil> I think it's more like people want to get offended these days ; )
[06:35:26] <Lambda_Aurigae> humor, attempt at, one each.
[06:35:38] <Lambda_Aurigae> and I don't care if I offend people.
[06:35:58] <mohsen_1> _ami_: He tells the truth, doesn't matter the truth is harsh or not.
[06:36:21] <Lambda_Aurigae> like at the store last night...girl kept saying it was her first day on the job...but she couldn't count change to save her life..even when the register told her how much change to give!
[06:36:38] <Lambda_Aurigae> she was at least 18....
[06:36:39] <Emil> :D
[06:36:51] <Emil> 'Murica fuck yeah?
[06:36:51] <_ami_> :)
[06:37:08] <Lambda_Aurigae> no reason on the planet that an 18 year old can't count out 5 dollars and 37 cents.
[06:37:45] <Lambda_Aurigae> guy ahead of me had a bill of $27.35...he gave her $32.35....
[06:37:52] <Lambda_Aurigae> she handed it back..said it was too much.
[06:38:05] <Lambda_Aurigae> and she couldn't figure out how to put it in the register.
[06:38:11] <_ami_> haha
[06:38:28] <Lambda_Aurigae> she handed back the change...the 35 cents..
[06:38:41] <Lambda_Aurigae> his whole thing was to get rid of the change and get a 5 dollar bill back.
[06:38:51] <Lambda_Aurigae> they had to call the manager over to explain it to her.
[06:39:17] <Lambda_Aurigae> schools these days...one has to wonder.
[06:39:32] <Lambda_Aurigae> as I remember learning to count change in grade school...somewhere around 3rd grade.
[06:39:59] <Lambda_Aurigae> guess I'm getting too old and grouchy.
[06:40:10] <_ami_> Mobiles have destroyed these kids ability to calculate. I remember i did not use calculator until i get into college
[06:40:42] <Lambda_Aurigae> _ami_, I had a teacher tell me, "You will never walk around with a calculator in your pocket." That was in 7th grade.
[06:41:08] <mohsen_1> Lambda_Aurigae: Maybe she had social anxiety
[06:41:29] <Lambda_Aurigae> mohsen_1, I had only ever seen one battery powered portable calculator in my life up to that point.
[06:41:59] <Lambda_Aurigae> she was a math teacher...and one kid had brought his father's calculator to class.
[06:42:23] <Lambda_Aurigae> _ami_, you still have your slide rule?
[06:43:03] <_ami_> Lambda_Aurigae: i am not that lucky to born in US :)
[06:43:08] <Lambda_Aurigae> I got mine in high school and still have it..
[06:43:20] <Lambda_Aurigae> _ami_, slide rule was not a USA thing...worldwide.
[06:43:38] <Lambda_Aurigae> heck, I still use my slide rule on occasion.
[06:43:57] <mohsen_1> Lambda_Aurigae: I meant the girl at the shop you went into last night:D
[06:44:01] <_ami_> i don't think i had and i ever used it
[06:44:33] <Lambda_Aurigae> mohsen_1, more like she had lack of education because she had no problem chatting with people.
[06:44:51] * _ami_ gotta run
[06:45:15] <mohsen_1> Lambda_Aurigae: I see
[06:45:53] <mohsen_1> We were forbidden to carry calculators to school since third grade of shool
[06:45:55] <Emil> Yeah, one of the best things to happen to me was me being too cheap to get a symbolic calculator until the last year of upper secondary
[06:46:05] <mohsen_1> too
[06:46:20] <Lambda_Aurigae> in high school chemistry and physics we were forbidden from using calculators.
[06:46:33] <Emil> I had to borrow others so I just had the time to quickly check my answer :D
[06:46:34] <Lambda_Aurigae> or, rather, if we used them then we would get incorrect numbers.
[06:46:40] <Lambda_Aurigae> but we could use slide rules.
[06:47:28] <Lambda_Aurigae> if your measurements are only accurate to 3 significant digits and you do math to more digits then your numbers are different than if you stick to 3 digits.
[06:47:51] <Lambda_Aurigae> so doing the math with a calculator and slide rule will give you different answers.
[06:48:06] <mohsen_1> yeah right, specially physics teachers never like their students to use calculators, I've had 3 physics teachers and they were all forbiding using calculator
[06:48:46] <Lambda_Aurigae> I had same teacher for chemistry and physics in the same year in high school.
[06:48:58] <Lambda_Aurigae> most awesome teacher ever.
[06:49:19] <Lambda_Aurigae> he taught us how to learn, not just the subject he was teaching but learning in general.
[06:50:30] <Lambda_Aurigae> there were several times when we had a test and were told to read the entire thing before taking the test.
[06:51:10] <Lambda_Aurigae> one in particular I remember had on the last page, "Draw a smiley face on the back, put your name on the test, and turn the test in without answering any of the questions."
[06:51:31] <Lambda_Aurigae> of 30 students, I was 1 of 5 who actually followed the directions.
[06:52:12] <Lambda_Aurigae> 15 minutes into the test you could hear other students trying to erase all their answers or groaning or cussing under their breaths.
[06:52:56] <mohsen_1> Haha
[06:53:14] <Lambda_Aurigae> an exercise in following directions and READING
[06:54:33] <Lambda_Aurigae> so, I suggest you read "Teach Yourself C" (any release) "Getting Started in Electronics" and then the datasheet for the chip you are wanting to use.
[06:55:07] <Lambda_Aurigae> those are the three books I have my students read before they get to play with microcontrollers.
[06:55:20] <Lambda_Aurigae> for the first two, they read and go through the exercises.
[06:55:20] <mohsen_1> Hmmmm
[06:56:01] <Lambda_Aurigae> I even give them computers with a text editor and C compiler to go through "Teach Yourself C"
[06:56:45] <Lambda_Aurigae> a company gave me a stack of P-4 class laptops a few years back. I'm down to 8.
[06:57:17] <Lambda_Aurigae> I put linux on them with gcc along with avr-gcc toolchain.
[06:57:33] <Lambda_Aurigae> so they can learn C easily.
[06:57:34] <Emil> Hmm
[06:58:28] <Lambda_Aurigae> so far I have 5 students signed up for this summer..
[06:58:45] <Lambda_Aurigae> 2 of them are GIRLS!
[06:58:46] <Lambda_Aurigae> hehe.
[06:59:17] <Lambda_Aurigae> one of the girls is coming back for her third year even.
[06:59:35] <mohsen_1> Girls learning microcontroller stuff are really rare.
[06:59:57] <Lambda_Aurigae> she is better than the boys at learning.
[07:00:19] <Lambda_Aurigae> but, she pays attention and doesn't try flirting while we are learning things.
[07:00:42] <Lambda_Aurigae> the boys are always trying to impress the girls..it's sickening sometimes.
[07:00:59] <mohsen_1> Lambda_Aurigae: Same here.
[07:02:34] <Lambda_Aurigae> this year we are working with pic32 chips and doing competitive autonomous robots I think.
[07:02:53] <Emil> Heh, I was having trouble with my shitty serialreader
[07:02:56] <Lambda_Aurigae> explore an area, map out and collect resources and "survive"
[07:03:07] <Emil> "Why is it putting out data all the fucking time"
[07:03:13] <Emil> Because I had set FNDELAY
[07:04:07] <Emil> Holy shit
[07:04:09] <Emil> it actually works
[07:04:10] <Lambda_Aurigae> well pooh...I didn't win the powerball so I have to go to work.
[07:04:20] <Emil> with cfsetspeed
[07:04:24] <Emil> and 500000
[07:04:39] <Emil> Fucking hell with the undocumented features
[07:04:53] <Lambda_Aurigae> if it's undocumented then it's a bug.
[07:05:10] <Lambda_Aurigae> ok..off to work..laters.
[07:05:12] <Emil> Or linux.die.net hasn't bothered updating
[07:05:14] <Emil> their documentation
[07:05:30] <Emil> Anycase, see ya
[07:32:27] <Muted> Hi, in AS6 there was a button to "Disable debugWIRE and Close" however I can't find this in AS7. How do I exit debugwire? (using Atmel-ICE and atmega328p)
[07:43:15] <LeoNerd> DOH! I ordered PCF8574 chips (8bit I²C GPIO expander); they sent me PCF8574A chips. Same functionallity, just different range of I²C slave addresses
[07:58:57] <Emil> Hohohoohoho
[07:59:06] <Emil> I got audio over uart working
[09:04:46] <theBear> heh, nice one
[10:14:25] <eszett> hi phinxy
[10:14:30] <phinxy> Hi
[10:15:06] <phinxy> What are you doing? im trying to connect to my ESP8266 trough serial
[10:15:23] <eszett> nothing in particular, im just waiting the postman
[10:15:37] <phinxy> What have you ordered
[10:16:28] <eszett> steel plates for my pcbs..
[10:16:37] <eszett> (pc keyboard)
[10:18:17] <eszett> how do you attach the antenna to the ESP8266_
[10:19:26] <phinxy> I bought the ESP-12F module
[10:19:31] <phinxy> its all plug and play
[10:21:10] <Muted> quit
[10:21:34] <eszett> ah.. and what do you like to control with it?
[10:30:58] <_ami_> phinxy: using esp01?
[10:31:17] <eszett> he is using ESP-12
[10:31:24] <eszett> the newest module
[10:31:56] <_ami_> ok
[10:40:21] <eszett> but i think its only for the advanced users, since its not breadboard friendly
[13:13:03] <WormFood> [20:33:08] <Emil> I got audio over uart working <-- huh? Audio over uart? What's up with that?
[13:13:31] <WormFood> sending serial data, like to an mp3 decoder, should be trivial.
[15:50:57] <inkjetunito> good evening. this might be a dumb question, but why do many things have a reset pin by default? to prevent running on too low/unstable voltage?
[15:55:35] <DKordic> inkjetunito: What do You mean ``by default''?!
[16:01:46] <inkjetunito> DKordic: sometimes the pin can be repurprosed
[16:07:07] <carabia> inkjetunito: ???
[16:07:27] <carabia> inkjetunito: to drive the "thing" in question into reset, perhaps?
[16:09:05] <dsal> If you can get away with not using the reset pin, you'll have a better time.
[16:09:41] <DKordic> I try not to use resistors with a reset pin.
[17:27:38] <Lambda_Aurigae> the reset pin on some AVRs can be disabled so you can use that pin as a GPIO...in order to reprogram after doing that you have to use a high voltage programmer rather than a standard ISP....or have a bootloader preloaded.
[17:32:46] <inkjetunito> yeah. i meant the more generic presence of it, also on chips that are not programmable and it's not necessarily needed for function. perhaps it's just the naming that's confusing
[17:36:54] <inkjetunito> good ngiht
[17:39:00] <Lambda_Aurigae> which chips are not programmable?
[17:39:17] <Lambda_Aurigae> maybe 20 year old prom based ones but I've never seen such an avr.