#avr | Logs for 2016-03-23

Back
[00:00:24] <eszett> so when i power the circuit down, and repower it again, this is also called a "reset"?
[00:00:37] <Casper> that the program can optionally verify and take different actions than an hardware reset... or a brownout reset... or a watchdog reset...
[00:00:55] <eszett> hm complicated :-)
[00:00:55] <Casper> yes, also a reset
[00:00:57] <eszett> thanks!
[00:01:11] <Casper> basically, the reset ensure a sane state of the chip
[00:01:41] <Casper> at power on, nothing can be assumed. The memory can be all fucked up
[00:01:58] <Casper> the cpu will not be able to do anything sane
[00:02:15] <Casper> so, the only solution is: issue a reset at power on
[00:02:23] <Casper> which the chip does automatically
[00:02:40] <Casper> it basically reset some register to their default values
[00:02:59] <Casper> now things are sane
[00:03:13] <eszett> I guess for entering bootloader mode it doesnt matter if push the RST button (connect RST to GND for a short time) or unplug & replug the usb cable again
[00:03:36] <eszett> (while the circuit is powered over USB)
[00:03:42] <Casper> normally it wouln'T matter, unless they added a check for the reset source, which I doubt
[00:03:48] <eszett> fine
[00:04:01] <eszett> I set the fuses correctly. BOOTSZ1 and BOOTSZ2 were correctly set by default. and BOOTRST i activated. However when i reset it still doesnt enter bootloader mode :-((
[00:04:29] <Casper> what are your fuses?
[00:04:40] <eszett> one second..
[00:05:03] <eszett> lfuse 0b11011110
[00:05:11] <eszett> hfuse 0b10011000
[00:05:36] <eszett> efuse 0b11110011
[00:05:47] <eszett> thats how they are now
[00:06:18] <Casper> what is it in hex? :D
[00:06:27] <Casper> and I read something interresting
[00:07:19] <eszett> in hex it is lfuse 0xde hfuse 0x98 efuse 0xf3
[00:07:21] <Casper> it look like you will want later on to NOT have the bootrst, but use the hardware pin to jump to it... what a weird bootloader...
[00:08:08] <eszett> yea, since when i have BOOTRST activated, it always enters bootloader mode when i plug the usb cable in, which is annoying, right?
[00:08:09] <Casper> and that should work...
[00:08:26] <Casper> yes... but does it enter the bootloader mode now?
[00:08:35] <eszett> unfortunately it doesnt :-(
[00:09:06] <Casper> hmmm
[00:09:36] <Casper> you sure the usb stuff is well connected? and also... if there was too much usb error, windows may have disabled your usb port
[00:09:55] <eszett> at least my Windows 7 doesnt do anything
[00:10:22] <eszett> when i plug the ISP programmer in, my Windows immediately detects it
[00:11:05] <Casper> then I'm out of idea... I never used the usb version (usb scare me)
[00:11:15] <eszett> lol..
[00:11:31] <eszett> yep, scares me too
[00:12:01] <Casper> might be your cable that don't work? :D
[00:13:20] <eszett> The weird thing is .. when i flash it with my Bascom code, that lets the LED blink, the circuit works, the LED blinks
[00:13:38] <eszett> so the cable works, the circuit works, the code works.
[00:14:57] <eszett> jeez, maybe i should try a different bootloader. there is this LUFA BL for example
[00:17:08] <Casper> maybe there is indeed an issue with the code...
[00:17:30] <eszett> with the bootloader code yes
[00:17:34] <eszett> maybe
[00:25:34] <cehteh> windows?
[00:25:40] <cehteh> dfu-util?
[00:26:07] <cehteh> under linux i had once the problem that dfu-util was too old
[00:26:43] <eszett> what is dfu util?
[00:27:36] <cehteh> what program do you use for flashing?
[00:27:43] <eszett> cehteh: well avrdude
[00:27:56] <cehteh> nevermind then
[00:28:12] <eszett> that i use with my ISP programmer. but my goal is to flash the atmega without ISP programmer and avrdude
[00:28:27] <cehteh> yes thats what i meant
[00:28:27] <eszett> I want to use Atmel FLIP then
[00:28:36] <eszett> ok
[00:28:40] <cehteh> i dont know that
[00:28:58] <eszett> well it does the job, used it many times before with my keyboard
[00:43:00] <eszett> alright im off to bed, see you later!
[04:37:44] <phinxy> my ssd1306 display with u8glib starts working with software SPI constructor but it wont start with the hardware SPI one. it asks to specify three pins, CS, a0, RES, i have these connected to some random PCINT pins
[04:56:36] <phinxy> HOLY SHEEEET
[04:57:12] <phinxy> i initialized SPI manually and it works. the FPS counter went from 1 fps to like 200
[05:01:24] <twnqx> only trust code you wrote yourself ;)
[06:26:57] <apo_> twnqx: Sometimes not even that
[06:29:51] <DrXasin> Heya! I'm having a slight problem with some code I wrote for handling TWI communications. I have already tested the Master Transmit code successfully with a IO Portexpander, but when I use another AVR as Slave it seems to be keeping the SCK line low, since the Master AVR only reports a successful Start transmission after disconnecting the slave.
[07:05:33] <|DM|> Slow down the clock a bunch and use a mosfet+led to visually inspect whats going on in the lines?
[08:20:18] <Lambda_Aurigae> DrXasin, you have pullups on the lines?
[08:31:59] <DrXasin> Oh whoops, I got myself sidetracked there ... Lambda-Aurigae, yes, I am using the AVR's builtin pullups.
[08:32:36] <DrXasin> |DM|, I already slowed the clock down, same result. Was thinking about using MOSFETs
[08:45:48] <DrXasin> <DrXasin> |DM|, I already slowed the clock down, same result. Was thinking about using MOSFETs
[08:56:05] <twnqx> don't use mosfets, they are boring! go SiC! go GaN!
[08:56:26] <DrXasin> Well damn, I've been doin it wrong my whole life X3
[08:57:12] <DrXasin> Well ... I'll be testing out different things. If the worst comes to the worst I'll just have to use a I/O Port expander instead of a separate chip. My robot needs more sensors :3
[08:58:28] <DrXasin> For those who dare to look at my code and try to find an error: https://github.com/XasWorks/Hexa-Bot/tree/master/Code/TWI || Warning, C++ and a somewhat messy code X3
[09:30:22] <twnqx> yuck C++
[09:37:52] <DrXasin> Hey! It works fine with the AVR-Gcc compiler. Despite complex functions for my Robot the code is small, and if you'd take a look you know why I'm still using C++ :P
[09:38:45] <WormFood> OOP isn't usually used for embedded design.
[09:38:53] <twnqx> i just see bloated code with permament syntactic sugar
[09:39:10] <WormFood> I don't see anything (I didn't look)
[09:40:48] <Jartza> depends what you consider being "small"
[09:41:01] <WormFood> 37 bytes, is what I consider to be "small"
[09:41:15] <Jartza> my VGA controler code is already HUGE in my opinion, although it has quite a lot of features.
[09:41:27] <DrXasin> Floating point variables and Sinus/Cosinus functions ... Ehh, I'm glad it is at 9kb
[09:41:28] <Jartza> it's 1.6kB of code
[09:41:34] <Jartza> I mean, binary
[09:41:36] <twnqx> well, you are (potentially) using inheritance, which screams "not small" - vtables cannot be small, and cannot be fast
[09:41:40] <twnqx> so they can't be efficient
[09:41:53] <WormFood> If you want small, then you want asm
[09:42:07] <Jartza> my VGA is asm
[09:42:15] <WormFood> awesome!
[09:42:30] <WormFood> I don't do much asm for the avr, but I'll use it when I need it
[09:42:36] <Jartza> but well. it also samples uart and parses ansi-escapes and generally acts as a vga-controller :)
[09:42:39] <WormFood> I'm starting a new project, and I was thinking about doing it in asm
[09:42:42] <DrXasin> I am in fact using inheritance, yes. And I am speaking about my (currently not too experienced) knowledge, in which the 9kB, with all the stuff I am using, seemed small to me. Seems like you guys don't like that opinion.
[09:42:46] <twnqx> also, vtables mean an around 200% function call overhead, for fecthing the real target address from vtable, then jumping indirect
[09:43:12] <Jartza> DrXasin: depends what your code does and what chip you're running it on, as long as you're happy, go with it :)
[09:43:17] <WormFood> DrXasin, it isn't about the size, it's about the efficiency of it. OOP has more overhead.
[09:43:19] <Jartza> and don't take people too seriously
[09:43:33] <Jartza> but truth is, C++ is bloat compared to C and C is bloat compared to asm
[09:43:34] <twnqx> well, i despise overhead
[09:43:42] <WormFood> well said Jartza
[09:43:59] <WormFood> well, I want a roof overehead
[09:44:03] <WormFood> overhead*
[09:44:12] <twnqx> i was compaining to the avr-gcc dev because of a missed keyhole optimization, because i tend to read the compiler's ASM output to see how bad it really is
[09:45:06] <WormFood> I tend to read the asm output, to understand how things work.
[09:45:20] <twnqx> but DrXasin: as Jartza set, don't let other people's oppinions get to you.
[09:45:22] <twnqx> said*
[09:45:26] <Jartza> https://github.com/Jartza/octapentaveega/blob/master/vga.asm
[09:45:31] <twnqx> the most imporant thing is that it works for _you_
[09:45:35] <Jartza> personally I think my asm is also pretty readable
[09:45:53] <WormFood> I feel the same way too.
[09:46:02] <WormFood> I use a ton of labels, for everything.
[09:46:08] <Jartza> yea, me too
[09:46:12] <Jartza> they cost nothing
[09:46:16] <WormFood> And, when I need to change something, it makes it a lot easier
[09:46:35] <WormFood> And, it makes the code a lot more readable, if you pick good label names (my weakness)
[09:46:48] <DrXasin> Well ... I might some day consider using Assembler. But for now, while still busy with Floating Point variables and different mathematical functions, I'll just stay with what I have here.
[09:47:10] <WormFood> DrXasin, can you program in assembler?
[09:47:11] <twnqx> DrXasin: see, i sit in between. i use asm if needed only
[09:47:21] <WormFood> I'm in the same boat as twnqx
[09:47:33] <DrXasin> Besides, from what I can tell the Compiler is doing a good job at producing somewhat small biaries. Also, WormFood, yes I can.
[09:47:37] <WormFood> I also only use asm, if it's needed.
[09:47:40] <DrXasin> A little bit at least.
[09:47:52] <WormFood> Have you ever written an entire program, all in asm?
[09:48:18] <twnqx> DrXasin: you won't notice the difference in C++ in the resulting binary, the memory overhead is pretty big, too
[09:48:32] <DrXasin> Only a small one. But that was a while ago. What are you trying to say, WormFood?
[09:48:49] <twnqx> as in RAM. objects on the heap are expensive, with their vtables and stuff
[09:48:50] <WormFood> I was just trying assess your asm skills ;)
[09:48:52] <Jartza> DrXasin: well. let's also put it this way, if you C++ code does what you want, the binary fits into the chip and you have no performance issues, I see no reason why you should rewrite it with anything :)
[09:48:57] <DrXasin> Oh and ... I don't precisely know why that would be, twnqx. The C++ I am currently using does not actually use any dynamically allocated variables.
[09:49:12] <twnqx> no var = new <object>?
[09:49:25] <DrXasin> It doesn't even have a "new" operator, no.
[09:49:34] <WormFood> the "best" language to do something in, is highly subjective.
[09:49:49] <Jartza> I tend to say, the best language is the one you know
[09:49:50] <DrXasin> What I can do is "ObjectType thing = ObjectType()", but I can't just create a pointer to a new one :P
[09:49:54] <WormFood> Sometimes things can only be done in some language, and not another. Asm can do *everything*.
[09:50:12] <twnqx> asm can do next to nothing C can't as well
[09:50:16] <Jartza> but yes, my VGA code is one good example of code that wouldn't even be possible with C
[09:50:22] <twnqx> except nop :P
[09:50:41] <WormFood> It's not considered bad form to use "goto" in asm
[09:50:42] <twnqx> yes, and cycle-exact timing
[09:50:53] <Jartza> and non-stack
[09:51:01] <DrXasin> True, since every other language will have to be compiled to ASM for AVR eventually, WormFood. But ... For really complex things, and I think that a robot with an Omniwheel build design, it might be a little hindrance ... *shrugs*
[09:51:02] <Jartza> :)
[09:51:02] <twnqx> you can do non-stack with C.
[09:51:08] <WormFood> I rewrote one program, to not use the stack
[09:51:24] <Jartza> twnqx: with avr-gcc? awesome!
[09:51:32] <WormFood> twnqx, but not for everything
[09:52:11] <DrXasin> Well, I was here to get help with my TWI library. Seems like I've caused an escalation to a ASM vs C discussion, which was not really my intention.
[09:52:11] <Jartza> I made the first VGA code with C
[09:52:25] <Jartza> but at some point it became pretty impossible
[09:52:26] <|DM|> well, with avr gcc you can work with both together drxasin
[09:52:37] <|DM|> You just have to read up on the libc register usage rules etc
[09:52:39] <twnqx> https://bpaste.net/show/9152d62da8be
[09:52:40] <twnqx> :3
[09:52:40] <|DM|> and make a header file
[09:53:00] <DrXasin> I know. I've used some assembler commands for certain things.
[09:53:37] <WormFood> I made a .fli (desktop "flicker" format) video viewer. First, all in C, using normal functions. Then C with direct manipulation of the video card. Then did some functions in asm, and then I got acceptable performance.
[09:53:45] <DrXasin> Oh gosh forced inline code X3 | It ... Works, but ... Won't inline code bloat the whole thing once you start to call it multiple times?
[09:53:53] <twnqx> sure
[09:54:01] <twnqx> but if you can't call a function, as you have no stack
[09:54:04] <twnqx> what can you do :P
[09:54:15] <DrXasin> ... Hm ... True ...
[09:54:43] <|DM|> You dont need a stack for all functions though, right ?
[09:54:53] <twnqx> you always need it for the return address
[09:55:00] <WormFood> How would you guys go about inverting all the bits in a byte, AND swapping the bit order?
[09:55:17] <twnqx> step a: read dr. dobbs
[09:55:22] <twnqx> step b: implement whatever is there
[09:55:41] <twnqx> or was it the binary magic article... forgot :(
[09:56:15] <DrXasin> Well, I'll ... I'll try to fix the TWI code myself. Still, thanks for the enlightemenet on ASM.
[09:56:15] <Jartza> anyway
[09:56:22] <WormFood> I was hacking on a program, and they did some fucked up bit rotate, and inverted it, bit-by-bit. Used a lot of cycles. I made a lookup table, and did it in 2 cycles.
[09:56:22] <Jartza> the little asm made nice VGA controller :)
[09:56:22] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxaFFxam1uVW05NlE/view?usp=sharing
[09:57:17] <twnqx> WormFood: on an 8bit you can get away with that, i guess
[10:00:13] <Lambda_Aurigae> twqnx...xor with 255
[10:00:42] <twnqx> that doesn't solve the bit order change
[10:00:52] <Lambda_Aurigae> oh...wormfoof
[10:00:56] <Lambda_Aurigae> d
[10:01:06] <twnqx> 8 shift left + 8 shift right would, though
[10:01:12] <Lambda_Aurigae> typing on cellphone
[10:01:36] <Lambda_Aurigae> i missed the bit swap.
[10:02:00] <Lambda_Aurigae> xor then some rol snd ror commsnds
[10:02:29] <Lambda_Aurigae> the bits get rorated througj the carry flag
[10:03:12] <twnqx> still 17 instructions
[10:03:28] <Lambda_Aurigae> yup
[10:03:42] <Lambda_Aurigae> the bit reversal is tough
[10:03:54] <twnqx> i bet someone figured out a faster way :P
[10:04:17] <Lambda_Aurigae> i could msybe do it math wise
[10:04:46] <Lambda_Aurigae> just not at computer to play...typing on phone is bsd emough.
[10:04:51] <twnqx> like the fun version of "count set bits in a dword"
[10:06:19] <twnqx> https://bpaste.net/show/e9ac731641af
[10:12:50] <Jartza> the fastest byte reversal in avr is this: https://bpaste.net/show/650818266851
[10:13:48] <liwakura> twnqx: how the fuck does that work
[10:15:05] <Jartza> but if you want shortest code, it's this: https://bpaste.net/show/dbbf57b3114a
[10:20:09] <twnqx> liwakura: https://bpaste.net/show/f5b9fe508d7f
[10:20:12] <twnqx> do the comments help?
[10:21:02] <twnqx> i think that's from an AMD optimization manual
[10:21:19] <twnqx> i once hat the original article, but can't find it any more
[10:21:56] <|DM|> liwakura, it "eats" one byte from the bottom up and "builds" it in another register, top to bottom
[10:22:15] <|DM|> oh wait, tou werent asking about that
[10:23:15] <twnqx> https://graphics.stanford.edu/~seander/bithacks.html was it this... hm
[10:31:15] <liwakura> twnqx: not exactly
[10:31:50] <twnqx> ok. it works by paralel counting
[10:32:02] <liwakura> the 2nd link helped
[10:32:13] <liwakura> it seems to be a bitbanged parallel addition
[10:32:49] <twnqx> it simply masks groups of bits, then adds them
[10:33:15] <liwakura> hm.
[10:33:23] <twnqx> first neighboring bits
[10:33:58] <twnqx> 00 => 0+0 = 00, 01 => 0+1 = 01, 10 => 1+0 = 01, 11 => 1+1 = 10
[10:34:13] <liwakura> yeah, bitbanged addition
[10:34:48] <twnqx> just instead of addition it's implemented by subtraction
[10:35:06] <lorenzo> hm, do you know if there's any way to optimize this?
[10:35:07] <lorenzo> http://hastebin.com/teqabumisa.avrasm
[10:35:51] <liwakura> lorenzo: how about keeping an pointer
[10:36:00] <liwakura> and every 200 ms you call an interrupt writing on char out?
[10:36:08] <liwakura> *pointer to the current char
[10:36:30] <liwakura> and the pointer loops trough the elements of the scroll thingie
[10:36:54] <lorenzo> yeah, but I was thinking
[10:37:08] <lorenzo> is there a way to do that without the entire 16 byte (4x4) array?
[10:37:33] <lorenzo> as in: I only define 'A', 'B', 'C', 'D'
[10:37:45] <liwakura> ah
[10:37:53] <liwakura> you want to make the chars scrolling by?
[10:37:55] <lorenzo> and then have some sort of loop which overflows at 3, then at 2..
[10:37:57] <lorenzo> yeah
[10:38:22] <lorenzo> like a ring buffer with a arbitrary start position
[10:38:34] <liwakura> just keep the string once, and make an pointer to one char
[10:39:12] <liwakura> on every print, you just print the next 4 characters, like string[(i + current) % 4]
[10:39:33] <liwakura> the % keeps sure you don't read from outside the string
[10:40:18] <liwakura> gimme a second, im trying myself
[10:44:01] <liwakura> lorenzo: http://hastebin.com/caxililoye.avrasm
[10:44:42] <liwakura> have not tried to compile it, but thats approximately how it could work
[10:45:16] <lorenzo> thanks :-) will try
[10:48:48] <lorenzo> liwakura: worked ;-)
[10:48:58] <lorenzo> http://hastebin.com/mohuladugo.coffee
[10:50:21] <Jartza> I would store those strings in flash
[10:50:24] <Jartza> in progmem
[10:51:39] <twnqx> only if you're memory limited
[10:56:37] <Jartza> AVRs are memory limited by design :)
[10:58:48] <twnqx> yeah, but not THAT limited
[11:00:44] <cehteh> what is not limited at 64bytes?
[11:01:07] <liwakura> an RPi!
[11:01:10] <cehteh> or moment except for the ones without any memory, are there any with 32bytes?
[11:01:30] <twnqx> dunny, i have 32kbytes externally attached to one of mine!
[11:01:43] <twnqx> (and don't even need them... sigh)
[11:01:56] <liwakura> uhm, i think my arduino nano has 2kb of ram or so
[11:02:11] <liwakura> but i don't even know what i could do with all that stuff
[11:02:16] <twnqx> my at90can128 has 4k by default i think
[11:02:26] <twnqx> +32 external added.
[11:02:48] <twnqx> "just in case"
[11:03:06] <liwakura> hm.
[11:03:16] <liwakura> i like to have the stuff to do cool projects
[11:03:25] <cehteh> some tinys have 64 byte or less
[11:03:33] <twnqx> i know
[11:03:41] <twnqx> i use a tiny13 or so as a 50hz generator :P
[11:03:42] <liwakura> but mostly im just looking around the internet thinking.. "i dont need this... i dont need that... that would be useless to me"
[11:03:53] <liwakura> i'd say, i have a lack of problems
[11:04:16] <twnqx> ah, yes. tiny13a
[11:04:34] <liwakura> why do you need an 50Hz generator?
[11:04:39] <twnqx> it's also C-only!
[11:04:50] <liwakura> making mains noises?
[11:04:53] <LeoNerd> The tiny13a isn't that small by ATtiny standards
[11:04:54] <twnqx> to shut up a watchdog timer on sometthing i was toying with
[11:04:57] <LeoNerd> It has actual addressible RAM
[11:05:29] <LeoNerd> I use one in my 4way continuity tester
[11:09:30] <cehteh> anyone of you know some easy way to figure out how many cycles some C code compiles to? .. easier than counting instructions in asm i mean
[11:09:41] <cehteh> non branching of course
[11:10:12] <cehteh> would be nice if the compiler could somehow dump that
[11:41:33] <cehteh> .. experimentally defined :D
[11:42:04] <WormFood> cehteh, use an emulator
[11:43:10] <cehteh> wanted something much easier
[11:43:38] <cehteh> have to tune some latency calculation, just did that with binary search and logic analyzer
[11:43:42] <WormFood> It's easy for me
[11:44:25] <cehteh> anyway done now
[11:59:01] <cehteh> 125ns timer ticks :D
[11:59:10] <LeoNerd> 8MHz
[11:59:11] <LeoNerd> Cute
[12:00:49] <cehteh> stretches the limit a bit, one can schedule on-the-tick ... but of course the tiny runs at 8mhz itself so there is some latency
[12:01:13] <cehteh> but at least it doent loose/drop events as long it can cope
[12:01:51] <cehteh> and the events run outside interrupts
[12:02:31] <LeoNerd> I'm not sure I see the point of a 8MHz timer tick on an 8MHz CPU
[12:03:13] * cehteh neither but i wanted to proof that the code is correct
[12:03:24] <Jartza> cehteh: atmel studio simulator seems to be cycle-perfect
[12:03:31] <Jartza> I used that to time my VGA code
[12:03:39] <cehteh> i am on linuix
[12:03:49] <Jartza> yea. I'm on mac.
[12:03:59] <Jartza> but I did run it under VM just for that reason :)
[12:04:00] <cehteh> and i hate that bloatblob
[12:04:14] <cehteh> anyway it works now
[12:04:18] <Jartza> there's simavr and simulavr too
[12:04:51] <cehteh> and i need the timer at high res because i want to parse CPPM data as well, later with /8 1Mhz timer which is just enough
[12:05:22] <cehteh> but if the timer code works correct at extreme configurations that gives some confidence
[12:06:21] <Jartza> I heard the simulavr git-version works pretty well
[12:06:48] <cehteh> yes i used it too
[12:07:02] <cehteh> but rigging that would be slower than i did it now
[12:07:33] <cehteh> didnt need to be that correct, actually i give a bit more headroom to my calculations, just in case
[12:07:34] <Jartza> yea, logic analyzer is nice for that
[12:08:02] <Jartza> I couldn't use that for VGA jitter fixing, though.
[12:08:09] <Jartza> for that I used simulator
[12:08:14] <Jartza> as it needs to be cycle-perfect
[12:08:27] <cehteh> the timer uses compmatch to wake the main loop, but for short times the time between setting up compmatch and going to sleep is racy
[12:08:42] <cehteh> i have to calculate that latency into the stuff
[12:09:00] <cehteh> done now, works ,, ship it :d
[12:12:42] <cehteh> too bad one cant run the tiny84 at 16mhz from the internal OSC
[12:25:36] <Lambda_Aurigae> cehteh, attiny84 doesn't have the pll?
[12:26:27] <LeoNerd> Nop
[12:26:37] <LeoNerd> The PLL is a "special snowflake" feature of the t85
[12:26:44] <Lambda_Aurigae> oh well.
[12:27:01] <Lambda_Aurigae> that's something they need to put on all AVRs in my opinion.
[12:27:15] <Lambda_Aurigae> specially those with usb hardware.
[12:27:27] <Lambda_Aurigae> so they can sync the clock to the usb clock like the new usbPIC chips can.
[12:28:39] <LeoNerd> Mmmm
[12:28:54] <LeoNerd> Oh if I had to wave hardware/periph design ideas at AVR I have a list of about 30 things ;)
[12:29:17] <Lambda_Aurigae> me too
[12:29:20] <Lambda_Aurigae> add a full crossbar
[12:29:27] <Lambda_Aurigae> and usb in a dip package dangit!
[12:30:05] <LeoNerd> crossbar IO, "buried" periph interconnects, more DIPs
[12:30:14] <LeoNerd> bit direction on tiny USI
[12:40:59] <cehteh> the tiny85 PLL isnt sufficient for USB clocks :D
[12:41:27] <cehteh> but one can use osccal .. micronucleus does that for 16.5mhz
[12:41:29] <Lambda_Aurigae> cehteh, well, it is usable for v-usb to adjust for low speed bitbanged usb
[12:41:39] <cehteh> v-usb yes
[12:41:47] <cehteh> 16mhz isnt optimal
[12:41:49] <Lambda_Aurigae> but I know what you mean.
[12:42:17] <Lambda_Aurigae> I've been playing with a couple of pic chips that can sync their internal clock to the usb clock and do full speed usb 2.0 without external clock or crystal.
[12:42:34] <LeoNerd> I suspect that's how some of the Prolific chips work too
[12:42:42] <Lambda_Aurigae> LeoNerd, very possibly.
[12:42:46] <LeoNerd> Most notably the SOIC8 sized PL2303SA, which lacks an xtal
[12:43:12] <cehteh> Lambda-Aurigae: micronucleus does that for vusb at startup (low speed)
[12:43:32] <cehteh> i recently completed code which can sync the clock to some external clock continously
[12:43:44] <cehteh> planning to add that to v-usb stuff someday
[12:44:30] <cehteh> but damnit .. OSCCAL is so coarse
[12:44:41] <cehteh> would be nicer to have a finer tuning knob
[12:44:48] <LeoNerd> Yah
[12:45:06] <LeoNerd> Add it to the list ;)
[12:45:25] <cehteh> either less range for OSCCAL or a 2nd register for fine tuning
[12:45:45] <cehteh> (OSCCAL is weird anyway becaus of its 2 modes)
[12:46:19] <cehteh> i had to add compensation for that, and it needs configuration for each chip, with values guessed from the datasheet
[12:46:43] <Emil> cehteh: hm
[12:46:48] <Emil> what 2 modes
[12:47:11] <cehteh> osccal is actually 7 bit and the highest bit defines the mode
[12:47:14] <Lambda_Aurigae> I once tried using OSCCAL for adjusting to tune for USART comms but went back to just adjusting the USART speed instead.
[12:47:18] <Emil> Ah, yeah
[12:47:22] <cehteh> there are 2 overlapping ranges
[12:47:32] <Emil> Yes I know
[12:48:43] <cehteh> i just added something simple if incrementing and OSCCAL == 127 then OSCCAL = MODE_UP ..
[12:48:43] <LeoNerd> OSCALFINE
[12:48:55] <LeoNerd> Wait that might be too long a name. AVR seem to have an allergy to long register names
[12:48:58] <cehteh> where MODE_UP is something like 186 or so
[12:49:13] <cehteh> (guessed from the figure on the datasheet)
[12:49:27] <LeoNerd> Oh that's another thing on my AVR list - split the UART core from the UART baud generator
[12:49:33] <cehteh> doesnt need to be very precise, but i dont want biggier jumps in OSC frequency
[12:49:55] <Lambda_Aurigae> LeoNerd, like the 8051/8052?
[12:49:57] <LeoNerd> Pull its timer away to being a dedicated separate (simpler) timer unit, and allow users to hook up the TXclock/RXclock of the UART to that *or* other sources
[12:50:23] <LeoNerd> Ihave on occasoins wanted different TX and RX clocks, and been quite happy to dedicate one of the other timer units to generating one of those clocks
[12:50:38] <cehteh> yeah different rx/tx clocks would be nice
[12:50:54] <cehteh> 2 uarts :D
[12:51:15] <cehteh> mega328pb \o/
[12:51:28] <Lambda_Aurigae> mega1284p has that.
[12:51:37] <Lambda_Aurigae> as do many others.
[12:51:42] <cehteh> i am eagerly avaiting china arduino nano clones with the 328pb
[12:52:20] <LeoNerd> Five-count-them-five timers!
[12:52:25] <LeoNerd> They've done a Gilette
[12:52:29] <LeoNerd> (Gillette?)
[12:52:37] <cehteh> well .. i only use one timer :D
[12:52:45] <lorenzo> I've got the mega328pb dev board from atmel :D
[12:52:48] <LeoNerd> My latest project uses 3 of them
[12:52:53] <lorenzo> it's like 7 eur
[12:52:55] <lorenzo> still have to figure out the differencies though :/
[12:53:00] <LeoNerd> Icould have got away with maybe 1 or 2 but I'm lazy and I have 3
[12:53:07] <LeoNerd> One is CPU core ticker, other two do LED PWMing
[12:53:28] <LeoNerd> I could have got away with softPWM but.. eh.. I had spare pins, they're OC pins, the timer units are sitting idle anyway... so why bother?
[12:53:41] <cehteh> one timer with massively more PWM units would be nice
[12:54:00] <cehteh> you rarely need different PWM clocks, actually having them synced is better
[12:54:03] <LeoNerd> The 32U4 has 3 output channels on its timer1
[12:54:07] <lorenzo> ah nice http://www.atmel.com/Images/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_Application%20Note_AT15007.pdf
[12:54:10] <LeoNerd> OC1A/OC1B/OC1C
[12:54:26] <LeoNerd> Yes - that might be nice. Or even separate PWM units
[12:54:35] <cehteh> i know .. but something like "2 clocks, one of them with 8 pwm channels" .. would be cool
[12:54:39] <cehteh> 6 already too
[12:54:43] <LeoNerd> 3 counter/timers, 8 PWM units which can each be steered to look at any of the timer counts
[12:55:03] <LeoNerd> At this point we're starting to edge on semicommitted logic FPGA-ish things
[12:55:36] <LeoNerd> But yah; I'd like to see MPUs work more like people building curcuits
[12:55:56] <LeoNerd> I don't buy a single chip that does everything. I combine smaller simpler units Lego-style. I'd like to see similar inside an MPU
[12:56:00] <LeoNerd> MCU
[12:56:01] <cehteh> anyway .. i try to conserve timers, makes it portable to smaller chips and later more flexible if one need to add drivers for esoteric shit
[12:57:28] <cehteh> thats why i run the main tick timer at this high speed too, i can use it in the CPPM driver with the capture unit to sample fast signals too
[12:57:46] <LeoNerd> I'm still superimpressed with my 6-LED independent PWM'able charlipexed LEDs on a tiny84
[12:58:25] <cehteh> do you have some generic charliplexing driver or ad-hoc?
[12:59:29] <cehteh> one can optimize chariplexing a lot, light more than one led at a time, but calculating the optimal drive sequence esp for PWM getting complex
[12:59:55] <cehteh> have some upper limit how much leds are on at most too
[13:00:11] <LeoNerd> Mm
[13:00:26] <LeoNerd> So far for prettymuch every project of mine, I copy the src/leds.[ch] files from my previous project and adapt it to match
[13:00:45] <LeoNerd> Almost every AVR project of mine ends up with calls to set_led(LEDID_STATUS, LED_ON); or somesuch... :)
[13:00:55] <eszett> hi
[13:01:08] <cehteh> haha
[13:01:21] <cehteh> LeoNerd: but you get what i mean?
[13:01:28] <LeoNerd> About..?
[13:01:49] <cehteh> charlypexing and calculating outputs for driving multiple leds at once
[13:02:29] <cehteh> mhm 8 I/O's are enough for 56 leds
[13:02:34] <LeoNerd> Oh.. in theory. In practice I've never found a case where it mattered. I'd only charliplex to maybe 3 channels (6 LEDs) or 4 channels (12 LEDs) at currents that the chip could just light up all at once anyway
[13:02:48] <LeoNerd> If I needed more LEDs I'd be looking to offload the lot to a max7219 or such
[13:03:09] <cehteh> yes i am only thinking about having fun here
[13:03:23] <LeoNerd> I only charliplexed this because I had a tiny handheld battery powered radio remote, which needed 3 buttons and 4 LEDs and I only had 4 spare IOs in total
[13:03:24] <cehteh> charlyplexing isnt that serious because it has a lot drawbacks
[13:03:35] <LeoNerd> So one became a 3way ADC chain and the other 3 charlied the LEDs
[13:04:08] <LeoNerd> The way I did analog read on the buttons was also quite cute - I picked the resistor values carefully and use the anacomp to distinguish "no buttons" from "at least one button"
[13:04:32] <LeoNerd> So in the common no-button case I don't need to poll the ADC, so battery is happier. anacomp tells me quickly if that changes, at which point I start polling to read them
[13:05:07] <cehteh> mhm charliplexed RGB leds ..
[13:05:20] <Lambda_Aurigae> isn't that called masochism?
[13:05:31] <cehteh> 56/3 .. 18 leds
[13:05:32] <liwakura> why not using WS2811 ?
[13:05:53] <cehteh> just because :)
[13:06:05] <LeoNerd> Because a: I wanted 4 simple single colour LEDs, b: I'm battery-powered so low power is good, and c: I don't want to kill myself with the stupid stupid timing requirements writing that shit
[13:06:14] <liwakura> cehteh: rgb leds have either common anode or cathode, you will need multiple types
[13:06:24] <LeoNerd> If I need a serial-controlled multiplexed RGB intelligent LED these days, I pick APA-102s
[13:06:28] <LeoNerd> They're an SPI chain
[13:06:31] <cehteh> liwakura: yes thats the challenge
[13:06:38] <LeoNerd> So wooo! no stupid timing critical requirements on the driver code
[13:30:53] <stephe> How does fast PWM work when top = OCR2A? I don't understand how you define the duty cycle %, usually I would use the OCRxx registers to set the time where I want to start the pulse, then the pulse ends at top...
[13:31:57] <Lambda_Aurigae> http://hackaday.com/2016/03/23/unlock-the-phase-locked-loop/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29
[13:32:05] <Lambda_Aurigae> nice little pll writeup
[13:33:46] <Emil> stephe: do you mean toggle, set or clear
[13:35:07] <stephe> Emil: set
[13:36:27] <stephe> I'm using WGM mode 7
[13:45:51] <stephe> With timer 1, there's another option where you can say ICR1 is TOP and then you just use OCR1A/B as normal
[13:46:02] <stephe> but not sure about timer 2
[13:47:19] <LeoNerd> Ohman all the timers are crazy
[13:47:27] <LeoNerd> So many weird special rules and minor differences between chips
[13:47:35] <LeoNerd> I can never get them committed to memory
[13:48:55] <Lambda_Aurigae> that's what datasheets are for.
[13:49:00] <Lambda_Aurigae> or, pick one or two and stick with them.
[13:49:02] <LeoNerd> Hah
[13:49:04] <LeoNerd> datasheets
[13:49:09] <LeoNerd> Yes, the information is all burried deep in there
[13:49:12] <LeoNerd> I want a handy little table
[13:49:15] <PoppaVic> hmm, I was thinking "hammer", but.. OK
[13:49:37] <Lambda_Aurigae> I've pretty much settled on attiny85, atmega1284p, ds89c450, and pic32mx270f256b as my standard chips.
[13:49:37] <LeoNerd> ATmega328P: "Timer2 - 16bit. output compare A and B. supports fastPWM. supports async."
[13:49:42] <LeoNerd> That one line would be useful
[13:51:02] <stephe> Timer1 is the 16 bit one, Timer2 is 8 bit
[13:52:08] <stephe> So 328p is one of the more complicated chips?
[13:52:34] <lorenzo> LeoNerd: how's the ds89?
[13:52:52] <LeoNerd> The what?
[13:52:57] <lorenzo> the maxim-ic micro
[13:53:05] <LeoNerd> stephe: Heh.. see... My memory is terrible
[13:53:13] <lorenzo> looks like yet another 8051 core
[13:53:34] <LeoNerd> I have no idea. Never used it, seen it, touched it...
[13:53:40] <Lambda_Aurigae> lorenzo, that's one I play with.
[13:53:46] <Lambda_Aurigae> it's a nice 8052 chi.
[13:53:47] <lorenzo> oh I got the tab wrong lol sorry
[13:53:51] <Lambda_Aurigae> chip.
[13:54:12] <Lambda_Aurigae> built in autobaud serial bootloader, external memory interface, 64K internal flash
[13:54:26] <Lambda_Aurigae> high speed 8052 core.
[13:55:28] <stephe> LeoNerd: hmm ok, what do you use?
[13:55:30] <Lambda_Aurigae> I have one on a board with a 128KByte nvsram that is hooked up for bank switching 32K of program space and 32K of data space
[13:55:41] <Lambda_Aurigae> not a lot in the way of peripherals thouh.
[13:55:42] <Lambda_Aurigae> though
[13:55:49] <lorenzo> Lambda-Aurigae: no peripherals such as spi/twi?
[13:55:50] <Lambda_Aurigae> but it does allow me to execute code from sram.
[13:55:59] <LeoNerd> stephe: I've used tiny13a tiny84 mega88p mega328p mega256a mega32u4
[13:56:35] <stephe> LeoNerd: do you have a favourite? :)
[13:56:43] <Lambda_Aurigae> lorenzo, 2 serial ports,,no i2c or spi.
[13:56:54] <lorenzo> Lambda-Aurigae: so it's pretty much all bitbanging?
[13:57:01] <LeoNerd> Hrm... hard to say. the tiny84 is nice
[13:57:04] <Lambda_Aurigae> yeah, if you need those ports.
[13:57:05] <LeoNerd> Oh.. and the tiny841
[13:57:09] <liwakura> do you guys have websites or project pages where i could find inspiration?
[13:57:29] <Lambda_Aurigae> liwakura, google.com
[13:57:35] <Lambda_Aurigae> that's where I get my inspiration.
[13:57:54] <liwakura> i just want to know what you are at
[13:57:56] <liwakura> you, like
[13:58:02] <liwakura> people i can actually talk to
[13:58:16] <stephe> LeoNerd: might have been wiser of me to start with a tiny chip instead of 328p, since im a beginner
[13:58:17] <Lambda_Aurigae> my online presence is,,,,irc
[13:58:33] <LeoNerd> stephe: Mmm. Perhaps. The mega328p is not the simplest of chips to learn from
[13:58:56] <liwakura> but its easily available with an bootloader for flashing over serial
[13:58:58] <Lambda_Aurigae> I think the 328p is a decent starter chip.
[13:59:12] <Lambda_Aurigae> I started with the atmega32 back in the day.
[13:59:16] <liwakura> btw, i also have arduino nano's (328p) as starter chip
[13:59:22] <liwakura> but i dislike the arduino libs
[13:59:26] <Lambda_Aurigae> that was the top of the line available in a dip package at the time.
[13:59:50] <stephe> So I ended up using fast PWM with top = 0xFF, then I can use OCR2A as normal, but i still dont get the point of mode 7 where you use OCR2A as top...
[14:00:28] <LeoNerd> Yah; I like using the arduino boards as they're cheap convenient ways to get an atmega on a breakout.. I don't run the software though
[14:01:40] <lorenzo> the arduino nano is probably the cheapest way to get an atmega328p development board / breakout
[14:02:05] <lorenzo> that's how I use it https://i.imgur.com/Z768RPs.gifv :D
[14:03:08] <stephe> lorenzo: what is that youre using to program it?
[14:03:53] <lorenzo> stephe: vim + avr-gcc + avrdude
[14:04:01] <lorenzo> and that thing is a tinyusb clone
[14:04:18] <lorenzo> usbtinyisp
[14:04:56] <lorenzo> http://www.ebay.it/itm/330824700564
[14:05:19] <lorenzo> $7.95 .. as you can see I invest a lot in my instruments :>
[14:05:22] <liwakura> did you remove the arduino bootloader?
[14:05:54] <lorenzo> liwakura: yes
[14:06:06] <lorenzo> well, I overwrote it the first time I programmed the thing :p
[14:06:35] <stephe> what's the benefit of removing the bootloader?
[14:06:48] <lorenzo> no idea, I just use the ISP header for programming
[14:06:56] <lorenzo> and what happens is that it flashes the whole chip
[14:07:03] <Lambda_Aurigae> remove bootloader, you have more space for main program.
[14:10:43] <stephe> hmm ok
[14:11:21] <Lambda_Aurigae> not sure how big the arduino bootloader is,,,2K, 1K, 0.5K? either way it takes up space.
[14:11:36] <Lambda_Aurigae> bootloader is good for uploading programs to the chip
[14:11:40] <Lambda_Aurigae> but it can't change fuses
[14:11:58] <cehteh> with the nano its really convinient
[14:12:00] <Lambda_Aurigae> so if you want to switch around things that are controlled by fuses you have to have an external programmer.
[14:12:00] <liwakura> its starts at 0x7800 and the flash goes until 0x8000 i think
[14:12:09] <LeoNerd> I often do change fusrs because I have differnet clock requirements
[14:13:31] <Lambda_Aurigae> so, 2K bootloader
[14:14:30] <stephe> what do you guys use to debug?
[14:15:54] <Lambda_Aurigae> my brain
[14:15:58] <Lambda_Aurigae> LEDs
[14:16:19] <Lambda_Aurigae> serial port to send "debugging" stuff.
[14:16:37] <Lambda_Aurigae> put printf commands here and there to send info out to tell what the chip is doing.
[14:16:37] <cehteh> logic analyzer
[14:16:43] <Lambda_Aurigae> much the same way I do it on a pc.
[14:17:03] <Lambda_Aurigae> I also have a logic analyzer.
[14:17:07] <cehteh> well most of it is thinking ... and instrumentate your code
[14:17:40] <cehteh> and possibly test things like algorithem before on your host computer, native compile or in simulator
[14:18:00] <stephe> right now i'm just using my brain, and my brain is coming up short a lot of the time :D
[14:18:07] <cehteh> if you are lucky then you only need to confirm that stuff still works on the avr
[14:18:25] <cehteh> happens often enough for me :D
[14:18:39] <liwakura> do you know a way how i could use an avr to temporarily store data?
[14:18:53] <cehteh> as in?
[14:18:54] <liwakura> like an ram
[14:18:54] <Lambda_Aurigae> you just need to understand your code and how it works...break it down into functional blocks and work on each small block then put them together.
[14:18:57] <liwakura> but multiple MB
[14:19:03] <Lambda_Aurigae> multiple MB?
[14:19:07] <cehteh> add a sd card over spi
[14:19:11] <Lambda_Aurigae> you will need external memory.
[14:19:22] <liwakura> im thinking of an ARM emulator
[14:19:27] <Lambda_Aurigae> you can get serial sram chips in 1Mbit configuration
[14:19:28] <liwakura> i would use sd card as sorta disk
[14:19:41] <cehteh> that one used a external dimm memory
[14:19:44] <Lambda_Aurigae> you CAN hook up a 4MB 30pin simm
[14:19:57] <liwakura> hm. not sure if 4MB will be enough
[14:20:00] <cehteh> simm whatever
[14:20:07] <Lambda_Aurigae> the arm emulator that's been done used that method.
[14:20:12] <cehteh> you know how slow it is?
[14:20:23] <cehteh> i mean if you need more ram .. caclulate the bandwdith you have
[14:20:26] <liwakura> cehteh: like 2000 instructions per second
[14:20:28] <Lambda_Aurigae> cehteh, yup....have one that I fire up once in a while.
[14:20:48] <cehteh> then soon you notice that transfering more than a few MB will take long
[14:21:15] <Lambda_Aurigae> liwakura, with a little more info on the project we might can come up with better suggestions..
[14:21:32] <Lambda_Aurigae> but an ARM emulator is gonna be horribly slow and not practical for anything but learning.
[14:21:41] <liwakura> similar setup: http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20on%208bit
[14:22:05] <Lambda_Aurigae> yup
[14:22:10] <Lambda_Aurigae> that's the one I copied.
[14:22:35] <Lambda_Aurigae> have considered adding another 4MB simm to the project.
[14:23:08] <cehteh> Lambda-Aurigae: would be fun to compile a kernel on itself
[14:23:35] <Lambda_Aurigae> cehteh, you have a few years to spare?
[14:23:38] <cehteh> yeah
[14:23:58] <liwakura> i do not directly want to run linux on it
[14:24:04] <Lambda_Aurigae> I recently did a recompile of an older kernel on a 386dx40 and it took 2 days.
[14:24:25] <liwakura> but make a way that i can code on that platform
[14:24:57] <Lambda_Aurigae> liwakura, it is possible to connect a 128Mb stick to an AVR and read/write it...not very practical though.
[14:25:26] <Lambda_Aurigae> liwakura, like, edit and compile?
[14:25:30] <liwakura> sort of
[14:25:35] <liwakura> or live edit the machine code
[14:25:38] <liwakura> while debugging
[14:25:54] <Lambda_Aurigae> if you are working on arm code, might be better to do it right on arm.
[14:26:07] <liwakura> nah, arm just because its an cool arch
[14:26:09] <Lambda_Aurigae> if you are doing it on avr code then it might be more doable.
[14:26:24] <liwakura> hm.
[14:26:30] <Lambda_Aurigae> running anything on an arm emulator on top of an avr is going to be horribly slow.
[14:26:46] <liwakura> "slow" is relative :D
[14:26:58] <PoppaVic> so is "cool"
[14:27:03] <Lambda_Aurigae> I bet just running gcc on that emulator would take an hour to come back with the version.
[14:27:16] <Lambda_Aurigae> vi on that is painful.
[14:27:21] <liwakura> i think i still have 40 or 50 years left
[14:27:57] <Lambda_Aurigae> I have been playing with picoC, a C interpreter and putting it on microcontrollers.
[14:28:00] <cehteh> Lambda-Aurigae: hah that would be the thing .. run this arm emulator in simavr
[14:28:17] <liwakura> an C interpreter?
[14:28:18] <liwakura> i mean
[14:28:21] <liwakura> why??
[14:28:24] <Lambda_Aurigae> cehteh, would take an extension to simavr for the external memory but doable.
[14:28:24] <liwakura> interpreting C ?
[14:28:28] <Lambda_Aurigae> liwakura, why not?
[14:28:29] <cehteh> scripting
[14:28:35] <Lambda_Aurigae> it's like a BASIC interpreter only more powerful.
[14:28:47] <Lambda_Aurigae> and/or just a different language than BASIC
[14:28:51] <liwakura> its even slower then directly emulating some architecture
[14:28:54] <Lambda_Aurigae> like csh or bash on linux.
[14:29:00] <Lambda_Aurigae> no,,,it's not
[14:29:12] <Lambda_Aurigae> at least, not slower than emulating a 32bit arm on an 8bit avr.
[14:29:25] <cehteh> i often add some ad-hoc things which get interpeted, configureable sequences for LED blinking, temperature curves for oven .. whatever
[14:29:39] <cehteh> having such things scriptable could have some benefit
[14:29:47] <liwakura> hm
[14:29:47] <Lambda_Aurigae> I've done a couple of custom scripting languages over the years.
[14:30:22] <Lambda_Aurigae> picoC is rather large though and I've shifted from the atmega1284p to the pic32mx270f256b
[14:30:49] <Lambda_Aurigae> twice the flash, 4 times the sram, 4 times the speed, and a 32bit processor.
[14:32:54] <Lambda_Aurigae> and I'm using Jartza's octapentaveega for video output.
[14:33:14] <Lambda_Aurigae> and an old ps-2 keyboard for input.
[14:33:22] <liwakura> maybe i'll just wire an piezo and an sd card to my avr
[14:33:31] <liwakura> and make it play the radetzky march
[14:33:44] <antto> the wat?
[14:33:54] <liwakura> The Radetzky March
[14:33:59] <liwakura> google it
[14:35:20] <liwakura> and if im gonna waste an 8gb sd card anyway, i'll just add some other stupid music
[14:35:28] <Lambda_Aurigae> hehe.
[14:35:34] <liwakura> like italodance
[14:36:06] <liwakura> and then i'll turn it in as "beeper project"
[14:36:18] <Lambda_Aurigae> I remember a project on hackaday years back that used old 32K UV-erasable EPROMs and an avr to play music for a musical doorbell.
[14:38:22] <eszett> hm
[14:38:39] <liwakura> oh
[14:38:49] <liwakura> i could also just load some 8bit music on it
[14:39:09] <liwakura> i think i should be able to run 8000 Hz 8bit pcm
[14:39:17] <liwakura> now wait for it...
[14:39:19] <liwakura> stereo!
[14:41:38] <liwakura> i think it will neve leave the planning stage anyways
[14:43:39] <Lambda_Aurigae> http://hackaday.com/2014/02/01/duo-portable-a-homebrew-computer-with-keyboard-and-display/
[14:43:45] <Lambda_Aurigae> nifty little project.
[15:56:17] <julius> hi
[15:57:23] <Lambda_Aurigae> iH
[16:02:40] <cehteh> 𝔊𝔲𝔱𝔢𝔫 𝔄𝔟𝔢𝔫𝔡
[16:04:02] <Valen> cehteh: thats fancy AF man
[16:22:54] <eszett> does someone know an easy way to check the datalines of an atmel, whether they are working correctly or not?
[16:23:10] <eszett> maybe some line of code?
[16:23:15] <Valen> flash a LED?
[16:23:31] <eszett> the LED flashes, but i think it would do without the datalines no?
[16:24:19] <eszett> the code that flashes the LED is on the Atmega, why would it need the datalines for it?
[16:24:39] <eszett> Valen?
[16:24:47] <Lambda_Aurigae> what datalines?
[16:24:55] <Lambda_Aurigae> do you mean i/o pins?
[16:25:02] <Valen> what?
[16:25:27] <eszett> I mean D+ and D- pins, the termination resistors on these pins, and the wiring from D+ and D- to my usb port
[16:25:40] <Lambda_Aurigae> you will need a logic analyzer
[16:25:49] <Lambda_Aurigae> and/or an oscilloscope.
[16:25:49] <eszett> a logic analyzer ok
[16:25:58] <Lambda_Aurigae> and some knowledge of what you are looking at.
[16:26:19] <eszett> just want to check if wiring is ok, and if resistors are doing what they shall do.
[16:26:31] <Lambda_Aurigae> what software are you running on the AVR to do USB communications?
[16:26:40] <Valen> you would need a very very fast logic analyser
[16:26:43] <eszett> Lambda: the bootloader
[16:26:50] <Lambda_Aurigae> THE bootloader?
[16:26:57] <Lambda_Aurigae> there are literally hundreds of bootloaders out there.
[16:26:58] <eszett> yes the DFU bootloader from Atmel
[16:27:03] <eszett> the official bootloader
[16:27:35] <eszett> the Bootloader is ATMega32U4-usbdevice_dfu-1_0_0.hex
[16:28:45] <Lambda_Aurigae> make sure your circuit meets the requirements as set forth by atmel for connecting to the usb port.
[16:28:54] <eszett> Lambda: i cant enter the bootloader mode, so i have to troubleshoot. a possible spot to check are the datalines
[16:29:26] <eszett> Lambda: i did
[16:29:53] <Lambda_Aurigae> you have the proper crystal attached?
[16:29:53] <eszett> rather, I cant get the circuit detected by the OS as USB device
[16:30:06] <eszett> yes, 16mhz, with 22pF caps, working
[16:32:50] <eszett> I would like to check the datalines, but there must be an easy way besides buying an oscilloscope. Just a line of code perhaps?
[16:35:47] <RikusW> eszett: Did you load any firmware onto the device yet ?
[16:36:04] <eszett> yes
[16:36:26] <RikusW> then you probably need to use the HWB pin to reenter the bootloader
[16:36:40] <RikusW> so usb bootloading worked ?
[16:36:55] <eszett> And it worked. circuit works, crystal works, cables (seems to) work, custom code works. But.. Bootloader doesnt work, at least i cant get the USB device detected by my OS as USB device.
[16:37:19] <RikusW> but it worked first time around to load the firmware ?
[16:37:27] <eszett> Rikus: I have HWB pin with 1k drawn to GND.
[16:37:46] <eszett> yes i can flash the firmware with my ISP programmer to the chip
[16:38:17] <Lambda_Aurigae> the question is, has the usb bootloader ever worked?
[16:38:21] <eszett> not sure
[16:38:42] <eszett> maybe the bootloader works, and it even enter bootloader mode. But i see no reaction. for example..
[16:38:49] <RikusW> there are unfortunately many things that can go wrong in the usb enumeration process.... hw, fw...
[16:39:02] <RikusW> which os are you using ?
[16:39:08] <eszett> With Atmel FLIP "sees" no USB device. My OS "seeS" no USB device. The USB device is not there in my OS
[16:39:12] <RikusW> win/lin/mac ?
[16:39:21] <eszett> Win7
[16:39:31] <eszett> Rikus. yes many many possible mistakes
[16:40:35] <Valen> I always get D+ and D- ass about
[16:40:39] <RikusW> The fuses need to be in the default state as well
[16:40:52] <Lambda_Aurigae> and, how is your system clock set?
[16:41:16] <Lambda_Aurigae> RikusW, that chip comes set to external crystal by default?
[16:41:22] <RikusW> Lambda_Aurigae: afaik the Atmel bootloader autodetects 8/16MHz
[16:41:31] <eszett> the fuses were in default state and it didnt worked. I slightly changed them, but with no effect too
[16:41:40] <Lambda_Aurigae> didn't know it worked with internal rc oscillator..interesting.
[16:41:43] <RikusW> yes its default to external
[16:42:07] <eszett> <Lambda_Aurigae> RikusW, that chip comes set to external crystal by default? => differs from whiich version of Atmega32U4. My version is Atmega32U4 and yes it needs external crystal
[16:42:11] <RikusW> I don't think RC will work for usb though
[16:42:18] <eszett> My version is Atmega32U4-AU, sorry -AU
[16:42:36] <RikusW> AU is for tqfp
[16:42:51] <eszett> oh, wait
[16:43:19] <RikusW> Is this a custom built board or a bought one ?
[16:43:28] <eszett> custom build circuit on breadboard
[16:44:00] <RikusW> How did you get the tqfp on breadboard ?
[16:44:09] <RikusW> generic breakout ?
[16:44:10] <eszett> bought an breakout board
[16:44:29] <eszett> so no mistakes there
[16:44:54] <Lambda_Aurigae> bus powered or self powered? 5V or 3.3V?
[16:44:57] <RikusW> Do you have a 1uF tantalum on Ucap ? and 10uF on Vcc ?
[16:45:26] <eszett> <RikusW> AU is for tqfp => yes you are right. but the version "Atmega32u4-AU" is for external crystal only. sEE PDF p. 421 http://www.atmel.com/images/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf
[16:45:53] <eszett> I have this version, so i need external crystal, and i have external crystal working, everything fine there.
[16:46:07] <eszett> Lmbda: USB powered
[16:46:10] <eszett> 5v
[16:46:12] <RikusW> 32u4 only comes in tqfp and qfn, both needs a crystal
[16:46:33] <eszett> nope..
[16:46:45] <Lambda_Aurigae> and what resistors do you have on the D+ and D- lines?
[16:47:37] <RikusW> UCap needs a 1uF tantalum for usb 3v3 regulation
[16:47:49] <eszett> ATmega16U4-AU & ATmega16U4-MU for External XTAL
[16:47:49] <eszett> ATmega16U4RC-AU & ATmega16U4RC-MU for Internal Calib. RC
[16:48:03] <eszett> Lambda: the standard 22 Ohm
[16:48:17] <eszett> Rikus: I use 5v
[16:48:34] <Lambda_Aurigae> eszett, you still need that cap for the usb regulator to work.
[16:48:43] <RikusW> the RC version only have different fuse settings afaik, you still need a crystal for usb
[16:49:01] <eszett> La,bda: the 1µF on UCap?
[16:49:09] <RikusW> eszett: even if you use 5V you NEED a 1uF cap on the UCap pin
[16:49:21] <RikusW> usb needs 3v3 on the D+ and D- lines
[16:49:40] <RikusW> the regulator is builtin, and only needs a cap
[16:49:47] <eszett> ah.. didnt know that
[16:49:50] <Lambda_Aurigae> section 21.5 of the datasheet
[16:49:51] <eszett> thanks for the hint!
[16:49:58] <eszett> let me check...
[16:50:04] <Lambda_Aurigae> I'm looking right at it.
[16:50:18] <RikusW> and do put a 10uF on Vcc and DO connect AVcc to Vcc
[16:50:36] <eszett> AVcc to Vcc => have this
[16:50:53] <eszett> i will add some cap(s) now to the breadboard
[16:50:59] <RikusW> If you want to use the comparator put a 10uH coil between Vcc and AVcc, and 100nF from Avcc to gnd
[16:51:05] <Lambda_Aurigae> refer to figure 21-3 on page 257
[16:51:34] <eszett> Rikus: a comparator? dont think i will use one
[16:51:41] <eszett> Lambda: ok
[16:51:56] <RikusW> then just connect Vcc and AVcc
[16:52:39] <eszett> I have to add this 1µF cap to UCAP =)
[16:52:54] <eszett> is tantalum necessary?
[16:52:58] <eszett> I have a ceramic one
[16:53:38] <RikusW> you can try another type of 1uF, atmel recommends tantalum or other low esr
[16:53:46] <eszett> ah, alright
[16:54:14] <RikusW> also connect vbus - uvcc - vcc - avcc
[16:55:36] <eszett> ye
[17:00:17] <eszett> omg it works!!
[17:00:25] <eszett> the ucap cap was it
[17:00:31] <RikusW> :)
[17:00:41] * eszett shakes the hand of RikusW and Lambda-Alpha
[17:00:55] <eszett> jesus joy is in the air
[17:01:32] <RikusW> eszett: have you done usb programming before ?
[17:01:46] <eszett> yes with my keyboard and Atmel FLIP
[17:02:35] <RikusW> I mean, have you written firmware that implements the USB stack ?
[17:02:49] <RikusW> or are you going to use LUFA or Atmel sample
[17:02:53] <RikusW> code
[17:02:58] <eszett> When i go in Atmel FLIP on "select a communication medium" it now detects the breadboard circuit as USB device, that is it! that was my goal!
[17:03:33] <eszett> Rikus: the only code i have written so far is flashing an LED
[17:03:36] <eszett> im a beginner
[17:03:41] <RikusW> ah
[17:04:05] <eszett> i use the Atmel official bootloader and for the main firmware, i dont know yet
[17:04:21] <RikusW> I recommend that you use either LUFA or the Atmel USB code, USB CDC will give you a simple USB serial port
[17:04:42] <eszett> ok..?
[17:04:49] <RikusW> writing a usb stack is NOT easy
[17:05:11] <eszett> I would suspect so ..
[17:05:16] <Lambda_Aurigae> it's super easy.
[17:05:21] <Lambda_Aurigae> well, writing it is.
[17:05:23] <RikusW> USB CDC would be best for you..
[17:05:30] <Lambda_Aurigae> coming up with it in the first place,,,now that's hard.
[17:05:31] <RikusW> debugging it is NOT
[17:05:37] <RikusW> that too
[17:05:41] <Lambda_Aurigae> well, there is that...hehe
[17:05:48] <RikusW> reading usb specs is a nightmare...
[17:05:53] <Lambda_Aurigae> did that
[17:05:54] <Lambda_Aurigae> twice
[17:06:02] <Lambda_Aurigae> then I stole someone else's code.
[17:06:20] <PoppaVic> nah, it's tedious and irritating - and I side with Lambda_Aurigae ;-)
[17:08:06] <RikusW> I converted the Atmel CDC code to asm, and later converted that to an FTDI clone too
[17:08:53] <Lambda_Aurigae> I just ripped off some pic cdc code from somewhere and use pic chips as usb-cdc adapters for my avr projects.
[17:09:34] <PoppaVic> eww
[17:09:51] <Lambda_Aurigae> when I can do usb without any external parts, not even a crystal, then life is good.
[17:10:01] <Lambda_Aurigae> although, adding one cap does make them a bit more stable.
[17:10:20] <PoppaVic> That is soo depressing.
[17:10:35] <PoppaVic> "I used a PIC so my AVR could USB"
[17:11:13] <Lambda_Aurigae> the AVRs I have don't have usb hardware
[17:11:19] <Lambda_Aurigae> so it's either that or v-usb.
[17:11:26] <Lambda_Aurigae> https://hackaday.io/project/6258-two-component-usb-temperature-data-logger
[17:11:33] <Lambda_Aurigae> I ripped the core from that.
[17:11:44] <PoppaVic> Lambda_Aurigae: it's just.... PIC.. I still lack a programmer, with 24's on the shelf.
[17:12:02] <RikusW> Seems to me the usb specs are only to be used for reference when you already understand usb, and even then its cryptic at best
[17:12:04] <Lambda_Aurigae> I got a pickit3 for doing pic32 stuff.
[17:12:24] <Lambda_Aurigae> which isn't really pic but mips with pic peripherals.
[18:02:29] <eszett> Lambda: just a question for my understanding. When i connect HWB Pin to GND this is similar in function like a fuse. It tells the microcontroller how he shall act. Is the 1µF cap on UCAP Pin also such a thing? or what is the reason of it being there?
[18:02:52] <LeoNerd> I believe all the U* pins relate to the USB PHY
[18:02:59] <LeoNerd> So if USB isn't working right I'd be looking at those
[18:03:00] <eszett> ah..
[18:03:09] <LeoNerd> also: why aren't you using a premade 32U4 breakout board?
[18:03:10] <Lambda_Aurigae> the ucap pin is part of a 3.3V regulator feeding the USB hardware.
[18:03:16] <LeoNerd> E.g. the Adafruit one is very nice and JustWorks straight out of the box
[18:03:21] <LeoNerd> You wouldn't have any of this mess of confusion
[18:03:24] <LeoNerd> Especially for a first-time user
[18:03:25] <eszett> Leonerd: im usint a custom circuit on breadboard for learnin purposes
[18:03:38] <LeoNerd> But why?
[18:03:43] <Lambda_Aurigae> it is explained in the datasheet.
[18:03:51] <Lambda_Aurigae> nobody bothers to read the datasheets these days.
[18:03:54] <LeoNerd> Start with the premade breakout board, so you can learn how the chip internals work, say, without worrying if you've wired the pins up correctly
[18:03:55] <eszett> Lambda: ok thx =)
[18:04:05] <LeoNerd> Don't dive in at the deep end and try to learn /everything/ all at once
[18:04:33] <Lambda_Aurigae> or, as gramps used to say,,,learn to crawl before trying to run.
[18:04:34] <LeoNerd> Otherwise you'll run into problems like this, where you keep turning up on IRC every day and ask lots of people lots of questions and consume lots of time; your own and others; trying to work out what the problem is
[18:04:42] <eszett> Leonard yes unfortunately i did dive abit too deep
[18:05:07] <LeoNerd> Also for hardware you might like the (badlynamed) Arduino Micro. That's a 32U4-based board.
[18:05:18] <LeoNerd> (not to be confused with the Mini or the Nano, which are both 328P)
[18:05:50] <LeoNerd> The Micro is a lot cheaper than the Adafruit breakout but it doesn't expose as many of the IO pins.. it's trying to be a Nano/Mini clone
[18:06:21] <eszett> but seriouzsly the datasheet are no good source to explain things. they are full of tables which isnt the same as text, and not even close to reasoning
[18:07:06] <Lambda_Aurigae> where do you think we got the info you asked for?
[18:07:23] <Lambda_Aurigae> I've never used an atmega32u4 but I was able to read the datasheet when you asked your questions.
[18:07:55] <eszett> i guess you know some working principles which are required to read a datasheeet properl
[18:08:15] <Lambda_Aurigae> reading comprehension
[18:08:18] <LeoNerd> Lambda_Aurigae: People are much the same in the software channels.. people are always turning up, asking how to use such a library, etc... and we just quote bits straight out of the docs...
[18:09:34] <eszett> The datasheet tells that x needs y, but not why it needs y, or what is the background of designing it like this
[18:10:11] <LeoNerd> Datasheets rarely do
[18:10:21] <Lambda_Aurigae> for some of that you need other background.
[18:10:25] <Lambda_Aurigae> like, the usb spec
[18:10:33] <LeoNerd> "You must place a 10nF cap between pin 12 and GND", random example. OK sure... I'll do that
[18:10:33] <eszett> so it explains almost nothing, it just gives requirements, and there is not even the info about how strictly the requirements are.
[18:10:40] <LeoNerd> I don't need to know why. I'll just do it, and look it works
[18:10:53] <Lambda_Aurigae> requirement is....requirement
[18:11:33] <LeoNerd> Again, you're learning from scratch. So start by just following the instructions to the letter, until it works
[18:11:34] <eszett> LeoNerd: hmm i dont have that attitude.
[18:11:42] <LeoNerd> Once you have something that works, you can start adjusting and playing with changing things
[18:11:54] <LeoNerd> But you need to start that experimentation from a known-good starting point
[18:12:04] <eszett> sure
[18:12:09] <LeoNerd> You can't start from a blank canvas and hope to stumble upon a working configuration from zero
[18:12:35] <Lambda_Aurigae> eszett, I do have a bit of an advantage in that I started reading datasheets when I was 10 or 12.
[18:12:38] <twnqx> i always do :/
[18:12:48] <twnqx> blank canvas is the way to go
[18:12:59] <LeoNerd> Yes but you have the experience to back it up :P
[18:13:04] <LeoNerd> New starting students don't
[18:13:11] <twnqx> less than you seem to believe :P
[18:13:13] <Lambda_Aurigae> I also started reading the science encyclopedia and encyclopedia brittanica when I was 5.
[18:13:15] <eszett> Lambda: little advantage. just little
[18:13:40] <Lambda_Aurigae> and, yes, reading, not just looking at the pictures.
[18:13:41] <twnqx> it's just that i use reference schematics from other people ver often, and hold them up against the data sheets
[18:13:59] <twnqx> to very that what other people do is actually right and not as half-assed as adafruit and arduino crap
[18:14:02] <twnqx> verify*
[18:14:14] <eszett> Lambda: you must be joking, dont know anyhow reading encyclipedias with 5.
[18:14:29] <Lambda_Aurigae> twnqx, hehe....and v-usb....the hacks that people have done from the v-usb reference projects just amaze me that they work at all.
[18:14:43] <twnqx> i was borrowing elektor books when my classmates went up to the children's section in the public library
[18:15:08] <Lambda_Aurigae> eszett, I learned to read from having my mother read to me and point at the words as she did so...
[18:15:16] <twnqx> really....
[18:15:56] <Lambda_Aurigae> taught myself to speed read in 4th grade...by then I was reading on a high school graduate comprehension level.
[18:16:01] <twnqx> can't remember if i could read before being taught in elementary school
[18:16:12] <Lambda_Aurigae> pissed my teachers off in first grade.
[18:16:22] <Lambda_Aurigae> I could outread anybody in the class from the start.
[18:16:40] <Lambda_Aurigae> and was bored with their slow teaching,,and told them so.
[18:16:51] <Lambda_Aurigae> I was a bastard even back then.
[18:16:54] <twnqx> heh
[18:17:08] <Lambda_Aurigae> spent a lot of time in the principal's office, I did.
[18:17:08] <twnqx> i skipped from first straight into second class, and semester break :P
[18:17:17] <twnqx> at semester break*
[18:18:09] <twnqx> and look where it got me, straight to spend all my time on irc!
[18:18:17] <Lambda_Aurigae> hehe.
[18:18:23] <Lambda_Aurigae> I'm doing 4 things right now.
[18:18:42] <eszett> hehe spending that much time on IRC means something went wrong in your life ;-)
[18:19:06] <Lambda_Aurigae> watching Startrek Enterprise, chatting on irc(7 channels but most are dead), reading vexxar web comic, and writing some code for pic32 project.
[18:19:10] <twnqx> a lot of things did.
[18:20:33] <Valen> everybody hated on enterprise
[18:20:38] <Valen> I liked it
[18:20:46] <Valen> except for the temporal cold war stuff
[18:20:50] <Valen> that was dumb
[18:20:54] <Lambda_Aurigae> I like it so far.
[18:21:07] <Lambda_Aurigae> up to episode 20 of season 1
[18:21:11] <Valen> pick 2 things trek do badly, politics and time travel
[18:21:17] <Valen> yeah i liked 1 and 2
[18:21:29] <eszett> Startrek was especially interesting, as it allowed to escape reality and dream of a bright future
[18:21:32] <twnqx> uh-uh
[18:21:36] <twnqx> how to reassemble this...
[18:21:48] <Lambda_Aurigae> the original startrek was all about politics...it was nothing but an ongoing political commentary in space cowboy form.
[18:21:52] <Valen> then they built 2 seasons around politics and time travel :-<
[18:22:01] <Valen> political commentary is fine
[18:22:05] <Valen> they are good at that lol
[18:22:22] <Valen> but trying to have political drama? they suck at that as a rule
[18:26:43] <Lambda_Aurigae> But, overall, T'Pol is hot.
[18:27:12] <Valen> I think we can all agree on that
[18:27:29] <Valen> particularly when there is decontamination gel involved
[18:27:34] <Lambda_Aurigae> hehe.
[18:27:43] <Lambda_Aurigae> yeah, Tripp is one lucky bastard.
[18:29:50] <twnqx> is star trek: enterorise the original series?
[18:29:55] <Lambda_Aurigae> no.
[18:29:57] <Lambda_Aurigae> it's a prequel
[18:30:17] <Lambda_Aurigae> the last of the startrek series to be made as I recall.
[18:30:19] <PoppaVic> It was OK
[18:31:18] <Valen> Lambda_Aurigae: correct
[18:31:59] <Lambda_Aurigae> ST: Enterprise takes place some couple hundred years before the original series.
[18:32:02] <twnqx> well, that explains why none of those names ring a bell.
[18:33:00] <Lambda_Aurigae> T'Pol is the vulcan science officer on the first warp capable spaceship named Enterprise.
[18:33:07] <Valen> not first warp
[18:33:11] <Valen> warp 4
[18:33:21] <Lambda_Aurigae> ok...there might have been an earlier enterprise...
[18:33:29] <Lambda_Aurigae> and, Warp 5 capable actually.
[18:33:35] <Valen> ahh my bad
[18:33:40] <Valen> they had warp for like 100 years or so before enterprise
[18:33:46] <Lambda_Aurigae> yes.
[18:33:54] <Valen> I *think* at the start they said archer met cockran?
[18:34:03] <Valen> (as a kid)
[18:34:08] <Lambda_Aurigae> possibly.
[18:34:10] <Valen> or was it his dad
[18:34:17] <Lambda_Aurigae> don't remember exactly.
[18:34:40] <Valen> The series begins in 2151 (115 years before the original series)
[18:35:56] <twnqx> i would be surprised if technology still exists then
[18:36:00] <Lambda_Aurigae> we get to see the origin of the holodeck, the force field(in the episode I'm watching now), photon torpedos, and other stuff.
[18:36:04] <twnqx> sadly (or luckily) i won't know
[18:36:40] <Lambda_Aurigae> twnqx, it's one of those things I hope doesn't happen but fear will,,,possibly in my lifetime...the destruction of our society by war.
[18:37:01] <PoppaVic> bwahahahaha
[18:37:02] <Valen> warp drive was done in 2063
[18:37:36] <twnqx> by war? unlikely
[18:37:51] <Lambda_Aurigae> twnqx, not likely war as we've seen in the past.
[18:38:14] <twnqx> played too much fallout? :P
[18:38:17] <Valen> I just like how we can go to the ruins of 7 or 8 previous civilisations that have all failed, and go "nah bruh we are special, nothing bad can ever happen"
[18:38:25] <Lambda_Aurigae> never played..or even seen it played.
[18:38:40] <twnqx> fun game series
[18:38:47] <Lambda_Aurigae> but I have seen humans and how they act.
[18:38:48] <twnqx> easy to sink a few hundred hours in, each
[18:39:39] <Lambda_Aurigae> likely a pay for game that won't run on linux.
[18:40:01] <twnqx> indeed
[18:40:07] <twnqx> well, dunno about wine
[18:40:08] <Lambda_Aurigae> I pretty much play 2 games...bought and paid for.
[18:40:12] <Valen> fallout is on steam, I wonder
[18:40:13] <twnqx> i just boot windows to play games. gaming HAL.
[18:40:23] <Lambda_Aurigae> KSP and minecraft.
[18:40:52] <Valen> new vegas has a gold rating on steam
[18:40:54] <Lambda_Aurigae> once in a while I'll boot up dos and play wolfenstein or doom series.
[18:40:59] <Valen> bah on wine rather
[18:41:04] <twnqx> aaaand tzhat's reassembled after removing all battery acid (hopefully)
[18:41:31] <twnqx> now i just need a lot of batteries to test it :X
[18:42:00] <twnqx> don't you just hate it when you take something from a drawer and see a puddle of leaked battery acid? :X
[18:42:37] <Lambda_Aurigae> yup.
[18:42:41] <Valen> oh btw, regarding that big war you are worried about, here's how you start it " http://fortune.com/2016/03/23/trump-nuclear-weapons-isis/ "
[18:42:44] <Lambda_Aurigae> haven't had that problem in a long time.
[18:42:56] <twnqx> 6 duracell plus. all leaked.
[18:43:24] <Valen> I had a battery in my mouse vent once
[18:43:28] <Valen> that was exciting
[18:43:31] <Valen> while i was using it
[18:43:36] <Lambda_Aurigae> kinky.
[18:43:54] <cehteh> duracells are often counterfeit
[18:44:11] <twnqx> i am switching to rechargable ni-mh currently
[18:44:37] <twnqx> cehteh: not usually in germany's supermarkets...
[18:44:48] <cehteh> yes thats ok
[18:44:50] <cehteh> mostly :D
[18:44:54] <Lambda_Aurigae> I use the cheapest crap batteries I can find and they last as long as the duracell or energizer batteries I've used.
[18:50:21] <cehteh> soo .. clock scheduler got even more precise, doing a busy wait for ultra short timespans which compmatch cant handle
[18:51:07] <twnqx> i ordered the four used sorting cabinets, btw :X
[18:51:18] <twnqx> of course i had to, given i needed one, maybe two.
[20:29:48] <julius> my handy batterie got empty to 0% and now its draining within two days....before that it could hold on at least 4
[20:30:06] <julius> wasnt the memory effect history?
[20:30:48] <julius> Lambda_Aurigae, doom and wolfenstein can be emulated in linux
[20:33:15] <julius> handy = mobile phone
[20:34:01] <Lambda_Aurigae> of course they can.
[20:34:11] <Lambda_Aurigae> but I I like the old systems.
[20:34:16] <Lambda_Aurigae> I play them on a 386DX40
[20:34:21] <julius> uh nice
[20:34:25] <julius> i once had one of those
[20:34:42] <julius> like 40mb harddrive or something like that
[20:35:08] <julius> thought you boot a ghz machine to dos
[20:35:32] <cehteh> julius: lipos dont like deep discharge, the loose some capacity
[20:36:20] <julius> ebay actually still sells 386er at horrible prices
[20:36:44] <julius> im gonna ask amazon for a refund
[20:37:10] <julius> yeah i ruined it, i dont care....i dont ruin the rest of the 99% i buy there
[20:40:40] <Valen> thats not memory effect
[20:40:54] <Valen> if you over discharge a lipo cell you damage it
[20:41:18] <Valen> if that is a smart phone 4 days is exceptional battery life
[20:45:40] <Lambda_Aurigae> julius, I've done that too.. I also still play games on my vic-20 and c-64 machines.
[22:16:00] <Casper> julius: memory effect is only theorical
[22:16:04] <Casper> however
[22:16:13] <Casper> over discharge can kill a battery
[22:16:54] <Casper> your phone may not have disconnected at a safe level, thru damaging the battery
[22:17:48] <Casper> fortunatelly, my phone have a replacable battery