#avr | Logs for 2012-01-11

Back
[01:09:58] <Tugge> I have a broblem with I2C-bus. In my project I have 24LC1026 I2C-memory. Also in same bus I have DS1307 RTC. The RTC works fine so thats why I think that I2C driver is OK.
[01:11:21] <Tugge> The broblem is while I try to read that eeprom memory. Writing to memory works fine but when I start to read, I2C bus gets stuck
[01:12:17] <Tugge> When reading, after address byte SCL-line stays low.
[01:15:13] <Casper> I'ld suggest to first start to look at timing issues
[01:15:27] <Tugge> Oscilloscope shoes me that address bytes 8th bit is one (like it should be 'cause in reading mode) and 9th bit is also one (acknowledge). After that SCL-line stays in low and SDA stays high.
[01:15:56] <Tugge> What do you mean by timing? SCL-frequency or something else?
[01:17:19] <Tugge> Here is the memory-IC https://www.elfaelektroniikka.fi/elfa3~fi_fi/elfa/init.do?item=73-811-77&toc=0
[01:17:27] <Casper> if you do bit banging, be sure to set the pins in the right order with the right delays... if you do it hardware, be sure that your commands are in the right order, and that you do not read too early or something
[01:18:24] <Tugge> It's done via hardware.
[01:24:12] <OndraSter_> I AM SUCH AN IDIOT
[01:24:26] <OndraSter_> I take AVR Dragon, my dev breadboard and some serial to US converter
[01:24:27] <OndraSter_> serial to USB
[01:24:32] <OndraSter_> but I forget to take the cables :(
[01:24:36] <OndraSter_> THAT'S TWO HOURS WASTED :(
[01:25:49] <Tugge> Been there, done that.. I know the feelilng.
[01:34:05] <OndraSter_> It is 8:25
[01:34:10] <OndraSter_> I have free time till 10:05
[01:34:13] <OndraSter_> but I can't do anything :(
[01:57:55] <Tugge> For my I2C-broblem. When I debug step by step with JTAG it doesn't get stuck. Why is this?
[01:58:18] <Valen> some clock speed thing?
[02:01:36] <Casper> check the speed and timing
[02:01:44] <Casper> jtag might be slowing it down
[02:01:54] <Casper> well, does since you do step by step
[02:29:29] <inflex> ah, joys of static registers :D
[02:29:43] <inflex> (for I2C etc... as opposed to software things)
[02:30:44] <inflex> so, when are we going to get multiple qubit entanglement, so we can have data being sent directly into the CPU without needing a bus
[02:32:15] * Valen watches inflex quantum CPU intently
[02:32:34] <Valen> </physics joke>
[02:32:34] <inflex> Saw the movie "Source code" last night... sort of okay
[02:34:49] * Valen is off to screw around with modems
[03:02:06] <DanFrederiksen> inflex, yeah it's small but decent. (that's what she said)
[03:05:25] <tomatto_> hi
[03:31:04] <Bushman> lol@ Valen watching quantum CPU intently
[06:18:21] <amee2k> why the fuck are SMT PTC resettable fuses so expensive???
[06:28:58] <Tom_itx> http://search.digikey.com/us/en/products/SMD100F-2/SMD100FCT-ND/1045914
[06:29:05] <Tom_itx> what size?
[06:31:52] <Tom_itx> izua
[06:33:00] <karlp> jadew: once you've gotten used to full debugging support, it's hard to go back.
[06:33:26] <Tom_itx> is it a crutch though?
[06:34:25] <karlp> oh, looks like I'm a lot further behind in the back log than I thought I was....
[06:37:09] <karlp> Tom_itx: using C is a crutch if you want to use that argument
[06:37:15] <karlp> using flash instead of OTP is too.
[06:37:32] * inflex did't find PTCs for SMD too expensive
[06:39:06] <Tom_itx> itead said they just shipped
[06:41:06] <Tom_itx> 10 days in house is about double what GP doesn isn't it inflex?
[06:41:26] <Tom_itx> -n
[06:41:28] <inflex> hrmm... depends, sometimes FedEx botches the changeover here and 4 becomes 10
[06:41:49] <Tom_itx> that's not including post
[06:42:33] <inflex> well, GP usually is about 5 days I've found from submission to shipping, then 4~10 for shipping, so overall for me it's rarely been below 2 weeks from emailing -> receiving
[06:43:12] <Tom_itx> i guess you either pay in time or money
[06:44:05] <amee2k> Tom_itx: err, i realized that i was looking at *max* current specs instead of trip current
[06:45:27] <amee2k> when i started filtering for the right parameter the price went down from like 1.5EUR to 50 cent >_>
[06:45:52] <inflex> Tom_itx: actually, for 100+ units, GP works out about the same price, only difference though is you only get the 1 layer of silkscreen :(
[06:46:11] <Tom_itx> yeah
[06:46:19] <Tom_itx> i generally order 2 anyway
[06:48:53] <inflex> if I have to, I put stuff on the bottom copper layer
[06:48:57] <inflex> at least it doesn't rub off :D
[06:49:10] <Tom_itx> :)
[06:56:31] <amee2k> looking at an LM4040... is it normal that shunt regulators don't come with stability charts for capacitive loading anymore?
[07:31:54] <Tugge> I have solved the I2C problem, what I had earlier. The problem was in EEPROM IC. I did read the whole datasheet really carefully and I did find that you need to have 5 ms delay between each page/byte writing.
[07:32:41] <Tugge> When I did add that delay to my program, everything started to work nicely..
[07:34:08] <Tugge> I took me about 8 hours to figure that out.
[07:45:01] <ziph> Tugge: Are you sure there isn't a status flag you can check so that the EEPROM can tell you as soon as you can write?
[07:47:19] <Tugge> Nope, but I'll test tomorrow how fast I can write stuff to memory.
[07:47:21] <scuzzy> 5ms seems like a long time to have to wait
[07:48:11] <Tugge> It is really long time for 1 MB memorys.
[07:48:57] <Tugge> The datasheet says that "Write cycle time (page/byte) | Max 5 ms"
[07:49:35] <Tugge> So maybe that 5 ms delay is needed if you write full page to memory (128 bytes)
[07:58:22] <ziph> Tugge: What's the part?
[07:58:29] <ziph> (Part number)
[08:39:05] <amee2k> hmm does the dragon work for chips newer than the dragon's firmware too?
[08:39:18] <amee2k> or does it need explicit support for every part too like the jtagice
[08:45:51] <eatyourguitar> I know the stk500 is getting phased out by the stk600, I have no idea about the dragon
[08:46:22] <eatyourguitar> I would like to know, I'm buying a programmer today and the dragon is the most expensive of the 3 i looked at
[10:09:45] <Tugge> ziph: https://www.elfaelektroniikka.fi/elfa3~fi_fi/elfa/init.do?item=73-811-77&toc=0
[10:12:25] <ziph> Tugge: 7.0 Acknowledge Polling tells you how to wait for it to finish.
[10:12:43] <ziph> Tugge: On page 11.
[10:17:09] <Tugge> Huoh... What can we learn from this.. RTFM :D Thanks ziph. I can't understand, how I've missed it :D
[10:20:14] <OndraSter_> eatyourguitar, dragopn is the cheapest :/
[10:20:16] <OndraSter_> $49
[10:20:24] <OndraSter_> jtag ice 3 = $199
[10:20:37] <eatyourguitar> avrispmkII $33
[10:20:58] <eatyourguitar> ISP shield for arduino is even cheaper and I have an arduino
[10:21:11] <asteve> look at me, i have an arduino
[10:21:53] <eatyourguitar> are you trolling?
[10:22:14] <eatyourguitar> its just cheaper, how is dragon cheaper?
[10:23:48] <OndraSter_> but
[10:23:56] <OndraSter_> dragon is more than isp!
[10:24:18] <eatyourguitar> I know, it has parallel and rescue and supports multiple chips onboard
[10:24:31] <eatyourguitar> but I don't exactly need all that
[10:24:36] <OndraSter_> aaand JTAG debugging
[10:24:45] <OndraSter_> which is really useful
[10:25:41] <eatyourguitar> the only reason I want an AVRISPmkII over the usbtiny is that I want to compile and program from avrstudio 5. I don't think avrstudio 5 supports usbtiny
[10:26:17] <eatyourguitar> like I would still need to use two programs which I don't think I like
[10:26:41] <OndraSter_> Dragon is worth it
[10:26:51] <OndraSter_> if you want to develop a bit more
[10:26:56] <OndraSter_> debugging = required
[10:26:57] <OndraSter_> (at least for me)
[10:27:01] <eatyourguitar> ok then maybe I should just buy the dragon. its only $50
[10:27:05] <OndraSter_> ye
[10:27:14] <OndraSter_> it was $70 here with shipping and so on, from farnell
[10:27:27] <OndraSter_> I am off to the party
[10:27:28] <OndraSter_> bb
[10:27:36] <eatyourguitar> yeah its $51 here in the usa with shipping about $8
[10:27:49] <eatyourguitar> then the zif and some other stuff I need to diy
[10:28:19] <eatyourguitar> I saw someone made cards that do all the jumpers for different chips
[10:28:59] <eatyourguitar> so you leave the ZIF 40 in place and the card that has all female headers just snaps on to the dragon
[11:06:29] <OndraSter_> eatyourguitar, oh, so you want it JUST for downloading the code?
[11:06:35] <OndraSter_> like I said, I use it for debugging
[11:07:02] <OndraSter_> (at least during development, target device will be just flashed later on and main firmware downloaded through bootloader after that, to verify it)
[11:07:26] <eatyourguitar> yeah pretty much. I am also disabling reset so that makes me think that I will regret buying avrispMKII
[11:22:11] <amee2k> how precise are the inregrated 1.1V ADC references in practice?
[11:22:37] <amee2k> the datasheet only specifies 1.0..1.2V for my tinyX4, which is kinda shitty (10% only)
[11:25:46] <eatyourguitar> can you use external referance for analog or is that something else?
[11:26:09] <amee2k> i'm scratching my head over whether i could avoid an external reference here
[11:26:52] <eatyourguitar> you need a method of testing it to get the real tolerance. how accurate is your meter or scope
[11:26:56] <amee2k> even the most shitty voltage reference IC i can find has better tolerances than 10%, but it takes up board space, money and an extra pin
[11:27:09] <eatyourguitar> oh wait I have the perfect thing
[11:27:28] <amee2k> my meter is a 10 years old 5$ dmm, so it probably isn't
[11:27:45] <amee2k> my scope isn't calibrated so not sure
[11:28:20] <eatyourguitar> http://www.ti.com/lit/ds/symlink/lm4040d50.pdf
[11:28:31] <amee2k> yeah, i've seen these
[11:28:53] <amee2k> lower power but twice the price of a tl431 iirc
[11:28:55] <eatyourguitar> every zener adds noise but the specs look decent on this
[11:29:02] <eatyourguitar> I have one but have not used it
[11:29:25] <amee2k> these ICs don't have just a zener inside. some kind of bandgap reference and amplifier with open collector output
[11:29:25] <eatyourguitar> I plan to use it for 18 buttons pulled high
[11:52:30] <Tom_itx> yo from Norway!
[11:53:34] <eatyourguitar> hello
[11:53:47] <eatyourguitar> its usually pretty slow in here
[11:54:08] <Steffanx> From Norway Tom_itx ?!
[11:54:14] <Steffanx> You are in Norway too?
[11:54:42] <Tom_itx> no but dean is
[11:55:07] <Steffanx> So, Yo to Norway :P
[11:55:41] <abcminiuser> Yahoyoy
[11:55:52] <abcminiuser> Everyone, quit emailing AVR technical support :P
[11:57:11] <Steffanx> Why?!
[11:57:12] <keenerd> "Dear Atmel, please add DAC. K thx." Lots of stuff like that?
[11:58:55] <karlp> eatyourguitar: iirc, it's 10% initial, but very stable per part,
[11:59:05] <karlp> so if you have a calibration routine, it can be just fine.
[11:59:15] <karlp> or am I thinking of the temp sensor?
[11:59:19] * karlp mutters in the corner
[12:02:38] <abcminiuser> Today's was "this code doesn't work", followed by about 6 lines of code
[12:02:45] <abcminiuser> No device name, board, or problem description
[12:02:54] <abcminiuser> At least put in the name of the chip you're using :S
[12:10:43] <eatyourguitar> karlp, in response to what? I'm not following what this is about
[12:11:47] <karlp> the 1.1v reference
[12:14:28] <eatyourguitar> ok so the device needs to do a self test at boot to find where the reference is at
[12:14:46] <eatyourguitar> that makes more sense
[12:14:59] <eatyourguitar> the real question is temperature stability
[12:16:20] <specing> abcminiuser: you should have a webpage where you posted all these mails as examples of what not to send
[12:17:32] <abcminiuser> specing, my training yesterday says that would be unethical :S
[12:17:41] <abcminiuser> But I could post a "what not to do" generic post
[12:18:59] <eatyourguitar> you can also modify the funny post so it is not verbatim
[12:19:07] <specing> yes
[12:19:20] <specing> just remove the from line and post!
[12:19:23] <keenerd> Link to How to Ask Smart Questions ;-)
[12:19:49] <eatyourguitar> "why does this cheese sammich not light LED. please explain. awaitingyour response"
[12:21:02] <keenerd> http://www.seattlerobotics.org/encoder/apr98/breadbrd.html
[12:22:56] <Kevin`> eatyourguitar: you need to burn it
[12:23:46] <eatyourguitar> kevin, this is just a joke. making examples of what not to ask
[12:24:41] <Kevin`> is there a multithreaded gzip?
[12:27:08] <karlp> eatyourguitar: they also have onboard temp sensors, which agian, have terrible off the shelf accuracy, but are defined to have pretty linear behaviour with time, so you can do it all in software if you want :)
[12:28:13] <eatyourguitar> do you just do a test on a sample that covers the whole batch?
[12:28:24] <eatyourguitar> then calibrate in firmware?
[12:29:32] <karlp> I suspect it's per part, not per batch
[12:29:44] <karlp> but, I don't have enough parts lying around to verify that :)
[12:32:11] <eatyourguitar> that seems like it would only be a real solution if you have time to do a one off project
[12:32:47] <eatyourguitar> and even after you mod the firmware to compensate you need to test again
[12:33:10] <eatyourguitar> so the chip is in and out of your target device and your programmer
[12:33:54] <eatyourguitar> and if it is more accurate over time that just means more time to stand there with a heat gun and a temp sensor.
[12:34:25] <Kevin`> eatyourguitar: you wouldn't mod the firmware, you'd write a calibration value to the eeprom
[12:34:47] <eatyourguitar> oh ok, I never used eeproms
[12:35:12] <karlp> you should :)
[12:35:15] <eatyourguitar> I know you can buy eeproms for drum machines but I'm new to AVR programming
[12:35:17] <karlp> eeproms are awesome for this sort of thing
[12:35:24] <eatyourguitar> cheap too
[12:35:28] <karlp> and almost all avrs have some eeprom onboard for exactly this thing
[12:35:33] <Kevin`> do you need to measure multiple points? it might be enough to just measure the temperature of the chip with both the internal sensor and an external sensor
[12:35:34] <karlp> so yet another part you don't need to place
[12:35:46] <Kevin`> eatyourguitar: there's an eeprom section built into the chip
[12:36:08] <eatyourguitar> so you program the eeprom with what?
[12:36:27] <Kevin`> eatyourguitar: either the onboard software, or the programming interface
[12:36:49] <eatyourguitar> so ISP?
[12:36:54] <karlp> or from the firmware
[12:37:04] <Kevin`> yeah isp can do it
[12:37:08] <karlp> avrlibc even has convenience routines to do it
[12:38:36] <eatyourguitar> but my whole point is that you need to test things with a temperature sensor. then once you get your answer, you need to program the eeprom
[12:38:55] <eatyourguitar> the firmware could do it if there was a socket for a 2 wire temp sensor
[12:39:17] <karlp> depends what else is on board, yes.
[12:39:21] <karlp> but ISP can do it too.
[12:39:37] <Kevin`> eatyourguitar: true, it could. I was more thinking of an infared thermometer pointed at the board, connected to a computer that does the calculation and programs the eeprom
[12:39:40] <eatyourguitar> so you do some kind of auto calibration at the factory and just disconnect the temp sensor after first boot
[12:40:55] <eatyourguitar> yeah that sounds pretty sweet but you would need a way to interface your infrared gun to the programmer software
[12:41:40] <Kevin`> there's a small amount of programming involved either way
[12:42:12] <eatyourguitar> you can have 1000 boards in a temp controlled room that just goes up and down. then you remove the re-usable sensors for the next batch
[12:43:05] <Kevin`> I wonder if you could do it while it's still warm from soldering, then when it's cold
[12:43:26] <Kevin`> if you need multiple data points
[12:44:27] <eatyourguitar> or you could just put them right into a hot room after production and remove the temp sensors right before inspection and packing
[12:45:26] <eatyourguitar> obviously packaging happens at room temp so there are your two points
[12:46:46] <jadew> karlp, this is a pretty late reply, but yeah, I could see how debugging would be really useful
[12:56:10] <jadew> what options do I have in protecting a controller from inserting it the other way around? (which would mean switching gnd with vcc)
[12:56:35] <jadew> how can I detect and reroute current away from the controller?
[12:58:22] <dofidum> jadew, i missed half of the conversation but can't you just use a boxed header?
[12:58:39] <jadew> for the controller?
[12:58:51] <jadew> it doesn't have a key\
[12:59:15] <jadew> I'm not talking about the power supply / programming cable
[13:00:32] <jadew> on t2313 for example, gnd and vcc are in opposite sides, so if you turn the controller around, the vcc pin lands in the gnd socket and the other way around
[13:00:37] <eatyourguitar> you can put a diode accross Vcc and ground. when reverse polarity is applied, it will go through the diode instead of your IC
[13:00:47] <Kevin`> jadew: a zener diode specified for your supply voltage (or slightly above) placed on the power supply lines would do it
[13:01:04] <eatyourguitar> also shorting your Vcc so maybe damging your supply
[13:01:10] <jadew> I see
[13:01:26] <jadew> well, I'm trying to drain some of the power like that
[13:01:31] <jadew> trough a led and a resistor
[13:01:35] <eatyourguitar> you dont even need a zener
[13:01:39] <jadew> but I'm sure not all of it will drain
[13:01:47] <Kevin`> correct, but a zener will protect against overvoltage at the same time
[13:01:52] <eatyourguitar> 0.7vf will do it
[13:01:59] <RikusW> jadew: the protection diodes will all conduct current....
[13:02:21] <RikusW> so you'll have 1.4v accross gnd->vcc
[13:02:51] <Kevin`> instead of "just" conducting at -0.7v, it would conduct at both -0.7v and 5.5v or whatever
[13:03:22] <eatyourguitar> 5.5v becomes 5v there
[13:03:45] <jadew> I'm a bit lost, you mean that they would conduct the other way too?
[13:03:58] <eatyourguitar> you could just TVS the 5v for overvoltage and 1.4vf for reverse
[13:04:09] <eatyourguitar> two diodes
[13:04:19] <RikusW> the builtin protection diodes of the avr IO pins...
[13:04:56] <RikusW> when vcc and gnd is the wrong way round all of them will conduct
[13:05:02] <RikusW> causing a short
[13:05:09] <eatyourguitar> I don't think I would use a zener in place of a TVS when a TVS is what I need. its not inline with the Vcc so I dont use zener herer
[13:05:23] <RikusW> you need current limiting
[13:05:34] <RikusW> to say max 20mA
[13:05:55] <eatyourguitar> resistor inline
[13:05:59] <jadew> eatyourguitar, that's what I'm using
[13:06:27] <eatyourguitar> which one?
[13:06:34] <RikusW> what value ?
[13:06:55] <jadew> I don't know what I have around, but I tried them earlier today and they seem to do the job
[13:07:01] <jadew> PL 5something
[13:07:04] <jadew> or something like that
[14:18:15] <syrou> hi
[14:18:45] <syrou> is it necessary to put a pullup resistor between vcc a reset when programming with a avrisp mkii device?
[14:45:53] <Xeli> Hey I am a bit confused and perhaps one of you could clarify a few things for me... I've created a circuit like this one: http://goo.gl/ybQKJ If I want to program/flash stuff on the atmega8, what else do I need?
[14:45:59] <Xeli> an avr programmer?
[14:46:23] <Xeli> Because it doesn't seem to work with via usb
[14:49:14] <Kevin`> Xeli: an atmega8 doesn't have a hardware interface, and also doesn't by default have a bootloader, you need to use the actual programming interface at least once to upload either a bootloader or your software
[14:49:22] <Kevin`> Xeli: doesn't have a hardware usb interface*
[14:49:57] <ben1066> what uses less power, avr or arm?
[14:50:08] <karlp> define less :)
[14:50:24] <Steffanx> Lower voltage and less current :)
[14:50:28] <ben1066> that
[14:50:29] <karlp> define avr and define arm :)
[14:50:35] <Kevin`> Xeli: aren't those leds on d- and d+ liable to explode from the large current available from 3.3v across them? not sure on that, but it seems strange to have them
[14:50:37] <ben1066> well, less voltage, more current
[14:50:41] <ben1066> avr, atmega/attiny
[14:50:48] <karlp> hehe
[14:50:53] <ben1066> arm low end cortex m3, lpc13** for eg
[14:51:08] <Kevin`> ben1066: it's going to depend on the individual devices, but probably avr
[14:51:16] <karlp> depends on your apps duty cycle really.
[14:51:19] <Xeli> Kevin`: so I would need an avr programmer in combination with avrdude/studio?
[14:51:43] <karlp> the stm32L and the lowest power M0s from nxp are all still a little higher than a picopower avr,
[14:51:50] <ben1066> read 1 ds18b20 or w/e, 1 mpx4115, 1 humidity sensor, resistive, send via rfm12b
[14:51:55] <karlp> but they can arguably do a lot more while they're running,
[14:51:55] <Xeli> Kevin`: if you say so.. :P it's my first project with electronics so I'm still learning ;)
[14:52:01] <Kevin`> Xeli: it looks like you have connector "sv1" specifically for programming it
[14:52:13] <Xeli> hmm yes
[14:52:29] <Kevin`> Xeli: in any case, you need an avr programmer of some sort to use that, at least once
[14:52:36] <karlp> if you're intending to do any listening with the rfm12b, that's going to be a far bigger factor than arm vs avr
[14:52:38] <ben1066> you can use an arguino
[14:52:43] <Kevin`> Xeli: if you want to, later on, you can upload software over usb using a bootloader
[14:52:48] <ben1066> karlp: none at all, its just sending
[14:53:02] <Xeli> Kevin`: ah, so the programmer is only needed for the bootloader?
[14:53:10] <karlp> bare numbers, avr is still lower.
[14:53:20] <ben1066> Xeli: if you haev a programmer the bootloader is unnessecary
[14:53:23] <karlp> but not by much.
[14:53:32] <Kevin`> Xeli: right. if you have a bootloader. you will also need to set the fuse settings with it, so it runs from the 12mhz crystal you have
[14:53:42] <ben1066> karlp: which would I be better using
[14:53:52] <karlp> do you want to use through hole?
[14:53:53] <ben1066> I want to start using arm, but i also like avrs cause i know what im doing
[14:53:57] <karlp> or is tqfp48 ok?
[14:53:57] <Xeli> Well I don't have a programmer but do you suggest I get one, rather than buy one? I mean is it useful to have one around?
[14:54:03] <ben1066> not such a preferance, i plan on getting some pcbs made
[14:54:06] <Xeli> erm rather than borrow one*
[14:54:12] <Kevin`> Xeli: it's useful to have one
[14:54:19] <ben1066> Xeli: I reccomend the avr isp mk2
[14:54:34] <ben1066> tomitx also does a good clone
[14:54:41] <Kevin`> Xeli: if you are going to buy one of the official devices, I would get an 'avr dragon'
[14:54:44] <karlp> I'm planning on going with arm for just about anything new,
[14:54:51] <ben1066> karlp: yea, ill use a hotplate for reflow
[14:55:07] <ben1066> Id like to use either nxp or atmel arms
[14:55:19] <karlp> can't say I've really looked at atmel's.
[14:55:29] <karlp> I've only used the STM32 series, and had a look at NXP.
[14:55:36] <ben1066> In general I just prefer their tools, and feature set, atmel look really interesting with their new cortex m4s
[14:55:53] <karlp> most of the cortex's are pretty similar,
[14:55:57] <ben1066> 30ma at 100mhz
[14:55:59] <karlp> price and availability are useful.
[14:56:14] <ben1066> farnell do well :P
[14:56:24] <Xeli> Kevin`: well at this point budget is a big factor, but thanks for the suggestions I'll have a look around :)
[14:56:24] <ben1066> although atmel are beter for samples?
[14:56:34] <ben1066> Xeli: where in the world do you live?
[14:56:42] <Xeli> netherlands
[14:56:55] <Kevin`> Xeli: you can program it with a parallel port or something if you are really desperate
[14:57:08] <Kevin`> and/or you want it done "quickly" without buying something
[14:57:10] <ben1066> http://nl.farnell.com/atmel/atavrisp2/programmer-avr-mcu-isp/dp/1135517
[14:57:29] <ben1066> thats pretty much the standard tool
[14:57:31] <Xeli> well im not desperate, but im only without parallel port haha (new motherboards... :( )
[14:57:57] <Xeli> ben1066: cool, thanks
[14:59:18] <ben1066> karlp: the issue i have is is I aim to have it solar powerd, so the less power the better
[14:59:51] <karlp> sleep mode, 3V, atiny84: 4uA, stm32L: ~20uA
[15:00:20] <karlp> sorry, that was only sleep,
[15:00:40] <karlp> for the power down as much as possible, the 32L is around 5-10uA
[15:01:22] <ben1066> Hm, most panels supply 100ma or so at 6v
[15:01:26] <ben1066> at least, thats pretty standard
[15:01:36] <karlp> 32L can also run (slowly, 128kHz) on only 50uA or so.
[15:01:39] <ben1066> if I use that to charge some batteries, it could work I guess
[15:01:42] <karlp> avr is stop or go only.
[15:01:53] <ben1066> cant avr run on a really low clock?
[15:02:02] <Kevin`> karlp: what's the 84 power-down mode
[15:02:04] <karlp> yeah, but then it has to run on that all the time.
[15:02:19] <ben1066> so the 32l actually sounds beter :P
[15:02:19] <keenerd> I've done a lot of solar power stuff and the cpu has never been the biggest power drain.
[15:02:30] <karlp> keenerd: I'd tend to agree,
[15:02:42] <karlp> I don't think arm vs avr is going to be the big power drain decider.
[15:02:45] <Kevin`> ben1066: there's no reason to limit the cpu clock speed, since it will only be running while you are processing something
[15:02:56] <karlp> Kevin`: what do you mean?
[15:03:05] <Kevin`> it'll use about the same amount of power either way
[15:03:09] <Kevin`> just in a short time vs a longer time
[15:03:13] <karlp> (on the 84 power down mode question?)
[15:03:20] <Kevin`> karlp: there's more than one sleep mode
[15:03:24] <keenerd> ben1066: Many AVRs have a built in 128KHz clock for low power running.
[15:03:32] <ben1066> barometric sensor, 7ma
[15:03:37] <karlp> that number was power-down mode.
[15:03:59] <karlp> 7ma?! that's huge!
[15:04:20] <Kevin`> ben1066: you'll be completely removing power from your sensor and from the rfm12 (if it has significant standby current) while they aren't in use, right?
[15:04:39] <ben1066> temp 1.5ma....
[15:04:49] <ben1066> Kevin`: Yea
[15:05:07] <ben1066> Barometric sensors are rediculous like that :P
[15:05:38] * Tom_itx tapes a barometric sensor to his head and watches it explode
[15:06:05] <keenerd> If quiesence currents are not good enough, I put a mosfet on the power rail. :-)
[15:06:11] <ben1066> fancy new sensors can do 1ma peak
[15:06:18] <Tom_itx> gawd i feel crappy today
[15:06:18] <ben1066> but they cost more...and are less avaliable
[15:06:41] <Kevin`> ben1066: also, be sure to either disable all of the microcontroller's cmos inputs and/or tie them low or high with the pullup resistors
[15:06:47] <ben1066> Ive got an mpx4115, its so old, it used to be made by motorola :P
[15:06:49] <Kevin`> ben1066: the ones that aren't in use, that is
[15:08:43] <Tom_itx> cool, got new stencils today
[15:10:26] <Tom_itx> he must have done a lense upgrade or somethign
[15:10:36] <Tom_itx> these look sharper than previous ones
[15:11:16] <ben1066> where do you get stencils made/
[15:13:03] <Tom_itx> OHararp
[15:13:56] <ben1066> eek, bit pricy, stencils always are expensive :S
[15:14:44] <Tom_itx> you can submit many designs
[15:14:52] <Tom_itx> just so they fit a sheet of paper
[15:14:56] <Tom_itx> with borders
[15:25:10] <Valen> stencils are easy http://www.vapourforge.com/jake/temp/IMAG0134.jpg
[15:25:38] <Valen> if you have the right source material http://www.vapourforge.com/jake/temp/IMAG0136.jpg ;->
[15:26:01] <Tom_itx> laser?
[15:26:08] <Tom_itx> the edges sure look rough
[15:26:13] <Tom_itx> maybe it's just the pic
[15:26:52] <Valen> mill
[15:27:03] <Valen> its mostly the camera
[15:27:20] <Valen> i havent deburred that one either most of that crud just brushes off
[15:38:54] <ben1066> http://uk.farnell.com/freescale-semiconductor/mpxh6115a6u/ic-sensor-abs-press-16-7psi/dp/1457169 think ill switch to that in my final pcb
[15:39:04] <ben1066> a newer version, but its so similar, even the equation is the same
[15:39:04] <ben1066> :P
[15:44:29] <ben1066> is there a way to accurately divide a voltage?
[15:44:42] <ben1066> voltage divider
[15:44:45] <^_> metal film 1% resistors
[15:44:52] <ben1066> I know, but that is only as good as the resistors...
[15:44:56] <ben1066> 1% isnt good enough
[15:45:03] <^_> then get something better
[15:45:16] <karlp> how many do you want to make?
[15:45:20] <ben1066> the part im using is 1.5%
[15:45:29] <karlp> you can hand sort parts...
[15:45:41] <ben1066> you COULD do that....
[15:46:03] <mrfrenzy> there are .1% resistors
[15:46:05] <eatyourguitar> better to just buy something better than 1%
[15:46:15] <eatyourguitar> yeah that
[15:46:19] <ben1066> Hm ok, im just thinking
[15:46:44] <ben1066> since the only thing that needs 5v is the pressure sensor, and thats analogue, if I divide its voltage from 5 to 2.5v
[15:46:50] <ben1066> then I can run everything else on 3.3v
[15:47:04] <ben1066> and that would be lower power too no/
[15:47:16] <ben1066> im wasting much less power through the smps boost
[15:48:24] <eatyourguitar> if you want to save battery life, voltage is nothing without current
[15:48:55] <eatyourguitar> the real question is how does this lower voltage affect current consumption
[15:49:35] <ben1066> true, however, i can use a 3.6v battery, so most of my parts do not require the smps boost converter, only the pressure sensor does, so by isolating that, surely I waste less power?
[15:50:48] <eatyourguitar> if you want to know how much current the whole thing uses there are a few ways. on paper, just add everything up. in reality you should test your current consumption if it matters to you.
[15:51:23] <eatyourguitar> batteries are rated in current hours not v
[15:52:14] <eatyourguitar> obviously they are rated for v but that does not tell you the total amount of energy in the charged battery
[15:52:58] <ben1066> My point is
[15:53:09] <ben1066> SMPS boost converters arent 100% effecient
[15:53:22] <ben1066> so surely by drawing less power through one, I increase effiency
[15:53:45] <eatyourguitar> no always
[15:53:48] <mrfrenzy> resistive voltage dividers are less efficient than smps
[15:53:50] <eatyourguitar> not always
[15:53:56] <ben1066> its a voltage
[15:54:17] <mrfrenzy> what do you need a voltage for if you're not going to use any current?
[15:54:17] <ben1066> from a sensor
[15:54:19] <ben1066> not a supply
[15:54:32] <ben1066> its going straight to an adc
[15:54:44] <eatyourguitar> I google smps and it looks like a switching dc to dc converter
[15:54:52] <Kevin`> running directly from the battery is something you should do
[15:54:53] <ben1066> correct
[15:54:55] <mrfrenzy> does the pressure sensor not require supply voltage?
[15:55:01] <ben1066> Yes, of 5v
[15:55:02] <Kevin`> since you can turn off any power regulator
[15:55:12] <eatyourguitar> you should look at your minimum power consumption on the datasheet
[15:55:12] <ben1066> I was going to divide the output
[15:55:13] <ben1066> to the avr
[15:55:20] <eatyourguitar> if you built it then run it through a sim
[15:55:39] <ben1066> The sensor is very very fussy with voltage, its something along the lines of 4.8-5.4
[15:55:59] <Kevin`> a microcontroller on standby will draw a lot less than the minimum efficient level for using an smps
[15:56:08] <eatyourguitar> thats not so fussy if it will always be connected to a 5v regulator
[15:56:19] <mrfrenzy> you will have to do calculations of total power usage for all your scenarios
[15:56:23] <mrfrenzy> including all losses
[15:56:35] <mrfrenzy> can't you use a two cell battery?
[15:56:50] <keenerd> Kevin`: Using a linear regulator and running your chip on the lowest voltage possible is more effecient than hooking straight to the battery.
[15:56:56] <ben1066> the thing is, my battery will be 3.6v lithium polymer, the solarpanel maybe 4v-6v, at some point im going to require at least one converter
[15:57:06] <Kevin`> using a two cell battery would mean you need a regulator for the main power supply that's always on
[15:57:11] <ben1066> however i figured reducing the current through said converter would improve effeciency
[15:57:28] <ben1066> so solar-battery-avr
[15:57:35] <eatyourguitar> first of all, I try to never use charge pumps
[15:57:36] <Kevin`> keenerd: not if the chip's clock isn't running
[15:57:36] <ben1066> battery-smps-pressure sensor
[15:57:58] <eatyourguitar> was the battery salvaged for free?
[15:58:04] <eatyourguitar> why would you spec that?
[15:58:06] <ben1066> No, itll be bought for the purpose
[15:58:06] <Kevin`> keenerd: also, I kind of doubt that, by the nature of a linear regulator, it should be at best the same
[15:58:23] <keenerd> Kevin`: Nope.
[15:58:26] <ben1066> id spec a lithium polymer battery as its light weight, small, high power density
[15:58:37] <eatyourguitar> then buy a 5.5v battery and run everything through a regulator
[15:58:49] <ben1066> a standard linear regulator wastes LOADS of power
[15:58:54] <ben1066> something I cannot afford to do
[15:59:17] <karlp> not really...
[15:59:30] <ben1066> they are hardly effecient...
[15:59:30] <karlp> htey don't have to,
[15:59:34] <eatyourguitar> well what would be the total current consumption if you ran everything at 5v?
[15:59:37] <karlp> depends how much votlage your're tossing out?
[15:59:44] <eatyourguitar> you can get a regulator that wastes less
[15:59:44] <keenerd> ben1066: Linear regulator can *save* loads of power in some cases.
[15:59:52] <karlp> running it all at 5V is wayyyy worse than a regulator down to 3v for the non 5v parts
[15:59:52] <eatyourguitar> or a sensor that does 3.3v
[16:00:22] <ben1066> eatyourguitar: find a pressure sensor at 3.3v, that doesnt cost the earth, that does 15kpa-115kpa
[16:00:27] <ben1066> they dont exist from what I can tell
[16:00:36] <Kevin`> eatyourguitar: iirc the idle current was something <10ua while it's waiting for something to happen
[16:01:07] <eatyourguitar> ok then whats the max current.
[16:01:16] <keenerd> ben1066: Lets say you have a chip that does 1mA at 1.5V or 4mA at 4.5V. Use a linear regulator and you are using 1mA at 4.5V. 4x battery life, even though 2/3rd the power is wasted.
[16:01:19] <ben1066> the sensor ive picked out uses 6ma
[16:01:22] <eatyourguitar> more usefull in spec for the regulator
[16:01:55] <ben1066> its a slightly modernised version of the sensor i already have
[16:02:05] <Kevin`> regulators draw current even with no output. linear regulators less than smps of course, but nothing less than linear
[16:02:06] <keenerd> *3ma at 4.5V. Point still stands :-)
[16:02:10] <ben1066> ` MPXH6115A6U
[16:02:29] <Kevin`> that is, using nothing uses less power than using a linear one
[16:02:41] <ben1066> Kevin`: Ill turn the supply off whenever im not reading the pressure
[16:03:03] <Kevin`> you can't turn off the cpu's supply/regulator, if you have one
[16:03:24] <ben1066> i know that, I meant the regulator for the pressure sensor, if I take the step up approach
[16:03:37] <ben1066> whats the effeciency of a step up vs step down
[16:04:08] <karlp> depends :)
[16:04:08] <keenerd> Much better than a sepic that does both :-)
[16:04:19] <Kevin`> I would expect a charge pump to be rather efficient for low power, but look at specifics
[16:04:24] <eatyourguitar> it all depends, I think he made it pretty clear that 5v at low current is still a viable option
[16:05:07] <karlp> 5V is instant fail for low power as far as I'm concerned :)
[16:05:32] <eatyourguitar> then its all about that sensor
[16:05:52] <keenerd> I just got a WikiReader. It gets 90 hours off two AAA batteries. And uses a 3.3V boost. Can't wait to tear it down and see how.
[16:06:31] <karlp> by mostly being off :)
[16:06:50] <karlp> eink doesn't need to be powered to remain visible right?
[16:07:01] <Valen> karlp: yeah
[16:07:07] <Valen> 's the point of it
[16:07:34] <eatyourguitar> it only uses power on button press, wifi use, or screen refresh
[16:07:41] <Kevin`> what type of display does the wikireader use? it looks like a reflective lcd, but I can't see something that specifically states that
[16:07:57] <eatyourguitar> I'm thinking of the kindle, never seen the wiki
[16:07:58] <Valen> probably transflective if its a reader
[16:08:06] <Valen> and lcd
[16:08:30] <Kevin`> lcd requires power continuously, but it's a very low amount if there's no backlight in use
[16:08:39] <Valen> could be amoled
[16:08:47] <Valen> they probably use less power
[16:09:01] <Kevin`> amoled would use a lot more power. found something that says it's lcd though
[16:09:22] <Valen> amoled would use less power than lcd though i'd imagine
[16:09:37] <Kevin`> Valen: have you ever seen a solar powered calculator?
[16:09:55] <Valen> they have no backlight though reflective screen only
[16:10:02] <Valen> most lcd's aren't that
[16:10:14] <keenerd> karlp: No, 90 hours is the on time.
[16:10:17] <Kevin`> it looks like the wikireader IS using a reflective one though
[16:10:21] <Valen> url?
[16:10:32] <keenerd> karlp: Reflective 1 bit monochrome.
[16:10:44] <Kevin`> Valen: http://upload.wikimedia.org/wikipedia/commons/8/82/WikiReader_DonnerParty.jpg
[16:11:07] <keenerd> It is a really nice piece of hardware for hacking as far as I can tell.
[16:11:23] <karlp> keenerd: what I mean is, even when it's "on" it's msotly off
[16:11:42] <keenerd> Nothing is locked, they give sources and an SDK.
[16:12:02] <Valen> i wonder if there is a wiki app for android
[16:12:04] <Valen> offline style
[16:12:11] <Kevin`> is that using any sort of rtos or is it just the single application?
[16:12:12] <keenerd> I can't even buy plain bitmap LCDs for as cheap as the wikireader :-)
[16:12:21] <Kevin`> Valen: there is
[16:12:23] <Valen> is there a video of it in use?
[16:13:36] <Valen> if it scrolls "iphone style" then it must be lcd
[16:13:48] <karlp> huh?
[16:13:51] <Valen> if it "pages" then it could be anything
[16:13:54] <karlp> what is "iphone style" ?
[16:13:57] <Valen> smoothly
[16:14:10] <keenerd> Valen: I am holding a unit in my hand. Do you have questions about it for me?
[16:14:11] <Valen> refresh on eink display is about 1 second or so
[16:14:19] <karlp> Valen: you mean, "does it have pixels" ?
[16:14:26] <Valen> uhh no
[16:14:46] <Valen> "does it scroll smoothly" != "does it have pixels"
[16:14:56] <karlp> I'm not sure I follow how scrolling rather than pages is "iphone style" nor why it implies lcd?
[16:14:58] <jadew> you know when you switch a product with another one and you find that the new one does something feels like a really good upgrade? I'd like to know what you guys found really useful when you switched development boards, trying to make one with everything :P
[16:15:14] <Kevin`> it looks like pretty obviously NOT e-paper. especially since i've seen specs now that say lcd
[16:15:18] <jadew> *that feels
[16:15:41] <Valen> http://www.youtube.com/watch?v=d3n_MTuOINY eink display flipping pages
[16:15:47] <Valen> notice how it works
[16:15:52] <Valen> it blanks the whole screen
[16:15:58] <Valen> then puts the new screen on i
[16:15:59] <Valen> t
[16:16:21] <Kevin`> e-ink doesn't HAVE to blank the whole screen btw
[16:16:28] <Kevin`> it's still rather obvious if you are looking at it
[16:17:21] <Valen> http://www.youtube.com/watch?v=80fmaBBRhV0 video of the actual thing, their own website seems to be lacking anything a bit less promotional
[16:17:39] <ben1066> so overall which would be my best solution?
[16:17:47] <Valen> looks like lcd as you say just slow
[16:17:52] <keenerd> Anyway, the wikireader has headers for a serial port and a touch screen. It might become a dumb terminal for a few of my AVR projects.
[16:18:04] <Valen> how much $ is it?
[16:18:32] <keenerd> Valen: Are you actually asking me or did you want to argue over it a bunch first?
[16:19:38] <Valen> keenerd: i don't know how to speak any plainer english, is the scrolling smooth or paged isn't exactly a rocket science quesiton
[16:19:39] <keenerd> It was $120 when it came out two years ago, now it is under $30.
[16:20:03] <keenerd> Valen: I said 10 minutes ago. 1 bit LCD.
[16:20:18] <ben1066> except its 100$
[16:20:36] <keenerd> I paid $20 for mine and I could find you six places selling it for $30.
[16:21:15] <Kevin`> Valen: http://kwzs.be/~kevin/eink-pageflip.avi - 1 full refresh and a bunch of partial ones
[16:22:26] <keenerd> ben1066: Amazon has it for $29, shadier places have it for $22-$25.
[16:22:30] <ben1066> also, how is it best to "switch-off" a sensor? a transistor on vcc?
[16:23:11] <Steffanx> That's pretty fast Kevin`
[16:23:45] <Kevin`> Steffanx: full-disclosure, I wasn't reading each page, I was just tapping on it
[16:23:47] <Kevin`> :)
[16:23:50] <Valen> ben1066: depends on the sensor and what its current draw
[16:24:04] <Steffanx> I know, but the e-paper is pretty fast
[16:24:16] <Steffanx> I've seen some VERY VERY VERY slow e-paper,
[16:24:17] <ben1066> Valen: 6ma top
[16:24:19] <Valen> its deffinatly gotten better
[16:24:28] <Valen> whats the sensor ben1066?
[16:24:31] <ben1066> would I be better just having it as an output of my mcu?
[16:24:32] <ben1066> its a
[16:25:01] <ben1066> MPXH6115 and a ds18b20 and a hcz-h8-a
[16:25:13] <ben1066> the last is resistive though, so that doesnt need much effort :P
[16:25:39] <Kevin`> Steffanx: angry birds on it is interesting.. kind of psychodelic
[16:25:45] <amee2k> what options are there to detect condensation on a circuit board? dedicated dew sensors seem to be rare and hard to find
[16:25:58] <ben1066> amee2k: humidity sensor?
[16:26:11] <ben1066> high humidity == dew? ish
[16:26:19] <amee2k> hmm
[16:26:37] <amee2k> i'm not sure a wideband humidity sensor would work for this
[16:26:44] <amee2k> hence why i'm asking
[16:26:54] <keenerd> amee2k: Make two combs of uncovered traces, measure current through them :-)
[16:27:04] <ben1066> or that...
[16:27:06] <amee2k> i was wondering about a zig-zag pattern on the board, but how reliable is this?
[16:27:27] <ben1066> surely its the same as having a pcb based button?
[16:27:34] <ben1066> they use the same sort of princable
[16:28:04] <karlp> amee2k: just conformal coat the boards and stop caring?
[16:28:11] <karlp> or are you looking to detect it for other reasons?
[16:28:12] <amee2k> i know how "water alarms" work... we made some at my parent's place after they had the basement flooded for the second time in less than a year
[16:28:56] <amee2k> karlp: partially... i also want the information because i care about external wiring nearby and as general environmental readout
[16:29:10] <Valen> ben1066: for 6ma run it off the MCU
[16:29:27] <Valen> amee2k: 2 traces really close to each other? ;->
[16:29:31] <Valen> bare traces
[16:29:35] <Kevin`> Valen: it needs higher voltage than the mcu will likely be running at
[16:29:39] <Valen> ahh
[16:29:48] <Kevin`> ben1066: do remember you can power the OTHER stuff from the mcu
[16:29:50] <Valen> how much voltage?
[16:30:03] <Valen> and where are you getting it?
[16:30:23] <amee2k> 5V regulated by an on-board regulator, but there is an 18..36V unregulated supply feeding the board
[16:30:35] <Valen> lotsa voltage
[16:30:37] <ben1066> Kevin`: shush :P i also take it I should turn the rf12b on and off too?
[16:30:46] <Valen> how much does the sensor need?
[16:30:50] <ben1066> or shall I just leave on standby at 0.3ua standby
[16:30:57] <Kevin`> ben1066: what's the rfm12b's idle current?
[16:31:02] <Valen> i reckon leave them in standby
[16:31:10] <Kevin`> ben1066: oh, i'd not bother switching it for that
[16:31:16] <Valen> adding more stuff will probably use more power
[16:31:19] <amee2k> the ghetto water alarms we made were basically a transistor and some resistors and caps
[16:31:28] <Kevin`> ben1066: do remember to turn of the radio itself of course
[16:31:44] <ben1066> Yea, that does use some power :P
[16:32:31] <ben1066> and uh, 1000na for the ds18b20 isnt really worthwhile either is it :P
[16:33:31] <amee2k> general purpose humidity sensors are 4.47EUR and up at digikey
[16:33:57] <ben1066> £2.05 over here at farnell
[16:34:12] <ben1066> dropping to £1.50 or so at 50+
[16:34:31] <amee2k> going to be much if i need 5 >_>
[16:34:43] <ben1066> ah lol
[16:35:29] <amee2k> looks like i'll put that one on the feature waiting list lol
[16:35:51] <ben1066> you could try the track matrix thing
[16:36:19] <Valen> could you use the humidity sensor and temperature?
[16:36:23] <amee2k> hmm yeah. i'd want to try that on a piece of scrap board first though
[16:38:38] <karlp> humidity sensors are _very_ not cheap.
[16:39:05] <karlp> and the cheapest ones are capacitive, and rather sensitive to oily wet fingers.
[16:39:18] <karlp> but, they are _super_ responsive!
[16:40:17] <Valen> actually i don't know if you can work out if the humidity is condesning or not
[16:40:41] <Valen> if your board is colder than the air around it it'll get condensation with really low humidity
[16:41:13] <amee2k> well, my board has one advantage... either the power dissipation is quite neglegible, or quite significant
[16:41:55] <amee2k> in the former case, humidity >90% would at least indicate a risk for condensation. in the latter case the board is probably hot enough so even if something has condensed it should dry quickly
[17:54:15] <Tom_itx> http://www2.electronicproducts.com/New_Digi_Key_tool_lets_Engineers_share_schematics-article-fajb_schemeit_jan2012-html.aspx
[18:48:40] <jadew> that's like... pastebin
[18:48:45] <jadew> for electronists
[18:50:15] <vectory> huh?
[18:50:23] <jadew> [01:45.33] <Tom_itx> http://www2.electronicproducts.com/New_Digi_Key_tool_lets_Engineers_share_schematics-article-fajb_schemeit_jan2012-html.aspx
[18:50:57] <vectory> not the first of its kind tho
[18:51:08] <vectory> and still people upload screenshots of eagle or whatever
[18:51:18] <jadew> yeah, seems easier
[18:51:27] <vectory> cool nevertheless
[18:55:49] <jadew> gonna ask again, since it's quietter here: what features you found extremely useful (or missed a lot) when you changed the development board? and what would you like to have on your current one?
[18:59:12] <jadew> thing is that after 2 days of using my first target board I already have a new one ready to be cooked, but I don't want to build it just to realize I'm missing other important stuff
[19:43:21] <Roklobsta_> has anyone here used the Bertos RTOS?
[19:44:04] <Casper> you sure you want an os on your avr? that waste so much ressources?
[19:44:29] <Roklobsta_> makes it easier to just get on with your app
[19:44:46] <Roklobsta_> you don't have to use the scheduler though.
[19:45:23] <Roklobsta_> i am trying to use it on an mega1280
[19:45:23] <Casper> why does it make it easier? it just add more layers
[19:46:03] <Roklobsta_> ok, what do you suggest, do own low level stuff from scratch or use some sort of driver library?
[19:46:04] <inflex> ja, never saw much sense in having an OS for small uC
[19:46:43] <Casper> from scratch or use some library
[19:47:05] <Roklobsta_> what's a good library that provdes a nice api to all the atmel hardware?
[19:47:11] <Roklobsta_> avr
[19:47:21] <inflex> erm, libc-avr
[19:47:47] <inflex> it's already "all available", I think perhaps you're viewing the uC with a perspective that doesn't let you see quite how it's done.
[19:48:30] <inflex> we use other libs for external hardware depending on what it is, eg, some I2C / SPI / LCD devices - but all the AVR hardware is already accessible via avr-libc
[19:49:03] <inflex> http://www.nongnu.org/avr-libc/user-manual/modules.html
[19:50:19] <Roklobsta_> oh i mean like a nice serial driver that handles xon/xoff/rts/cts/fifo so all you need to do is open(), read(), write() and close()
[19:52:54] <inflex> ja, you just need a wrapper, not an OS or anything - maybe Arduino would be more your thing.
[19:53:57] <inflex> http://homepage.hispeed.ch/peterfleury/group__pfleury__uart.html <=- here's one I found, Fleury has done some good work in the past
[19:55:48] <inflex> uCs do have to be treated differently to normal PCs, eg you don't normally go about doing something like f = open('/dev/ttyS0'); ... because you need only talk to the registers directly,eg, send a byte using UDR = data_byte; (yes, it's that simple really)
[19:58:19] <inflex> basically, when it comes to talking to the hardware (USART, ADC etc) it's all just done through the appropriate register.
[19:58:29] <fisted> hey there, i'm planning to bit-bang the serial in-system programming protocol, can i do this arbitrarily slow? that is, do i have to maintain some minimum or even regular clock frequency at the SCK pin which clocks the serial downloading?
[19:58:48] <inflex> fisted: depends if it's sync or async :)
[19:59:25] <fisted> inflex: then that's what my question boils down to, i see:)
[19:59:32] <inflex> async doesn't need it (normal RS232 serial etc), so long as the pulses are correctly timed/shaped.
[19:59:43] <Roklobsta_> inflex: i appreciate that. maybe it's the scale of of the application... the last microcontroller job i had the original implementor lived in world that bit banged and used wrapper/drivers which resulted in a horrible mess.
[19:59:49] <inflex> very easy to bitbash serial TX... I use it a lot to add debugging
[20:00:45] <pepsi> i bang my bits, not bash them
[20:00:47] <Roklobsta_> i just like the bertos method of abstraction. the open() command doesn't care if you are talking to SPI or one of the UARTs. the end result is the same - data moves in and out.
[20:01:06] <inflex> Roklobsta_: well, frequently that is how uC code ends up, especially when feature X, Y and Z have to be crammed into a uC that ended up being selected because it was $0.10 cheaper than the other one which would have been cleaner
[20:01:57] <Roklobsta_> inflex: it was a clusterfsck to untangle, debug and get working. it was so bad the application didn't even work if eben one compiler optimisation was turned on.
[20:02:09] <inflex> Roklobsta_: sounds normal.
[20:02:40] <inflex> Roklobsta_: uC programming invariably means you'll be struggling for either cycles or memory (flash or sram)
[20:02:54] <inflex> Roklobsta_: so you end up with a lot of crazy hacks
[20:03:02] <Roklobsta_> i remember my boss saying the compiler was broken. once i inserted a few volatiles here and optimisation was ok to use.
[20:03:05] <inflex> I've got some code here which will work only on certain versions of the compiler.
[20:04:06] <inflex> Easiest way to avoid it.... take the uC you think will do the job, then double or triple the spec and get -that- uC
[20:04:36] <Roklobsta_> for something like a keyboard controller i think bit banging is ok but something like a dtaa logger where there are lots of system activities going on abstraction is better and easier to debug.
[20:06:06] <Roklobsta_> anyway, that was on an 8051 based machine. i don't like 8051 much...
[20:06:19] <inflex> As I said - depends on the constraints. eg I do logging here on 1K or 2K flash AVRs (tiny13, 25 etc). Seriously though, if you're thinking of needing an OS for a purpose-specific application (embedded), then things might need a rethink. I suppose things can get blurry at about 128K+ sizes though
[20:07:07] <inflex> However using an OS for abstraction of the core hardware probably is an overkill, when sanely written functions alone would solve that.
[20:07:09] <Roklobsta_> inflex: true. especially when you add in a tcpip stack and so on.
[20:07:14] <Kevin`> 8051 isn't really designed to be used with a compiler at all
[20:08:39] <Roklobsta_> kevin: yeah. i won't forget the time i ran out of stack because of too deep function nesting.
[20:11:17] <Roklobsta_> inflex: do you use avr for work or fun only?
[20:20:59] <inflex> Roklobsta_: production / commercial sales
[20:21:31] <inflex> Roklobsta_: mostly sold via this site - http://nqrc.com
[20:23:06] <Valen> rule of thumb for development, put the biggest micro in that'll fit
[20:23:19] <Valen> you can chop it down if you make a million of em
[20:24:16] <Roklobsta_> inflex: nice all your work?
[20:25:37] <inflex> Roklobsta_: yes
[20:25:55] <Roklobsta_> inflex: were you a model hobbyist first?
[20:26:14] <inflex> Roklobsta_: sort of, yes.
[20:27:18] * inflex did EE at Uni... moved on to other things, then came back around to it a few years ago.
[20:27:27] <Tom_itx> lo inflex
[20:29:26] <Roklobsta_> inflex: good idea, i went regional a year ago an in spite of telecommuting your business model looks good. design and sell widgets that scratch an itch.
[20:34:15] <inflex> Tom_itx: how's things ?
[20:34:25] <Tom_itx> fair
[20:34:33] <Roklobsta_> inflex: does your avr programmer use AVRDUDE?
[20:34:36] <inflex> Roklobsta_: yes
[20:34:40] <Tom_itx> inflex, got stencils back today
[20:34:47] <Tom_itx> waiting for boards now
[20:34:58] <inflex> Roklobsta_: I use Tom_itx's programmer as well as a batch of the really simple AVR USBISP's
[20:35:16] <Tom_itx> mine will use avrdude or studio
[20:35:26] <Roklobsta_> I have been using this: http://helix.air.net.au/
[20:35:37] <inflex> Tom_itx: I endedup submitting the PCBs for the Tiny10 edition of these units.... bit of a gamble, hope it pays off
[20:35:54] <Tom_itx> who'd you go with?
[20:35:57] <inflex> Tom_itx: GP
[20:36:01] <Tom_itx> k
[20:36:10] <inflex> I don't trust itead to not layer it up with that 'strange' conformal layer
[20:36:25] <Tom_itx> i'm gonna give it a try once
[20:37:36] <Tom_itx> Roklobsta_, my little programmer does 3 protocols
[20:38:23] <Roklobsta_> tom_itx: url?
[20:38:55] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[20:39:05] <Tom_itx> i'm gettin more of the green ones soon
[20:57:36] <Valen> geez battery prices have gone up
[20:58:07] <Valen> i used to get brand name coin cells for ~40 cents now they are $1.40
[22:15:22] * inflex gets back
[22:15:35] <inflex> just trying to organise a new job
[22:25:35] <BrentBXR_> Anyone here real familiar with bootloaders?
[22:25:53] <BrentBXR_> im wondering, if there a way to read a byte from bootloader section in program?
[22:26:04] <BrentBXR_> like if you stored a version in the bootloader
[22:26:12] <BrentBXR_> is tehre a way to read it from the program memory
[22:26:31] <Casper> sure
[22:26:45] <BrentBXR_> alright do you go about doing that?
[22:26:54] <Casper> there a call for that
[22:27:04] <BrentBXR_> any idea what it bees :3
[22:27:19] <Casper> http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html
[22:28:11] <BrentBXR_> hm
[22:28:17] <BrentBXR_> thats program space
[22:28:29] <BrentBXR_> I dont know if it can break into the bootloader space
[22:28:43] <Kevin`> the bootloader is in program space too
[22:29:08] <BrentBXR_> alright; for some reason i was thinking it wasnt
[22:29:13] <BrentBXR_> thanks; thats all i needed
[22:29:14] <inflex> nooo, it's in magic-land!
[22:29:22] <BrentBXR_> lol
[22:29:45] <Kevin`> the only difference on most parts is that the cpu starts from the bootloader section instead of '0', and it may or may not be possible to write to it from the application
[22:30:39] <vectory_> somehow thought, too, that bootloader coad was in eeprom
[22:30:54] <vectory_> *code
[22:34:33] <Kevin`> the eeprom section is used for data that the application will read/write, not for code. it allows single-byte writes
[22:49:42] <vectory_> i know :)
[22:50:24] <vectory_> ive just got too many loose ends, so i get confused
[23:56:08] <CapnKernel> Hello folks.
[23:56:19] <CapnKernel> I am doing a survey of websites which take orders for PCBs. I am interested in the user interface aspects.
[23:57:09] <CapnKernel> If you get PCBs made, PCB supply company do you use?
[23:57:22] <CapnKernel> Is there a PCB company that you feel has a particularly good ordering user interface?
[23:57:36] <ziph> You're going to start a PCB front end business?
[23:57:59] <CapnKernel> I'm thinking of it.
[23:59:11] <CapnKernel> I eventually want to do components.
[23:59:16] <jd_ce> 4pcb/advancedpcb: great student rate. pretty old school interface. built in drc
[23:59:22] <jd_ce> thats all I got
[23:59:23] <ziph> With a quality fab like PCBCart or a cheap one like iteed? :)
[23:59:46] <CapnKernel> But PCBs is a lot easier to get into - no need to catalog 400,000 parts before going into business :-)
[23:59:58] <CapnKernel> Depends on how much you're willing to pay.