#avr | Logs for 2014-12-21

Back
[05:41:25] <TechChristoph_> do you know how to read values from the arduino using the buspirate
[05:41:36] <TechChristoph_> i searched in the web
[05:41:47] <TechChristoph_> but didn't find any good stuff
[05:44:18] <Jartza> read what values?
[05:44:37] <Jartza> bus pirate supports spi, uart, i2c etc.
[05:45:29] <Jartza> but of course it depends what software is running on your arduino and what buses it uses, if any
[05:47:28] <TechChristoph_> ok
[05:47:45] <TechChristoph_> sadly there isnt any good tutorial about the buspirate
[05:47:59] <TechChristoph_> i just wanna read the pins
[05:51:51] <LeoNerd> As a dumb digital IO? Just put it in raw bbio mode
[05:52:17] <LeoNerd> I don't think that one has a terminal mode though; only binary. Use my program :)
[05:53:12] <LeoNerd> http://home.leonerd.org.uk/local/screenie/tickit-buspirate-bbio.png looks like this
[05:53:48] <Jartza> TechChristoph_: oh, http://dangerousprototypes.com/docs/Bus_Pirate_101_tutorial
[05:53:53] <Jartza> I find that to be quite good tutorial
[05:59:11] <TechChristoph_> Jartza: yes the tutorial is good
[05:59:21] <TechChristoph_> but it doesnt show any example to use it
[06:00:36] <LeoNerd> TechChristoph_: the Bus Pirate is largely intended for talking SPI, I2C, UART,... not simple digital probe reading
[06:00:54] <LeoNerd> If you just want to sense high/low you're probably better off with a logic probe
[06:01:11] <TechChristoph_> so it is crap :-)
[06:01:36] <LeoNerd> No; it is a tool for doing something different than you are trying to use it for
[06:02:31] <LeoNerd> Bus Pirate = active participant in a communication; primarily bus master. You want = passive observer simply watching
[06:03:27] <LeoNerd> Bus Pirate = active participant in SPI, I2C, UART, JTAG, other serial-bus links. You want = simple dumb IO reading of high/low state
[06:04:25] <LeoNerd> Really; you sound like you want a logic probe. You -can- make the Bus Pirate do that, but only slowly, at 5 channels, and only with software added on that it doesn't come with natively
[06:05:16] <LeoNerd> Its terminal mode doesn't support that, so you'd have to do it in binary bbio mode via some driver program on the PC; such as the one I showed above
[06:09:06] <Jartza> yeah, far from being crap. quite amazing tool for it's price.
[06:09:32] <Jartza> I find it very useful, especially now that I'm trying to get multiple i2c touchscreens to work
[06:09:51] <LeoNerd> I did a talk about it recently
[06:09:56] <TechChristoph_> ok
[06:10:00] <LeoNerd> It's on youtube
[06:10:38] <TechChristoph_> well on dangerousprototype they wrote its a sniffer
[06:10:46] <TechChristoph_> so then not ?
[06:11:25] <LeoNerd> It can do bus sniffing, yes
[06:11:41] <LeoNerd> At least. of SPI, I2C, and UARTs
[06:16:36] <TechChristoph_> so not of microcontrollers ?
[06:16:45] <Jartza> wut?
[06:16:49] <LeoNerd> Verymuch so
[06:16:54] <Jartza> indeed
[06:16:58] <TechChristoph_> well if you want to read some values
[06:17:00] <LeoNerd> Massively useful with them
[06:17:13] <TechChristoph_> that are coming from a microcontroller
[06:17:18] <Jartza> spi, i2c and uart are major communication with microcontrollers
[06:17:23] <Jartza> like arduino
[06:17:32] <TechChristoph_> well arduino ??
[06:17:37] <LeoNerd> I think this has become an issue that at least one of us doesn't know what the other is talkimg about
[06:17:42] <TechChristoph_> how can i read then the values ??
[06:17:45] <Jartza> and yes, you can read "values" from any of those buses
[06:17:55] <TechChristoph_> ok ??
[06:18:00] <LeoNerd> What do you mean "read the values"?
[06:18:15] <Jartza> get arduino i2c library for example
[06:18:17] <LeoNerd> Stop saying those words and try using more words to /explain/ your intentio
[06:18:20] <TechChristoph_> well i want to see if a pin is on HIGH or LOW
[06:18:20] <LeoNerd> intention
[06:18:29] <Jartza> so you need a logic probe
[06:18:38] <TechChristoph_> ok
[06:18:46] <Jartza> it's not "value", it's just logic high/low
[06:19:12] <LeoNerd> Right, yes that is simple dumb IO; as I said the BP -can- do that but it's meant for more complex, powerful things
[06:19:15] <TechChristoph_> so a aduino has not SPI,I2C and UART
[06:19:22] <LeoNerd> It has all of those
[06:19:33] <TechChristoph_> ok
[06:19:38] <LeoNerd> Do you even know what we're talking about?
[06:19:42] <TechChristoph_> so now im more confused :-)
[06:20:33] <LeoNerd> If you just want to know if a pin is high or low, why not put an LED on it?
[06:21:52] <TechChristoph_> but sometimes the pin receives some serialdata
[06:22:09] <LeoNerd> Well, serial is all what the bus pirate is about :)
[06:22:24] <LeoNerd> Or some other sentance that is more grammatical ;)
[06:22:33] <TechChristoph_> so i wanna see what serial data is coming and going
[06:22:39] <Jartza> yes
[06:22:46] <Jartza> that's not just "pin high or low"
[06:22:50] <Jartza> that's called UART
[06:22:56] <LeoNerd> Right.. so what kind of serial?
[06:23:05] <TechChristoph_> ok now i got my question
[06:23:09] <Jartza> if it's just one pin, most probably uart
[06:23:15] <TechChristoph_> ok
[06:23:41] <Jartza> i2c requires 2 pins (clock & data), spi requires usually 3
[06:23:52] <Jartza> (chip select, clock, data)
[06:24:07] <LeoNerd> (to be fair in your situation, reading async serial off a pin I'd also use my Salaea probe ;) )
[06:24:16] <Jartza> me too
[06:24:31] <Jartza> I mainly use bus pirate to two-way-communication
[06:24:34] <LeoNerd> -far- more flexible as I don't have to guess right the first time
[06:24:35] <LeoNerd> Mhmm
[06:24:36] <Jartza> and the python api
[06:24:54] <LeoNerd> I wrote the Perl one :)
[06:25:15] <Jartza> I've grown out from perl ;)
[06:25:50] <LeoNerd> My screenshot above was one of those programs
[06:25:54] <TechChristoph_> well i use python serial
[06:26:38] <LeoNerd> Needs a 256-colour-capable terminal though, because I decided to use proper brown and orange colours for the MISO/MOSI lines
[06:51:25] <TechChristoph_> ok thanks
[07:25:12] <ecilop> Hi, everybody
[07:25:27] <LeoNerd> Hi Doctor Nick!
[07:26:01] <ecilop> Question: can I use array with variable index in C? (Do not use malloc)
[07:26:55] <ecilop> Like this?
[07:26:58] <ecilop> void f1(uint8_t length) {
[07:27:01] <ecilop> char array[length];
[07:27:04] <ecilop> ...
[07:27:07] <ecilop> }
[07:27:20] <ecilop> Is it ok to use "array[length]"?
[07:27:39] <Tulitomaatti> i don't think you can do that.
[07:27:52] <ecilop> But I do that.. in avr-gcc
[07:28:13] <ecilop> what problems I'll have?
[07:28:19] <Tulitomaatti> if you just use it to index an array there shouldn't be any problems
[07:28:47] <Tulitomaatti> but creating arrays of unknown lengths at run-time without malloc seems problematic to me
[07:28:54] <ecilop> I use variable to define local array (inside function)
[07:29:05] <Tulitomaatti> hmmm
[07:29:14] <Tulitomaatti> can it be so that it gets optimized to some malloc thingy
[07:29:29] <ecilop> <stdlib.h> not included
[07:29:32] <Tulitomaatti> or is there something about local scope vars that i've missed.
[07:30:11] <ecilop> In proteus I saw that this array placed at the end of memory addresses
[07:30:40] <Tulitomaatti> or maybe the newer c standards allow that kind of stuff.
[07:31:29] <ecilop> I thik that this can make me problem.. But I can't see any mistakes in simulation process
[07:31:56] <ecilop> sorry for my poor english
[07:32:54] <ecilop> char temp_str[length];
[07:32:57] <ecilop> uint8_t r_i = buf_read -> r_index;
[07:33:00] <ecilop> for(uint8_t i=0;i<length;i++) {
[07:33:03] <ecilop> temp_str[i] = buf_read -> buffer[r_i++];
[07:33:06] <ecilop> correct_buf_index(&r_i, uart_buffer_size);
[07:33:09] <ecilop> }
[07:33:12] <ecilop> write_con(buf_write, temp_str, length, uart_buffer_size);
[07:33:15] <ecilop> And all works fine :-/
[07:34:57] <Tulitomaatti> hmm
[07:35:03] <Tulitomaatti> works fine for me too (gcc)
[07:35:07] <ecilop> I expected mistakes..
[07:35:15] <ecilop> but looks fine
[07:35:39] <ecilop> Local variables localized in stack memory?
[07:38:02] <ecilop> if this trick is acceptable -> I shall use malloc less
[07:38:40] <Tulitomaatti> ha
[07:38:46] <Tulitomaatti> -pedantic
[07:38:56] <Tulitomaatti> arraytest.c:8: warning: ISO C90 forbids variable-size array ‘array’
[07:39:08] <Tulitomaatti> -> i guess it's allowed in newer c standards.
[07:39:24] <ecilop> CFLAGS += --std=gnu99
[07:39:50] <Tulitomaatti> so, if your compiler does c99 fine, it should work.
[07:39:58] <ecilop> avr-gcc
[07:40:24] <ecilop> I don't know compilers that do c99 fully
[07:41:15] <ecilop> This compiler flag I use first when include <util/atomic.h>.
[07:41:40] <ecilop> without "gnu99" atomic will not work
[07:54:01] <ecilop> He.. this called "variable length arrays" (VLA)
[07:54:20] <ecilop> It was included in gnu99 :)
[07:57:07] <ecilop> In simulation i seen that array really changes length on every function call.
[08:02:29] <ecilop> https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
[08:10:41] <twnqx> i hope it works with c11 too :P
[08:24:22] <Lambda_Aurigae> variable length arrays will work in C just fine but on the AVR you might run into a memory leak causing it to fill up memory rather quickly.
[08:27:36] <Lambda_Aurigae> gcc did backport VLA into C90 as well it seems.
[08:29:29] <Lambda_Aurigae> https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
[08:31:39] <Lambda_Aurigae> I have never tested the implementation of VLA with avr. I would bet you will end up with some nasty fractured memory and run out of memory chunks large enough to include the array at some point.
[08:31:41] <ecilop> Is better use alloca() ?
[08:32:35] <Lambda_Aurigae> probably but again, think about chunk allocation and how that works. it could run into the same problem with allocation of large enough chunks of ram.
[08:33:04] <ecilop> alloca places chunks in stack..
[08:33:15] <Lambda_Aurigae> sweet then.
[08:33:22] <Lambda_Aurigae> I didn't look at how it works exactly.
[08:33:43] <Lambda_Aurigae> if they go in stack then you have a much better solution
[08:34:17] <ecilop> In simulation a seen that VLA have placed in stack too
[08:34:22] <Lambda_Aurigae> I wouldn't use that on one of the smaller attiny chips with the teensy tiny stack, however.
[08:34:35] <ecilop> atmega8
[08:34:44] <Lambda_Aurigae> maybe they converted it in avr-gcc to use alloca instead?
[08:35:45] <ecilop> malloc - is huge thing. alloca looks smaller. VLA looks faster memory dispose than alloca
[08:36:23] <ecilop> as i think
[08:36:32] <Lambda_Aurigae> according to the gcc manual there, if you use VLA, don't make the code reentrant because the variable will go byebye on you.
[08:37:08] <Lambda_Aurigae> and I definitely wouldn't make it recursive or you will fill ram rather quickly.
[08:37:15] <ecilop> it will be freed when program returns from called block
[08:37:38] <ecilop> I have no recurse..
[08:37:47] <Lambda_Aurigae> jumping out or breaking out of the scope makes VLA variables go away too.
[08:38:30] <ecilop> I know that dynamic memory allocation is dangerous for careless using
[08:38:47] <Lambda_Aurigae> I wish you would teach that to microsoft programmers.
[08:38:49] <ecilop> malloc, alloca, vla ... etc.
[08:39:00] <Lambda_Aurigae> for that matter, any programmer who writes GUI apps these days it seems.
[08:39:13] <twnqx> they use c sharp
[08:39:16] <twnqx> or jave
[08:39:18] <twnqx> java
[08:39:24] <twnqx> with their automatic garbage collectors
[08:39:28] <Lambda_Aurigae> irrelevant.
[08:39:28] <twnqx> no need for malloc!
[08:39:32] <ecilop> I am not good programmer. I know only avr and gcc implementation of C
[08:39:37] <twnqx> they don't even know what malloc is!
[08:39:38] <Lambda_Aurigae> someone had to write those garbage collectors.
[08:40:01] <ecilop> My friend works with C#..
[08:40:35] <ecilop> When they disable garbage collector -> compiled project works more faster :D
[08:40:59] <ecilop> and they not see no memory leaks :D
[08:41:00] <Lambda_Aurigae> ecilop, 25 years of C here. C++, Java, and many others somewhere in the 10 to 15 year range. Assembly on various processors starting with the 6502 back in the early 80s.
[08:41:18] <twnqx> same o/
[08:41:31] <twnqx> taught myself asm on the commodore 128, with nothing but the shipped docs :3
[08:41:44] <Lambda_Aurigae> commodore vic-20 and apple-II here.
[08:42:33] <Lambda_Aurigae> ecilop, if they can write tight code without memory leaks in C#, more power to them.
[08:43:17] <Lambda_Aurigae> there are some good programmers out there. I wouldn't say I'm really good but I'm passable.
[08:43:44] <Lambda_Aurigae> but, I don't do it for a living either. It's a part time hobby for me.
[08:44:29] <Lambda_Aurigae> mixed in with woodworking, hiking, canoing, model aircraft, and remodeling my house.
[08:44:30] <ecilop> If discuss of knowing programming languages. I have 8 years exeperinse in perl, 2 years - java, many-many yars ago - pascal and MASM.
[08:44:33] <ecilop> I am bad programmer anyway. Because it's not my profession.
[08:44:51] <twnqx> it's not mine either
[08:45:00] <twnqx> and i tend to make horrible design decisions "because i can"
[08:45:20] * twnqx looks back at a 1k line makefile that has complete parseres written in make
[08:45:39] <Lambda_Aurigae> twnqx, you masochist!
[08:45:54] <twnqx> i... wanted to proof that it's possible
[08:46:00] <Lambda_Aurigae> hehe.
[08:46:12] <twnqx> it is. and it's a bad idea, too.
[08:46:14] <Lambda_Aurigae> I'm sure you could write a whole OS in make but,,,WHY?
[08:46:26] <twnqx> this was aout automating video encoding
[08:46:29] <twnqx> input files, out files
[08:46:33] <ecilop> time killer
[08:46:35] <twnqx> so make was an obvious choice.
[08:46:37] <twnqx> or so i thought.
[08:46:57] <twnqx> well, make IS an obvious choice, but maybe i should not use make to genrate the dependencies.
[08:46:59] <Lambda_Aurigae> twnqx, so, what kinda drugs were you on at the time?
[08:47:14] <twnqx> caffein
[08:47:17] <twnqx> lots of it
[08:47:25] <Lambda_Aurigae> I bet.
[08:47:47] <ecilop> Lysergsäurediethylamid
[08:47:52] <Lambda_Aurigae> sounds more like a dextromethorphan hallucination to me.
[08:48:14] <twnqx> no, i still work on it when i come across more special cases
[08:48:20] <twnqx> it realls works surprisingly well
[08:48:26] <Lambda_Aurigae> although, I have heard of people hallucinating after being away took long with caffeine infusions.
[08:48:48] <twnqx> i started to factor out some things to more suited languages though
[08:49:00] <twnqx> make can't deal good enough with filenames that have spaces in them
[08:49:38] <Lambda_Aurigae> yeah...that is a problem with make at times.
[08:49:58] <ecilop> try perl.. huge monster for same tasks
[08:50:06] <twnqx> perl is great
[08:50:11] <Lambda_Aurigae> hehe.
[08:50:18] <twnqx> and no, it's not a replacement for make
[08:50:34] <twnqx> make is really perfect for the task
[08:50:40] <ecilop> CPAN can help to replace it :)
[08:50:45] <twnqx> no
[08:50:52] <twnqx> you'd be exactly coding make again
[08:50:54] <Lambda_Aurigae> one place I worked, a bunch of java programmers were trying to write a parser program in perl...which it is supposed to be good at. after several weeks of them screwing around the boss asked me to do it.
[08:50:58] <twnqx> pointless reinvention of the wheel
[08:51:03] <Lambda_Aurigae> so I wrote it in C in an hour.
[08:51:14] <twnqx> depends on what you want to parse
[08:51:15] <Lambda_Aurigae> debugged in an hour...
[08:51:25] <Lambda_Aurigae> SNMP MIBs
[08:51:31] <twnqx> i like perl to parse html
[08:51:39] <twnqx> mainly because http::parser though
[08:51:44] <twnqx> and it's descendents
[08:51:54] <twnqx> because doing http _right_ is a pain
[08:51:56] <ecilop> CPAN - you can find everything, and a little bot more :)
[08:51:58] <Lambda_Aurigae> parse and reformat certain parts.
[08:52:25] <twnqx> not sure which language i'd use for that... i'll have to reread the format
[08:52:31] <twnqx> possibly awk :P
[08:52:34] <Lambda_Aurigae> in the time it took them to screw with perl on it they could have done the parsing by hand.
[08:53:11] <Lambda_Aurigae> well, almost...we ended up parsing several hundred MIBs
[08:53:28] <ecilop> http://search.cpan.org/~hardaker/SNMP-5.0404/SNMP.pm - oh shi..
[08:53:39] <ecilop> They did it for you
[08:53:57] <Lambda_Aurigae> there are several ways to format different things in mibs. our software wanted it formatted a certain way.
[08:54:49] <ecilop> reformat using regexp-s - easy way. If java programmers don't know how do that - it is thir problem
[08:54:51] <Lambda_Aurigae> they did it for perl....
[08:55:37] <Lambda_Aurigae> I did this back in 2002 as I recall.
[08:56:33] <Lambda_Aurigae> I found it an easy thing to do without regex of any kind...it did involve breaking certain lines apart and recombining them with other lines depending on what was in the different lines.
[08:56:41] <Lambda_Aurigae> several case statements
[08:56:45] <ecilop> look to copyright of this module..
[08:56:54] <Lambda_Aurigae> I see that.
[08:56:55] <ecilop> years of copy
[08:57:03] <Lambda_Aurigae> back then I didn't know perl.
[08:57:10] <LeoNerd> I'd parse it into an ASTish tree then re-emit it again
[08:57:10] <Lambda_Aurigae> and apparently the java programmers didn't either.
[08:57:37] <twnqx> using something new in limited time environments is bad
[08:57:43] <Lambda_Aurigae> I was only digging for 3 to 6 lines inside files of 50 to 300 lines long and converting them...was fairly simple in C.
[08:58:05] <ecilop> Your java programmers worse than me :) I am bad programmer
[08:58:28] <LeoNerd> I tend to find I can write Perl about 5 times quicker than C, if not more...
[08:58:38] <Lambda_Aurigae> just goes to show, the best programming language for a job is not necessarily one made to do the job but one you know how to use to do the job.
[08:58:53] <Lambda_Aurigae> LeoNerd, I'm the other way around...mostly because I know C much better than PERL.
[08:59:14] <LeoNerd> I know both very well; perl's just so much quicker to get something working for all the extra stuff it does behind you
[08:59:39] <Lambda_Aurigae> if you know it, great..
[08:59:40] <LeoNerd> If I want a huge list of things, sort it, pull elements out of it, whatever... those are all little one-line statements..
[08:59:41] <ecilop> And someone say "perl is dead"
[08:59:55] <Lambda_Aurigae> I have a passing knowledge of PERL..slightly more than of ruby.
[09:00:11] <Lambda_Aurigae> ecilop, I've heard that COBOL is dead too.
[09:00:25] <Lambda_Aurigae> but if you are a good COBOL programmer you can make 100K USD a year easy.
[09:00:35] <Lambda_Aurigae> because all the good COBOL programmers are dead!
[09:00:49] <Lambda_Aurigae> and the code at the core of many financial institutions is still COBOL.
[09:01:14] <Lambda_Aurigae> COBOL=COmmon Babboon Oriented Language
[09:02:14] <ecilop> What about fortran?
[09:02:33] <Lambda_Aurigae> still used in math systems.
[09:02:36] <Lambda_Aurigae> but not as much.
[09:02:53] <Lambda_Aurigae> we wrote a lot of orbital stuff in fortran back in the 80s and 90s for the military.
[09:03:07] <Lambda_Aurigae> great for math functions. much better than pascal of the time.
[09:03:23] <Lambda_Aurigae> then they made us convert everything to ADA....what a freaking nightmare that was.
[09:03:39] <Lambda_Aurigae> about the time we got things actually working in ADA they dropped that requirement, thankfully.
[09:06:33] <ecilop> bye, all
[12:15:29] <tpw_rules> anybody have experience with trinketloader?
[12:15:49] <tpw_rules> it's giving me random device signatures but they are sometimes right. it can't verify the fuses either. did i blow my chip? i don't have a usbtiny or similar with me
[12:24:55] <tpw_rules> hi?
[12:41:07] <tpw_rules> blah i think it's dead. a real programmer can't recognize it
[12:42:04] <Lambda_Aurigae> tpw_rules, never heard of trinketloader.
[12:47:16] <tpw_rules> it's a program for reprogramming the adafruit trinkets and gemma thingers
[12:47:32] <tpw_rules> the trinkets have an attiny85 but i think my friend blew it up
[12:48:46] <Lambda_Aurigae> friends don't let friends use their electronics.
[12:48:53] <Lambda_Aurigae> they tend not to be friends anymore.
[12:49:41] <tpw_rules> well it's his, i'm just more experienced
[12:50:44] <tpw_rules> he's like "it no program" so i offered to help. an arduinoisp can't detect it at all
[12:50:57] <tpw_rules> trinketloader was giving random device ids but somehow got the right one half the time, but it couldn't burn the fuses after
[12:51:29] <Lambda_Aurigae> trinketloader is a bootloader or external programmer?
[12:51:59] <tpw_rules> external programmer
[12:52:13] <tpw_rules> you flash it onto an uno and it can reprogram your trinket if you erase the bootloader
[12:52:28] <tpw_rules> it operates over serial and is mostly automatic as opposed to like arduinoisp
[12:53:34] <Lambda_Aurigae> never owned any arduino gear myself.
[12:53:56] <tpw_rules> oh. well if it can't be detected and is all zeros, then it's probably dead right?
[12:54:02] <Lambda_Aurigae> probably.
[12:54:33] <tpw_rules> trying to hvpp it if the clock fuses are bad would be more effort than simply buying a new one
[12:55:02] <Lambda_Aurigae> unless you happen to have a HV programmer.
[12:55:12] <Lambda_Aurigae> you will probably need HVSP though, for an attiny.
[12:55:28] * LeoNerd grins
[12:55:32] <LeoNerd> Did someone say HVSP? ;)
[12:55:35] <Lambda_Aurigae> hehe.
[12:55:44] <LeoNerd> I literally just put it up on Tindie
[12:56:04] <Lambda_Aurigae> I'm sorry.
[12:56:12] * Lambda_Aurigae has no clue what tindie is.
[12:56:30] <tpw_rules> it's like etsy but for electronics i think
[12:56:38] <tpw_rules> with a dash of kickstarter
[12:56:44] <LeoNerd> https://www.tindie.com/products/leonerd/avr-hvsp-programming-bus-pirate-adapter/
[12:56:48] <Lambda_Aurigae> ok...and,,,guess I'll look up etsy too.
[12:56:55] <LeoNerd> Nothing kickstarty about it. It's just a marketplace
[12:56:57] * tpw_rules wonders when the language will become entirely hip web startups
[12:57:01] <rue_bed> Tom_itx, whats with your high voltage adapters?
[12:57:31] <tpw_rules> anyway, it's already SMD embedded on a small board so buying a new one will simply be easier
[12:58:29] <LeoNerd> Yah; that could make it trickier
[12:59:03] <Lambda_Aurigae> that's what a chip clip is for!
[12:59:12] <tpw_rules> well i'd have to desolder it
[12:59:20] <Lambda_Aurigae> nope
[12:59:23] <Lambda_Aurigae> chip clip
[12:59:26] <LeoNerd> The board might interfere with it
[12:59:28] <tpw_rules> exactly
[12:59:44] <LeoNerd> At least, since you have to put +12V into the reset line
[12:59:51] <Lambda_Aurigae> might but not likely if it uses an external programmer.
[13:00:04] <tpw_rules> well you're supposed to be able to program it by usb
[13:00:08] <Lambda_Aurigae> https://www.sparkfun.com/products/13153?gclid=CKjK0pjk18ICFUmCMgodSWAAgg gotta love chip clips!
[13:00:50] <LeoNerd> Yup - useful, but only if it actually works on the board
[13:18:05] <xpoqp> I'm programming a Arduino Uno R3 with avrispmkII programmer, I wanted to try the arduino-native external 16MHz oscillator which is connected to XTAL0/XTAL1, I have been reading up, but to make sure I understand, does these fuse settings seem accurate= lfuse 0xF7 hfuse 0xDF efuse 0xFC
[13:19:22] <tpw_rules> http://www.engbedded.com/fusecalc/ check there
[13:19:35] <xpoqp> I understand that >8MHz I should use Full-swing crystal setting?
[13:19:40] <xpoqp> I did tpw_rules
[13:19:43] <tpw_rules> be careful because if you program the clock settings wrong, you'll need a high voltage programmer to fix it.
[13:19:45] <tpw_rules> oh, i don't know
[13:20:08] <xpoqp> ^that's why i ask :)
[13:20:43] <xpoqp> s/i/I/
[13:21:03] <Lambda_Aurigae> hv programmer is not the only way to recover..often you just need an external clock source.
[13:21:11] <tpw_rules> use it as an excuse to buy another uno and the high voltage progamming kit
[13:21:49] <Lambda_Aurigae> or built a fuse doctor.
[13:22:55] <LeoNerd> Or buy my HVSP programmer :)
[13:23:21] <tpw_rules> so i've also got this thing that i'm not sure what it is
[13:23:33] <tpw_rules> it says arduino on it and it has a regular B usb and some ftdi chip
[13:23:34] <xpoqp> right not, that's not an option :) I'd like to know before I program it and possibly blow it.
[13:23:51] <tpw_rules> but it doesn't have any avr on it
[13:24:20] <Lambda_Aurigae> tpw_rules, what ardweeny is it?
[13:24:26] <tpw_rules> i don't know
[13:24:34] <tpw_rules> it just says the logo and arduino.cc but it has no avr
[13:24:52] <Lambda_Aurigae> what is the main processor then?
[13:24:59] <tpw_rules> the only chip is an ft232rl
[13:25:17] <Lambda_Aurigae> http://arduino.cc/en/uploads/Main/ArduinoUnoSmd450px.jpg
[13:25:20] <Lambda_Aurigae> look like that?
[13:25:24] <tpw_rules> no no no
[13:25:25] <tpw_rules> much much smaller
[13:25:26] <Lambda_Aurigae> it has to have something other than the ft.
[13:25:34] <tpw_rules> from the usb connector to the left bit of the infinity
[13:25:39] <tpw_rules> and just a little wider
[13:25:41] <Lambda_Aurigae> ft232rl is nothing but a usb to serial adapter.
[13:25:52] <tpw_rules> do they make arduino branded usb to serial adapters?
[13:26:05] <Lambda_Aurigae> you mentioned an arduino uno r3...that's an official r3.
[13:26:10] <tpw_rules> no
[13:26:19] <tpw_rules> oh i was just given the box, it's an arduino usbmini
[13:26:37] <tpw_rules> http://arduino.cc/en/Main/MiniUSB
[13:26:46] <Lambda_Aurigae> ok.
[13:27:00] <Lambda_Aurigae> so that's not an arduino...it's just a usb to serial adapter board.
[13:27:18] <tpw_rules> yes. i thought so but i didn't know there were arduino branded ones. seems a bit silly
[13:27:22] <Lambda_Aurigae> duh...it wasn't you asking about the uno r3..sorry.
[13:28:24] <Lambda_Aurigae> but, yeah, that's just a serial adapter for older ardweenies.
[14:08:08] <rue_more> who here has hooked up a sd card?
[14:08:44] <specing> onto a fishing line?
[14:09:04] <specing> YES, I use it when fishing for SSDs
[14:13:27] * Tom_itx waves his hand wildly in the air
[14:13:58] <Tom_itx> i know it can be a pain in the ass
[14:15:36] <rue_more> Tom_itx, did you ever get it top work?
[14:15:46] <Tom_itx> not entirely no
[14:15:49] <Tom_itx> mmc did
[14:15:57] <rue_more> huh
[14:16:06] <tpw_rules> i got one to work fine with the seeed tft shield but i wrote my own driver
[14:16:28] <rue_more> tpw_rules, yea, I got prolly the same one working last night
[14:16:32] <rue_more> uses a 4050 level converter
[14:17:01] <tpw_rules> i'm pretty sure they're not 5v tolerant i/o and they're certainly not 5v power
[14:17:22] <rue_more> arduino, did they make their own drivers or pull some drivers from pre-arduino
[14:17:36] <rue_more> correct
[14:17:54] <rue_more> ok I have a limited amount of sun and dry to get some things done
[14:18:05] <tpw_rules> they're probably based on something else but i don't know
[14:18:41] <tpw_rules> mine are only raw sector drivers. i didn't have the memory for the fat and didn't really need it
[14:37:27] <Lambda_Aurigae> SD interface is basically serial ATA...not quite SATA, but, the commands and format and all are similar to ATA...read and write in 512 byte blocks and all that stuff too.
[14:37:44] <Lambda_Aurigae> or rather, the MMC interface to SD cards is..
[14:38:15] <Tom_itx> there are 3 init strings depending if it is mmc SD or SDHD isn't there?
[14:38:24] <Tom_itx> you have to interrogate which to see
[14:38:57] <Lambda_Aurigae> most SD can support MMC, but, yeah, you have to in-terror-gate it to find out what it supports.
[14:39:39] <Tom_itx> i sent the mmc string first then if it failed i sent the regular SD one then...
[14:39:48] <Lambda_Aurigae> for smaller, under 2GB, you can generally assume MMC capability.
[14:40:40] <Tom_itx> some 2GB are different than other depending on the date of MFG iirc
[14:40:53] <Lambda_Aurigae> as I said, under 2G
[14:40:59] <Tom_itx> the rules kinda changed as they grew bigger
[14:42:00] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/pdf/mmc/
[14:42:09] <Tom_itx> that's about the extend i know about SD
[14:42:14] <Tom_itx> extent*
[14:42:58] <Lambda_Aurigae> the fun one is working with a full PATA harddrive from an AVR.
[14:46:07] <Tom_itx> part of my problem was the buffer chip i used for the 3v translation
[14:46:17] <Lambda_Aurigae> that can be an issue.
[14:46:19] <Tom_itx> i think if i did it over i'd have alot better luck
[14:46:34] <Lambda_Aurigae> I just run my avr at 3.3V and it works fine.
[14:47:47] <Tom_itx> hindsight...
[14:48:18] <Lambda_Aurigae> yup.
[14:52:24] <Tom_itx> nowdays even that isn't quite 20/20
[14:53:00] <Lambda_Aurigae> that's what cannons and nukes are for.
[14:53:07] <Lambda_Aurigae> to erase mistakes.
[18:30:57] <rue_more> is there an "erase all" button?
[18:32:44] <Tom_itx> yeah
[18:32:57] <Tom_itx> it's tied to a intercontinental balistic missle
[18:39:49] <Lambda_Aurigae> you could always use the space based nukes.
[18:39:56] <Lambda_Aurigae> those are more immediate.
[18:44:08] <Lambda_Aurigae> Nuke the site from orbit. It's the only way to be certain.
[19:21:18] <theBear> send me in, it's the only way to be certain