#avr | Logs for 2013-06-03

Back
[00:07:39] <microchip_sac> hello all
[00:07:49] <microchip_sac> my question is not exactly related to AVRs
[00:08:13] <microchip_sac> but here it goes -- why do i get very bad communication
[00:08:29] <microchip_sac> between two AVRs when using serial comm. over IR?
[00:09:09] <microchip_sac> im using a standard IR LED and receiver-demodulator-amplifier
[00:09:29] <microchip_sac> but serial comm. works only once in a while (1 out of 5 tries)
[00:10:03] <Casper> do you have a crystal?
[00:14:49] <Valen> IR led is it modulated?
[00:15:36] <microchip_sac> Valen: yes, im using pulse code modulation
[00:15:52] <Valen> i mean the "demodulators" expect a 40khz carrier
[00:16:03] <Valen> are you providing that on the transmitter somehow
[00:16:28] <microchip_sac> yes, i know that (BTW, mine expects 38 kHz)
[00:16:38] <microchip_sac> im using the timer PWM function
[00:16:54] <microchip_sac> setting the TOP value so that i get 38 kHz
[00:18:22] <microchip_sac> and, if i connect the devices directly with a wire
[00:18:37] <microchip_sac> it works 19 out of 20 times approx.
[00:19:13] <Valen> if its not working all the time with a wire connecting the two I'd say you have an issue
[00:19:28] <microchip_sac> it works 19 out of 20 times!
[00:19:48] <microchip_sac> plus, im using the internal rc osc.
[00:19:49] <Valen> if your usb drive worked 19 out of 20 block transfers you would return it
[00:20:46] <microchip_sac> mine is a very simple application, i dont mind failing once in 20 tries
[00:21:00] <microchip_sac> but it should work the same over ir, right?
[00:27:02] <thetruthisoutthe> :) http://en.wikipedia.org/wiki/Functional_square_root
[00:30:21] <microchip_sac> thetruthisoutthe: what?
[00:34:39] <thetruthisoutthe> i suggest this for the beginners http://en.wikipedia.org/wiki/Dynamic_programming
[03:45:24] <cart_man> Hey Guys. Whats the maximum watt an average 8bit AVR can consume?
[03:49:22] <Valen> look up the max ratings in the datasheet
[03:49:26] <Valen> usually around 200ma per port
[03:50:45] <Tom_itx> an 8bit attiny4 will consume less than an 8bit atmega2560
[03:51:06] <cart_man> Well im doing some rough estimates
[03:51:15] <cart_man> havent decided on a AVR yet
[03:51:25] <cart_man> Pico Power would most likely be an option
[03:51:46] <cart_man> Is it hard to implement Pico Power and whats the Tradeoffs? Does ADC go down or interrupts go down?
[03:51:55] <cart_man> Atmega48P
[03:59:57] <R0b0t1> cart_man: picopower is a quality of the chip
[04:00:06] <R0b0t1> It's what atmel calls their low current sleep modes
[04:00:20] <R0b0t1> It's not too hard to implement, but note what kind of interrupt will wake which sleep modes
[04:00:38] <R0b0t1> (as in, if you want to use deep sleep you will need an external interrupt to wake the device)
[04:00:39] <Valen> my non picopower chip is pulling .1-.2ua in sleep at 5V
[04:01:02] <R0b0t1> I think picopower does nA? Or hundreds of nA, at any rate. Might not be much of a power saving.
[04:01:12] <cart_man> Well all the MCU will be doing is just check temperatures and switch Transistors on and off ? Would it be able to do that in Sleep mode?
[04:01:17] <R0b0t1> (A lot of chips with RTC have a minimum draw of like 900nA, I found this odd)
[04:01:47] <cart_man> Oh so its really not that big of a deal anyway it seems
[04:01:48] <cart_man> ?
[04:01:54] <cart_man> 900nA is nothing
[04:02:01] <Valen> sleep means no clock
[04:02:16] <cart_man> Although it will get more the higher the Crystal Frequency goes?
[04:02:23] <cart_man> Ohhhh ok
[04:02:29] <Valen> i meant there is no clocking happening
[04:02:36] <Valen> no instructions get executed
[04:02:42] <cart_man> thats odd...Ok soo obviously with no clock it wont be processing so thats not going to happen
[04:02:56] <cart_man> yes id
[04:03:21] <cart_man> Ok but its ok since the current drawn is pretty low I dont have to worry about that anyway
[06:10:21] <inflex> 900nA is fairly hungry for a RTC
[06:10:38] <inflex> I mean, that's almost 1mA
[06:23:44] <twnqx> inflex: you mean almost 1µA, or 0.001mA....
[06:24:45] <cmtptr> or 900uA
[06:24:58] <inflex> oppps, yes, quite correct
[06:25:19] * inflex retires for the night instead
[06:25:33] <twnqx> jeez, my day just began, and other people go to bed :S
[06:26:50] <inflex> getting a little late here in North-East Australia :)
[06:26:56] <inflex> Was a brutal Monday.
[06:28:09] <cmtptr> great thanks for spoiling it for me
[06:29:03] <cmtptr> Monday just started here. apparently it's going to brutal... maybe I'll just stay home
[06:37:07] <dunz0r> Anyone in here done any wifi stuff with an Atmega?
[06:37:26] <dunz0r> I want to know if I should just find some other solution before I start testing stuff
[06:47:46] <thetruthisoutthe> oh http://en.wikipedia.org/wiki/Trinidad_Moruga_Scorpion looks harmless juicy fruit, i feel like slicing one up, put on a slice of buttered bread, and bite in it
[08:24:48] <cart_man> RikusW: Hey Rikus. The GPS unit we have been discussing. Does it need a pulse to start up or does it just spew out Co-Ordinates upon startup?
[08:25:00] <RikusW> hi cart_man
[08:25:09] <RikusW> spew out
[08:25:17] <RikusW> as long as power is applied
[08:25:34] <RikusW> you can use PMTK220,500 etc to set frequency in ms
[08:26:03] <cart_man> Thats good news...do youthink its a good idea to buffer the output of the GPS from 3.3V to another MCUs 3.3V rx tx?
[08:27:09] <RikusW> actually it outputs 2v8
[08:27:28] <RikusW> but I've connected it via 330 Ohm (or 470) to 3v3 directly without any problems
[08:27:49] <RikusW> you will need a pcb for it...
[08:28:17] <cart_man> RikusW: So the PMTK220 is the actual datasheeT?
[08:28:34] <RikusW> PMTK is the commands sent to the PA6H
[08:30:28] <cart_man> RikusW: Ohhh lol I see
[08:32:49] <cart_man> RikusW: Im going to use my PC to read the readings first and to check if everythings working over plain seriel and Max IC and then later attach it to my Atmega328P
[08:33:37] <RikusW> default baud is 9600 8N1
[08:33:48] <RikusW> do you have all the datasheets ?
[08:34:56] <cart_man> only have the one that looks nice.I was going to buy the IC today but then stuff came up with the GF
[08:35:31] <RikusW> its more like a module...
[08:36:00] <RikusW> I have all the datahsheets as a 5.5MB 7z
[08:38:40] <cart_man> How does one establish a private char? could I give you my email address ?
[08:49:57] <Badaboom> morning
[08:52:35] <DagoRed> morning
[09:52:20] <ambro718> I've gotten my 32bit log2 down to 24 instructions in worst case. Can anyone see potantial for improvement? http://ideone.com/8Gtk4q
[10:02:47] <ambro718> In inline asm, what does "=r" mean for output registers? The docs (*) say that "=" stands for "write-only". Does this mean I'm only allowed to write it once, i.e. not set to something than modify it? * http://www.nongnu.org/avr-libc/user-manual/inline_asm.html
[10:23:06] <theBear> without looking i'd say it means you can't read values from there, only write them
[10:26:34] <ambro718> ok that's good, I can remove the final mov from my code
[10:26:41] <ambro718> oh wait...
[10:27:03] <ambro718> so "ldi output,6; inc output" is not ok to do?
[10:29:40] <theBear> i dunno, i'm dizzy from lack of food
[10:29:47] <theBear> and i haven't assemblered for years
[10:43:03] <Grievar> ambro718: I don't like doing inline assembly generally, I usually just do entire functions in assembly and then call them from C
[10:44:25] <ambro718> I don't like that, it means I need to link the assembly files separately (right now my whole program is just one translation unit).
[10:44:31] <ambro718> everything is in C++ headers
[10:44:55] <ambro718> Grievar: do you know if gcc can inline such written assembly functions?
[10:46:56] <Grievar> ambro718: Not sure. Anyway your question is probably better asked in the GCC channel (which might be on oftc I don't remember)
[10:47:34] <twnqx> ambro718: in one particular case it can
[10:47:47] <ambro718> I asked on SO anyway
[10:48:08] <twnqx> when you throw all your source file in it at once, without separate compiling/linking stages
[10:48:58] <ambro718> yes that's what I do of course, there's no advantage to splitting it for small projects like AVR stuff
[10:49:10] <twnqx> "small projects like avr stuff" lol
[10:49:17] <twnqx> 2.5k loc
[10:49:40] <twnqx> eh, 4.6k loc
[10:49:43] <ambro718> what do you mean? you can't really have big projects for AVR
[10:49:46] <ambro718> 4.6k is small
[10:49:50] <twnqx> i have 4600 lines of code
[10:49:57] <twnqx> i wouild not put that into one unit
[10:50:14] <twnqx> also, makefiles automatically do that
[10:50:47] <jadew> you can fit a lot of code into 32k
[10:51:19] <theBear> seperation is often logical, if you are likely to modify a large part of a project or are reusing previous chunks of code modular style
[10:51:31] <Grievar> separation
[10:51:34] <twnqx> umm
[10:51:40] <twnqx> putting code into separate files
[10:51:45] <Grievar> you can remember the spelling because it shares the same root as "parity"
[10:51:48] <twnqx> does not imply compiling/linking separately
[10:51:54] <theBear> you may also have a collection of 'personal' functions and headers and things that you like to have and then just pick and choose what you use from them
[10:52:35] <twnqx> i'd let gcc handle that
[10:53:04] <twnqx> slap __attribute__ ((unused)) on it and let it happily remove what's unneeded, yet compile with -Wall -Werror
[10:53:31] <theBear> gcc will handle what gets built in/used, but it's easy if you got a bunch of functions you regularly use to just keep them in a myfunctions file, easier than copy and pasting out just the ones you use everytime
[10:53:41] <ambro718> I don't think you need any attributes, just -ffunction-sections -fdata-sections -Wl,--gc-sections
[10:53:45] <twnqx> read again
[10:54:15] <twnqx> ambro718: you'll get a warning for stuff that's defined static but not used
[10:54:25] <ambro718> twnqx: I disabled this warning :D
[10:54:35] <twnqx> i don't
[10:54:41] <twnqx> i just slap attributes on
[10:54:42] <theBear> the warning is saying you're wasting space
[10:54:45] <jadew> yey \o/ for disabling warnings
[10:54:53] <twnqx> in fact no
[10:54:57] <twnqx> because gcc will remove it
[10:55:07] <theBear> oh, saying you're trying to waste space eh :)
[10:55:19] <twnqx> yeah
[10:55:21] <theBear> even without optimisation set ?
[10:55:36] <theBear> then again, there's seldom (never?) a good argument for doing that
[10:55:37] <twnqx> no idea, i next to never compile without (unless i suspect a gcc bug)
[10:55:45] <theBear> ahh, seldom indeed :)
[10:56:30] <twnqx> the fact is that gcc is warning you "hey, you defined <something> statically, but you don't use it... did you do that by mistake, maybe?"
[10:58:00] <theBear> wll it's a mistake whether you meant to reference it and forgot or didn't mean it to be included i suppose :)
[10:58:03] <theBear> well
[10:58:20] <twnqx> i sometimes really want to retain some source idea, so i slap that attribute on :P
[10:58:59] <twnqx> static __attribute__ ((unused)) can_t obd_heartbeat = { .port = CANPORT_AVR, .id = 0x7df, .extended = 0, .rtr = 0,
[10:59:00] <twnqx> .length = 8, .data = { 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
[10:59:25] <twnqx> i switch between using it and not using it quite often :P
[10:59:43] <twnqx> and i don't feel like deleting/copying it back all the time
[12:13:27] <thetruthisoutthe> h
[12:15:00] * thetruthisoutthe steps out of an event horizon in midair waving hi
[13:52:32] <megal0maniac> No more exams :D
[13:52:41] <megal0maniac> Full-time(ish) AVR for a bit
[13:53:47] <twnqx> help me figure out floating mosfet drive then :P
[13:53:57] <megal0maniac> I don't know anything!
[13:54:08] <twnqx> mosfets were parts of your exam!
[13:54:22] <megal0maniac> I barely know bjt, and it's electronics 1!
[13:54:37] <megal0maniac> And that's a semester long course where we start with reading resistor colour codes
[13:54:38] <twnqx> all the same
[13:54:45] <twnqx> apply voltage, observe smoke
[13:55:06] <megal0maniac> We've learned how to avoid that, with a BJT
[13:55:51] <megal0maniac> And I know it's kind of evil, but I look forward to people getting cap polarities wrong or reverse biasing diodes
[13:56:13] <twnqx> next semester you mean?
[13:56:14] <megal0maniac> Because it makes the crappy labs more exciting :) And they don't often disappoint
[13:56:21] <megal0maniac> twnqx: No, this semester
[13:56:50] <megal0maniac> We did rectification / regulation (transformer basics) and BJT basics
[13:57:10] <twnqx> that's actually what i am trying, too
[13:57:11] <twnqx> :S
[13:57:19] <twnqx> except for the BJT, rather mosfet or igbt
[13:57:19] <megal0maniac> And a little bit of FETs which I don't quite get yet
[13:58:20] <megal0maniac> In our digital systems exam today, they had a circuit diagram with various logic gates and all the inputs were pulled low :/
[13:59:14] <megal0maniac> I've tried that and it doesn't work (with TTL, anyway). Something about open drain. And then I was told why it doesn't work. And yet they get it wrong when they set the exam
[13:59:27] <megal0maniac> And what exactly are you trying to do? I doubt I can help, but I'm curious
[13:59:48] <twnqx> switchmode primary side power supply
[13:59:57] <twnqx> with power factor correction
[14:03:41] <megal0maniac> :/
[14:17:07] * RikusW got bitten in the ... bu unsigned int to float conversions :(
[14:17:29] <RikusW> -3 -> > 4GB :S
[14:18:03] <RikusW> twice....
[14:33:42] <megal0maniac> I've been trying for so long to get x86 support working on Debian. Random and misleading errors :/
[14:34:01] <twnqx> eh
[14:34:07] <twnqx> > debian
[14:34:13] <megal0maniac> Turns out I needed to add x86 to dpkg to turn on multiarch support
[14:34:45] <megal0maniac> twnqx: I quite like it
[14:35:19] <megal0maniac> I'm just getting used to it. Made peace with the fact that there is _no_ Linux distro that works exactly how I want it to, so now I'm giving it more of a chance
[14:38:13] <twnqx> but debian...
[14:38:23] <twnqx> even sid is a pile of oboslte software
[14:38:29] <twnqx> and a pita with the -dev separation
[14:38:39] <twnqx> or -devel or whatever they do
[14:39:15] <megal0maniac> You think?..
[14:40:25] <megal0maniac> I don't know. I'm using Wheezy and it seems modern enough. Although I'm not really sure what up to date means anymore on Linux. I only found out that they'd moved on from 2.6 kernels this year :)
[14:43:56] <megal0maniac> OndraSter_: Do you watch Flight of the Concords?
[14:53:59] * RikusW got kernel 3.5.0-17
[14:54:07] <RikusW> Mint x64
[14:56:04] <megal0maniac> I have 3.3.8
[14:56:12] <inkjetunito> 3.4.42 :o
[14:56:23] * RikusW is up to date for once :-P
[14:56:37] <RikusW> had Debian Etch previously...
[14:57:15] <inkjetunito> hehe. without debian i would never had used xfree86 3.x and linux 2.0 :D
[14:57:32] <tzanger> anyone interested in an embedded c 12-18m+ contract in farmington hills, mi with possible travel to germany if you wanted? automotive obviously, no idea on rate but if you're interested I'd put you in contact with my account manager
[15:06:24] <megal0maniac> Well I've got 3.6.something on my Dockstar, but that doesn't count :P
[15:06:31] <megal0maniac> Although it's also running Wheezy
[15:06:35] <Tonelock> tzanger- I'm in the job market at the moment- any chance I could p/m you?
[15:06:50] <megal0maniac> tzanger: That sounds pretty great
[15:08:37] <RikusW> $12m ?!
[15:08:52] <Tonelock> tzanger: I'm just currently looking for embedded jobs as we speak
[15:09:14] <megal0maniac> RikusW: Months :)
[15:09:17] <Tonelock> RikusW-lol, m=months:)
[15:09:22] <RikusW> heh
[15:12:11] <megal0maniac> tzanger: Unfortunately, I'm in the wrong hemisphere. Also I don't know embedded C. And I'm still in university :)
[15:18:23] <cmtptr> embedded C is still just C
[15:48:49] <tzanger> Tonelock: yeah no worries
[15:48:58] <tzanger> megal0maniac: lol
[16:30:10] <orfix> Hi, is it safe to assume that all register values defaults to 0 ? I see code examples like SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0); where bits are only set to 1s... thank you.
[16:33:50] <Casper> orfix: no, not all registers reset to zero
[16:34:33] <orfix> the example I gave was from the datasheet... so which ones are set to zero uppon reset ? how can I know ?
[16:35:00] <orfix> I am new to MCUs
[16:35:09] <Casper> check the datasheet, each registers will have the default values there
[16:35:16] <Casper> and yes, the datasheet is big
[16:36:50] <orfix> Casper: you are right "18.5 Register Description" gives the initial value for each register :)
[16:36:59] <orfix> ok thank you.
[16:38:29] <Casper> don't be affraid of the big datasheet, it may be big, but it's because there is lots of features, and some sections are doubled
[16:39:01] <Casper> ex, port a/b/c/d, they did a copy paste of the text for each port, changing "portx" for the apropriate one
[16:39:51] <orfix> =]
[16:42:26] <orfix> I am writing in C but seems like with all the bitwise operation, bit shifting, registers... an assembly code would be more readable :P
[16:53:06] <ambro718> am I hitting a compiler bug here? http://stackoverflow.com/questions/16900444/what-are-the-limitations-on-the-use-of-output-registers-in-avr-gcc-inline-assemb
[17:02:30] <twnqx> well, you have an answer there
[17:02:36] <twnqx> and it explains what output regs are
[17:02:58] <twnqx> can't you allocate the same reg as initialized input as well?
[17:27:04] <sabesto> hm, so i'm trying out this sam4 board, setting pll,osc and cpu clock is suppose to require unlocking the registers, however it works anyway
[17:27:24] <sabesto> not using asf, anyone know why?
[17:34:51] <ambro718> twnqx: fixed it, problem was the compiler allocated the same reg for input and output. Adding & to the output operand declaration fixed it.
[20:33:15] <dgriffi> can anyone here suggest a replacement for Jameco's blue "bug trays"? It seem that they're discontinuing them and the ones they have left don't have lids
[21:12:01] <skurz0> any idea why writing to internal flash can fail?
[21:20:07] <Badaboom> >?
[21:20:49] <Badaboom> writing to it more that 10k time is one
[21:20:57] <Badaboom> than
[21:20:58] <Tom_itx> dgriffi how big?
[21:21:07] <Tom_itx> dealextreme has a few for smt stuff
[21:21:09] <Tom_itx> with lids
[21:21:28] <skurz0> i'm using the facilities provided by avr-libc, using the example (boot_program_page) found on source and user manuals
[21:21:46] <skurz0> from a loaded application
[21:22:17] <skurz0> but the programming does not have any effect
[21:22:38] <skurz0> I think it may be sth related to fuses and other protections
[21:22:54] <dgriffi> Tom_itx: for dips. I'm just going to say "screw it" and get some polyethylene foam
[21:23:12] <Badaboom> what exactly is happening,, are you trying to program a chip?
[21:23:34] <skurz0> I'm trying to develop a filesystem for the internal flash
[21:24:40] <skurz0> I understand that I have to use the SPM instruction and so, and found the avr/boot.h functionalities implement this
[21:25:11] <skurz0> (I also have a version in assembler with the same results)
[21:26:12] <skurz0> can I write from the application over the application (e.g: page 0)?
[21:27:21] <cmtptr> seems more like a use case for eeprom
[21:27:53] <skurz0> too small
[21:28:02] <Badaboom> yeah,, im a little confused on the end results
[21:29:27] <skurz0> wearing can't be the cause, because when I program it it works
[21:29:45] <cmtptr> there is a fuse bit you have to set to 0 to enable smp
[21:30:21] <cmtptr> or spm, even
[21:31:10] <Badaboom> I wish i could find a fusebit calc like the app i have on my phone
[21:31:56] <Badaboom> I know there was a site mentioned but can't remember that add
[21:32:04] <Tom_itx> you don't like the one we post all the time?
[21:32:13] <Badaboom> eghh?
[21:32:19] <Badaboom> I no see that 1
[21:32:52] <Badaboom> is it on your site?
[21:33:07] <Tom_itx> http://www.engbedded.com/fusecalc/
[21:33:43] <skurz0> default values are: LB2=0 LB1=0 (lock bit: no protection) BLB02=1 BLB01=1 (no restrictions on LPM/SPM on application section) BLB12=1 BLB11=0 (no serial/parrallel programming allowed)
[21:33:52] <Badaboom> rgr,, thanks Tom
[21:36:22] <skurz0> I go to sleep, night
[21:41:26] <Badaboom> uncheck SPEIN rite?
[21:42:03] <Badaboom> ok,, that was bad
[22:18:01] <rue_house> http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html
[22:18:02] <rue_house> huh
[22:18:11] <rue_house> library overhead?
[22:27:29] <Badaboom> hrmm
[22:28:30] <Badaboom> so the mac outperformed
[22:28:56] <quxy> can anyone advise as to what the proper way is to write a main() for AVR development? int main(void){} seems silly, but avr-gcc does not like void main(void){}
[22:29:43] <Badaboom> quxy: remember this,, main void main isnt calling anything into it whereas int is
[22:30:16] <quxy> Badaboom: not sure I understand, could you elaborate?
[22:31:08] <Badaboom> quxy: if you planning on calling a function into the main cycle youll need int main void
[22:31:29] <Badaboom> but im no expert,, just what ive learned
[22:31:53] <jadew> it is silly
[22:32:04] <Badaboom> yep
[22:32:07] <jadew> the reason gcc expects it, is because it's part of the standard
[22:32:41] <jadew> at least that's what I know (never really read the standard)
[22:32:42] <quxy> jadew: yeah, that's what google tells me
[22:33:12] <Badaboom> quxy: think of it as a sort of lockout from what ive read
[22:33:25] <jadew> lockout?
[22:33:49] <Badaboom> it will not call functions in main void main
[22:34:36] <Badaboom> if youve set up a function like if and then then then try to call it it wont respond
[22:34:47] <Badaboom> so a button press for example
[22:34:48] <jadew> that's not true
[22:34:52] <Badaboom> no?
[22:35:00] <jadew> nope
[22:35:04] <Badaboom> ohok
[22:35:07] <Badaboom> see:)
[22:35:16] <jadew> int main() comes from the fact that regular programs have to return a value to the OS
[22:35:26] <jadew> normally 0 being success
[22:35:37] <jadew> any other value being considered an error
[22:35:49] <Badaboom> ahhh
[22:36:00] <jadew> if you say void main() in a regular program, the compiled program will still return a value, because the compiler knows to return one
[22:36:12] <jadew> now this thing made its way into the standard
[22:36:16] <Badaboom> quxy: see,, if you listen to me your avr might grab your dogs leg and..
[22:36:22] <jadew> and gcc tries to be as standard complient as possible
[22:36:36] <jadew> which is why, even tho you're not returning anything in an AVR program, it's still required
[22:36:45] <Badaboom> ahhh ok
[22:37:23] <Badaboom> jadew: if you ever leave this ch im screwed
[22:37:24] <quxy> Badaboom: hehe
[22:37:44] <jadew> heh
[22:38:06] <Badaboom> so say i int a function and call for it,, no errors?
[22:38:21] <quxy> jadew: thanks for the info. do you then declare int main() and then have a "return 0; // never reached" ?
[22:38:22] <jadew> well, with a function is different
[22:38:30] <jadew> quxy, yep
[22:38:44] <jadew> I suspect it gets trimmed out by avr-gcc tho
[22:39:21] <jadew> Badaboom, a function is a function if it returns something, otherwise it's a procedure
[22:39:33] <jadew> int whatever(); // function
[22:39:39] <jadew> void whatever(); // procedure
[22:39:45] <quxy> jadew: my issue with it is that anywhere there is a "//never reached" is silly, but oh well. standards are standards..
[22:39:53] <Badaboom> u know i have a pad rite here rite?
[22:41:00] <jadew> Badaboom, so it's normal to get an error if you're using a procedure in the context of a function
[22:41:14] <Badaboom> ahh ok
[22:41:20] <jadew> like x = callProcedure();
[22:44:06] <Badaboom> the funny thing with me is i understand more complicated things but miss broad stuff ferom time to time
[22:44:24] <jadew> quxy, yeah, it's not that big of an issue, but I agree, my first instinct when I wrote my first AVR program was to go with void main() since there was nothing on top of the device to return values to, so I figured it wouldn't need that
[22:45:16] <jadew> Badaboom, we all missunderstand things at times and live with the wrong idea in our heads for years
[22:45:35] <Badaboom> Thats a life lesson
[22:46:03] <Badaboom> My intent is to keep at it and get good tho
[22:46:03] <jadew> which is why I have a hard time tursting my preconceptions, you have to go over them from time to time
[22:46:45] <Badaboom> oh for example that datasheet on the init for the display was a little off
[22:47:01] <Badaboom> well from a powerup anyways
[22:47:27] <jadew> for a hd44780?
[22:47:40] <Badaboom> I guess like u said i try to deal in absolutes and sometimes its not always that way
[22:47:47] <Badaboom> no the max7219
[22:47:54] <jadew> ah
[22:48:02] <jadew> thought you used a LCD
[22:48:26] <Badaboom> thats a 7seg driver
[22:48:27] <jadew> Badaboom, you should get a logic analyzer
[22:48:32] <jadew> yeah, I remember
[22:48:54] <Badaboom> well, i have access to one but not my own,, arent they $$?
[22:49:35] <jadew> well, you can get one for anything from $10 to $300 - hobby level
[22:49:51] <Badaboom> oh wow,, i was thinking 2k min
[22:50:02] <jadew> nah
[22:50:06] <Badaboom> lets say moderate
[22:51:04] <jadew> the comercial ones I know: http://www.usbee.com/
[22:51:17] <jadew> they have quite a big range of analyzers, pretty expensive tho
[22:51:48] <jadew> these seem to attract a lot of people: http://www.saleae.com/
[22:52:05] <jadew> now, for both of these companies there are $10 clones
[22:53:11] <jadew> then there's the opensource ones: http://dangerousprototypes.com/docs/Open_Bench_Logic_Sniffer
[22:53:32] <jadew> http://dangerousprototypes.com/docs/Logic_Shrimp_logic_analyzer
[22:54:04] <Badaboom> which would get the job done
[22:54:09] <Badaboom> i take it
[22:54:21] <Badaboom> but limited
[22:54:34] <jadew> the logic shrimp isn't really a good choice tho, because the $10 clones do the same thing, only that they send the data directly over USB, so no buffer, more sampling, same/better speed
[22:54:56] <Badaboom> so if you had to choose?
[22:55:04] <jadew> well, I already chose :P
[22:55:18] <Badaboom> usbee
[22:55:36] <jadew> I went for the open bench logic sniffer, but the other choices are good too
[22:55:47] <Badaboom> rgr
[22:56:14] <jadew> however, I wouldn't want to spend 100+ on an analyzer and buying a clone and then using the original software kinda sucks
[22:56:32] <jadew> but the difference is not only in price
[22:56:37] <Badaboom> well thats only $50 and sparks has it
[22:56:44] <jadew> yeah
[22:56:49] <jadew> but do your reading first
[22:56:53] <Badaboom> ok
[22:57:25] <Badaboom> I have to buy something else this week 1st tho so itll have to wait till next week:(
[22:57:25] <jadew> keep in mind that the OLS has internal buffer, so only 24k samples
[22:57:29] <jadew> but 200Mhz sampling speed
[22:57:43] <Badaboom> wow,,
[22:57:43] <jadew> while the other ones have 24Mhz sampling speed and virtually unlimited number of samples
[22:57:57] <jadew> except the logic shrimp
[22:58:13] <jadew> which has 20 Mhz sampling speed and 256k samples capacity
[22:58:23] <Badaboom> so speed vs sampling it seems
[22:58:23] <jadew> so I'd take that out of the equation
[22:58:30] <jadew> yeah
[22:58:32] <Badaboom> ahh
[22:59:18] <Badaboom> so ide say 24mhz unlimited
[22:59:28] <Badaboom> for now anyway
[23:00:13] <jadew> search on the forums for original vs clone, maybe you'll find differences or something
[23:00:23] <Badaboom> o
[23:00:25] <Badaboom> ok
[23:00:43] <jadew> altho, I think there's not much different in them, they use a $3 chip that does everything
[23:00:45] <Badaboom> I have to buy a MKII this week
[23:01:49] <jadew> what are you currently using?
[23:02:01] <Badaboom> lmao,, you would laugh your ass off
[23:02:16] <Badaboom> a very old bit banger
[23:02:40] <jadew> ah, they work...
[23:02:50] <Badaboom> yes but lately very iffy
[23:03:04] <Badaboom> and besides there cheap enough now
[23:03:15] <Badaboom> I built this a long time ago
[23:04:05] <jadew> at least you don't have to worry about the firmware :P
[23:04:41] <Badaboom> yeah,, tell me,, i tried to build ladayadas device,,, fml
[23:04:52] <jadew> oh, I did build that one
[23:04:54] <jadew> and still using it
[23:05:06] <jadew> as a matter of fact I have it on the desk right now
[23:05:40] <jadew> and I programmed it with a lpt one too :)
[23:05:46] <jadew> what went wrong?
[23:06:00] <Badaboom> so can i ask then,, i did something wrong,, are the resistors on the data lines 27ohm?
[23:06:11] <Badaboom> one sec,, ill photo both
[23:07:17] <jadew> yeah 27-68
[23:07:32] <Badaboom> k,, well it keeps giving an error
[23:07:46] <Badaboom> comes up as device damaged
[23:08:14] <jadew> are your zener diodes ok?
[23:09:09] <Badaboom> well,, heres the thing,, i didnt have any so i used to reg to bring it down
[23:09:13] <Badaboom> total of 4
[23:10:16] <jadew> what reg?
[23:10:37] <jadew> ah, you're running the chip from 3.3v?
[23:10:40] <Badaboom> theregulator?
[23:10:50] <Badaboom> yes
[23:10:56] <jadew> I see
[23:11:06] <Badaboom> so no reg
[23:14:54] <jadew> is the clock freq. correct?
[23:15:38] <jadew> did you wire the data lines to the right pins?
[23:15:52] <Badaboom> yes and 12mhz
[23:16:03] <Badaboom> load caps 22pf
[23:16:51] <jadew> did you compile it?
[23:17:55] <Badaboom> I used the hex
[23:18:04] <jadew> compile it
[23:18:07] <Badaboom> do i have to recompile on this mach
[23:18:09] <Badaboom> ahh ok
[23:18:10] <jadew> you might have better luck
[23:18:18] <jadew> I remember I compiled mine
[23:18:32] <Badaboom> yeah i thought it might a prob
[23:19:04] <Badaboom> http://tinypic.com/view.php?pic=4ikd42&s=5
[23:19:12] <Badaboom> so thats the rev 1 tho
[23:19:40] <Badaboom> i didnt have a buffer 74als125 i believe so i had to rev 1 it
[23:20:49] <Badaboom> the one to the right is my older one and i have a usb converter based off the usbtiny
[23:20:53] <jadew> you can use rev2 with out the buffer
[23:21:11] <Badaboom> well,, yes,, thats sort of what i did,, i took from both
[23:21:41] <Badaboom> added in the self prog jumper and made it isp
[23:22:02] <Badaboom> thats the left jumper,, the right is the power enable
[23:22:18] <jadew> didn't know it can self program
[23:22:39] <Badaboom> and yes,, i just ran the sck, miso mosi rst and + - right out and didnt follow the standard 6 pack
[23:23:07] <Badaboom> not really,, it just ties the reset line in so u can load it
[23:23:52] <jadew> reset has to go low and high several times durring programming
[23:24:22] <Badaboom> yeah,, its just a jumper to seperate the to lines basically
[23:24:45] <Badaboom> to the output is pin 16 and the rst line (1) is disabled
[23:25:36] <jadew> I'm off to bed, else the wife will punish me
[23:25:41] <jadew> see ya
[23:25:55] <Badaboom> lol,, ok take care man,, always good talking with ya
[23:39:38] * thetruthisoutthe steps out of an event horizon in midair waving hi