#avr | Logs for 2014-11-25

Back
[00:00:40] <RLa> http://www.avrfreaks.net/forum/tut-c-using-eeprom-memory-avr-gcc
[00:01:00] <RLa> i'm having issues with this: "Upon compilation of your program with the default makefile, GCC will output two Intel-HEX format files"
[00:01:25] <RLa> i'm not seeing two hex files and i have absolutely no idea what is the "default makefile"
[00:02:14] <Casper> they assume that your tools generated one
[00:02:22] <Casper> which is the problem with many places
[00:02:50] <Casper> they claim it to be for newbies, but skip major steps
[00:03:03] <Casper> or they covered it in another tutorial, but make no mention of it
[00:04:48] <RLa> trying to find gcc switches that enable the eeprom file
[00:08:25] <RLa> figured out, it's extracted using avr-objcopy
[00:18:46] <rue_bed> RLa, want my makefile?
[00:19:07] <rue_bed> it outputs them both
[00:19:31] <rue_bed> my bf interperter has an example of writing to the eeprom
[00:23:51] <RLa> rue_bed, thanks, but i have figured out the switches
[00:24:02] <RLa> although i do not understand some
[00:24:17] <RLa> like why i need --change-section-lma and .eeprom=0
[00:24:38] <RLa> this is my complete rule: avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@
[00:25:24] <rue_bed> yea, just get or make a makefile that does it
[00:25:38] <rue_bed> all I have to do is to say make, and everything is done
[00:25:38] <RLa> help says: "Change the LMA of section <name> by <val>"
[00:25:51] <RLa> lma stands for what?
[00:25:57] <rue_bed> make install uplaods it to my avr
[00:26:20] <RLa> i already have a makefile but it was written from scratch
[00:26:35] <rue_bed> ok
[08:11:23] <LeoNerd> Wow, cute. I didn't realise this, but you can get a "1 gate" version of a 74-series tristate buffer (74HC125), in a SOT-6 chip
[08:11:34] <LeoNerd> It's called, amusingly enough, 74HC1G125. I like that naming. :)
[08:12:02] <LeoNerd> Er.. I don't mean SOT-6. I mean whatever is the 6-pin variant of a SOT-23
[08:45:00] <twnqx> LeoNerd: they are fun. i used a nand + a and as address decoder for memory mapped io + ram on a at90can :)
[09:12:20] <LeoNerd> Hehe, cute
[09:13:08] <LeoNerd> It's just so tiny though; and looks so much easier to tristate a line, than having to fiddle awkardly with a pair of FETs
[09:31:46] <twnqx> the 5pin is actually sot23, the other is sot23-6
[09:52:09] <ColdKeyboard> How can I print unsigned long as hex over uart?
[09:52:20] <ColdKeyboard> sprintf("%lx", value) ?
[10:20:44] <LeoNerd> https://twitter.com/cpan_pevans/status/537272827842682880 <== boards ;)
[10:38:02] <learath> LeoNerd: Nice, do they work?
[10:39:03] <LeoNerd> I'm tracing them out now... It would be faster if I'd made my multiplexing continuity tester already ;)
[10:41:04] <LeoNerd> Well, that's a start. On each board, the set of things connected to the grounding plane is exactly the set that should be, and no more
[10:41:28] <LeoNerd> Given there's grounding between basically everything, I think therefore that means there's no extra shorts in places there shouldn't be
[10:48:54] <LeoNerd> And all the traces are good. Mm.. Well, I think I've run out of things to test... guess I'll just have to try soldering it up :)
[10:49:04] <LeoNerd> I think I'll do one board to completion, and if that works, the other two concurrently
[11:47:44] <bitd> LeoNerd, those boards look fancy.
[11:48:43] <LeoNerd> I do like them, yeah.. And I now have all the the resistors on the first one :)
[12:20:26] * LeoNerd declares #AchievementUnlocked on SOT-23 and 0603 soldering
[12:21:25] * Bright is reading about acid copper electroplating .-.
[12:22:12] <Bright> if i want plated vias from my home fab, i'm gonna have to really work for it!
[12:26:08] <Tulitomaatti> my most interesting soldering experience was probably some leds with 0.25mm between the contacts, which were under the package. i got this feeling that they really aren't designed to be hand worked.
[16:42:03] <LeoNerd> First attempt at my HVSP board: not good.
[16:42:14] <LeoNerd> Only got ~6V out of the charge pump, and it was getting very hot
[16:44:45] <LeoNerd> Aha! Found a tiiiiny solderball shorting one of the pump caps
[16:44:49] <LeoNerd> That would explain it
[17:10:04] <LeoNerd> ARRRRRGGGHHHHHHHH!!!
[17:10:16] <LeoNerd> I found a bug. The bug is when I -first- transcribed my breadboard circuit onto the schematic capture
[17:10:34] <LeoNerd> schematic -> board is fine. board is fabbed fine. board is constructed fine by me just now
[17:12:18] <learath> oops :(
[17:12:49] <LeoNerd> It's not a -massive- bug... and it may be recoverable in copper
[17:13:05] <LeoNerd> But it's causing the RESET line not to properly shut off
[17:14:10] <LeoNerd> I wonder if that would be enough to upset the tiny84 into not playing ball
[17:25:33] <LeoNerd> well, first things first, I'll update the diagram + copper files in Eagle, then see if I can rescue the physical boards somehow
[17:26:06] <LeoNerd> Basically, I just have signal -> resistor -> pulldown + transistor base; I should have signal -> pulldown + resistor -> transistor base
[17:26:14] <LeoNerd> I think that upsets the voltage levels just enough
[17:26:29] <Tom_itx> did you find a boo boo?
[17:26:33] <LeoNerd> Yeah
[17:26:38] <Tom_itx> :)
[17:26:48] <LeoNerd> Right at the initial stage, when I first captured the breadboard into a schematic
[17:26:51] <Tom_itx> recall what i said about rev3?
[17:26:53] <LeoNerd> I.e. the bit I've done many times before
[17:27:30] <Tom_itx> cut traces and fix it
[17:27:40] <LeoNerd> Yeah.. it shouldn't be too hard to move those around
[17:29:04] <LeoNerd> I do have a tonne of 28awg kynar here, so I can probably recover something
[17:42:26] <ambro718> Where can one find an avr toolchain build for OS X with at least GCC 4.8?
[17:51:17] <Jartza> ambro718: http://www.obdev.at/products/crosspack/index.html
[17:51:43] * LeoNerd attempts to work out a copper-patch
[17:52:52] <ambro718> yeah just found that :)
[18:50:50] <Lambda_Aurigae> my rPI is alive!
[18:50:54] <Lambda_Aurigae> and on the internet.
[18:51:58] <pi_Aurigae> now time to get an avr dev environment setup on here.
[19:00:14] <LeoNerd> https://twitter.com/cpan_pevans/status/537402924759252993 patch :)
[19:01:16] <N1njaneer> Nice!
[19:01:36] <Tom_itx> damn wire is bigger than the parts
[19:01:43] <LeoNerd> That's 28awg
[19:01:46] <Tom_itx> i know
[19:01:58] <N1njaneer> Suggestion -- always try to chamfer your traces when rounding corners wherever possible.
[19:02:07] <tpw_rules> pi_Aurigae: that sounds like a very slow idea
[19:02:07] <LeoNerd> In hindsight I should have used blue... it would stand out less
[19:02:12] <Tom_itx> oh yeah i just noticed that oo
[19:02:13] <Tom_itx> too
[19:02:18] <Tom_itx> no square corners!
[19:02:22] <tpw_rules> i am amazed by how well they handle video decoding though. just xbmc interface runs at like .23 fps
[19:02:43] <tpw_rules> what assembler do you all use? avr-as or avra or something else? i need one for linux
[19:02:54] <LeoNerd> N1njaneer: Oh, the second trace between C2 and R2 here? That big sharp corner?
[19:02:59] <LeoNerd> Hrm... why are corners bad?
[19:03:05] <N1njaneer> LeoNerd: All of the corners :)
[19:03:26] <tpw_rules> he means (i think) 90 degree angles are bad
[19:03:28] <N1njaneer> They'll radiate more EM and can cause problems at higher speeds.
[19:03:28] <tpw_rules> two 45s are better
[19:03:32] <Tom_itx> yeah
[19:03:32] <LeoNerd> Ahh
[19:03:46] <LeoNerd> Well, the major speed factor on -this- board is the Bus Pirate :)
[19:03:53] <LeoNerd> But I'll keep that in mind for the future, sure
[19:04:05] <N1njaneer> By extension that's why you actually see rounded arcs on really high-frequency RF stuff.
[19:04:12] <Lambda_Aurigae> tpw_rules, avra myself
[19:04:28] <LeoNerd> (Two bytes of UART at 115200 per clock tick, so.. yeeeah... not going fast here)
[19:04:51] <Lambda_Aurigae> got the avr toolchain on the rPI now.
[19:05:02] <N1njaneer> The field actually moves very analagous to a wave in a set of canals if you think of the traces as half-filled with water. Sharp edges cause impedence discontinuities and will actually reflect part of the field back. It's kind of mesmerising to watch on a field simulator :)
[19:05:06] <LeoNerd> Ohyes, and it's an 11-bit serial protocol. So 22 bytes of 115kbaud UART per -byte- of data transferred down the line. Each instruction is 7 bytes.
[19:05:14] <Lambda_Aurigae> gonna put it in a case with lots of other bits and pieces to make a portable microcontroller/electronics lab.
[19:05:25] <LeoNerd> Ahh I see
[19:05:42] <LeoNerd> I'll rework those in the board then; I should probably do another one with this bugfix anyway
[19:05:55] <Lambda_Aurigae> even have a 12V powered 14 inch flatscreen touchscreen ELO monitor to put in the case.
[19:06:04] <N1njaneer> LeoNerd: Again, not a big deal, just a "best practice" suggestion for the future. Plus I think chamfers look nicer, too :)
[19:06:13] <N1njaneer> PCBs should be functional art where possible!
[19:06:26] <LeoNerd> :)
[19:06:51] <LeoNerd> Yeah - but if I'm going to redo this board for my -actual- resistor-placement bugfix, I might as well have a practice at bending the corners as well
[19:06:56] <tpw_rules> Lambda_Aurigae: that actually sounds pretty cool
[19:07:08] <Lambda_Aurigae> tpw_rules, hopefully it will be.
[19:07:45] <tpw_rules> i've been extremely critical of rPis in the past. but as long as you make it lightweight enough it should be really sweet
[19:07:54] <tpw_rules> (beaglebone master race)
[19:07:56] <N1njaneer> You guys want to see something highly amusing?
[19:08:02] <Lambda_Aurigae> only problem is getting this hdmi to vga adapter working.
[19:08:11] <Lambda_Aurigae> N1njaneer, sure.
[19:08:19] <N1njaneer> Check out what cam in this Silicon Labs DevKit -- https://www.dropbox.com/s/pql79efmoklzwvj/HappyFunBall.jpg?dl=0
[19:08:35] <tpw_rules> it would have to be active. i guess you couldn't get an hdmi touchscreen? does a touchscreen help? how do you code on it
[19:08:44] <N1njaneer> I am not 100% sure that including a stress ball with your product sends the right message. :D
[19:08:47] <Lambda_Aurigae> tpw_rules, local school actually has a highschool class with rPI now and I work with some of those kids teaching them general electronics and microcontrollers.
[19:09:08] <N1njaneer> +came
[19:09:08] <tpw_rules> personally i'd get something like http://www.amazon.com/Keycool-Mechanical-Backlight-Available-backlight/dp/B00A7NFPF0 and make it slide/fold out
[19:09:16] <Lambda_Aurigae> tpw_rules, well, this touchscren was free...and I code the same way I would on my desktop PC...with vi.
[19:09:22] <tpw_rules> i mean to type it in
[19:09:26] <tpw_rules> you can't use a touchscreen for that
[19:09:28] <Lambda_Aurigae> keyboard.
[19:09:42] <Lambda_Aurigae> but, you could run an onscreen keyboard but that's a pain in the arse.
[19:09:57] <tpw_rules> extremely no thanks
[19:09:58] <Lambda_Aurigae> I would love to get one of the projector keyboards for it.
[19:10:14] <tpw_rules> wouldn't it have to sit in the middle of the screen though?
[19:10:28] <tpw_rules> and i personally really couldn't use one of those
[19:10:34] <Lambda_Aurigae> no...there is an onscreen keyboard for linux touchscreens that is moveable.
[19:10:44] <Lambda_Aurigae> http://www.gearbest.com/bluetooth-keyboard/pp_75339.html?currency=USD&gclid=CK20tcuGl8ICFYFDMgodAEYAbA
[19:10:50] <tpw_rules> no the projector doodad
[19:10:53] <Lambda_Aurigae> I've used one and it's fairly simple.
[19:11:04] <Lambda_Aurigae> worked well for me.
[19:11:08] <tpw_rules> i can't deal with clacking against a tabletop
[19:11:24] <Lambda_Aurigae> no worse than the old membrane keyboards really.
[19:11:35] <Lambda_Aurigae> and I did a lot of work with those over the years.
[19:11:46] <tpw_rules> i may have to try one then
[19:11:55] <Lambda_Aurigae> kinda have to get used to it.
[19:12:07] <Lambda_Aurigae> wish I could talk the wifey into letting me buy that one I posted.
[19:12:14] * tpw_rules likes his machine gun style mechanical monsters
[19:12:25] <Lambda_Aurigae> but just spent about 80 bucks on rPI and associated bits.
[19:12:39] <Lambda_Aurigae> I usually use whisper quiet keyboards at home.
[19:12:41] <tpw_rules> what os?
[19:12:48] <Lambda_Aurigae> for the rPI?
[19:12:53] <tpw_rules> yeah
[19:12:54] <Lambda_Aurigae> running raspbian...debian
[19:13:04] <Lambda_Aurigae> I have several downloaded.
[19:13:28] <Lambda_Aurigae> and plan on doing some low level hardware work, maybe even write my own simpleOS like I did for the PC years back.
[19:13:30] <tpw_rules> blah that was annoyingly slow for me. it seems that beaglebones are dramatically faster
[19:13:42] <tpw_rules> i also tried that but i was too lazy to get any farther than the uart
[19:14:12] <Lambda_Aurigae> was thinking a C64 emulator.
[19:14:19] <Lambda_Aurigae> without an underlying OS.
[19:14:51] <tpw_rules> that would be pretty neat and not difficult to do wrt hardware access
[19:16:25] <Lambda_Aurigae> hmm.
[19:16:38] <Lambda_Aurigae> this chip has thumb and java core extensions.
[19:16:50] <Lambda_Aurigae> so it can execute java bytecode in hardware apparently.
[19:16:52] <tpw_rules> please no
[19:16:58] <Lambda_Aurigae> much like the avr32.
[19:17:02] <Lambda_Aurigae> hehe.
[19:17:11] <Lambda_Aurigae> just digging through various bits on the rPI
[19:18:21] <tpw_rules> will you be sad if i begin asking really stupid questions about avra
[19:18:44] <Lambda_Aurigae> no, but likely won't be too much help.
[19:18:59] <Lambda_Aurigae> I used avra back when I started with AVR,,,,13 years ago.
[19:19:01] <tpw_rules> i mean also like avr assembly. i've done plenty of other assemblies but not avr
[19:19:10] <tpw_rules> didn't you just say you used it
[19:19:26] <Lambda_Aurigae> I used it, yes, when I did avr assembly work.
[19:19:36] <Lambda_Aurigae> along with gavrasm
[19:19:53] <Lambda_Aurigae> I'm sure we can find the answers.
[19:19:59] <tpw_rules> first step: read the readme
[19:20:06] <Lambda_Aurigae> avr assembly isn't too difficult...easier than pic assembly..
[19:20:17] <Lambda_Aurigae> it actually reminds me of 6502 assembly which was the first I ever learned.
[19:20:47] <tpw_rules> i know that pretty well
[19:20:56] <tpw_rules> (incidentally i'm trying to interface an avr with a nes)
[19:22:42] <tpw_rules> i even have a copy of the instruction set reference
[19:23:02] <pi_Aurigae> Tom_itx, just so you know, your programmer shows up on the lsusb on the rPI nicely.
[19:23:05] <pi_Aurigae> Bus 001 Device 010: ID 03eb:2104 Atmel Corp. AVR ISP mkII
[19:26:08] <tpw_rules> blargh. it doesn't include the includes for atmega328
[19:28:48] <Lambda_Aurigae> that could be a problem.
[19:29:18] <tpw_rules> do you have access to avr stuido?
[19:29:30] <Lambda_Aurigae> not currently.
[19:29:37] <Lambda_Aurigae> that is windows only and I am linux only here.
[19:29:38] <tpw_rules> i found somewhere on the internet that purports to have them
[19:30:06] <tpw_rules> there's no way with git to pull a whole repo is there
[19:30:15] <tpw_rules> i mean only one directory
[19:31:48] <tpw_rules> augh atmel
[19:31:48] <tpw_rules> why
[19:31:53] <tpw_rules> i have to give them my email to download it
[19:32:27] <tpw_rules> my name is Mr. b of c Corporation from algeria
[19:33:58] <tpw_rules> i have to download 500MB of crap for a 11KB text file
[19:40:43] <tpw_rules> okay Lambda_Aurigae so i have my include files
[19:41:14] <Lambda_Aurigae> ok.
[19:41:21] <tpw_rules> i have an empty file test.s
[19:41:36] <tpw_rules> what boiler plate do i need to like set an output pin to 1
[19:41:54] <Lambda_Aurigae> no clue what you mean by boiler plate.
[19:42:03] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/
[19:42:29] <tpw_rules> like how to define the reset vector, any urgent hardware init, any defines for things like clock speed
[19:42:42] <tpw_rules> i know like what a register is
[19:43:34] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/source/TEST1.asm
[19:44:01] <tpw_rules> that's exactly what i want. thanks
[19:44:11] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/
[19:44:13] <Lambda_Aurigae> read.
[19:44:20] <Lambda_Aurigae> that's what I started with AVR on way back when.
[19:44:31] <Lambda_Aurigae> http://www.avr-asm-tutorial.net/avr_en/AVR_TUT.html
[19:45:40] <Lambda_Aurigae> it is one of the earliest, and I think still the best AVR assembly tutorials out there.
[19:45:49] <tpw_rules> ah there we go. thanks. i'll do that then. i do still need to know the avr specific stuff
[19:46:24] <Lambda_Aurigae> that is an AVR specific site...started with at90s and worked forward.
[19:46:57] <Lambda_Aurigae> and you can download the whole thing...8.8MB download
[19:47:02] <tpw_rules> oh neat
[19:47:11] <Lambda_Aurigae> bottom of the main page.
[19:47:20] <Lambda_Aurigae> all the code samples and everything.
[19:47:46] <Lambda_Aurigae> looks like it went up 16 Dec, 2001
[19:48:51] <tpw_rules> ah cool
[19:49:05] <Lambda_Aurigae> they even show you how to make a buffered R/2R DAC.
[19:49:08] <tpw_rules> anyway, i guess i've some reading to do. i'll be back tomorrow to be ignorant again
[19:49:18] <Lambda_Aurigae> ignorance can be cured.
[19:49:22] <Lambda_Aurigae> stupidity is terminal.