#avr | Logs for 2014-11-02

Back
[01:13:13] <twnqx> how do you measure the capacity of a li-ion battery you bought? :S
[01:13:36] <twnqx> discharge with constant current and measure time to 3V?
[01:14:14] <twnqx> and then to be sure charge with known (low) current and measure time until full?
[01:16:53] <Casper> twnqx: fully charge, then do a controlled discharge
[01:18:11] <twnqx> ah
[01:18:18] <twnqx> well, they are at 3.8V
[01:18:22] <twnqx> (of 3.7)
[01:18:53] <twnqx> i bought so much shit on this trip :X
[02:28:24] <malinus> twnqx: whatever you do, don't charge it by hand. You might just cause a fire
[02:28:46] <twnqx> ... i thought i'd just plug it into an ac socket
[02:29:58] <malinus> charging IC's are so cheap, no reason to risk it
[07:12:09] <LeoNerd> Is there an easy Bill of Materials feature in Eagle, does anyone know? I want to turn my schematic into a ticky box list of what components I need, so I can be sure I've got/ordered them all
[07:12:57] <twnqx> there's a script for that, yes
[07:14:31] <LeoNerd> Ah - Export | Partslist
[08:10:06] <Tom_itx> LeoNerd yes there is
[08:10:16] <Tom_itx> 2 or 3 in fact
[08:10:25] <Tom_itx> one is better than the others
[08:11:38] <LeoNerd> It's OK.. I foudn a good enough one
[08:49:52] <LeoNerd> Ah; found a source of SMT 4.7µF caps too.. I can change my board a bit more
[08:51:06] <LeoNerd> Annoying, in a way, that the ST662 chips are about half the cost of all the components on the board
[08:53:26] <twnqx> where are you buying that you need to look around?
[08:54:08] * twnqx normally does one-stop-shopping at mouser or digikey
[08:54:20] <LeoNerd> Initially I was looking on eBay but it turns out that Farnell is about the same price anyway...
[08:55:45] * twnqx would just walk into SEG mall atm
[08:55:53] <twnqx> damn that place is paradise and hell combined
[08:56:02] <twnqx> you can get EVERYTHING there
[08:56:08] <twnqx> and then, you can't because of > chinese
[08:57:20] <LeoNerd> Well, it's now ordered. :) Now I'll have to see if I can hand-solder 0603 discretes and SOT23 transistors
[08:57:46] <LeoNerd> I managed a SOIC8 fine, so hopefully. Shall also get myself a nicer better iron too
[09:23:23] <megal0maniac> < twnqx> and then, you can't because of > chinese
[09:23:29] <megal0maniac> Elaborate?
[09:24:39] <twnqx> they don't get what you want
[09:24:59] <twnqx> i mean, simple stuff - no prob
[09:25:23] <twnqx> but try to find a specific IC down there
[09:25:29] <twnqx> with hundreds of booths
[09:25:46] <twnqx> unless you speak enough chinese to ask your way around - no chance
[09:37:50] <Tom_itx> LeoNerd is the 662 for your HVPP?
[09:38:01] <Tom_itx> should work nice for that...
[09:38:12] <Tom_itx> i got one for the attiny10 etc
[09:39:10] <megal0maniac> twnqx: Ah. I can see how that might be frustrating :P
[09:45:25] <LeoNerd> Tom_itx: Yup. Well, it's actually an LT.. mumble. but it's the pin-equivalent, just a little cheaper
[09:50:02] <Tom_itx> http://www.mouser.com/ProductDetail/STMicroelectronics/ST662ACD-TR/?qs=%2fha2pyFaduiYma%252bgFCm6VMa%252bWb0u7q4d8BptPAIPFyE%3d
[09:52:38] <Tom_itx> http://tom-itx.ddns01.com:81/~webpage/boards/USBTiny_Mkii/12v_TPI_Prog_top.jpg
[10:54:13] <LeoNerd> I do believe I have a board layout :)
[10:55:19] <Tom_itx> now that you believe that... check it again :)
[10:55:28] <LeoNerd> I've starred at it lots
[10:59:21] <LeoNerd> Other than "staring at it lots", anything you could recommend?
[10:59:40] <Tom_itx> let someone else stare at it?
[10:59:50] <Tom_itx> then stare some more
[11:00:08] <Tom_itx> or just send it in then you will know if it's ok or not
[11:00:09] <Tom_itx> :)
[11:00:24] <LeoNerd> Heh.. ;) Well, who else? Do you want to take a look?
[11:01:13] <Tom_itx> can't right now
[11:02:51] <LeoNerd> I'll do a "paper test" too before I order it
[12:36:15] <Plugh> I am using an ATmega16 and using a small demo program to talk to an external device. I'm hardly using any memory basedon the report from avr-size (less than 10% Program and less than 1% Data) but malloc() always returns NULL when I try to allocate 21 bytes.
[12:37:00] <Plugh> I shouldn't have heap collision AFAIK. Any ideas why malloc() always fails?
[12:38:20] <Lambda_Aurigae> dunno..never used malloc on avr...I just predefine my variables.
[12:44:43] <learath> does malloc work on avr?
[12:45:01] <Tom_itx> i have my doubts
[12:45:13] <Tom_itx> it's flash not sram
[12:45:32] <Tom_itx> well they do have a tiny bit of sram
[12:46:05] <LoRez> http://www.nongnu.org/avr-libc/user-manual/malloc.html
[12:55:57] <Plugh> Tom_itx: This device has 1024 bytes of SRAM. I once worked with a device that had only 112 bytes of RAM. :)
[12:57:13] <Plugh> LoRez: I found that page earlier. I'll print out the heap start and end to see what that tells me. My data and bss is only reported as 10 bytes in the .lst output.
[12:58:57] <Plugh> Oh, I thought the nick of LoRez seemed familiar. Hello from ##microcontrollers. :)
[12:59:12] <LoRez> I'm everywhere.
[13:10:55] <Plugh> Problem does appear to be heap related. Printing heap start and end just gives -1 for both.
[13:45:28] <megal0maniac> Noooooooooooooooooooooo
[13:46:06] <Plugh> I gave up on trying to use malloc. I restructured the main program to pass the address of a structure typed variable to a routine in a file containing routines to control a display. The display library routines were already expecting a pointer so I didn't have to restructure them in any way. I was able to eliminate two routines in the display library while keeping the functionality I want.
[13:47:47] <LeoNerd> That seems cleaner, yes. malloc generally doesn't play well on these small devices
[13:49:06] <Plugh> It was only 21 bytes needed and there was plenty of RAM still available. Not sure why it wouldn't work. It was worth a shot.
[13:49:14] * Plugh makes a note to self -> don't use malloc. :)
[13:50:13] <Plugh> Perhaps there is a linker option that would have made it work. I can experiment another time.
[14:42:56] <rue_house> hmmif I put the gate of an SCR at 5V, I wonder if I can use it to crowbar input voltages more than 5.7V
[14:50:32] <rue_house> ok, even at 10 bits, I can implement a 4-20ma 11 channel reciever with a 0-400c sender and a resolution of .5c
[14:50:53] <rue_house> using a tiny26
[14:51:54] <rue_house> hmm, the lm75 protocol can only take 8 sensors.... I'll have to use some random address space
[14:53:33] <Tom_itx> 3bit yes
[14:56:19] <rue_house> but I can just have the tiny26 pretend to be 11 lm75's from address x to y
[14:56:47] <rue_house> on the linux setup I have, because I dont have real lm75's I have to specify the address of every sensor anyhow (tcn75)
[14:57:19] <Tom_itx> so use it as a mux and send it a dummy extra address packet
[14:57:35] <Tom_itx> so x address could be 8 more devices
[14:57:38] <Tom_itx> or more
[14:57:58] <Tom_itx> like an apartment complex with building numbers
[18:13:33] <rue_house> nono, I'll just have it emulate 11 of them on different addresses
[18:13:43] <rue_house> dont' matter where I put them in the addrss map
[18:13:53] <rue_house> there are 120 addresses to choose from
[20:49:02] <rue_bed-aok> anyone have tiny26 code that implements an i2c slave?