#avr | Logs for 2016-04-06

Back
[04:05:12] <WormFood> I plug my usbasp programmer into my atmega2560 and it works as expected. I plug it into my atmega88 and it acts like it's not connected to anything. How fuckin' hard can it be to make this thing work?
[04:06:28] <cehteh> wrong crystal/fuse/clock?
[04:06:50] <WormFood> It's brand new. It's never been touched before.
[04:07:06] <cehteh> wrong connection? :D
[04:07:10] <WormFood> It's unlikely it shipped from the factory, with fuses set to make it unusable.
[04:07:14] <cehteh> yeah
[04:07:14] <WormFood> I don't see how?
[04:07:22] <WormFood> i've gone over it 5 god damn times.
[04:07:28] <cehteh> dunno 'should' work
[04:08:01] <WormFood> It's only 6 pins.
[04:08:11] <WormFood> how the fuck can it not work?
[04:09:17] <cehteh> dunno .. but it happens :D
[04:09:32] <cehteh> what case?
[04:09:46] <cehteh> rotated/ wrong pin order connected?
[04:10:43] <cehteh> avrdude? try differnt speeds -B option
[04:13:01] <WormFood> thanks cehteh. Once I made the speed super slow, it fuckin' worked.
[04:13:11] <cehteh> :D
[04:13:19] <cehteh> check fuses
[04:13:51] <cehteh> 'normally' it should be fused to work by default, strange thing
[04:14:14] <cehteh> or maybe your avrdude config is borked and sets up too high speed
[04:16:35] <stephe_> damn atmega2560 has so many pins
[04:16:40] <WormFood> I haven't touched the default settings
[04:17:01] <WormFood> But it sure as fuck is frustrating when shit doesn't work out of the box.
[04:17:51] <cehteh> well at least it can made work
[04:18:16] <cehteh> things which are working out of the box, then breal w/o reason and cant be fixed are worse :d
[04:18:24] <cehteh> like windows :D
[04:36:01] <stephe_> WormFood: you using the atmega2560 on an arduino or something?
[04:36:55] <WormFood> or something
[04:37:36] <WormFood> It's an arduino compatible board, but only the layout is arduino. I don't use their tool stack. I use straight gcc with it.
[04:38:12] <WormFood> so, I can program it to act like an arduino, or just a normal AVR. I choose to treat it like a normal AVR
[04:40:30] <WormFood> I needed some 3.3 volt regulators. I wanted through-hole parts, but I couldn't find any, so I picked up some ASM1117-3.3 regulators in a SOT-223 case. I've discovered that I can wedge that SOT-223 case, into a normal DIP socket. So now I have a SOT-223 socket. :D
[04:41:34] <cehteh> there should be some 3.3v ldo's in to92
[04:42:05] <WormFood> Should be, but do you know how to ask for it using 普通话?
[04:42:21] <cehteh> thats your job not mine :D
[04:42:26] <WormFood> 我的中文很不好
[04:42:27] <cehteh> lm317`
[04:42:56] <cehteh> i dont know how fluent you are with chinese .. i am not, but i dont live there either
[04:43:04] <WormFood> My Chinese is shit.
[04:43:10] <cehteh> ok
[04:43:13] <WormFood> I don't practice or study enough. It's my own fault.
[04:43:15] <cehteh> how long are you there?
[04:43:21] <WormFood> Actually, I can read more than I can speak.
[04:43:27] <cehteh> wow
[04:43:32] <WormFood> If I'm watching TV, I can usually read more than I can hear.
[04:43:47] <WormFood> I've been here 8 years.
[04:44:09] <cehteh> oh i thought in 8 years one learns some substantial parts
[04:44:27] <cehteh> but i guess it depends on what contacts you have, prolly using english a lot or?
[04:44:44] <WormFood> I do know a lot. I can say a lot of things very easily. I know a lot of random words. But also lack a lot of daily words.
[04:44:52] <WormFood> It varies.
[04:45:42] <cehteh> for us westerners chineses is just very strange i tihnk
[04:46:31] <WormFood> Of course it is.
[04:46:38] <WormFood> It's radically different from English.
[04:46:54] <cehteh> i can understand a few words japanese .. but not really much
[04:47:08] <Thrashbarg> Si
[04:47:11] <cehteh> chinese .. i guess no wey i ever cope that
[04:47:40] <WormFood> I mean, they have tones. Which is a hard thing to understand. Get this..."mother", "scold", "horse", "numb", "hemp", and a verbal question mark, are all the same sound, "ma". But the tone changes the meaning.
[04:47:53] <cehteh> i know
[04:48:07] <liwakura> ugh
[04:48:24] <liwakura> im happy i just learned english
[04:48:30] <WormFood> my favorite, is "pen", and "cunt" have the same sound, but different tones. Same with "grass" and "fuck". Same sounds, different tones.
[04:48:31] <Thrashbarg> Mother scolded a numb horse with hemp?
[04:48:48] <cehteh> https://en.wikipedia.org/wiki/Lion-Eating_Poet_in_the_Stone_Den
[04:48:56] <WormFood> That's a good one
[04:49:02] <WormFood> shi shi shi shi shi shi shi
[04:49:31] <liwakura> t t t t t t t
[04:49:39] <liwakura> sorry, could not resist
[04:49:51] <cehteh> https://www.youtube.com/watch?v=vExjnn_3ep4
[04:50:00] <WormFood> "two tutus to you two too"
[04:50:22] <liwakura> just had the idea of writing a bot that checks for a a freqency and baudrate in a channel message
[04:50:25] <WormFood> try saying that to someone.
[04:50:30] <liwakura> and outputs the ubrr registers
[04:50:55] <WormFood> liwakura, that probably won't be so useful.
[04:51:04] <Thrashbarg> macros!
[04:51:16] <liwakura> hm
[04:51:27] <liwakura> its supposed to catch beginner questions
[04:51:36] <WormFood> check out my avr "baud" rate calculator.
[04:51:40] <liwakura> i know
[04:52:15] <Thrashbarg> I am a thistle sifter. I have a sieve of sifted thistles and a sieve of unsifted thistles, because I am a thistle sifter.
[04:52:16] <WormFood> You typically want to know, the closest UBRR to achieve a given bit rate, since rarely will it be dead on.
[04:52:33] <WormFood> That's terrible Thrashbarg
[04:52:37] <Thrashbarg> hehehe
[04:52:38] <liwakura> i wrote code two days ago to do that calculation in the avr itself
[04:53:05] <WormFood> Good luck with that liwakura. Check it's results with my calculator.
[04:53:20] <liwakura> i checked with datasheet :D
[04:53:34] <WormFood> datasheet, or my calculator, same thing.
[04:53:39] <liwakura> im also gonna look into
[04:53:47] <liwakura> auto-detecting the baud rate
[04:53:56] <liwakura> like, waiting for pin changes
[04:54:15] <liwakura> while a 16-bit timer is running
[04:54:33] <liwakura> and sampling a few values and find the common base
[04:54:37] <cehteh> fun with serial because its not really unambigous
[04:54:50] <WormFood> You can't do it reliably
[04:54:57] <cehteh> serial needs some pauses in transmission to resync
[04:55:04] <WormFood> unless you can guarantee, it's all 7-bit data, like text
[04:55:06] <cehteh> or some well defined signal (UUUUUUUUUUUUUU)
[04:55:09] <liwakura> if i have pauses, i can do it reliably.
[04:55:15] <cehteh> yes
[04:55:18] <WormFood> pauses?
[04:55:23] <liwakura> between chars
[04:55:35] <cehteh> but you have to know that there are pauses
[04:55:58] <WormFood> The start bit, and the stop bit, are the only things you can be sure of.
[04:55:59] <liwakura> pause = pin is high for longer than ubrr could ever cover
[04:56:11] <WormFood> If you're using a parity bit, then it should be doable.
[04:56:11] <cehteh> another thing with serial is, that you usually *know* the baudrate or at least have only a few to try
[04:56:26] <cehteh> so autodetecting isnt really that useful
[04:56:36] <liwakura> its just a proof-of-concept
[04:56:46] <cehteh> yes its ok
[04:56:55] <liwakura> also, its quite useful when you only have shit quartz
[04:57:12] <cehteh> or no quarz :D
[04:57:23] <liwakura> or using a NE555 instead of quartz
[04:57:24] <WormFood> Also, if you want to auto-detect, you have to do it in software. You can' reliably use the u(s)art to do that for you
[04:57:31] <liwakura> i know
[04:57:33] <cehteh> i have my code which syncs OSCCAL to some external signal,
[04:57:38] <cehteh> can add that to UART too
[04:57:56] <WormFood> But you still need to figure out the bit rate
[04:58:14] <cehteh> should work with some heuristics
[04:58:16] <WormFood> if you're using the u(s)art, then you'll lose characters that are using the wrong settings.
[04:58:18] <liwakura> measure delays between pin state changes and search for a common base
[04:58:19] <cehteh> but adds a lot dead weight
[04:58:38] <liwakura> WormFood: if i dont autodetect, i'll lose everything
[04:59:08] <WormFood> *ONLY* the START and STOP bits are a sure thing. If you use parity, that will help autodetection a lot.
[04:59:14] <cehteh> sometimes loosing everything is better than working with defective data :D
[04:59:39] <liwakura> but when i measure the time between them
[04:59:46] <liwakura> between begin of start and end of stop
[04:59:51] <WormFood> you want to sample the character, and once you sure you have the whole thing, then figure out the start and stop bits, and the rest from there.
[05:00:01] <liwakura> uhm
[05:00:02] <WormFood> HOW do you determine the start and stop bits?
[05:00:07] <WormFood> It's a stream of serial data.
[05:00:08] <liwakura> WormFood: maybe misconception
[05:00:19] <liwakura> 1) real stream data has pauses
[05:00:33] <liwakura> 2) im not interested in reading that data. i just want the serial configuration
[05:00:58] <WormFood> you need to figure out the data, to get the speed
[05:01:03] <liwakura> no.
[05:01:12] <liwakura> just sample the pin while measuring
[05:01:36] <liwakura> the low times will always be n * UBRR
[05:01:57] <liwakura> overlong high times will mark borders between frames
[05:02:36] <liwakura> also i know that frames can be between 7 and 13 bits long
[05:02:50] <WormFood> I just got pulseview compiled, and installed, so I gotta go play with this.
[05:35:52] <edwardoid> Hi guys
[05:37:33] <edwardoid> Is here anybody who's is enthusiastic enough to work on an open source project just for fun?)
[05:37:46] <cehteh> i am doing that all the time :D
[05:44:30] <Lambda_Aurigae> my projects are all open source...I just never post them online.
[05:47:40] <cehteh> i just put them on my own server .. recently i cloned mµOS to github, but that was just a test, i wonder if github syncs properly
[05:47:56] <Lambda_Aurigae> dunno
[05:48:04] <Lambda_Aurigae> I just use it to rip off code from other projects.
[05:48:39] <Lambda_Aurigae> and, he didn't stay around long enough to her other replies.
[05:54:08] <edwardoid> Excellent, then look at https://github.com/edwardoid/avr_libs
[05:54:48] <cehteh> license?
[05:54:58] <edwardoid_> Then look at https://github.com/edwardoid/avr_libs
[05:55:05] <cehteh> ah gpl
[05:55:17] <edwardoid_> And let me know if you are still interested
[05:55:31] <edwardoid_> Yeah
[05:55:39] <Lambda_Aurigae> looks like you are re-reinventing the wheel all over again.
[05:56:09] <edwardoid_> Why?
[05:56:16] <Lambda_Aurigae> I don't know why you are doing it.
[05:56:26] <Lambda_Aurigae> http://www.procyonengineering.com/embedded/avr/avrlib/
[05:56:57] <cehteh> heh
[05:57:14] <Lambda_Aurigae> I've used and abused procyon avrlib for years.
[05:57:24] <cehteh> uhm everything with busy waits
[05:57:48] <cehteh> i like to reinvent the wheel too in some cases :D
[05:58:07] <edwardoid_> Looks like project you linked is pretty similar:(
[05:58:16] <Lambda_Aurigae> and much older.
[05:58:46] <cehteh> mhm
[05:59:06] <Lambda_Aurigae> and written as part of pascal stang's masters thesis as I recall.
[06:00:16] <cehteh> what license is that? public domain? copyrighted?
[06:00:18] <Lambda_Aurigae> edwardoid_, so far all the libs I've looked at in your project there rely on blocking loops...no interrupt based stuff.
[06:00:40] <Lambda_Aurigae> cehteh, procyon avrlib? I don't remember...never really bothered to look.
[06:00:57] <cehteh> well i'd bother if i use it for open source code
[06:01:02] <cehteh> cant find any notice
[06:01:27] <cehteh> and yes .. nice idea edwardoid_, but no thanks, no busy loops
[06:01:44] <cehteh> also some things are racy
[06:02:06] <cehteh> #define pwm_t1_set_prescaling_1024() set_bit(TCCR1B, CS10); clear_bit(TCCR1B, CS11); set_bit(TCCR1B, CS12);
[06:02:25] <cehteh> ... i'd set that at once
[06:02:29] <Lambda_Aurigae> cehteh, gnu gpl.
[06:02:39] <Lambda_Aurigae> or so it says in the header files.
[06:03:15] <cehteh> the procyon?
[06:03:45] <cehteh> edwardoid_'s libs are gpl
[06:03:47] <edwardoid_> Sometimes I can't use interrupts, for example I have my own delay
[06:04:38] <cehteh> i deliberately have *no* delay function :D
[06:05:19] <cehteh> if i need to wait then i use a timer
[06:05:33] <Lambda_Aurigae> the only thing I've found that needed a delay in anything I've done in the last 2 years was vga generation and a few nops for a delay for a 16x2 lcd display.
[06:05:37] <cehteh> very short delays maybe with avr_libc
[06:05:46] <cehteh> yes
[06:06:05] <cehteh> delays for lets say 100µs are sometimes reasonable
[06:06:19] <cehteh> depends of course
[06:06:47] <cehteh> anything else, use timer
[06:07:07] <edwardoid_> Anyway guys, I'm going to continue to work on my lib. I know there are many not-well written code in the my lib, but writing the lib allows me to better understand how it works
[06:07:19] <Lambda_Aurigae> go for it.
[06:07:33] <Lambda_Aurigae> you might look at how procyon does some of theirs too.
[06:07:36] <cehteh> or i have a 'wait(predicate, timeout)' ... which waits for condition come true at most timeout time (and while waiting the scheduler serves other jobs)
[06:07:47] <cehteh> or sleeps the cpu if there is nothing to do
[06:08:09] <Lambda_Aurigae> it is very well documented
[06:08:35] <cehteh> edwardoid_: general style is ok, just some things are not to my taste
[06:08:45] <edwardoid_> And I have an idea to use the lib for a bigger project in future
[06:09:05] <cehteh> like the #define i pasted abive, which is racy and bloating and the busy loops
[06:09:21] <edwardoid_> Many preprocessor definitions should be replaced with inline functions
[06:09:39] <cehteh> its not the that its a macro vs function
[06:10:22] <cehteh> you should set the prescaler register in one go, and possibly wrap that into a nicer function which stops the timer while you deal with its configuration
[06:10:36] <cehteh> (stop timer or disable interrupt)
[06:10:50] <cehteh> setting prescaler to 0 is stopping the timer :D
[06:11:26] <edwardoid_> Then I need to read more about PWM
[06:11:59] <cehteh> setting/clearing bit by bit on the prescaler will change it in some unreliable way
[06:12:43] <edwardoid_> Ok, this can be changed to setting a mask
[06:12:45] <cehteh> iirc the prescaler is latched in some modes, but still a overflow can happen while you reconfigure it and then it will run at least one cycle at wrong speed
[06:13:19] <cehteh> i just setup the timer at start and then let it spin freely, never touch its config again
[06:13:54] <cehteh> for some PWM generation that might be not desireable, but then one has to pay attention that changes there are not racy
[06:15:32] <edwardoid> That's why I'm looking for someone who can change/advice what to change in the lib, to make it better
[06:15:45] <Lambda_Aurigae> look at others like what you are trying to do.
[06:15:51] <Lambda_Aurigae> like procyon's
[06:16:06] <edwardoid> ok-s)
[06:16:27] <Lambda_Aurigae> I don't know about you but I learned to code by looking at existing code.
[06:16:37] <edwardoid> today I'm going to change PWM's code since I'm adding servo mottors support
[06:18:14] <Lambda_Aurigae> procyon avrlib has an interrupt driven rc servo function library too...uses a timer but not the hardware pwm...works rather well.
[06:18:28] <edwardoid> at end, user should be able to work with the lib without adding anything, it should provide functionality like arduino lib does
[06:18:37] <Lambda_Aurigae> eeww
[06:19:04] <liwakura> Lambda_Aurigae: see topic
[06:19:06] <liwakura> :P
[06:19:17] <edwardoid> can I use timers in avr to work correcly with 1-Wire + Servos?
[06:19:18] <Lambda_Aurigae> hehe.
[06:20:34] <cehteh> depends
[06:21:02] <edwardoid> depends on what?
[06:21:05] <cehteh> 1-wire may need a bitbanging with some hard timing and interrupts disabled in some parts
[06:21:21] <cehteh> servo signals can generated with 16 bit pwm
[06:21:39] <cehteh> if you generate them in software it might be a bit more tricky
[06:21:43] <Lambda_Aurigae> also, how many servos you want to run.
[06:23:11] <cehteh> better use sbus servos :D or add some attiny for each servo (or one tiny for 4 servos?) listening on spi or whatever and only generating servo signals
[06:23:26] <edwardoid> If someone goes to use my libs, he should not ask himself "how many servos I can use?", he should think simethink like "there are 2 pwm, I need to drive 2 servos, then let me use servos module, and just connect my servos to the atmega
[06:23:26] <cehteh> if you want to add many servos
[06:24:00] <cehteh> well if you want more servos than pwm's then you have a problem
[06:24:14] <LeoNerd> There's some nice SPI-attached PWM chips that output 8 or 16 synchronised channels
[06:24:19] <LeoNerd> They're nice for servos
[06:24:22] <cehteh> or that
[06:24:27] <edwardoid> and then call something lie servo_rotate(30 /* rotate 30 degrees CW, &my_servo_cfg)
[06:24:33] <Lambda_Aurigae> cehteh, hobby servos are easy enough to drive. I've done as many as 16 from a single atmega32 at 16mhz with plenty of time free to do usart and i2c.
[06:24:51] <cehteh> Lambda_Aurigae: depends on the precision you nee
[06:24:52] <cehteh> d
[06:25:24] <cehteh> if you have something else going on which generates interrupts or disables them at inconvinient times then it wont work
[06:25:35] <cehteh> *but* servo signals have so much dead time
[06:25:42] <Lambda_Aurigae> yes.
[06:25:54] <Lambda_Aurigae> 30 to 50 hz for analog servos.
[06:25:59] <Lambda_Aurigae> which is what I use mostly.
[06:26:04] <LeoNerd> TLC5940. It's a 16-channel 12-bit PWM driver. Primarily intended for LEDs, but you can do servos with it just as easily
[06:26:11] <Lambda_Aurigae> then 1 to 2 ms pulses.
[06:26:35] <cehteh> and in short times they want to be precise
[06:27:47] <cehteh> i possibly implement some software thing for mµOS for servos .. wake at 900µs .. busy loop for the next at most 1100µs for generating servo signals, done .. schedule next cycle
[06:27:54] <Lambda_Aurigae> LeoNerd, bah..TI isn't sampling dip package stuff these days.
[06:28:18] <cehteh> that should be able to handle plenty servos, at some cost
[06:28:50] <cehteh> (~1ms in 20ms == 5% of the time, interrupts are disabled)
[06:29:45] <Lambda_Aurigae> last servo project I did used attiny45 chips to drive servos in blocks of 4 with an i2c interface.
[06:30:16] <cehteh> some servos are hackable, having some controller which you can flash by yourself
[06:30:18] <Lambda_Aurigae> used 4 wire phone line plugs to connect them to the central i2c "hub"
[06:30:27] <cehteh> but possibly quite some work
[06:30:34] <LeoNerd> Lambda_Aurigae: disabled reset?
[06:30:44] <Lambda_Aurigae> cehteh, yeah, some of the newer digital servos.
[06:30:46] <Lambda_Aurigae> LeoNerd, yeah.
[06:30:51] * LeoNerd grin
[06:31:09] <LeoNerd> That's what I built my HVSP burner for. I can do tiny{2,4,8}{4,5}s with this
[06:31:15] <LeoNerd> And tiny13
[06:31:38] <Lambda_Aurigae> I did the software with 3 servos up to the end then added the 4th and just used the fuse doctor to reset and reprogram.
[06:31:41] <cehteh> just use tiny85 or 45 with bootloader, i bet your code fit comfortably along bootloader
[06:31:51] <Lambda_Aurigae> it probably would have.
[06:32:14] <Lambda_Aurigae> was helping some kids build a 4 legged walker.
[06:32:33] <LeoNerd> Youknow what would be really nice? Would be some sort of internal status register that lets you "see" the +12V signal on the RESET pin when normal reset is disabled
[06:32:39] <LeoNerd> So you could use that as some special signal to your own code
[06:32:44] <edwardoid> Guys I have an offtopic question: does anybody have RPi?
[06:32:51] <Lambda_Aurigae> edwardoid, yes.
[06:32:53] <cehteh> yes
[06:33:11] <Lambda_Aurigae> looking to sell it...want an rPI B+?
[06:33:26] <cehteh> edwardoid: btw i am working on a small OS/Scheduler for the AVRs if you are bored you can contribute there :D
[06:34:09] <cehteh> haha i have one of the first batch .. rpi 1 with 256mb ram only .. dont use it anymore, maybe i find some use for it for some embedded tihngs
[06:34:15] <edwardoid> Lambda_Aurigae did you met situation when its shuts down after few days uptime?
[06:34:26] <cehteh> also having a rpi2 .. thats ok'ish
[06:34:31] <Lambda_Aurigae> edwardoid, no...never run it more than a couple of hours at a time though.
[06:34:34] <Lambda_Aurigae> it's kinda useless.
[06:34:47] <Lambda_Aurigae> might be ok for a video player hooked to the tv
[06:34:53] <cehteh> edwardoid: what did you run in it? overclocked?
[06:34:55] <Lambda_Aurigae> but I have roku sticks on all the TVs in the house.
[06:35:07] <cehteh> could be bugs, flippd bits, ram exhausted/leaks
[06:35:21] <edwardoid> cehteh i would like join, just a question, how are you going to handle situation when client's applicatin is bigger tan letsay 50Kb?
[06:35:33] <Lambda_Aurigae> they do sell heatsink kits for the rPI for a reason.
[06:36:09] <edwardoid> cehteh couchdb + tor
[06:36:09] <cehteh> edwardoid: i am targeting very small things, actually i borrowed a bit from pointers so only 64k at most are addressable now
[06:36:12] <edwardoid> nothing more
[06:36:27] <cehteh> i have a plan how to fix that, but its not implemented
[06:36:33] <edwardoid> i'm disabled x11, so I have free resources
[06:36:42] <cehteh> later i want to port that OS to stm32 as well
[06:36:43] <edwardoid> it's temp is ~41 Celsius
[06:36:58] <cehteh> I/O on rpi is quite modest
[06:36:59] <edwardoid> I have an heatsink
[06:37:37] <cehteh> you may overload the io (usb) bus and then something times out or doesnt handle that situation properly
[06:38:03] <cehteh> my rpi ran for days to weeks but its not that stellar in uptimes
[06:38:06] <Lambda_Aurigae> it's easy to overload the power supply on the rPI too.
[06:38:09] <edwardoid> nothing special, it's just running couchdb, tor and connected to the internet
[06:38:21] <cehteh> yeah 2A PS is a requirement
[06:38:41] <edwardoid> since it shuts down every few days I can't use RPi as mail-server
[06:38:51] <cehteh> add some logging
[06:38:52] <edwardoid> and my services written in Go/Python
[06:39:03] <cehteh> figure out if memory gets exhauted (swap fills up)
[06:39:07] <edwardoid> it connected to 2A power supply
[06:39:08] <Lambda_Aurigae> rPI is an OK learning tool...I wouldn't use the platform for anything serious.
[06:39:37] <cehteh> rpi goal was: cheap
[06:39:44] <Lambda_Aurigae> yup.
[06:39:46] <cehteh> goal archived .. thats all
[06:39:58] <Lambda_Aurigae> they were subsidized by the manufacturer of the cpu
[06:40:08] <cehteh> its not bad .. but you cant put too much on it
[06:40:15] <edwardoid> atm it mm 0% of spap is used...
[06:40:31] <edwardoid> there is nothing which can use so much memory
[06:40:32] <cehteh> watch it, maybe remote syslog
[06:40:48] <cehteh> are there any cron jobs starting regulary?
[06:40:55] <edwardoid> no
[06:41:06] <cehteh> well you have to debug it byyourself
[06:41:16] <edwardoid> I can give you sudo access, you can check it yourself
[06:41:19] <edwardoid> nothing special
[06:41:24] <edwardoid> just couch + tor
[06:41:25] <cehteh> in my experience its not the most rock solid platform
[06:41:32] <cehteh> i dont want to
[06:42:09] <cehteh> thats prolly more a thing about watching and loggning it for days and see whats going on
[06:42:29] <cehteh> there is also a #raspberrypi channel here on freenode
[06:42:40] <edwardoid> BTW I have an Cubieboard 2 which was supplied with the same power supply and was runnign python-based web server, nodejs service, couch, tor and it was working well
[06:42:55] <cehteh> next best thing to rpi is its great community
[06:43:21] <edwardoid> Rpi 2 Model B is owerful than Cuebiard 2 as I remmber
[06:43:25] <edwardoid> so problem is in Rpi
[06:43:31] <cehteh> could be
[06:43:57] <cehteh> just schedule a regular reboot :D
[06:44:00] <Lambda_Aurigae> rPI is cheap...cheaply assembled although not too bad...
[06:44:08] <Lambda_Aurigae> could be bad solder joint, bad ram,
[06:44:11] <Lambda_Aurigae> any number of things.
[06:44:16] <cehteh> yes the engieering is well done
[06:44:52] <cehteh> edwardoid: whats the longest time it sustained so far?
[06:44:57] <Lambda_Aurigae> I know mine just refuses to boot about 1 in 3 powerups...
[06:45:34] <cehteh> i'd just try it with tor disabled for that time+1day .. next time with couchdb disabled .. and so on
[06:45:44] <cehteh> maybe you find some reason
[06:45:56] <cehteh> and/or try some stresstest
[06:46:18] <Lambda_Aurigae> should be a memory test on one of the linux boot images.
[06:46:39] <cehteh> any overclocking configured?
[06:46:51] <cehteh> thats often a reason for spurious flaws
[06:47:03] <cehteh> sometimes it works, but then it crashes
[06:47:12] <cehteh> esp the memory often doesnt like overclocking
[06:48:00] <cehteh> they added some 'official' overclocking support which usually works ... i use it too
[06:48:13] <cehteh> but there are no gurantees about stability
[06:48:15] <Lambda_Aurigae> I like the power control on the rPI B+
[06:48:21] <Lambda_Aurigae> but haven't overclocked it.
[06:48:44] <cehteh> sometimes it gets more stable when you increase the voltage a bit
[06:48:54] <cehteh> other times it gets hotter and more unreliable :D
[06:49:05] <cehteh> just try, with paticence
[06:49:11] <Lambda_Aurigae> the power control I know about is being able to provide more power to the usb ports mainly.
[06:49:28] <cehteh> might take days to weeks to find the error systematically ... maybe you find it never
[06:49:54] <cehteh> the old rpi had flimsy fuses on the usb ports
[06:49:59] <cehteh> i bridged them :D
[06:50:00] <Lambda_Aurigae> yeah.
[06:50:03] <cehteh> 180mA or so
[06:51:56] <Lambda_Aurigae> ok..time to get ready for worky.
[06:52:33] <cehteh> and i have to write at least a bit user documentation to my code :D
[07:59:44] <WormFood> I finally get Sigrok and Pulseview compiled and working...and it's totally useless for being an oscilloscope.
[08:56:51] <cehteh> WormFood: i have no analog source device, but i guessed so
[09:43:46] <RikusW> megal0maniac: hi
[09:44:30] <LeoNerd> I suspect I'm not sleeping properly
[09:44:40] <LeoNerd> I get a permanent 20mA of current draw on a 328P
[09:45:45] <RikusW> maybe an io pins is draining some current...
[09:46:00] <RikusW> How much current is drawn when not sleeping ?
[09:46:07] <LeoNerd> About 20
[09:46:19] <LeoNerd> I need to measure it better, I'll have a better graph tonight
[09:46:29] <RikusW> should be less than 1mA
[09:47:49] <LeoNerd> So I need to keep INT0, INT1 and some PCINTs capable.. according to the chart in the data sheet, any sleep mode will suffice for that
[09:48:24] <LeoNerd> Oh.. though also I have timer1 running to drive an LED in PWM
[09:48:35] <LeoNerd> That could be using power
[09:49:45] <LeoNerd> Hrm. Actually that's quite tricky
[09:52:00] <LeoNerd> The LED PWM itself is on timer2, I wonder if I can make use of that
[09:52:59] <RikusW> turn off the led while in sleep to test
[09:53:40] <LeoNerd> Still.. 20mA sounds like a lot
[10:05:02] <daey> LeoNerd: at 1.8 or 3.3V
[10:05:07] <LeoNerd> 5
[10:05:13] <LeoNerd> Ohwait, 3.3
[10:05:21] <LeoNerd> 3.3V, 14.7456MHz xtal
[10:05:48] <daey> how much does it draw powered on? when not driving anything?
[10:06:14] <LeoNerd> What do you mean "driving anything" ?
[10:06:17] <daey> leds
[10:06:21] <daey> motors
[10:06:44] <LeoNerd> I'll have to measure it more tonight. I don't have it to hand currently.
[10:07:02] <LeoNerd> I know the board as a whole pulls about 20mA but hard to say which parts are responsible for that. I'll get the proper probe and the development board out
[10:07:26] <daey> ah ok. i thought you were talking about the bare µC
[10:08:04] <LeoNerd> Oh no.. it's a mega328P + SD card + PCF 8563 RTC chip + Prolific PL2303SA USB-UART bridge
[10:08:11] <daey> ...
[10:08:24] <LeoNerd> Well, without the SD card in, the board pulls about 23mA. With it it's more..
[10:08:38] <LeoNerd> About 3mA is the LED I have on there.
[10:09:07] <daey> i think the culprit is the usb-uart bridge
[10:09:07] <LeoNerd> The RTC chip pulls absolute peanuts (it's in the µA range) and the USB-UART ought to be in standby without D+/D- connected
[10:10:49] <daey> i happen to have a 328p @14.7MHz at home on a proto board. i can check what the bare unit roughly takes. im pretty sure its sub 10mA
[10:17:53] <cehteh> LeoNerd: 20mA is even for full active a lot
[10:18:25] <cehteh> vreg on board? some voltage divider? anything else that can draw that much?
[10:20:14] <LeoNerd> No regulator.. it's a 3.3V LiFePO4 cell to power it, so that goes directly into the chips
[10:20:33] <LeoNerd> I think at this point I need to poke around more with the current probe
[10:20:37] <LeoNerd> So I'll get back to it later
[10:23:10] <cehteh> i think 328p at 3.3v alone can not draw that much power under any circumstance
[10:36:27] <LeoNerd> Yes.. that's the conclusion I'm coming to reading this data sheet. I'll have to apply more subtle debugging later
[11:45:32] <cehteh> just out of curiosity .. are there any non-legacy 16bit microcontrollers around? .. avr are relative modern 8bit, then stm32 is arm 32bit... of course there are some legacy 16bit z80 or m68k based embedded systems, but anything new there?
[11:51:15] <stephe_> cehteh: msp430
[11:51:20] <stephe_> they are 16 bit
[12:26:57] <Lambda_Aurigae> cehteh, msp430 and pic24f series.
[12:27:29] <Lambda_Aurigae> might as well go for a pic32 if you wanted to go pic24 unless you needed specific functionality of a specific chip.
[12:27:50] <Lambda_Aurigae> atxmega has some 16bit functionality too as I recall but never played with those.
[12:30:39] <stephe_> how is the pic support on linux?
[12:31:15] <Tom_itx> non exhistent
[12:31:27] <LeoNerd> 'tis why I like AVRs :)
[12:31:28] <stephe_> hehe
[12:31:32] <stephe_> indeed
[12:45:13] <RikusW> Lambda_Aurigae: xmega is 8bit AVR with new peripherals
[12:46:20] <cehteh> the 8 bit avr's have some 16 bit functionality too .. but they are clearly 8 bitters
[12:55:03] <RikusW> actually AVR is a 8 + 16 bit hybrid, the data is 8 bit and instructions is 16 bit
[12:55:27] <RikusW> (that is the bus widths
[13:00:34] <cehteh> usually people count the register word size and data bus size .. thats 8 bit
[13:01:09] <cehteh> most 8 bit computers have instructions and addresses which exceed 8 bit (256 addresses are not much useful)
[13:11:09] <bootsys_ufoo> I have a silly noobie question. I'm preparing to do some development on a SAM-D Model ATSAMD21E15A on a linux box. How do I compile for the chip? I have downloaded and sucessfully used avr-gcc but the mmcu for my device is not in the list of options? Or is it and I just don't know what I'm looking at......yet.
[13:14:30] <cehteh> thats this newfangled 32bit avr?
[13:15:46] <bootsys_ufoo> Yes, it is
[13:15:54] <cehteh> ah yes thats not supported by avr-gcc as far i know
[13:16:18] <bootsys_ufoo> Dang, what do I have to do to compile it? Atmel studio?
[13:16:22] <cehteh> some arm-gcc toolchain maybe? havent use those
[13:16:38] <cehteh> google ftw
[13:17:57] <bootsys_ufoo> Cool thanks for the help.
[13:19:03] <cehteh> seems my arm-gcc can do cortex-m0
[13:19:11] <cehteh> still never used / tried
[13:19:42] <bootsys_ufoo> I'm looking around now, I really would love to not have to use win.
[13:19:52] <cehteh> i only use linux
[13:20:15] <cehteh> (but i wont buy a µC which is not supported by my toolchains :D)
[13:20:50] <bootsys_ufoo> This isn't my call, I do what the electical guys tell me too.
[13:20:55] <bootsys_ufoo> Virtual box here we come
[13:23:51] <cehteh> heh
[13:24:00] <cehteh> there is gcc for embedded arm
[13:24:43] <cehteh> https://launchpad.net/gcc-arm-embedded
[13:24:49] <cehteh> may work ..
[14:21:16] <bootsys_ufoo> Hey Cehteh are you still in here?
[14:21:25] <cehteh> yes
[14:21:31] <bootsys_ufoo> Just an FYI
[14:21:44] <bootsys_ufoo> I was digging around in Studio trying to fix my issue
[14:21:47] <bootsys_ufoo> anyway
[14:22:18] <bootsys_ufoo> whil checking out the libs that studio included for my project it includeded arm-gnu0toolchain
[14:22:25] <bootsys_ufoo> looks like you were exactly right
[14:22:28] <bootsys_ufoo> thanks again
[14:22:31] <bootsys_ufoo> for now
[14:23:02] <cehteh> :)
[14:54:40] * sebus is lucky
[14:55:15] <sebus> found today C= on junk yard not far from my home
[14:59:44] <liwakura> C what?
[15:00:02] <sebus> liwakura Commodore 64
[15:00:16] <liwakura> in what state is it?
[15:01:20] <sebus> it boots, missing keys, board ok, soundchip ok
[15:04:10] <sebus> Wondering why some people won't even try to sell such equipment on ebay or something...
[15:41:57] <Lambda_Aurigae> stephe_, pic32 is supported with a modded gcc and mplabx...you can compile gcc yourself to support it...it is a mips processor with pic peripherals.
[15:56:28] <LeoNerd> I really need to make myself a simple SMU
[15:56:40] <LeoNerd> Even if it's just for characterising LEDs