#avr | Logs for 2014-04-12

Back
[00:05:38] <jadew> sorry, kid woke up
[00:05:54] <jadew> managed to put him back to sleep, maybe I'll get another hour of quiet
[00:06:20] <jadew> xorm, I'm trying to get myself to make a board too, I'm just too lazy and sort of tired of this project
[00:06:41] <tzanger> heh
[00:06:44] <xorm> what's that project
[00:07:09] <jadew> I'm building a frequency standard, much like the one Gerry Sweeney has done, only that I overcomplicated it a bit :P
[00:08:12] <jadew> the biggest change is that I added an OCXO inside the box, as a secondary standard, which I'll probably use all the time, while keeping the Rb only for important measurements and for calibrating the OCXO
[00:10:00] <jadew> also made a board that generates the 1pps output, CPLD based and is also controlling the status leds and checks for voltage errors and all that even if it's clockless (which is why I went for a CPLD instead of a MCU)
[00:10:43] <jadew> also made it so every row of 3x3 outputs is switchable between OCXO, Rb and external which is pretty sweet
[00:11:11] <jadew> anyway, the only thing remaining is drilling the holes for the Rb and building the OCXO board, which is super simple
[00:11:38] <jadew> but since it's almost ready, I got hit by that thing that makes me not excited anymore
[00:14:20] <jadew> nothing too impressive I'm afraid, but definitely much more time consuming than I expected
[00:18:05] <jadew> I was using the Rb by itself up until now, but I started working on a frequency counter and I kinda needed more outputs
[00:18:21] <jadew> figured it's time to make a more permanent solution
[00:24:15] <jadew> I'm considering making the OCXO board a bit smarter and have it disciplined by the Rb over longer periods of time, but I think that's a bit of an overkill
[01:22:11] <TeknoJuce01> How would I control this i2c device? http://pdf.datasheetcatalog.com/datasheet/newjapanradio/de05058.pdf
[01:22:31] <TeknoJuce01> would you have to know the address that it is set to first?
[01:27:42] <jadew> you always need that
[01:27:51] <jadew> i2c is an address based protocol
[01:29:58] <jadew> TeknoJuce01, if there are no pins that control the address, you should look for the ordering information
[01:30:17] <jadew> it should have different package numbers for different addresses
[01:30:45] <jadew> there's also the chance that it's programmable, but that's not always the case
[01:36:32] <TeknoJuce01> in that pdf do you see how you would set the address>
[01:37:15] <jadew> TeknoJuce01, did not, but I rushed trough it
[07:00:26] <Lambda_Aurigae> TeknoJuce01, page 10 of the datasheet...gives a slave address register...
[07:01:00] <Lambda_Aurigae> looks like default is 0x10001000
[07:01:21] <Lambda_Aurigae> you can change the last bit only.
[07:01:27] <RikusW> s/0x/0b ?
[07:01:27] <Lambda_Aurigae> so you can have up to 2 of them on a bus.
[07:01:35] <Lambda_Aurigae> oops
[07:01:36] <Lambda_Aurigae> yeah.
[07:01:41] <Lambda_Aurigae> it's early yet.
[07:01:48] <Lambda_Aurigae> been outta bed 5 minutes.
[07:01:54] <RikusW> lol
[07:02:14] <RikusW> 64bit AVR :-D
[07:02:26] <Lambda_Aurigae> damned right!
[07:02:30] * antto uses 64bit int math on teh atmega
[07:02:32] <Lambda_Aurigae> only this is an i2c volume control.
[07:02:35] * antto hides
[07:03:47] <RikusW> antto: you'll run a bit slow at 64 bit ;)
[07:04:43] <Lambda_Aurigae> hmm..woops...seems I am still waking up...the r/w bit there is for,,,of course, read/write of registers..so no address change,,,
[07:04:50] <Lambda_Aurigae> only one device per bus.
[07:04:56] <antto> yes.. it's not uber fast
[07:04:59] <antto> ;P~
[09:34:12] <jadew> Lambda_Aurigae, you can have a switch for the clock line and feed different devices with it
[09:34:26] <jadew> so you select which one you talk to, just like you do with SPI
[09:34:34] <Getty> \o/ i feel home
[09:35:57] <brabo> phryk: dujde
[09:37:13] <Getty> i made a disko disko partizani with the LEDs of the STK600 yesterday, happiest moment seeing the stuff work
[09:43:25] <Getty> so..... msgpack on the avr, anyone here did it already?
[10:17:21] <Lirezh> What can be the reason that sei is stuck ?
[10:17:53] <Lirezh> I have an input on INT0 and during bootup my code is stuck at sei() until I disconnect the cable. then it continues
[10:19:28] <Lirezh> # define sei() __asm__ __volatile__ ("sei" ::: "memory")
[10:26:06] <Lirezh> the chan is pretty dead
[10:27:05] <Lirezh> this: GICR |= (1 << INT0); causes the sei() crash. also cli() is ignored, I can receive interrupts before sei was called
[10:30:23] <kline> Lirezh: not getting an answer in <8 mins doesnt mean a channel is dead :)
[10:31:01] <Lirezh> you sure we both are not the only living ones here ? :)
[10:32:08] <kline> yes, the last discussion involved >= 3 people and finished at 15:26
[10:32:08] <Lirezh> I am so puzzled, I did not even know that an AVR can halt execution at the sei instruction
[10:36:33] <guanche> I'm taking appart a brother printer, it comes with a small smps (31V - 2A or so), and I'd like to use an lm298 with it to play with the motor and the sensor with an atmega
[10:37:02] <guanche> how I can derive 5 volts out of it? the regulator, although can't see it, must be on the motherboard
[10:38:11] <guanche> on the other hand, 31Vis more than an lm7805 can handle, or either, is it safe to connect both grounds together? (lm7805 circuit and smps)?
[10:39:35] <Getty> kline: even not getting an answer in <1 week doesnt mean a channel is dead, it just means noone likes the question ;)
[10:39:55] <kline> heh
[10:40:17] <Getty> ok that was now questionistic.......
[10:42:14] <Casper> Lirezh: sei can not freeze, but can cause stored interrupt to execute, and if your code is wrong then lots of stuff can go wrong
[10:42:33] <Casper> also, if you don't compile for the right avr then stuff can go wrong too
[10:43:00] <Casper> and if you don't have decoupling caps on each power pin then it can also cause weirdness
[10:43:21] <Getty> i must say, it feels a bit ironic that we are right now more struggeling with the C then with the actual hardware
[10:43:25] <Casper> external crystal or more than 8MHz require ckopt fuse
[10:43:37] <guanche> he quit Casper
[10:43:42] <Casper> ohh ping out...
[10:43:45] <Casper> yeah just noticed
[10:44:01] <guanche> I also guess his problem is either electrical or in the software
[10:44:15] <Casper> I'ld say wrong part set in the compiler
[10:44:40] <guanche> brother service manuals are crap
[10:44:51] <Casper> most are
[10:45:05] <guanche> epson ones are quite specific
[10:45:16] <Getty> if you dont mind the 100MB printer driver, sure ;)
[10:45:37] <Casper> hmmmm I think I'll really use a table for the led thing I want to do...
[10:46:16] <guanche> haha, but at least they publish full schematics, while brother only puts components without values
[10:46:20] <Casper> if I do a 256 colors.... it's only 768 bytes of flash... small enought to even fit in ram...
[10:46:48] <guanche> and that is for the power supply, the main board has a connector marked as jtag though
[10:47:25] <guanche> but no schematics or whatsoever
[10:48:52] <Casper> too. many. project. idea
[10:48:58] <Getty> hahahaha
[10:49:13] <Getty> touching hardware is like a honeypot you never leave
[10:49:20] <Getty> and you die without even seeing the ground
[10:49:59] <Casper> I ordered some rgb led strip, then the next step is to see if what I want to do is doable
[10:50:18] <guanche> I think I've found the regulator, it's a 8-pin tsop, marked as 2113 G078F JRC
[10:50:25] <Casper> if it is, I need to turn those strip into garden lights
[10:50:28] <Getty> sounds at least more reasonable as the raspberry pi promoted example of someone having a cluster of pis where every pi has control of 2 LEDs
[10:50:35] <Casper> then make a fader ircuit and all
[10:50:36] <Getty> that was....... not even funny
[10:51:16] <Casper> 2 leds per pi????? ew
[10:51:22] <Getty> yeah
[10:51:40] <Getty> if you checked up deeper you saw that this was not the real purpose of the cluster
[10:51:56] <Getty> but the raspberry pi twitter loved to promote it just referncing to the LED show
[10:52:11] <Getty> i never understand their marketing, promoting all kind of cases where a raspberry is DEFINITLY the wrong choice
[10:52:14] <Casper> it was a spy experiment?
[10:52:27] <Casper> oh hehe
[10:53:05] <Getty> if you do simple electronic control, dude, arduino, beagleboard or some atxmega is like 10 times smoother as there are more real world cases you can look at
[10:53:19] <Getty> all the raspberry pi guys do is buying the extension board and connecting wires <rolleyes>
[10:53:33] <Getty> investing 70$ alone in the "board" of their electronic
[10:53:58] <Getty> and then best making it control a lamp..... <makingsealapplause>
[10:54:12] <guanche> to end up having a soc for which not actual datasheet is available
[10:54:28] <Casper> oh? you can control a lamp with a pi??? WOWWWW!
[10:54:55] <Getty> if those "control your lamp" documentations would at least include the "and how make it available via webserver"
[10:55:01] <Getty> then i would be at least ..... seeing a sense
[10:55:18] <Thrashbarg> I can control a lamp. There's a control for it on the wall....
[10:55:37] <Getty> Trashbarg++
[10:55:43] <Casper> Thrashbarg: there is?
[10:55:47] <Getty> Thrashbarg++ # i mean ;)
[10:55:56] <Casper> oh that's what this thing is for?
[10:56:09] <Thrashbarg> perhaps they're impressed by the number of transistors they can utilize to do it
[10:56:40] * Thrashbarg goes back to his valve amplifiers...
[10:57:05] * Casper thinks even more about the stuff he'll do...
[10:57:16] <Casper> and if I get a new lens or what
[10:58:15] <Getty> and i still have this table project
[10:58:21] <Getty> a glass table with a TV under it (no touch)
[10:58:33] <Getty> now its used as eletronic workplace for showing the sheet while working on them
[10:58:40] <Thrashbarg> neat
[10:58:55] <Thrashbarg> I need to finish writing the documentation for my Z80 kit computer
[10:59:03] <Getty> yeah if you take security glass you can even drop heated shit on it without damage
[10:59:16] <Getty> and such a glass only cost like 100 EUR in the size of a table
[10:59:21] <Thrashbarg> cool
[10:59:39] <Getty> the TV then lets image 32" is a spit, the only problem is bringing the TV UNDER the glass perfect fitting
[10:59:47] <Getty> for this i use a laboratory thing
[10:59:53] <Getty> which is used to lift stuff
[11:00:10] <Getty> https://files.omnilab.de/Inetserv/omni/Img/578_0254.JPG
[11:00:14] <Getty> "Laborboy"
[11:00:18] <phryk> brabo: invading moar ircz?
[11:00:27] <Getty> phryk: YES! FOR THE EMPIRE!
[11:00:38] <brabo> phryk: i cannot go anywhere without bumping into you!
[11:00:43] <brabo> i feel stalked
[11:00:45] <brabo> :(
[11:01:30] <phryk> brabo: How am *I* stalking you when *you* follow me around? :P
[11:01:48] <Getty> phryk: you dont get the concept of stalking
[11:02:14] <phryk> Getty: I'd say the same about you…
[11:03:03] <Getty> phryk: whats more creepy, the stalker that follows or the stalker who is waiting for you coming???? ;) think about it!!!
[11:04:08] <phryk> I think it'd be more creepy if you were your own stalker with split personality disorder.
[11:04:18] <phryk> You'd be safe NOWHERE!
[11:04:49] <Getty> and how this feels to the third personality!
[11:06:18] <phryk> And the fourth… One tries to get the stalker personality to stop stalking the stalked personality while one is pissed that it doesn't get any attention from the stalker…
[11:06:30] <phryk> I'm pretty sure I could work in a love triangle somewhere in that, too…
[12:55:55] <Getty> i get CRAZY here... i found tons of tutorials about the stuff with the USART but none of them actually tells with port this runs on with the specific implementation
[12:56:07] <Getty> its like "hey you make this code and it works" yeah it works on WHICH PORT?! <goingnuts>
[12:57:46] <Lambda_Aurigae> have you looked at the datasheet?
[12:57:54] <Lambda_Aurigae> it specifies exactly what pins the usart uses.
[12:58:03] <Lambda_Aurigae> they are labeled TXD and RXD
[12:58:30] <Lambda_Aurigae> or, if the chip has multiple usarts, TXD0, RXD0, TXD1, and RXD1
[13:00:03] <Getty> uh ok that might be a reason why i dont get that info
[13:00:37] <Lambda_Aurigae> didn't bother to read the one document that tells everything you need to know about the chip...
[13:01:04] <Getty> its just one chip of the several i have to work with, actually its not even the one i use later
[13:01:18] <Lambda_Aurigae> so, browse it.
[13:01:35] <Getty> even if i would have browesed the sheet ;) i wouldnt have seen that detail so knowing is still king here
[13:02:16] <Lambda_Aurigae> first thing I did before starting with any microcontroller was read the datasheet.
[13:02:36] <Lambda_Aurigae> look at the pin configuration so you know what is where.
[13:02:43] <Getty> dude.... you are not encouraging, i have to dive in and learn what is relevnat at all and what not
[13:02:46] <Lambda_Aurigae> and that tells exactly the info you are looking for in this case.
[13:02:52] <Getty> fuckshit, stop telling me shit after you already told me the relevnat key info
[13:02:57] <Getty> i feel like i go to school here again
[13:04:44] <Getty> yeah and my chip has of course multiply
[13:05:02] <Lambda_Aurigae> my apologies. I thought you wanted to learn something, not have someone else tell you everything you needed to know.
[13:05:16] <Getty> so your comment is actually even useless, as i still stay to the base question that i need to find out which one the usart is now the one i have to check
[13:05:35] <Getty> (additional to find out where that shitcrap is mapped on the STK600)
[13:05:43] <Lambda_Aurigae> can't tell you which pins for your particular chip if I don't know what chip you are using.
[13:05:54] <Getty> again..... we come back to the base question
[13:06:07] <Getty> i have code of people that uses the USART and i cant define _WHICH_ USART they are using
[13:06:16] <Getty> s/define/find/
[13:06:29] <Getty> now i know i have 4 USARTs, and i know where those pins are thanks to datasheet
[13:06:47] <Getty> and i am not 1 step more near the solution ;)
[13:37:18] <Getty> got it!
[13:44:19] <Daulity> why must a powerfull programmer be so expensive :(
[13:46:27] <antto> because.. obama ;P~
[17:34:48] <Engen> What benefit would the 8088 have gained by having an external 8-bit bus vs in internal 16-bit in the 8086?
[17:35:34] <Lambda_Aurigae> ummm.
[17:35:39] <Lambda_Aurigae> comparing apples to apricots there.
[17:35:57] <Engen> I know this isn't avr but I'm probably going to purchase a 328, was just reading about intel last night.
[17:36:01] <Engen> Lambda_Aurigae: in layman terms?
[17:36:37] <Lambda_Aurigae> comparing external bus on one processor to internal bus on another is kinda,,,useless.
[17:37:17] <Engen> ah ok
[17:37:29] <Engen> see here's a silly question probably
[17:37:32] <Lambda_Aurigae> they were basically the same processor. the only real difference was the external bus.
[17:37:47] <Engen> why downsize though?
[17:38:01] <Engen> or can you do more outside with less?
[17:38:02] <Lambda_Aurigae> they made the 8088 with an 8bit external bus to simplify integration with external logic chips.
[17:38:13] <Lambda_Aurigae> err
[17:38:35] <Lambda_Aurigae> yeah.
[17:38:51] <Lambda_Aurigae> http://en.wikipedia.org/wiki/Intel_8086
[17:40:15] <Lambda_Aurigae> can't do more outside, but can do it simpler at times,,,specially with the x86 bus interface complexity.
[17:40:50] <Engen> ah ok
[17:41:22] <Engen> I opened the datasheet for the 328p last night for the first time as well
[17:41:28] <Engen> 700 pages
[17:41:46] <Engen> http://i1.kym-cdn.com/photos/images/newsfeed/000/360/368/a90.png
[17:42:06] <Engen> http://i1.ytimg.com/vi/Dgosi8Mp41Q/hqdefault.jpg*
[17:42:17] <Engen> hitler version was not on purpose, sorry
[17:44:43] <Lambda_Aurigae> only 700?
[17:44:47] <Lambda_Aurigae> try the pic32 sometime.
[17:45:13] <Lambda_Aurigae> it's 20ish documents of 50 to 100+ pages.
[17:47:06] <Engen> the other kids at school are working with pic
[17:47:18] <Engen> some enjoy the difficulty and reap the rewards
[17:47:27] <Engen> others just down quit yapping about how hard it is
[17:47:34] <Engen> dont*
[17:48:39] <Lambda_Aurigae> I don't find pic necessarily harder.
[17:48:59] <Lambda_Aurigae> and really, the only reward I get out of pic is the fact that they have usb hardware in dip package chips.
[18:15:36] <Daulity> from what i have read, pic asm is a bit harder. but I personaly don't have experience with PIC :) though it's on my list ! and it's getting close and close to trying.
[18:16:03] <Daulity> as Lambda_Aurigae stated what attract me though is that they have a lot of stuff in thier hardware and dips ftw
[18:16:06] <Lambda_Aurigae> a bit more complex due to paging issues mostly.
[18:16:54] <Lambda_Aurigae> and the lack of a fully implemented stack in sram does tend to cause me some consternation..
[18:16:58] <Daulity> http://www.ladyada.net/library/picvsavr.html
[18:17:22] <Daulity> Lambda_Aurigae: consternation ?
[18:17:29] <Lambda_Aurigae> each has its strengths and weaknesses.
[18:17:50] <Lambda_Aurigae> feelings of anxiety or dismay, typically at something unexpected.
[18:18:02] <Daulity> ok :)
[18:18:11] <Lambda_Aurigae> a sudden, alarming amazement or dread that results in utter confusion; dismay.
[18:20:45] <Daulity> pics have von neuman architectur (iirc) which would allow them to execute stuff from ram instead of flash
[18:20:53] <Lambda_Aurigae> nope.
[18:20:59] <Lambda_Aurigae> well, maybe some of them.
[18:21:06] <Lambda_Aurigae> but for the most part they are like avr in that matter.
[18:21:21] <Lambda_Aurigae> for executing from external memory I use 8052 chips.
[18:22:01] <Daulity> wait one of the big things i was hoping for was that :P
[18:22:35] <Lambda_Aurigae> I've yet to come across a pic that can execute from external memory except for the larger pic32 devices.
[18:25:12] <Lambda_Aurigae> with 8052 I can use 40pin dip package to execute from external memory.
[18:25:46] <Daulity> maybe maybe it would be good for me too look into arm microcontrolers.
[18:34:30] <Daulity> anyway i don't really see any advantage to executing from ram in microcontroller world.
[18:36:09] <Xark> Daulity: It is needed on some ARM MCUs to get cycle-accurate timing (since flash can have unpredictable wait-states).
[18:36:59] <Lambda_Aurigae> Duality, being able to chage your app on the fly quickly and lots of times...
[18:37:37] <Daulity> i meant more in the non arm world :)
[18:37:50] <Lambda_Aurigae> it is often done with an interpreter and interpreted language in the ram..
[18:38:35] <Daulity> I know someone who has been working on something funny .. like a stack based programming language forth or something
[18:39:09] <Lambda_Aurigae> I'm working on a function based pseudo-basic.
[18:39:37] <Daulity> i believe it's this http://amforth.sourceforge.net/
[18:39:51] <Lambda_Aurigae> that's been around for a while I think.
[18:40:02] <Daulity> it's really fast for a interperted language, he didn't write the code but helped porting it to a few devices
[18:41:29] <Daulity> anyway it's getting late, and i need sleep so gn :)
[19:33:46] <Engen> http://www.digikey.com.au/product-detail/en/ATMEGA328P-PN/ATMEGA328P-PN-ND/2357094
[19:33:52] <Engen> http://www.digikey.com.au/product-detail/en/ATMEGA328P-PU/ATMEGA328P-PU-ND/1914589
[19:34:01] <Engen> why would the chip with the lower temp rating be cheaper? o.O
[19:34:16] <Engen> higher8
[19:34:19] <Engen> *
[20:05:22] <Lambda_Aurigae> Engen, more of them made maybe?
[20:09:11] <Engen> Lambda_Aurigae: it's things like that throw me off as to whether they really as the same chip as a beginner
[20:10:44] <Lambda_Aurigae> methinks you are missing a word or two in there.
[20:15:30] <Engen> Lambda_Aurigae: indeed I am
[20:15:49] <Engen> power analysis will do that to you
[20:16:26] <Lambda_Aurigae> I don't analyze, I just apply enough power till it works,,,or the magic blue smoke escapes.
[20:16:38] <Engen> you stare long enough at the question, not figure it out, look at the worked solutions, stare at it long enough and still not figure it out, repeat this for a period of over 48 hours, throw in some substance abuse and no rest, this is what you get
[20:20:08] <Engen> like, for example in calculating the power for a load, P_max = |Vth|^2/8*Rl when you do a question that's supposed to use this, but the solutions don't. You start to question your sanity after a while
[20:20:35] <Lambda_Aurigae> bah
[20:20:49] <Lambda_Aurigae> I have never and will never question my sanity.
[20:20:51] <Lambda_Aurigae> I know I have none.
[20:25:14] <Engen> mine went out the window when I decided to do electrical engineering
[20:25:50] <Lambda_Aurigae> dunno if I ever had any sanity.
[20:27:57] <Engen> it's all relative though
[20:28:27] <Lambda_Aurigae> my relatives are all insane.
[20:28:53] <Engen> again that's relative too xD
[20:29:03] <Engen> unless it's medical
[20:29:51] <Lambda_Aurigae> in some cases,,,I know of at least 5 people I'm related to by blood who are in institutions for mental "illness"
[21:12:15] <technomancy> I've got some code that works or fails based on the length of a dummy string I allocate on the previous line
[21:12:30] <technomancy> if I add char * a = "abc"; while(*a) {a++;} then the following line works fine
[21:12:44] <technomancy> but if the string is just "ab" then my code gets skipped, and the line after it runs
[21:13:24] <Lambda_Aurigae> why not use an array for starters?
[21:13:42] <Lambda_Aurigae> but, I have no clue otherwise.
[21:13:51] <technomancy> Lambda_Aurigae: this is just throw-away code I'm using to explore this bizarre bug
[21:13:55] <technomancy> the string does nothing
[21:14:11] <Lambda_Aurigae> look at the assembly output and see what it is doing.
[21:14:12] <technomancy> lengths of 3, 4, 12, and 13 all make it work; every other length I've tried causes it to fail
[21:14:43] <technomancy> eventually I guess I'll have to, but I don't know assembly
[21:14:57] <technomancy> so I was wondering if there were any likely causes I could investigate first
[21:15:41] <Lambda_Aurigae> go through it line by line...with the instruction set in front of you.
[21:16:17] <technomancy> the line that's getting skipped is invoking a forth interpreter I wrote, so it's pretty involved
[21:17:15] <technomancy> oh son of a bitch
[21:17:26] <technomancy> now it's skipping the code regardless
[21:17:52] <technomancy> this is the exact same source as I had earlier
[21:19:47] <technomancy> what kinds of things can cause non-deterministic behaviour in code that doesn't read from input ports?
[21:21:23] <technomancy> huh... now I need a string of length 1 or 2 to make it work
[21:29:59] <technomancy> it seems like whether it works or not depends on the reported size of the .hex file
[21:30:22] <technomancy> adding one or two chars to the string seems to only increase the size if it pushes it over a word boundary or something?
[21:30:55] <Lambda_Aurigae> dunno
[21:31:05] <Lambda_Aurigae> again, would have to look at the assembly output to see what it is doing.
[21:31:31] <technomancy> ok, so actually it looks like the location of the string is immaterial
[21:31:41] <technomancy> it's just the fact that memory is set aside for it that matters
[21:32:15] <technomancy> it will still break the code even if it's moved to after a reset call
[21:42:49] <technomancy> must be something about alignment
[21:43:07] <technomancy> or could be memory management I guess
[21:43:16] <technomancy> same code works fine on x86 =\
[21:46:07] <Engen> would using a 328p be overkill for an AM/FM radio?
[22:21:23] <zdennis> hello