#avr | Logs for 2016-03-27

Back
[01:08:28] <eszett> hi
[01:08:59] <Casper> o/
[06:37:24] <Lambda_Aurigae> Go back to bed. Easter is canceled. I found the body.
[06:44:33] <WormFood> Easter? I think I remember that holiday.
[06:44:57] <WormFood> Isn't that where Jesus rises from the dead, and if he sees his shadow, there is 6 more weeks of winter?
[06:46:22] <julius> WormFood, no. i got it at my apartment but im still waiting on the openhantek guys to reply to my comment on compile errors. if that happens in a few days, im gonna install a windows in a vm
[06:56:29] <WormFood> ok julius
[06:57:40] <WormFood> I'm gonna try to pick one up on tuesday. I'll be anxious to play around with it, so I'll probably install the Windows software on my spare machine. As one of the guys in the forum talking about this commented, it works great under XPee. So, I may fire up my XPee machine (I have a dedicated XPee machine, for this kinda shit)
[06:59:23] <Lambda_Aurigae> WormFood, no..it's where the leader of a downtrodden nation rose from the grave as a zombie and took over the world, making millions of mindless zombies to follow him.
[07:00:27] <WormFood> Easter? That's an ancient fertility ritual, that predates Jesus, and all that crap, by many centuries.
[07:00:51] <Lambda_Aurigae> Baeltain or Beltaine or Baeltaine, depending on where you are from.
[07:00:55] <WormFood> Notice that Easter is rich with rabbits and eggs. Rabbits symbolize fertility, and eggs are a symbol of new life.
[07:01:24] <WormFood> The christians tried to put their own spin on things, and it's been happening so long, people now believe that is how easter started.
[07:01:24] <Lambda_Aurigae> just another fun holiday subjugated by the christians and turned into an overly commercialized waste.
[07:01:51] <Lambda_Aurigae> WormFood, how bout the christmas tree and ornaments?
[07:02:10] <Lambda_Aurigae> originally the pretty ornaments on the tree were sacrifices hung on trees in the forest to appease the gods.
[07:02:44] <WormFood> The tree comes from germanic rituals.
[07:02:52] <theBear> predated ? like what happened to his mum shortly before he got born ? woaaah ! no i di'nt !
[07:02:57] <WormFood> The tinsel is actually spider web that has been turned into silver.
[07:03:17] <Lambda_Aurigae> and the birth of christ was originally celebrated in the early spring...but the emperor of constantinople declared it would be on december 25 to coincide with the birth of the pagan sun god so everybody could party together.
[07:03:19] <theBear> heh, at my place also
[07:03:23] <theBear> the tinsel thing
[07:03:33] <Lambda_Aurigae> theBear, my spider webs just turn brown.
[07:03:58] <theBear> tinsel in the corners, i even noticed some under the bottom edge of the kitchen cabinets near the front door earlier
[07:04:04] <WormFood> predated, meaning it happened before. The celebration currently commonly called "easter" predates Jesus by a loooong time
[07:04:19] <theBear> aww, you got me, none of it is pretty or silver, but a lot of it got tar and nicotine staining
[07:04:34] <theBear> WormFood, you mean overpriced shitty chocolate ?
[07:04:36] <WormFood> the "birth" of the "pagan sun god" is actually the same god the christians worship.
[07:04:49] <WormFood> God of the bible, IS the sun.
[07:05:00] <WormFood> Jesus is a personification of the sun.
[07:05:02] <theBear> and i noticed for the first time this year, a green kinda fake-lawn looking bunny err, icon, graven image, i dunno
[07:05:05] <Lambda_Aurigae> hehe..that's one interpretation.
[07:05:20] <WormFood> Read the bible, it's all there.
[07:05:23] <Lambda_Aurigae> I kinda like it..never heard it put quite that way.
[07:05:38] <WormFood> Seriously, jesus and his 12 deciples, is the sun and the 12 zodiac signs.
[07:05:45] <Lambda_Aurigae> oh, I've read it...was forced to...found it to be a poorly written pseudo historical fiction at best.
[07:05:47] <WormFood> Judas is Scorpio
[07:05:51] <theBear> but it had cloven little bunny err, toes, and ears and stuff, and was green, it spent the whole week in a very high thruput public place, right where people could see it, and i was the only one to ask why it was so, and nobody knew
[07:05:55] <Lambda_Aurigae> hey, I'm a scorpio!
[07:06:12] <WormFood> yes, you betrayed Jesus, you bastard! :P
[07:06:18] <Lambda_Aurigae> thank you.
[07:06:19] <Lambda_Aurigae> but,
[07:06:23] <Lambda_Aurigae> it wasn't Jesus.
[07:06:29] <WormFood> seriously, check it out. Hold on, and I'll find you a link, that explains this stuff.
[07:06:37] <Lambda_Aurigae> Jesus is a derivation of a greek name from some 200AD or so.
[07:06:38] <theBear> technically i betrayed his father <wink>
[07:06:42] <theBear> totally worth it
[07:07:04] <Lambda_Aurigae> the original hebrew language and the written form called aramaic had no letter J or sound for the letter J.
[07:07:15] <Lambda_Aurigae> so, no jesus, no joshua, no john, etc.
[07:07:20] <Lambda_Aurigae> all made up.
[07:07:23] <theBear> heh, what about the mk2 hebrew ?
[07:07:27] <WormFood> how in the fuck, can chrome be soooo slow to resolve dns names, but dig on a command line, and it's almost instant resolution
[07:07:41] <Lambda_Aurigae> it's called,,,,chrome.
[07:07:55] <theBear> cos chrome is modern and unbelievable inefficient, yet everyone other than me seems convinced it isn't somehow
[07:08:14] <Lambda_Aurigae> I use chrome for playing netflix on linux.
[07:08:16] <Lambda_Aurigae> that is all.
[07:08:22] <WormFood> It's shitty, in it's own way, and different from the way Firefox is shitty.
[07:08:33] <Lambda_Aurigae> yup.
[07:08:56] <Lambda_Aurigae> I use firefox for general web browsing..this latest version seems to have fewer memory leaks than previous ones though.
[07:09:12] <theBear> compared to the oldendays (you know, the beforetime) and to chrome or explorer, ffox is by far the least painful
[07:09:35] <theBear> course i wouldn't know how it performs on more popular kinda err, os's than the one i use
[07:09:38] <WormFood> http://www.solarmythology.com/lessons/christ2002.htm <-- scroll down to the picture of the last supper, and start reading there, if you want to get straight to the judas/scorpio reference.
[07:10:21] <Lambda_Aurigae> cute
[07:10:34] <Lambda_Aurigae> you know, that site brings up something else I have wondered about for years.
[07:10:49] <Lambda_Aurigae> the romans used an X shape to crucify people historically, didn't they?
[07:11:00] <WormFood> don't know
[07:11:03] <WormFood> but it doesn't matter
[07:11:10] <WormFood> because the shit in the bible didn't happen
[07:11:13] <theBear> wtf other shape would you crucify someone on ?
[07:11:26] <Lambda_Aurigae> theBear, the christians claim a T shape
[07:11:28] <WormFood> In fact, the shape of the christian cross, is the same shape as a compass
[07:11:31] <Lambda_Aurigae> or a + shape,,
[07:11:46] <theBear> oh, you mean an angled X, ok
[07:11:50] <Lambda_Aurigae> oh,,,here's one that I got a neighbor on some years ago.
[07:12:02] <Lambda_Aurigae> he put up a star at christmas,,,up on the front of his garage.
[07:12:04] <Lambda_Aurigae> 5 pointed.
[07:12:13] <Lambda_Aurigae> but,,,,he put it with 2 points up, 1 down...
[07:12:21] <Lambda_Aurigae> rather than 1 point straight up and 2 down...
[07:12:36] <Lambda_Aurigae> 2 up 1 down is a goat symbol....satanic..
[07:12:42] <WormFood> hahaha
[07:12:44] <Lambda_Aurigae> I pointed it out to him...
[07:12:51] <Lambda_Aurigae> that thing was down in less than 5 minutes!
[07:13:01] <WormFood> You should have pointed it out, by drawing a goat head on it.
[07:13:08] <Lambda_Aurigae> oh, I did better
[07:13:26] <WormFood> oh yeah?
[07:13:30] <theBear> i still like the inri guitar ... if yer not familiar this should cover it... https://www.youtube.com/watch?v=JsUhAbZqijo
[07:13:32] <Lambda_Aurigae> I showed him my copy of the Satanic Bible.
[07:13:57] <Lambda_Aurigae> I keep it on the shelf between the catholic bible and the book of mormon.
[07:14:10] <Lambda_Aurigae> it's the only way I can keep those two from fighting.
[07:14:23] <Thrashbarg> neat
[07:15:11] <Lambda_Aurigae> on a totally unrelated note.
[07:15:27] <WormFood> how about C sharp
[07:15:33] <WormFood> no...make it C flat
[07:15:42] <Lambda_Aurigae> I just resurrected 4 more old android phones to use as security cameras around my house.
[07:15:50] <Lambda_Aurigae> C# is satan's work all the way around.
[07:16:25] <Lambda_Aurigae> have 3 that won't work as they don't have wifi on them.
[07:16:52] <Lambda_Aurigae> they are to become mp3 players in the shop and truck.
[07:16:56] <theBear> "we need something that's funny the first time you hear it, then less funny every time after that !" "ooh, how about 'The B Sharps' !?!" <general laughter> "hehe, perfect, the b sharps it is" <hesitant arkward laughter>
[07:17:15] <Lambda_Aurigae> theBear, I don't get it.
[07:17:33] <WormFood> It's a simpsons reference, I believe.
[07:17:37] <Lambda_Aurigae> oh.
[07:17:45] <Lambda_Aurigae> I stopped watching that after the second episode.
[07:17:49] <WormFood> Maybe I'm wrong there
[07:18:00] <Lambda_Aurigae> sounds right.
[07:18:12] <Lambda_Aurigae> either way, it's some kind of pop culture reference I'm sure.
[07:18:21] <Lambda_Aurigae> most of which I never get as I avoid pop culture...
[07:18:33] <theBear> yeah, it's hard to appreciate purely quoted, outta context, without the pictures that match
[07:18:37] <Thrashbarg> Put it in H!
[07:19:03] <Lambda_Aurigae> H Bang?
[07:20:03] <Lambda_Aurigae> "Clearly you have no experience with self-aware AI." 'How do you know that?' "You aren't extinct."
[09:46:34] <twnqx> any idea why fastron smcc axial wound chokes on ferrite cores might not work with switching power supplies?
[09:46:49] * twnqx is a tad cluelsss when it comes to analog stuff
[09:50:06] <Lambda_Aurigae> switch mode power supplies...first you have to sacrifice at least 3 chickens to the god Toroid.
[09:50:40] <twnqx> well, small DC-DC regulators
[09:51:25] <twnqx> the only one that didn't work out of the box was the one i tried to breadboard with those inductors
[09:51:41] <Lambda_Aurigae> for small ones you only need to sacrifice 2 chickens and a hamster.
[09:52:10] <Lambda_Aurigae> that stuff is all black magic to me.
[10:30:07] <twnqx> great
[10:30:13] <twnqx> i have a diode here that says ZPY 1
[10:33:10] <twnqx> there are no 1V Z diodes of the zpy family.
[10:45:13] <twnqx> 48mhz ttl/cmos compatible 5V oszillators, full size as 14pin dip... why do i even have such stuff...
[10:46:53] <Lambda_Aurigae> for the fun of it.
[10:56:53] <phinxy> A project ive not written tries to check if __AVR_ATmega64__ is defined
[10:57:06] <phinxy> which is is not on my Atmel studio 7 installation
[10:57:14] <phinxy> its a atmega644 project.
[11:06:36] <phinxy> Can you change what version of GCC is used for compiling in atmel studio ?
[11:08:11] <Lambda_Aurigae> I can't.
[11:08:15] <Lambda_Aurigae> but I'm sure someone who runs it can.
[11:10:05] <phinxy> How would you check what version is currently in use?
[11:10:17] <phinxy> Lambda_Aurigae
[11:10:38] <Lambda_Aurigae> I would type avr-gcc -version
[11:10:41] <Lambda_Aurigae> at a command prompt
[11:10:42] <Lambda_Aurigae> but
[11:10:45] <Lambda_Aurigae> I don't use windows
[11:10:48] <Lambda_Aurigae> nor atmel studio
[11:10:53] <Lambda_Aurigae> so, no clue how you would do it.
[11:10:59] <phinxy> \atmel\ATmega_DFP\1.0.98\gcc\
[11:11:27] <phinxy> maybe that means version 10, i want 4.9
[11:11:52] <Lambda_Aurigae> I doubt that means version 10
[11:11:55] <Lambda_Aurigae> as there is no version 10
[11:15:49] <phinxy> Do you happen to know the command to print version?
[11:15:53] <phinxy> tried -V ,,
[11:16:45] <phinxy> 4.8.1
[11:38:37] <julius> hi
[11:39:28] <julius> as far as i know "from experiemnts" when you attach a dc motor that normally draws 35ma (according to datasheet) to a constant current power supply set to 1A it just doesnt take more than it needs..so like 50ma
[11:39:36] <julius> is that true? or are there exceptions?
[11:39:52] <julius> besides if you stall the motor...of course power usage will go up
[11:44:23] <Lambda_Aurigae> correct.
[11:45:15] <Lambda_Aurigae> constant current supply just indicates that it will not allow more than 1A...it should read Maximum Current rather than Constant Current.
[12:40:00] <hetii> Hi
[12:40:14] <hetii> Any clue how to flash s29gl032n90?
[12:40:45] * Casper takes camera, take a picture with the flash on
[12:40:47] <Casper> there :D
[12:41:00] <Casper> but seriously, no idea what it is
[12:41:02] <Casper> so not me
[12:41:27] <hetii> Its a flash from br615n router ;)
[12:41:53] <hetii> Today i brick one and wonder how to recovery it
[12:42:27] <twnqx> flash programmers are expensive
[12:42:34] <twnqx> and just looking at your particular one... wee
[12:43:17] <twnqx> 21 address bits, 16 data bits
[12:43:21] <twnqx> sounds like "fun"
[12:43:38] <Casper> still in the router?
[12:43:45] <hetii> Yes
[12:44:01] <Casper> asmax
[12:44:25] <hetii> Btw I see also a place on pcb for spi flash
[12:45:10] <hetii> But the questiin is if I take original firmware do It have also uboot?
[12:45:22] <twnqx> weee amd am27c020-150 "eproms"
[12:45:34] <twnqx> the good old flash chips that are UV erasable :D
[12:45:37] <hetii> Or do I need to get orginal raw image stored in that ram?
[12:45:46] <twnqx> i suppose ram image
[12:46:26] <twnqx> why do i have all this stuff...
[12:46:52] <hetii> Is it possible to convert such official image to ram image?
[12:47:25] <twnqx> unlikely
[12:47:40] <Lambda_Aurigae> if you have to ask you can't do it.
[12:47:42] <Casper> that combo unit is not supported by openwrt due to too little ram
[12:48:20] <Casper> recovery will be complicated... next time, don't buy a combo unit, they suck anyway
[12:49:00] <hetii> Yep but it is supported by dd-wrt and wive-ng
[12:49:01] <lorenzo> hetii: you probably need both the bootloader, to be stored in flash via some other programmer (or jtag)
[12:49:16] <lorenzo> and then tftp load the actual binary image
[12:49:32] <hetii> Btw there is rt3050f used also by openwrt
[12:49:37] <Casper> hetii: check if dd-wrt or wive have a recovery
[12:49:42] <Casper> btw, it have a serial port
[12:49:50] <Casper> might want to check what it spit out there
[12:50:48] <hetii> There are some pads also on board, propably jtag but don't know signals
[12:51:11] <hetii> So any clue how to discover it ?
[12:51:41] <hetii> I have nothing to lose so can play with that board
[12:51:41] <Lambda_Aurigae> trace down the schematic and work it out with some datasheets and such.
[12:52:07] <hetii> Well rt3050f is in bga
[12:52:28] <hetii> So will be hard to trace wires.
[12:52:48] <Lambda_Aurigae> desolder it, take a meter to the board, solder it back on.
[12:53:02] <hetii> Huh
[12:53:15] <Lambda_Aurigae> that's how its done.
[12:53:23] <Lambda_Aurigae> or, find someone else who has done it already.
[12:54:10] <hetii> Yep propably better idea cause i don't have equipment to play with bga
[12:54:33] <Casper> hetii: first, connect a TTL serial to the board, there is a 4 pins header
[12:54:46] <Casper> then you will possibly see if it have uboot
[12:55:01] <Casper> and what happened to the router flash...
[12:55:36] <hetii> No i dont have. I burn that way flash image who broke it
[12:56:01] <hetii> Currently have no response via serial
[12:56:09] <Casper> my router, I can tell you that the recovery is not too hard
[12:56:39] <Casper> I actually added the recovery section on the openwrt page
[12:57:35] <hetii> Is it possible to use other routers as a programmer and hot replace flash?
[12:58:03] <Casper> the original info sucked hard. the original info was like: "serial 115200 8n2, type tpl, ip is x, server is y, address is 0x8......... good luck"
[12:58:12] <Casper> no
[12:58:17] <Casper> however
[12:58:41] <Casper> you could read the working flash, then write it on the broken one
[12:59:28] <hetii> Well i just have few other routers that propably will never use and can play with them
[12:59:57] <Lambda_Aurigae> same make and model?
[13:00:12] <hetii> But first somehow i need to get raw image of broken
[13:00:13] <Casper> the issue is that the flash do not hold a 1:1 content to the firmware file
[13:00:36] <hetii> Hmm
[13:00:43] <Casper> but hetii... might want to first google for jtag recovery for other router
[13:00:53] <Casper> chance is that the process will be simmilar
[13:01:59] <hetii> Yes I will try to find jtag pinouts somehow if dont get it then will try to use other spi flash for that same chip
[13:48:58] <WormFood> Does anyone know of an AVR price list? I need to pick an AVR, and price is the main factor, since the code is relatively simple.
[13:50:15] <Lambda_Aurigae> depends where you buy from.
[13:52:02] <cehteh> and how many units
[13:52:39] <cehteh> when you need 10000+ the uncomman very small avr's become cheap
[13:52:45] <WormFood> Price is relative. I know what prices Atmel has on their website, but no list of everything, and no way to sort it via price.
[13:53:00] <cehteh> check alibaba
[13:53:06] <WormFood> well, I imagine at 10k pieces, you get a good price on almost anything
[13:53:22] <WormFood> alibaba is terrible for this kinda stuff.
[13:53:42] <cehteh> farnell, rs, digikey?
[13:53:44] <WormFood> Anyways, I'm searching mouser. I know their prices are higher, but like I said, it's relative.
[13:53:48] <cehteh> or mouser
[13:53:53] <WormFood> don't know farnell
[13:54:23] <WormFood> Is the internal clock stable enough to bitbang USB?
[13:54:44] <Lambda_Aurigae> WormFood, only on like the attiny85/45 series
[13:55:03] <WormFood> Why is that?
[13:55:06] <cehteh> this hobbyist prices for less than 20 pcs differ vastly from real prices you get for high volume
[13:55:16] <WormFood> I'm looking at 1000
[13:55:18] <Lambda_Aurigae> those are the ones that have the pll for syncing the usb clock with v-usb
[13:55:26] <WormFood> oh, I got ya
[13:55:36] <cehteh> WormFood: for some time yes, but as soon it drifts because of temperature changes it may become unstable
[13:55:40] <Lambda_Aurigae> attiny 25/45/85 are the ones that can do v-usb without external crystal.
[13:56:04] <cehteh> you can adjust the clock to the usb master clock, that works pretty well
[13:56:12] <cehteh> runnin at 16.5MHz then
[13:56:26] <Lambda_Aurigae> I would never use v-usb for a commercial project myself.
[13:56:42] <cehteh> low speed usb only of course, it works
[13:56:44] <WormFood> Why not?
[13:56:55] <cehteh> depends on the project i guess
[13:57:04] <Lambda_Aurigae> if I had to do usb without external crystal I would go with a pic16f1454 or 1455
[13:57:16] <WormFood> I only need usb firmware to update the main firmware.
[13:57:25] <cehteh> but avrs are simpler :D
[13:57:37] <Lambda_Aurigae> yes, they are simpler.
[13:57:42] <WormFood> no thanks. I'll pass on the pic. Especially 16xxx series
[13:57:43] <cehteh> WormFood: look at the 'micronucleus' bootloader
[13:57:44] <Lambda_Aurigae> and I find avr much easier and more fun to use.
[13:58:01] <cehteh> works pretty well
[13:58:06] <Lambda_Aurigae> I just find v-usb to be unusable in some circumstances.
[13:58:19] <WormFood> like which circumstances?
[13:58:22] <cehteh> if its only bootloader then its fine
[13:58:22] <Lambda_Aurigae> this particular laptop I'm using doesn't work with v-usb.
[13:58:37] <z3t0> hello, I am currently working on a project with an ATMega
[13:58:40] <z3t0> 328p*
[13:59:02] <z3t0> and was wondering how I could figure out how long parts of the code take to run so that I can work on optimizing
[13:59:23] <cehteh> beans counting :D
[13:59:29] <Lambda_Aurigae> look at the assembly code and count clock cycles according to commands.
[13:59:32] <cehteh> dump asm and look
[13:59:37] <cehteh> or simulator
[13:59:50] <cehteh> or use a timer and add some instrumentation to measure it
[13:59:51] <Lambda_Aurigae> each command executes in a set number of cycles....time to count.
[14:00:27] <cehteh> depends on what size the code has and how exact you need the timing
[14:00:58] <cehteh> checking some kb of asm down to the cycle might be really hard
[14:01:10] <Lambda_Aurigae> then run it through a simulator.
[14:01:31] <z3t0> Looking at assembly code wont really work for me as I have no experience with asm
[14:01:32] <Lambda_Aurigae> or write a script to look at your asm and count for you.
[14:01:38] <Lambda_Aurigae> that data is all available out there.
[14:01:42] <cehteh> i'd do the later, just instrumentate my code, add timer and logging over serial for that
[14:01:59] <z3t0> hmm but wont using the serial slow it down?
[14:02:00] <cehteh> thats the low hanging fruit
[14:02:12] <z3t0> il take a look at simavr
[14:02:17] <cehteh> only do serial outside of the measured code
[14:02:19] <Lambda_Aurigae> using serial doesn't slow down how the processor processes.
[14:02:32] <Lambda_Aurigae> it will still execute code at a set rate.
[14:02:34] <cehteh> well isr's do a bit
[14:02:44] <Lambda_Aurigae> it's not like the thing is multiple-piplined with cache
[14:02:45] <cehteh> entriely depends on the code
[14:03:17] <Lambda_Aurigae> you can do serial without isr.
[14:03:23] <cehteh> and the instrumentation itself will add their bits and possibly change your code because of different compiler optimizatiion
[14:03:24] <Lambda_Aurigae> so, yeah, entire depends on the code.
[14:03:38] <z3t0> the code is fairly simple
[14:03:38] <cehteh> it wont be exact, but for a rough estimate it should be ok
[14:03:40] <z3t0> one sec il shwo you
[14:03:52] <z3t0> https://github.com/z3t0/shadow
[14:04:07] <cehteh> another thing i just toggle an output on certain points, thats always 1 cyclle
[14:04:13] <z3t0> its for a sumobot project and my main aim is to compare the run time between using two different sensors
[14:04:17] <cehteh> and measure it with the logic analyzer
[14:04:39] <cehteh> that gives quite precise timing down to the cycle
[14:04:42] <z3t0> unfortunately I also dont have a logic analyser
[14:04:48] <Lambda_Aurigae> so make one
[14:04:49] <Lambda_Aurigae> or buy one.
[14:04:49] <cehteh> $15
[14:05:24] <Lambda_Aurigae> I made a logic shrimp from spare parts and a couple of sampled chips.
[14:05:30] <z3t0> I know that we have one at my school but unfortunately we have a school break at the moment... would it be possible to use another arduino as a logic analyser?
[14:05:58] <cehteh> should be possible too .. but you need to sample at least twice as fast as your signal is
[14:06:06] <Lambda_Aurigae> an AVR can be made to be a logic analyzer, yes,.
[14:06:48] <z3t0> Lambda_Aurigae: ok thanks I'll try and make a logic analyser and then see how far I can get with that! Thanks for all the help guys
[14:07:13] <cehteh> z3t0: search amazon or ebay for saelae ...
[14:07:38] <cehteh> $15 clone does the job and maybe delived by tuesday when you order now
[14:07:41] <Lambda_Aurigae> cehteh, sounds like he is doing homework that needs to be done before he goes back to school in a day or two.
[14:07:46] <z3t0> I found https://www.element14.com/community/people/jancumps/blog/2015/03/13/make-a-logic-analyzer-from-your-dev-kit-part-1-arduino-uno do you think this will work?
[14:07:47] <cehteh> hehe
[14:08:08] <cehteh> well i hardly seen any homeworks which has much demands on optimizaton :D
[14:08:09] <z3t0> nah haha this is for a sumobot competition im hoping to win xD
[14:08:12] <Lambda_Aurigae> I don't do arduino so wouldn't know if it works or not.
[14:08:17] <z3t0> ok thanks
[14:09:09] <cehteh> probably it will work
[14:09:41] <lorenzo> does anyone know if there's a development kit for avr with integrated ethernet?
[14:09:50] <cehteh> dunno the code, about glitches, jitter
[14:10:02] <lorenzo> like, an atmega something with a wiz5100 something on board :D
[14:10:12] <Lambda_Aurigae> lorenzo, yes...not with that one...but, yes.
[14:10:27] <lorenzo> do you happen to have a link?
[14:10:34] <Lambda_Aurigae> http://tuxgraphics.org/electronics/200606/article06061.shtml
[14:11:47] <Lambda_Aurigae> http://shop.tuxgraphics.org/electronic/index-eth.html
[14:12:09] <Lambda_Aurigae> uses the enc28j60 chip from microchip.
[14:13:22] <lorenzo> looks nice, thanks
[14:13:44] <z3t0> is this what you are looking for?
[14:13:44] <z3t0> http://www.arduino.org/products/boards/4-arduino-boards/arduino-leonardo-eth
[14:13:55] <Lambda_Aurigae> I've used the tuxgraphics libs for several years.
[14:14:00] <Lambda_Aurigae> z3t0, but, that's an arduino.
[14:14:19] <z3t0> Lambda_Aurigae: oh sry my bad
[14:14:32] <Lambda_Aurigae> sry?
[14:15:36] <Lambda_Aurigae> I still don't understand people just randomly dropping characters and expecting the rest of us to understand them.
[14:19:21] <Lambda_Aurigae> lorenzo, I've gotten magjacks out of dead routers and sampled the enc28j60 chips.
[14:19:47] <lorenzo> yeah, I have a few of those laying around, need to find a sop -> dip adapter
[14:19:49] <Lambda_Aurigae> built several ethernet devices with that software and their designs myself.
[14:19:56] <Lambda_Aurigae> I get them in dip package.
[14:22:35] <Lambda_Aurigae> not the fastest ethernet chip out there
[14:22:38] <Lambda_Aurigae> but fun to work with.
[14:28:20] <julius> hi
[14:28:45] <lorenzo> hi
[14:49:35] <lorenzo> Lambda-Aurigae: it works!
[14:49:37] <lorenzo> I have ping :-)
[14:49:51] <z3t0> hello I managed to get the arduino to be a logic analyser and am now trying to learn how to use ols which listens to serial port but for some reason it only works for a small amount of time and then finishes recording
[14:52:02] <cehteh> could be because serial is too slow to transmit that data at full bandwidth
[14:52:14] <cehteh> i dont know the arduino software there
[14:52:20] <cehteh> can you define triggers?
[14:55:52] <z3t0> yes it allows me to define triggers, but I wonder if theres anyway to keep it looping so that way I am not limited to the small time frame given... I'll go do some googling
[14:58:33] <cehteh> possibly not with serial
[14:59:20] <cehteh> you may try to configure the serial as fast as possible, but i dont know the code if it makes any benefit from that
[14:59:45] <cehteh> could be that it buffers all in ram (which is very small) and then sends it out
[15:00:21] <cehteh> and since you need to time stuff at high speeds you have no much options there
[15:03:23] <z3t0> yeah, I guess I'll just use this for the time being then go and get a real logic analyser :D once again thanks for the help
[15:04:39] <cehteh> i got one some weeks ago and use it constantly
[15:04:54] <cehteh> even this cheap cloned do their job pretty well
[15:05:37] <cehteh> (dont reach the advertized 24mhz, but i dont need that, often i sample much slower, 4mhz at most rarely)
[15:09:31] <z3t0> i am turning a pin on before a certain function and then off after the function finishes executing but then the results on the logic analyser dont seem to match...
[15:09:51] <z3t0> I am wondering if maybe the sampling rate is not fast enough (4Mhz) but then i cant go any higher with this anyways...
[15:12:53] <cehteh> just PINn = 1<<PINnx; toggles the pin
[15:13:21] <cehteh> what frequency does your avr run?
[15:13:28] <liwakura> cehteh: i heard that this is not valid for all avr's
[15:13:34] <z3t0> basically the logic analyser reports 50.25 us between the states but thats with a 50us delay ...
[15:13:41] <z3t0> 16Mhz
[15:13:46] <z3t0> atmega328p is the one being used
[15:13:48] <cehteh> liwakura: the ones i know works
[15:13:55] <cehteh> 328p dooes
[15:14:16] <z3t0> ok
[15:14:38] <z3t0> oh got it to work!
[15:14:40] <z3t0> thanks
[15:14:50] <z3t0> just needed to add a delay in between so that it showed up
[15:14:51] <cehteh> i measured 8mhz avr with 4mhz sampling sequence
[15:15:02] <cehteh> yeah
[15:15:27] <cehteh> to be correct your sampling frequency should be twice as fast as the cpu freq
[15:15:37] <z3t0> it seems it takes 28us for the ir sensor, now im going to see how the sonar works
[15:15:40] <z3t0> hmm I see
[15:15:45] <z3t0> but currently thats not possible
[15:15:55] <cehteh> 32mhz stretches the limit a bit
[15:15:58] <cehteh> yeah
[15:16:14] <z3t0> I have a teensy which has a much higher clock speed so maybe i'll see if i can turn that into a logic analyser
[15:16:38] <cehteh> half work, if the time inbetween is a bit longer (you actually doung something) and has a error of +/-3 cycles
[15:17:19] <cehteh> i wonder if one can make a single channel logic analyzer with the attinys which have the 64mhz PLL
[15:17:28] <cehteh> input capture unit
[15:17:33] <cehteh> but the memory is small
[15:17:35] <z3t0> this seems to do 1-2 channels at 30mhz
[15:17:37] <z3t0> https://github.com/LAtimes2/TeensyLogicAnalyzer
[15:17:39] <z3t0> for teensy that is
[15:20:34] <cehteh> me thinks 4mhz and more channels are more universal
[15:21:17] <z3t0> in terms of usability?
[15:21:20] <cehteh> yes
[15:21:31] <cehteh> i often connect all 8 channels
[15:21:55] <cehteh> each one giving some information
[15:23:15] <jacekowski> it's amazing that with shit like ethernet now being so fast and usb being fast as well there is no cheap ADC + USB + some frontend that can serve as half decent cheap scope
[15:23:53] <cehteh> there are
[15:24:04] <cehteh> well half decent .. not really
[15:24:24] <jacekowski> 3Gbits usb 3.0 or even 10Gbits usb 3.1 gives you over 1Gs/s
[15:24:33] <cehteh> the cheap usb scopes cost $50 and have 1% of the feature of a $400 scope
[15:24:40] <cehteh> not really worth it
[15:24:46] <jacekowski> split that across 4 channels and you still get decent 250Ms/s
[15:24:57] <jacekowski> cehteh: but all you really want is something that can give you raw data
[15:25:01] <cehteh> fast adc is the problem
[15:25:14] <jacekowski> not anymore
[15:25:25] <jacekowski> let's just check AD website
[15:25:35] <cehteh> there are, but what do they cost?
[15:26:11] <jacekowski> AD9841
[15:26:20] <cehteh> and at high sampling rates you have to put some efforts into the analog input stage, any capacitance and inductance there will be bad and you need high impedance
[15:26:58] <jacekowski> AD9481
[15:27:06] <jacekowski> not in stock
[15:27:09] <cehteh> i dont say its impossible but considering this crap usb scopes from china are not cheaper than $30-$50 there must be a reason
[15:27:51] <cehteh> and really you get soo much more when you take $300 at hand
[15:28:53] <jacekowski> http://uk.farnell.com/texas-instruments/tvp7002pzp/ic-video-graph-digitzr-100-htqfp/dp/1755604
[15:28:58] <jacekowski> 10bit, 165MSPS
[15:29:09] <jacekowski> £8.12 if you buy one
[15:29:22] <jacekowski> at decent quantities it drops down to £2.69
[15:29:50] <cehteh> what do you need as external stuff around that? input opamp, etc etc?
[15:30:24] <cehteh> well if you can build a decent USB or ethernet scope for less than $50 .. i'll buy one
[15:30:33] <jacekowski> it can probably all be done for less than £10/channel
[15:30:40] <jacekowski> for a 4 channel device
[15:30:55] <cehteh> usually scopes have flash adc's 8bit only
[15:31:08] <cehteh> and quite some software stack
[15:31:20] <jacekowski> cehteh: i know, but that 10bit thing has nice parameters and price is good
[15:31:32] <cehteh> just build me a scope :D
[15:31:38] <cehteh> 2 channel would be good already
[15:31:54] <jacekowski> software stack is there because comms interfaces were never fast enough
[15:32:12] <jacekowski> up until 2 years ago the fastest thing we had was 1gigE
[15:32:31] <jacekowski> that was reasonably accessible without spending tons of cash
[15:33:11] <jacekowski> now with 10Gig usb 3.1 you don't need processing in the device itself you can leave it to the PC
[15:34:23] <jacekowski> with modern NVME drives reaching 2Gigabytes/s write speed you can actually get very nice feature set
[15:34:45] <jacekowski> few years ago you needed a deep memory scope to even think about doing something like that
[15:35:20] <jacekowski> and now you can sample at 1GSPS and transfer it to pc and store it
[15:35:37] <jacekowski> and then analyse it in any way you can imagine afterwards
[15:44:35] <stefan_schmidt> Is this the right place to ask avrdude questions?
[15:45:10] <Lambda_Aurigae> ask away.
[15:45:25] <stefan_schmidt> fair enough
[15:45:47] <stefan_schmidt> I have a jtag mkII here and want to flash a rzusbstick
[15:45:56] <stefan_schmidt> avrdude -P usb -c jtag2 -p usb1287 -U flash:w:rzusb.bin -v
[15:46:12] <stefan_schmidt> as far as I understand it I have to use jtag for flashing this one
[15:46:23] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/avr/avrdude/avrdude-doc-5.10.pdf
[15:46:24] <stefan_schmidt> RSP_NO_TARGET_POWER is waht I get
[15:46:52] <stefan_schmidt> which leads me to think the stick has no power, it is connected to my PC and the LED is on, though
[15:47:45] <stefan_schmidt> Tom_itx: I looked into that one briefly. No reference to the error code and it looked rather old (2010)
[15:48:01] <Tom_itx> yeah that's the last one i have handy
[15:49:20] <stefan_schmidt> Tom_itx: ok, I will see if it has anything useful, thanks
[15:49:39] <Lambda_Aurigae> is jtag enabled on the chip?
[15:49:47] <Tom_itx> http://download.savannah.gnu.org/releases/avrdude/
[15:50:01] <Tom_itx> yeah you may need to switch a flag for jtag
[15:50:18] <stefan_schmidt> hmm, I was told it was flashed before so I expected it to be on
[15:50:21] <Lambda_Aurigae> there is usually a fuse to enable/disable jtag.
[15:50:23] <stefan_schmidt> maybe they changed it back
[15:50:39] <Lambda_Aurigae> just because it's flashed with some code doesn't mean jtag is enabled.
[15:50:45] <Lambda_Aurigae> they could be using isp.
[15:50:50] <stefan_schmidt> I would expect a different error in that case, but its a start
[15:50:55] <Tom_itx> what's a .sig file?
[15:51:09] <Tom_itx> http://download-mirror.savannah.gnu.org/releases//avrdude/avrdude-doc-6.3.pdf
[15:51:13] <Tom_itx> there's the latest one
[15:51:14] <Lambda_Aurigae> Tom_itx, in what context?
[15:51:16] <stefan_schmidt> Lambda_Aurigae: as far as I know the header that the rzusbstick exposes allows jtag flashing only
[15:51:20] <stefan_schmidt> I might be wrong though
[15:51:21] <Tom_itx> Lambda-Aurigae on that site
[15:52:01] <Tom_itx> 2-15-2016 is fairly new
[15:52:21] <stefan_schmidt> Lambda_Aurigae: thanks for the jtag enabled tip in any case. I will try to fidn out if it is enabled
[15:52:42] <Tom_itx> check the fuse bits
[15:53:04] <Tom_itx> http://www.engbedded.com/fusecalc/
[15:53:06] <Lambda_Aurigae> Tom_itx, I think it's a signature...you can check the integrity of the main file with it.
[15:53:13] <Tom_itx> oh
[15:55:51] <Tom_itx> you know what...
[15:56:14] <Tom_itx> i bet the 1287 has it's own bootloader so you can use DFU or FLIP on it
[15:56:33] <Tom_itx> and if you jtag that wrong you might bork it
[15:56:50] <Lambda_Aurigae> probably.
[15:57:05] <Tom_itx> it's one of the few 'host' usb chips
[15:58:10] <stefan_schmidt> I tried -U lfuse:r:-:i -v to read the fuse bits
[15:58:36] <stefan_schmidt> but I get the same RSP_NO_TARGET_POWER error message
[15:58:49] <stefan_schmidt> it comes not even to the stage to ask for anything form the device
[15:58:58] <stefan_schmidt> wiring is nothing hand solder
[15:59:11] <stefan_schmidt> all pieces from the mkII or the rzusbstick kit
[15:59:34] <Lambda_Aurigae> sorry but I've never used either here.
[16:00:03] <stefan_schmidt> Lambda_Aurigae: thanks
[16:01:01] <Lambda_Aurigae> I most often use an old stk200 clone that just works.
[16:01:03] <stefan_schmidt> Tom_itx: I would love if it had DFU
[16:01:22] <stefan_schmidt> Tom_itx: There seems to be some bootloader which has it but not on this one I have
[16:01:36] <stefan_schmidt> Would make things a lot easier for testing later on as well
[16:03:04] <stefan_schmidt> hmm, I really wonder why the programmer or avrdude thinks the target has no power. I plug it in, the LED goes on and I clearly see it enumerate on the USB bus in dmesg
[16:03:39] <julius> just imported a irf3205 into ltspice 4 and can now use it. but i dont get a mosfet symbol....just a box with 3 connectors all jumbled up
[16:03:48] <julius> how do you make it like a mosfet?
[16:06:18] <Tom_itx> stefan_schmidt, the 1287 may have 2 power options
[16:06:57] <Tom_itx> iirc you can power the USB side separate from the rest
[16:08:02] <Tom_itx> you should be able to get the bootloader from atmel for the 1287
[16:08:23] <stefan_schmidt> Tom_itx: it has only the 10 ping header exposed which is full filled up with the jtag flasher connector. I see no way to apply power there.
[16:08:41] <Tom_itx> jtag has power iirc
[16:08:53] <stefan_schmidt> Tom_itx: its a stick from atmel directly and all the docs I found from the only said that it has to be plugged in for flashing for power
[16:09:19] <stefan_schmidt> Tom_itx: not sure if the jtag mkII actually applies the power to the device
[16:09:25] <Tom_itx> i've offered about all i know on the topic
[16:09:43] <stefan_schmidt> Tom_itx: yeah, thanks a lot for your help!
[16:09:57] <stefan_schmidt> I will go through the doc once again and see if I find anything
[16:10:12] <Tom_itx> get the chip pinout, find the power pins and trace them back
[16:10:13] <stefan_schmidt> Tom_itx: the new PDF you linked might have newer info
[16:10:30] <Tom_itx> well, use the one for your avrdude version
[16:10:40] <Tom_itx> they're all there i think
[16:10:49] <stefan_schmidt> Tom_itx: no equipment here to trace anything over the long easter weekend :)
[16:16:14] <lorenzo> hm, is CS pulled low automatically when data is loaded in SPDR?
[16:17:06] <Tom_itx> i wouldn't trust it to be
[16:17:27] <lorenzo> I have a chip which takes a CS transition (high -> low) as a "start conversion"
[16:17:27] <Tom_itx> i can't honestly remember...
[16:22:49] <lorenzo> hm just checked, it's not :)
[17:28:39] <z3t0> are there any debugging methods for avr without using something like the avr dragon?
[17:29:31] <Tom_itx> led
[17:30:34] <Lambda_Aurigae> an LED, serial connection with printf("test1\n"); etc
[17:30:37] <Tom_itx> there's a newer cheaper tool now besides the dragon anyway
[17:37:13] <cehteh> write correct code in the first place :D
[17:38:10] <Tom_itx> it was a hypothetical question
[17:38:50] <cehteh> writing correct code is also hypothetical :)
[17:38:58] <Lambda_Aurigae> writing code with no bugs is very hypothetical
[17:40:24] <cehteh> logic analyzer helps me a lot with debugging
[17:40:47] <cehteh> methinks mµOS 0.1 should be ready soon
[17:41:16] <cehteh> have to write documentation
[17:41:29] <Lambda_Aurigae> well, there goes the project out the window.
[17:43:41] <cehteh> :D
[17:44:22] <cehteh> i think i write a little bit, but not to much, i dont expect maybe people will use it
[17:44:44] <cehteh> (possibly because of the lack of documentation ...)
[17:44:58] <cehteh> idc .. i have fun
[17:45:39] <Lambda_Aurigae> properly documented code doesn't need external docs.
[17:45:55] <Lambda_Aurigae> but, when is the last time we saw properly documented code in the wild.
[17:46:00] <cehteh> properly written code you mean :D
[17:46:13] <Lambda_Aurigae> err..
[17:46:21] <Lambda_Aurigae> properly commented code doesn't need documents
[17:46:39] <cehteh> well i like some "documentation for human beings" .. not explaining the bare api, but some concepts and intentions behind the code
[17:46:59] <cehteh> you cant get that by just some api docs
[17:47:25] <cehteh> thats why i hate doxygen
[17:48:13] <cehteh> you have a shitload of browsable api's but dont know a fuck about why its done that way and how its supposed to be used
[17:48:38] <Lambda_Aurigae> never actually used it myself.
[17:49:04] <cehteh> i have my own documentation system, actually i am currently rewriting it to become even better
[17:49:52] <cehteh> its rather only an extractor, collecting documentation from textfiles, source comments and elsewhere. processing them and bringing it in proper order
[17:50:36] <cehteh> usually i document in asciidoc, that then can produce quite good quality documents, books, html
[17:52:14] <cehteh> kindof literate programming in reverse, not code is weaved into text documents, but documentation text right at the sourcecode within comments
[17:53:08] <cehteh> also issue tracking with //TODO: //FIXME: //PLANNED: tags etc
[17:54:06] <Lambda_Aurigae> don't forget the most important tag... //WTFDIDT?:
[17:54:24] <cehteh> haha
[17:54:42] <cehteh> thats a //FIXME:
[17:55:14] <Lambda_Aurigae> naa..
[17:55:20] <Lambda_Aurigae> fixme is different.
[17:55:37] <cehteh> i intentionally only have these 3 categories
[17:55:48] <Lambda_Aurigae> wtfdidt is for the day after you did a 24 hour binge programming run.
[17:56:15] <cehteh> yes .. as soon you discover the crap you add //FIXME: WTF
[17:56:32] <cehteh> or just fix it instantly
[17:58:12] <cehteh> btw yesterday i had some 'eureka' moment .. reversed the interupt logic in mµOS, before i disabled interrupts only when accessing ciritical structures
[17:59:22] <cehteh> now the mainloop/scheduler runs entirely with interrupts disabled (its small), but whenever some queue gets served (user function) or it enters sleep interrupts are reenabled
[17:59:43] <cehteh> code became smaller, faster, simpler and more responsive
[18:43:14] <vaskozl> Hey I'm trying to teach myself some asembly.
[18:43:17] <vaskozl> I'm running this code: https://skozl.com/IPdp
[18:43:29] <vaskozl> It works fine and I can enable different leds, however they only turn on very dimly.
[18:43:36] <vaskozl> Could you tell me why that is?
[18:45:41] <cehteh> w/o looking at your code: forgotten to set the DDR?
[18:45:56] <cehteh> you have resistors limiting the current of the leds?
[18:46:09] <vaskozl> I think I might know what I did wrong.
[18:53:56] <vaskozl> Nope still same problem.
[18:54:02] <vaskozl> Even without resistor it is dim :/
[18:54:29] <vaskozl> This is my current code: https://skozl.com/s/main.S
[18:54:32] <vaskozl> it's really short
[18:58:38] <cehteh> you must add a resistor
[18:59:38] <cehteh> why the nop?
[19:01:10] <cehteh> and why sbi in main .. turn led on in your init and then let main loop in a empty loop or maybe over a nop .. then you'll see
[19:03:29] <vaskozl> cehteh: thanks :)
[19:04:18] <cehteh> and my first idea was that you drive the led through the internal pullup (DDR misconfigured)
[19:04:27] <cehteh> then it would be very dim
[21:42:32] <Valen> you must have a resistor or it'll blow up