#avr | Logs for 2014-06-12

Back
[00:00:01] <N1njaneer> Only costs $29 USD to get it filled, too. Static hold time of about 180 days
[00:02:19] <Valen> there has been some discussion of using LN2 for car propulsion
[00:04:06] <N1njaneer> Can't imagine you'd get a whole lot.
[00:04:24] <N1njaneer> NH3 is where it's at.
[00:04:54] <RikusW> just don't inhale that !
[00:05:06] <N1njaneer> NH3 or LN2?
[00:05:25] <RikusW> NH3
[00:05:42] <RikusW> or N2O :-D
[00:05:49] <N1njaneer> I demonstrate Leidenfrost Effect by putting LN2 in my mouth and blowing a couple meter vapor plume, much to the amusement of those standing around :D
[00:06:46] <RikusW> and never got frostbite on your tongue ?
[00:07:04] <N1njaneer> Nope! Not to date. Been doing it for 5-6 years now :)
[00:07:22] <N1njaneer> Need good technique, like fire-breathing.
[00:07:32] <N1njaneer> Do not inhale. DO NOT SWALLOW.
[03:28:02] <inflex> until one day...
[04:22:42] <Darkwell> hmm I want to make a charge regulator for my lead acid battery that has deep cycle support. its supposed to take charge from either boat engine or solar panel... wasnt hard to find solar charge controlers .. but how about gettin that piwer from the boat engine ? seems a good idea to get feed from that when the engine is up..
[04:24:18] <Valen> diode?
[05:07:31] <RikusW> voltage drop might mess up the charge control
[05:13:41] <Roklobsta> you can use a fet circuit as a low drop diode. google it
[05:28:24] <malinus> Darkwell, have you figured it out?
[05:29:33] <malinus> Darkwell, you can probably get an alternator for free as scrap from old vehicles.
[05:31:28] <Roklobsta> http://rs20.mine.nu/w/2013/02/using-mosfets-as-blocking-diodes-reverse-polarity-protection/
[08:27:32] <Jartza> any good avr assembler -tutorials you know of?
[08:38:17] <inflex> mmm..... which AVR?
[08:38:23] * inflex only did ASM on the T10
[08:39:19] <jadew> Jartza, the datasheet mentions all the instructions
[08:40:10] <jadew> if you already know ASM for a different platform, you should be able to easily put those instructions to use, because the idea is the same across all of them
[08:52:17] <superware> I'm currently doing 8-bit AVR, can someone explain XMEGA vs. AVR32 vs. ARM? for example, XMEGA seems superfluous to me...
[09:02:28] <Roklobsta> avr cpu with more bells and whistles than a regular avr
[09:02:35] <Roklobsta> for peripherals
[09:03:33] <Roklobsta> look http://www.atmel.com/products/microcontrollers/avr/avr_xmega.aspx
[09:03:35] <superware> I see, and what about AVR32 vs. ARM?
[09:04:14] <RikusW> the architecture is somewhat the same, judging from the block diagrams
[09:04:22] <RikusW> AVR32 vs ARM that is
[09:04:31] <Roklobsta> avr32 is atmels answer to arm.
[09:04:38] <Roklobsta> i think arm has won this war.
[09:04:47] <RikusW> xmega is still 8 bit but with more advanced peripherals
[09:04:56] <RikusW> indeed
[09:05:07] <Roklobsta> nothing wrong with avr32 though
[09:05:15] <RikusW> arm is the new 86 ;)
[09:05:42] <superware> is there a specific/general ARM for beginners?
[09:05:58] <Roklobsta> maybe find a cheap cortex-m0
[09:06:18] <Roklobsta> from one of the mant cpu makers
[09:06:20] <Roklobsta> many
[09:07:07] <superware> like http://www.atmel.co.il/products/microcontrollers/arm/ ?
[09:28:31] <Jartza> jadew: sure, the instructions are not the problem
[09:28:43] <Jartza> but the datasheet is being a bit vague about commands
[09:29:48] <Jartza> like... "CP | Compare | Rd - Rr | Z, N, V, C, H"
[09:30:31] <Jartza> I understand it affects Z, N, V, C and H flags... but how exactly? :)
[09:32:46] <jadew> Jartza, that shouldn't be too hard to test
[09:32:56] <jadew> you normally don't care about that
[09:33:08] <jadew> but if you do, you should be able to figure it out in 2 minutes
[09:33:11] <jadew> tops
[09:40:42] <Jartza> maybe I should install some avr-simulator
[09:46:44] <RikusW> CP is the same as SUB except no change to Rd
[09:47:16] <RikusW> Z is when the result is zeor or equal
[09:47:30] <RikusW> C is when Rd is smaller than Rr
[09:50:35] <RikusW> Jartza: the manual actually tells you how the flags are affected
[09:52:57] <RikusW> www.atmel.com/Images/doc0856.pdf
[11:07:01] <Jartza> cool, that document is much better
[11:42:36] <malinus> wait, does the timer in normal mode, count 255 times or 254 times
[11:43:24] <malinus> top should be "0xFF"
[11:43:29] <malinus> so 255 times I guess?
[11:44:46] <Tom_itx> does it start with 0 or 1
[11:45:52] <malinus> it should start with +
[11:45:53] <malinus> *0
[11:46:24] <malinus> should clear to 0x00 and go to 0xff, and then 0x00 again. So 255 steps.
[11:46:49] <malinus> I'm trying to make a simple "millis" functions. That will simply count number of milliseconds pasted since the timer starts
[11:46:57] <malinus> but it drifts like 10sec/1000sec
[11:48:04] <N1njaneer> Malinus: What is your clock source?
[11:48:13] <N1njaneer> i.e. internal, ceramic resonator, or quart?
[11:48:18] <N1njaneer> quartz
[11:48:19] <malinus> 20MHz quartz
[11:48:49] <malinus> I guess I'll have to read the counter value. I hoped I could avoid that
[11:49:04] <N1njaneer> 0x00 to 0xff is 256 steps :)
[11:49:08] <N1njaneer> Make sure you are accounting for that.
[11:49:25] <malinus> oh ups
[11:49:30] <malinus> haha that will help a lot
[11:50:34] <malinus> doh
[11:50:57] <N1njaneer> Usually when doing a ms or 1/10th ms timer, I'll start by dividing down the clock (usually 8 or 16 Mhz) by a power of 2 to get it in to a sane range - 125,000 is usually what it winds up at. Then I set the counter to interrupt and recycle on a 125 count, so you then get an interrupt that fires 1000 times per second, etc. Then you don't have to keep track of other Maths
[11:51:32] <myself> You could fit about 44,000 crystals (assuming the little cylindrical package) into a quart, btw.
[11:51:52] <N1njaneer> Also don't have to worry about resetting the count manually and suffering indeterminate instruction-timing jitter that will then compound over time.
[11:52:59] <malinus> N1njaneer, mind checking the math behind this: if the 8bit timers runs at 20mhz but prescaled with 256, and if I just count the overflows - that should just make it possible to divide the number of overflows with 20 to get the msec, right? (((1/20000000)/256)*256)*x=0.001
[11:53:32] <malinus> this should be pretty precise, if I'm not making another stupid mistake
[11:54:22] <N1njaneer> Which micro?
[11:54:46] <malinus> ehm
[11:54:49] <malinus> atmega328p
[11:55:24] <malinus> N1njaneer, why would that matter though?
[11:55:24] <N1njaneer> Yes, hold on a moment.
[11:55:42] <N1njaneer> Just want to look at something in the datasheet
[12:06:08] <N1njaneer> Malinus: Can you use Counter1 instead of Counter0?
[12:07:10] <malinus> N1njaneer, in this application, yes. Mind explaining your reasoning behind using the 16-bit counter?
[12:07:21] <N1njaneer> Because of the odd 20Mhz frequency not dividing down in to smaller numbers evenly due to power-of-2 prescalars, it's hard to get down to a fixed value you can easily handle without special cases. If you can use Counter1, I would do this --
[12:07:44] <malinus> N1njaneer, what about what I've just said? the 256 prescalar?
[12:09:28] <N1njaneer> Counter1, 20Mhz / 8 prescalar = 2,500,000 -- if you set Counter1 to count to 2500, that gives you 1,000 counts per second, ms accurate, without any additional management needed. And alternatively you can divide by 25000 to get 10ms intervals, or 250 to get 0.1ms intervals.
[12:10:13] <malinus> N1njaneer, oh that's quiet nice
[12:10:28] <malinus> this way I avoid the divison by 20
[12:10:29] <N1njaneer> Malinus -- Your method would work, but the 20 is a bit of a harder number to wrangle evenly. Another option would be to go Counter0, 20Mhz / 8 = 2,500,000 and then count to 250, which would give you 0.1ms intervals, then count ten of those.
[12:11:31] <N1njaneer> My preference is always to try to keep the math as clean as possible to make counters accurate, especially for time-keeping purposes where any error will compound non-deterministically over longer intervals.
[12:12:09] <N1njaneer> Always multiple ways to do things, and sometimes if you have to use multiple counters at once you have to get fancy because the easier-to-use resources have been exhausted :)
[12:13:10] <malinus> N1njaneer, thanks a bunc. I'll just use the counter1. But thanks for checking up on what I did, just wanted to make sure my reasoning was correct
[12:13:14] <N1njaneer> The nice thing with Counter1 is that due to the 16-bit count you can have the leeway to move your ms count by decades by changing the count overflow -- so 25 = 0.01ms, 250 = 0.1ms, 2500 = 1ms, 25000 = 10ms, etc :)
[12:13:21] <N1njaneer> Sure, no problem!
[12:13:43] <malinus> how precise is a normal crystal?
[12:13:54] <malinus> I'm just wondering how much it would drift over a day
[12:13:54] <N1njaneer> I really need to find a good site that I can use for easily writing articles on this stuff. I feel I could make up some nice charts and explanations that could help folks out with this stuff.
[12:14:59] <N1njaneer> Typical quarts crystals are +/- 50ppm variance, which will account for drift of +/- 4.32 seconds per day
[12:15:37] <N1njaneer> You can usually get slightly more expensive ones that will do more like 5-10ppm if you need more precision. Or you go to a $30 OCXO and you're down in parts per billion :)
[12:16:03] <N1njaneer> It depends on the application needs most specifically.
[12:16:39] <malinus> N1njaneer, maybe I get lucky and it will be 4.32+ one day and -4.32 the next ;)
[12:17:59] <N1njaneer> I had an application that I did a while back that had a +/- 50ppm quartz crystal tied to an FPGA, but that was also tied to a GPS pulse-per-second which is 1us edge-aligned to the GPS constellation, and typically has a stability around +/-100ns indefinately which provides a fantastic longer-term reference. I could actually measure the change in the quartz clock's frequenct very readily simply by
[12:17:59] <N1njaneer> breathing on the quartz crystal to change the temperature.
[12:18:23] <N1njaneer> +frequency
[12:18:30] <malinus> haha
[12:18:32] <malinus> that's crazy
[12:18:36] <N1njaneer> I find the timing stuff to be absolutely fascinating, but that's just me :D
[12:20:56] <myself> are you on time-nuts, btw?
[12:21:33] <myself> http://www.febo.com/pipermail/time-nuts/
[12:21:59] <N1njaneer> I'm familiar with it, but not an active member. Lot of good stuff in there, though :)
[12:22:18] <N1njaneer> I still need a Rubidium clock here for the lab, just because they're sexy, and pretty inexpensive these days.
[12:24:04] <myself> Heh. The #rtlsdr convo about rubidium and masers and pulsars the other night was interesting
[12:26:45] <N1njaneer> Malinus: If you use a $100 OCXO (temp-stabilized quartz) you can get +/-10ppb, which is +/-315ms of drift over a year :D
[12:27:17] <malinus> N1njaneer, I'm pretty sure there are cheaper solutions
[12:28:57] <N1njaneer> $30 gets you a +/-50ppb OCXO from DigiKey :D
[12:29:40] <N1njaneer> But thankfully most applications don't need anywhere near that long-term accuracy :D
[12:30:34] <N1njaneer> Or if you do, you can use a longer-term stable source to resynchronize, etc. For $80 you can always get a Garmin OEM receiver and be accurate to 1us of UTC indefinately. Awesome little receivers.
[12:30:53] <N1njaneer> Then your Atmel can also know where it is, in case it gets lost!
[12:53:30] <myself> and leapsecond info, and...
[12:55:13] <N1njaneer> Yeah. Interestingly though GPS uses a timing system that is completely independent of any othr timing reference system, and rolls over back to epoch ever 19.7 years. We're in the second GPS epoch currently.
[12:56:28] <N1njaneer> The GPS almanac information contains the information necessary for the receiver to convert from GPS time to UTC, including knowing when leap-seconds need to be added in. Since leap-second additions are know about 6 months in advance if they will be added, the almanac carries that information as well as the day that the leap-second should be inserted at the end of. Fascinating stuff. :D
[13:00:59] <myself> i had a gps epoch problem once.... guys at the plant wanted to know why the car thought it was 2033
[13:01:08] <N1njaneer> oops!
[13:01:21] <N1njaneer> Though... maybe spacetime warped in the vicinity?
[13:01:44] <myself> that's what i told them.
[13:04:28] <myself> as far as i can tell, it saved an incomplete or invalid time, then next boot it got a good fix and time had moved "backwards", which triggered the epoch increment
[13:05:29] <TheArtist> Hi i need some help! Can somebody help me find the according port of this attiny44 diagram (http://www.bidouille.org/files/hack/nespadusb/schematic1.png) for an atmega328?
[13:06:08] <N1njaneer> TheArtist: Can you clarify what you need a bit more? I don't follow your question.
[13:06:28] <TheArtist> This diagram describes a project done on an atmini44
[13:06:32] <TheArtist> i have an atmega328
[13:06:49] <TheArtist> and i would like to find witch are the according ports in my atmega
[13:06:59] <N1njaneer> PORTA and PORTB
[13:07:36] <TheArtist> I'm really new to microcontrollers
[13:07:39] <TheArtist> i meant pins
[13:07:46] <N1njaneer> Oh okay, I see the confusion
[13:07:55] <N1njaneer> The 328 doesn't have a PORTA as such
[13:08:26] <N1njaneer> You need to look at the 328 datasheet and match things up
[13:08:36] <N1njaneer> I assume you need to port the code over
[13:08:54] <N1njaneer> At least in this case, it's mostly just GPIO pins
[13:09:29] <N1njaneer> The clock on PB0/PB1 on the T44 is going to go on PB6/PB7 on the 328
[13:09:51] <TheArtist> Is the clock really needed? Can i use the internal one?
[13:10:34] <N1njaneer> Since you are using USB in that application, and bit-bang USB at that, you'll need the 12 Mhz precision timing reference.
[13:10:54] <TheArtist> ok
[13:12:18] <N1njaneer> PORTA is a bit trickier on the T44 -- you can remap most of that over to PORTB on the 328. Certainly PA7, PA3, PA2 which just have LEDs can go right to PORTB's equivalent pins. PA0/PA1 are PB0/PB1 on the 328, and have the associated pin-change interrupts (PCINT0/1) which the USB code may use. Can't tell without looking at it.
[13:12:28] <N1njaneer> It SHOULD be a very straight code port.
[13:13:02] <N1njaneer> I would honestly try connecting what is on PORTA on the T44 to PORTB on the 328, and changing all instances of DDRA to DDRB, PORTA to PORTB, and PINA to PINB and see if it works.
[13:13:17] <TheArtist> OK i'll try it
[13:13:35] <N1njaneer> Does this application just run three LEDs from a USB port? :D
[13:13:45] <N1njaneer> Oh, those go off elsewhere
[13:13:48] <N1njaneer> Sorry, looking too fast.
[13:14:00] <N1njaneer> I assume NES_ORAGE/RED/YELLOW are going to something else
[13:14:33] <TheArtist> Let me ask another silly question
[13:14:42] <TheArtist> if i dont connect the nes ports
[13:14:55] <TheArtist> and just pass the firmware with the needed usb connections
[13:15:02] <N1njaneer> Unless the NES lines are being used with the ADCs to read analog values or such, you shouldn't have to do much changing.
[13:15:04] <TheArtist> will the pc still recognize it ?
[13:15:08] <N1njaneer> It should, yes.
[13:15:24] <TheArtist> Ok that the first target then :P
[13:15:42] <N1njaneer> Just make sure you set the 328 to use an external 8 Mhz crystal, and make sure you turn off CLOCKDIV8
[13:15:57] <N1njaneer> Er 8+ Mhz Crystal, rather
[13:17:09] <TheArtist> i would like to find a way to try it without a crystal too :P . I think atmega328 internal clock can reach 12 Mhz
[13:17:26] <TheArtist> i know thought it wont be stable
[13:23:08] <N1njaneer> USB won't work like that.
[13:23:16] <N1njaneer> Not with bit-bang USB.
[13:23:58] <N1njaneer> The chips which have a dedicated USB peripheral MAY be able to run on internal oscillator with low-speed USB. That would be a Dean question, and regrettably he's not logged in right now :(
[13:24:27] <OndraSter> xmegas can run on internal osc
[13:24:38] <N1njaneer> OndraSter: For USB?
[13:24:39] <OndraSter> (plus they calibrate with USB's clock)
[13:24:39] <OndraSter> yes
[13:24:49] <N1njaneer> What's the speed limit?
[13:24:52] <OndraSter> core?
[13:25:09] <N1njaneer> No, I mean USB speed (low, full?) with only internal oscillator?
[13:25:18] <OndraSter> 48MHz, full speed
[13:25:27] <N1njaneer> Nice.
[13:25:34] <OndraSter> because why not.
[13:31:08] <warsh> How can I go about programming an arbitrary avr to be a I2C slave; for the purpose of controlling servos through pwm
[13:31:24] <warsh> I'm not sure how to program such
[13:31:46] <N1njaneer> warsh: The I2C section of the datasheet is a good place to start. :)
[13:32:28] <N1njaneer> There are some decent code examples that show how to set it up and read data. I2C is a bit of a tricky protocol to get right, and a logic analyzer is HIGHLY reccomended to speed up the process.
[13:33:02] <warsh> not something that I have on hand
[13:33:10] <warsh> but certainly easy to obtain
[13:34:33] <warsh> N1njaneer: do you know of any links where I can read about some examples
[13:36:06] <N1njaneer> I would reccomend a Logic-16 from Saleae - inexpensive and does I2C really nicely.
[13:36:37] <N1njaneer> warsh: There's good documentation in the datasheet with code examples. You really need to study the I2C peripheral if you intend to utilize it.
[13:36:57] <N1njaneer> There should be a multitude of I2C examples out there if you do a search.
[13:37:23] <warsh> I came across a few, but those focused more on the I2C's implementation
[13:37:33] <warsh> which I've already done a bit of reading on
[13:37:49] <warsh> I'm still a novice when it comes to programming avrs
[13:39:54] <N1njaneer> Do you need I2C? SPI is honestly a bit easier to get a handle on.
[13:40:58] <warsh> I mean, there's no real need for I2C specifically. I'm using a beaglebone black as the, would-be, master
[13:41:06] <warsh> and it has SPI as well
[13:41:20] <warsh> I just wanted to get some practice with I2C
[13:42:02] <N1njaneer> Then dig in to the datasheet and get to know the I2C peripheral inside and out.
[13:42:19] <N1njaneer> Again, I would reccomend having a logic analyzer do you can see exactly what it's doing or not doing.
[13:42:24] <N1njaneer> +so you
[13:42:43] <warsh> N1njaneer: I'm already looking at the logic analyzer you recommended,
[13:43:12] <Tom_itx> saleae?
[13:43:30] <warsh> https://www.saleae.com/logic16
[13:43:50] <Tom_itx> they've got some new ones coming soon too
[13:43:52] <Tom_itx> that do analog
[13:43:56] <warsh> that price is a bit high though
[13:44:03] <Tom_itx> get the 8
[13:44:05] <N1njaneer> Get the Logic-8 if you need less
[13:44:09] <Tom_itx> it's plenty for avr
[13:44:29] <N1njaneer> the Logic-16 is nice because it will do 50Mhz sampling with reduced channels, etc.
[13:45:11] <N1njaneer> If you're doing SPI-bus at highest-rate, you start needing that pretty quick on a 16-20Mhz processor :)
[13:46:12] <warsh> ahh, when I buy one; I'd rather buy once
[13:46:29] <warsh> I'm going to go with the logic 8, but I'll probably have to wait a bit
[13:49:21] <warsh> once I see a basic c program of i2c implemented, I'll be able to go off of that
[13:50:03] <jadew> I've been happy with the OLS
[13:50:36] <jadew> way cheapper and 200 Msps with 16 channels or 100 Msps and lower with 32
[13:51:14] <warsh> jadew: this? https://www.sparkfun.com/products/9857
[13:51:32] <jadew> warsh, yeah
[13:52:25] <jadew> it's cheaper here: http://www.seeedstudio.com/depot/Open-Workbench-Logic-Sniffer-p-612.html
[13:52:42] <megal0maniac_afk> warsh: Are you a student?
[13:52:48] <warsh> that I am
[13:52:56] <warsh> EE / CS
[13:53:20] <megal0maniac_afk> Mail the Saleae guys, they're quite open to student discounts. You used to be able to get the logic 8 for $100 instead of $150
[13:53:51] <megal0maniac_afk> It isn't on their site anymore, but Mark, Nate and Joe are great guys. Worth a shot
[13:54:29] <warsh> megal0maniac: I was thinking about doing that; I'm certainly doing that now after hearing (*seeing) what you said
[13:55:06] <megal0maniac> I got mine for $100 :) And I only found out about the discount a while after I bought it for full price and they refunded me the $50
[13:55:16] <warsh> wow,
[13:55:19] <megal0maniac> Like I said, great guys
[13:55:24] <warsh> well put
[13:58:47] <N1njaneer> megal0maniac: Ooh, good call. I miss the days of being able to do that :D
[13:59:35] <megal0maniac> N1njaneer: I was really chuffed
[14:00:16] <warsh> N1njaneer: though I really enjoy being a college student, that whole college loan thing can weigh on the mind
[14:00:41] <megal0maniac> They were under no obligation whatsoever. And it was past the time limit for paypal refunds, so they just transferred the money. And they've been very receptive to my annoying emails about using the Logic on ARM based machines :)
[14:01:40] <warsh> megal0maniac: I just sent them the email
[14:01:49] <warsh> I'll report back when they respond
[14:02:06] <megal0maniac> I hope it doesn't say "this guy on IRC said, so you have to give it to me"
[14:02:08] <megal0maniac> :P
[14:02:52] <warsh> nonono, I can just assume that wouldn't fly too well
[14:03:32] <warsh> I am asking a favor of them
[14:06:43] <warsh> so what are you guys making these days
[14:19:23] <N1njaneer> Doing final-testing on an LTC SMPTE reader here today, as well as flash memory libraries :)
[14:24:31] <megal0maniac> Oh, K&R arrived today :D
[14:26:40] <N1njaneer> megal0maniac: Yeah?
[14:27:06] <megal0maniac> N1njaneer: So now I have it. PDF just isn't the same
[14:27:27] <N1njaneer> Now you need a copy of Stroustrup to complete the collection :D
[14:27:45] <megal0maniac> Any sponsors? :P
[14:27:52] <megal0maniac> Oh but C++
[14:28:00] <megal0maniac> Why would I need that for AVR? :P
[14:29:06] <megal0maniac> Also, I recently blew all of my savings on proper riding gear. Boots, pants (which were previous all stars and jeans) and a decent rain suit
[14:30:21] <megal0maniac> *previously
[14:30:27] <N1njaneer> I use C++ for AVR regularly. It's useful for a lot of organizational stuff.
[14:30:45] <megal0maniac> I'll get there eventually :)
[14:31:35] <megal0maniac> Meanwhile, it's university holidays. I'll be doing a workshop with classmates on the basics of microcontrollers :) Just a primer before we get into it, so that the explanations make a bit more sense.
[14:32:33] <megal0maniac> It'll also force me to learn the stuff intimately. The best way to learn is through teaching others
[14:33:26] <megal0maniac> This LostDatagram guy...
[14:35:03] <megal0maniac> Unfortunately it's on PIC, because that's what we'll be doing next semester.
[14:35:14] <megal0maniac> But the principles are similar
[14:35:44] <megal0maniac> Tom_itx: Halp!
[14:39:28] <N1njaneer> We need more channel admins
[14:40:59] <megal0maniac> LostDatagram: Fix your client!
[14:41:32] <megal0maniac> N1njaneer: I offered once. Tom said that the fact that I want to be a channel admit means that I shouldn't be a channel admin :P
[14:41:57] <N1njaneer> That's.... odd thinking.
[14:42:08] <megal0maniac> Well it was something like that
[14:42:13] <megal0maniac> It holds some merit
[14:43:00] <N1njaneer> I've hosted an IRC server for 15+ years elsewhere with full services running. There's definately some usefulness in having a few trusted channel admins for exact reasons such as this.
[14:43:31] <megal0maniac> N1njaneer: I'm on frequently, I believe I'm "trusted" and I'm in a different time zone
[14:43:40] <megal0maniac> So I tick all the boxes :P
[14:44:49] <megal0maniac> Anyway, so yeah. I'm going to teach my classmates a bunch of stuff that I learnt here so I'm excited :)
[14:47:58] <Jartza> I'm more or less trying to figure out what would be the best way to stop whatever my "main loop" is doing when an interrupt detects that something should be done :)
[14:48:11] <Jartza> meaning, jumping to totally different code than loop
[14:48:22] <Jartza> of course the interrupt itself "stops whatever main loop is doing" :)
[14:49:01] <N1njaneer> Jartza: You can use a semaphore in the main-loop in order to signal that some processing is ready to be done.
[14:49:26] <Jartza> I guess it's the only option yeah
[14:49:51] <Jartza> but the main loop has all kinda loops that send data to SPI etc
[14:50:23] <Jartza> I was hoping that it would also be possible to launch some kind of sw-interrupt, but it seems it's not
[14:52:17] <N1njaneer> I don't know why you'd need to or want to.
[14:53:14] <N1njaneer> That's what an interrupt is for, or else you use the semaphore to allow effectively polling by the main thread to synchronously handle processing of a new 'task' in the main-loop level when appropriate without disabling interrupts.
[14:53:56] <N1njaneer> bbiab
[14:54:20] <megal0maniac> Usually if you need to jump through hoops to get stuff to work, the problem lies in your thinking, not the language
[14:54:27] <megal0maniac> s/thinking/logic
[14:54:45] <Jartza> sure
[14:55:02] <Jartza> I just would like to stop what mainloop is doing really fast ;)
[14:55:29] <megal0maniac> break;;
[14:55:39] <Jartza> :D
[14:56:08] <Jartza> I'll have to see
[14:56:27] <Jartza> oh
[14:56:32] <guanche> is there somebody having problems with google? or it's just me?
[15:17:23] <N1njaneer> Google works fine :)
[15:17:54] <N1njaneer> The data overlord always works fine
[15:27:06] <Jartza> hmmh
[15:27:36] <Jartza> is there a way from code to reset the chip so that on next boot there could be a flag telling that it was reset by code and not by power-on etc.?
[15:27:57] <Jartza> meaning, resetting from sw :)
[15:28:45] <megal0maniac> Jartza: There is, I'm pretty sure
[15:28:50] <megal0maniac> It's in the datasheet
[15:29:05] <megal0maniac> One sec
[15:29:30] <N1njaneer> Jartza: Yeppers
[15:30:25] <megal0maniac> MCUSR (status register) there are flags for watchdog, brownout, external reset and power on reset
[15:31:05] <N1njaneer> Similarly, you want to use the watchdog timer to force a reset on the microcontroller rather than just jumping to 0x0000 if you want to reset
[15:33:42] <Jartza> ahh
[15:34:08] <Jartza> yeah, just found out also same register myself, but thanks :)
[15:34:34] <Jartza> so actually I could write 1 to "external reset" bit and on the boot just read, if that bit is set?
[15:34:48] <Jartza> and detect that it wasn't power-on
[15:35:42] <Jartza> well I'll test
[15:54:43] <Jartza> hmmh
[15:54:59] <Jartza> still need a way to reset the device with watchdog :)
[15:55:01] <Jartza> I guess
[15:57:21] <Tom_itx> resetting one way doesn't clear all the regs
[15:57:31] <Tom_itx> i forget which is which
[15:57:56] <Jartza> hmmh
[15:57:56] <Jartza> MCUSR |= (1 << EXTRF);
[15:57:56] <Jartza> WDTCR &= (1 << WDIE);
[15:57:56] <Jartza> WDTCR |= (1 << WDE);
[15:57:59] <Jartza> agh
[15:58:03] <Jartza> well, tried that
[15:59:40] <Jartza> ahh
[15:59:56] <Jartza> I didn't know how to read, WDCE must be also written to 1
[16:01:35] <Tom_itx> i'm looking...
[16:01:49] <Jartza> still no reset :(
[16:03:22] <Tom_itx> is wdt enabled?
[16:03:53] <Jartza> well that WDE-bit should enable it
[16:04:02] <Jartza> WDTCR = (1 << WDCE) | (1 << WDE);
[16:04:04] <Jartza> tried that
[16:04:25] <Tom_itx> can't seem to find it right now...
[16:05:25] <Tom_itx> there is a wdt_enable() function i think
[16:05:50] <Tom_itx> /* Disable watchdog if enabled by bootloader/fuses */
[16:05:50] <Tom_itx> MCUSR &= ~(1 << WDRF);
[16:05:50] <Tom_itx> wdt_disable();
[16:05:58] <Tom_itx> that's to disable it
[16:21:12] <Jartza> hmmh
[16:21:14] <Jartza> getting no reset
[16:22:35] <Jartza> ahh
[16:22:37] <Jartza> darn
[16:26:17] <Jartza> I don't know if it was because I did set the watchdog in INT0 vector?
[16:26:28] <Jartza> but adding for(;;); after watchdog enable did the trick
[16:26:35] <Jartza> INt0 feeds the wd?
[16:31:46] <malinus> Jartza, remember to add the ISR!!!
[16:32:01] <Jartza> ??
[16:32:03] <malinus> I once forgot, and couldn't understand why the mcu seemd to restart all the time.
[16:32:05] <Jartza> I want to reset the chip
[16:32:18] <Jartza> so I actually DO want restart :D
[16:32:22] <malinus> :P
[16:32:24] <malinus> oh well
[16:32:38] <malinus> Jartza, is the scope still working :D?
[16:33:07] <Jartza> yes :)
[16:33:15] <Jartza> haven't played with it today that much though
[16:33:20] <Jartza> have some coding to do :P
[16:33:35] <malinus> coding can wait, you need to scope ;P
[16:33:41] <malinus> scope everything
[16:33:56] <Jartza> well, on weekend then .... :)
[16:39:01] <Jartza> is watchdog the only way to reset the chip?
[16:46:54] <malinus> Jartza, you should also be able to simply jump to the start
[16:48:31] <Kev> Jartza, you can use the /reset pin
[16:49:17] <Jartza> nope, I need to do it with sw
[16:49:27] <Jartza> all the pins are in use, even the reset
[16:49:39] <Kev> wdt is the only option then
[16:49:48] <malinus> Kev, jumping should work too
[16:50:01] <malinus> no?
[16:50:07] <Kev> it's not an actual reset
[16:50:26] <malinus> Is the watchdog reset an actual reset?
[16:50:27] <Kev> it wont default the registers, variables, etc
[16:50:32] <Kev> yea
[16:52:04] <malinus> void(*reset) (void) = 0; reset();
[16:52:09] <malinus> it's kinda neat though :D
[17:02:44] <malinus> the man with many names
[17:08:26] <N1njaneer> Identify crisis
[17:10:44] <malinus> N1njaneer, I'm stubborn, and hence I've decided to stick with the 8-bit counter0. It seems however like there is an error somewhere. Looking at http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html it seems that there is no TIMER0 compare match A interrupt !
[17:11:00] <malinus> N1njaneer, well I didn't decide to stick with it, but at least try it.
[17:15:51] <malinus> is that some kind of error :S
[17:22:53] <Jartza> hah
[17:22:54] <Jartza> well
[17:22:56] <Jartza> works like a charm
[17:23:16] <malinus> Jartza, which approach?
[17:23:22] <Jartza> watchdog
[17:23:28] <malinus> well it should
[17:24:09] <Jartza> just needed to find out that if WDRF bit is set in MCUSR (it is, after wd-reset) the watchdog gets automatically enabled again
[17:24:19] <Jartza> so I need to disable it also in boot :)
[17:24:34] <Jartza> but after realising that, it's all swell
[17:29:40] <Jartza> but I guess it's time to sleep now... nights
[17:29:54] <N1njaneer> Sorry, back now guys
[17:34:32] <malinus> N1njaneer, I've figured it out. It seems like there is an error in the interrupt.h documentation.
[17:34:40] <malinus> the atmega328p is missing from the list
[17:34:49] <N1njaneer> What environment?
[17:35:36] <malinus> N1njaneer, it's defined in code. It's just missing in the automatically-generated documentation of the avr-gcc http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
[17:35:58] <malinus> not sure how to report it though
[17:37:01] <N1njaneer> It may just get grouped under 328
[17:37:07] <N1njaneer> What specifically was missing?
[17:37:40] <malinus> nope. it isn't. it's missing under the "TIMER0_COMPA_vect"
[17:44:13] <N1njaneer> malinus: Maybe try a more recent version? It appears in iom328p.h, lines 829/830 in my copy
[17:44:33] <N1njaneer> malinus: $Id: iom328p.h 2225 2011-03-02 16:27:26Z arcanum $
[17:45:00] <malinus> N1njaneer, thanks a bunch! But it isn't really an issue. I'm just pointing out that the online documentation is outdated/bugged.
[17:45:38] <N1njaneer> Oh, could be. But if you don't RTFM in the first place the ommissions don't apply :D
[17:46:18] <N1njaneer> I usually go digging through the .h files if I'm unsure specifically what an interrupt vector is called, but they usually match what's in the Atmel datasheets pretty well.
[17:47:07] <malinus> N1njaneer, well I *was* reading the manual. If that isn't the avr-libc manual what is then. The source as you imply sure isn't the manual.
[18:59:05] <N1njaneer> malinus: Sorry, had to pop off for a bit.
[18:59:24] <N1njaneer> malinus: and sorry I stated that poorly as it was intended as a joke --
[18:59:39] <N1njaneer> i.e. If you don't read the manual, the errors in the manual don't matter! :)
[18:59:58] <N1njaneer> That whole thing about engineers never wanting to read the manual, and in this case meaning it's a GOOD thing!
[19:00:09] <N1njaneer> Sorry, joke came through poorly.
[19:00:09] <malinus> haha
[19:00:18] <malinus> it's okay, i didn't get offended, more confused.
[19:00:29] <N1njaneer> Yeah sorry.
[19:00:38] <N1njaneer> I had to go feed a goat. Seriously.
[19:01:46] <malinus> N1njaneer, sorry for sounding so defensive :).
[19:04:59] <N1njaneer> Nah is okay! I just wanted to make sure I hadn't made yoy mad from a misplaced joke!
[19:09:11] <clixx_IO> morning
[19:09:47] <N1njaneer> Hello!
[19:11:10] <clixx_IO> I've been working on an IoT Analog Sensor for Attiny85 - https://github.com/clixx-io/clixx.io/blob/master/examples_eventframework/analogsensor/analogsensor.cpp
[19:12:46] <N1njaneer> clixx_IO: Why the class overhead? Is/was this converted from Arduino?
[19:13:18] <clixx_IO> no it wasn't converted from Arduino
[19:13:23] <N1njaneer> Or are you doing something else? :)
[19:13:27] <clixx_IO> there's not much class overhead
[19:13:59] <clixx_IO> it's a little similar to Wiring/Arduino but is straight GCC/G++
[19:14:05] <N1njaneer> No offense on the Arduino question, just looks very similar to the same setup() and loop() class methods that appear internally in Arduino.
[19:14:12] <clixx_IO> yes
[19:14:26] <N1njaneer> Anyhow, continue!
[19:14:26] <malinus> I really don't understand why you would want it to be a class :V
[19:14:33] <malinus> sorry :)
[19:14:55] <clixx_IO> Shorter code
[19:15:17] <clixx_IO> and Platform independance
[19:15:27] <clixx_IO> same code can run on Linux
[19:15:46] <N1njaneer> ... reading the Linux ADC? :D
[19:15:49] <clixx_IO> Windows etc. Whereas Arduino is limited only to AVR
[19:16:14] <malinus> I'm confused
[19:16:27] <clixx_IO> yes, only minor changes to read a connected ADC on a linux box
[19:16:32] <N1njaneer> Well portability is more based on your abstraction of hardware-specific code calls, but yes.
[19:16:37] <N1njaneer> What is your question?
[19:16:59] <clixx_IO> I didn't have any
[19:17:10] <N1njaneer> Oh, okay.
[19:17:59] <clixx_IO> I was just demonstrating something I've been working on
[19:18:30] <malinus> so how would it work, on let's say some arm dev board like the famous raspi?
[19:18:38] <clixx_IO> Theres a bit more documentation here : https://github.com/clixx-io/clixx.io/tree/master/eventframework
[19:19:06] <clixx_IO> Same code compiles and runs on the raspi - just use a different makefile
[19:20:02] <clixx_IO> I have a python program to generate the Makefiles
[19:22:46] <clixx_IO> on a Raspberry-Pi, you'd probably use an I2C DAC
[19:22:59] <clixx_IO> ADC*
[19:52:29] <clixx_IO> Here's th different boards and things I've done: https://plus.google.com/u/0/+DavidLyon/posts
[19:58:26] <Lambda_Aurigae> Hey,,,how much for the little girl?
[19:58:45] * Lambda_Aurigae channels the blues brothers.
[19:59:16] <clixx_IO> :-) exactly
[20:00:41] <clixx_IO> She actually likes the Electronics more than the brothers
[20:00:48] <Lambda_Aurigae> awesome.
[20:01:00] <Lambda_Aurigae> have a couple of girls in the group here that I work with during the summer.
[20:03:52] <Lambda_Aurigae> should have our first meeting of the summer this saturday in fact.
[20:04:01] <clixx_IO> some are quite clever [understatement]
[20:04:35] <Lambda_Aurigae> most of what I'm having to teach is how to think
[20:04:42] <Lambda_Aurigae> they pick up the technicals easily enough
[20:04:51] <Lambda_Aurigae> but kids aren't taught how to think these days.
[20:05:23] <clixx_IO> so much is 'there's an app for that'
[20:05:40] <Lambda_Aurigae> yup.
[20:05:48] <Lambda_Aurigae> I won't let them use ardweeny stuff here.
[20:06:51] <clixx_IO> Well it's become somewhat of a proprietory eco-system
[20:07:32] <clixx_IO> nothing wrong with that, but ardweeny is all over the universities here as well
[20:07:45] <aandrew> I find that a lot of people (not just kids) just cannot even begin to fathom how to troubleshoot
[20:07:52] <clixx_IO> the problem if there is one, is not enough capable contendors
[20:07:59] <aandrew> it's all like "it's broken" and I ask "so what did you try?" and I get blank stares
[20:08:11] <aandrew> "what is this 'try' you speak of? I just told you it's broken"
[20:08:29] <Lambda_Aurigae> yup.
[20:08:37] <Lambda_Aurigae> that's a problem we have with new copier techs too.
[20:08:38] <aandrew> ardweeny haha
[20:10:06] <aandrew> http://mixdown.ca/dump/sensor.png
[20:10:07] <aandrew> getting there
[20:10:08] <clixx_IO> well it takes decades to learn wtf it's all about
[20:10:39] <Lambda_Aurigae> aandrew, time to ROUTE!
[20:10:40] <clixx_IO> what mcu aandrew ?
[20:10:54] <aandrew> I am routing
[20:10:59] <aandrew> clixx_IO: psoc4200
[20:11:30] <Lambda_Aurigae> http://dangerousprototypes.com/docs/images/b/b7/Logic_pirate_schematic.png
[20:11:39] <Lambda_Aurigae> wanna make one of those.
[20:13:06] <clixx_IO> This is my logic pirate : https://plus.google.com/109366813998920635083/posts/2YDmCCfb1ke
[20:14:12] <Lambda_Aurigae> I have one similar to that pic but it's made with an 8bit usb pic.
[20:14:20] <Lambda_Aurigae> that one has a 32bit usb pic...much faster.
[20:14:53] <Lambda_Aurigae> and I want to use a single serial sram for each channel.
[20:18:12] <clixx_IO> what mcu Lambda_Aurigae do you plan to use?
[20:18:30] <Lambda_Aurigae> I'll use the 32bit pic for that particular project..same as in that pdf.
[20:18:41] <Lambda_Aurigae> picmx250f128b
[20:19:11] <Lambda_Aurigae> mainly because it's available as a dip package.
[20:19:22] <Lambda_Aurigae> which I can't get anything that speed in avr in dip package.
[20:21:08] <clixx_IO> Yeah, AVR's are horespower limited - how to say that in computing terms
[20:21:34] <Lambda_Aurigae> slow
[20:21:56] <clixx_IO> right
[20:21:57] <Lambda_Aurigae> fast clock for clock compared to 8bit pic
[20:22:09] <Lambda_Aurigae> but the 32bit pic chips are plenty fast.
[20:22:29] <Lambda_Aurigae> I still prefer working with AVR overall.
[20:22:31] <clixx_IO> are they GCC/G++ programmable?
[20:22:35] <Lambda_Aurigae> kinda.
[20:22:51] <clixx_IO> how kinda?
[20:22:57] <Lambda_Aurigae> there is a modded GCC from microchip for them...you have to pay for the optimized version.
[20:23:05] <Lambda_Aurigae> it's not a full open source compiler.
[20:23:19] <clixx_IO> ah ok, so kinda
[20:23:39] <clixx_IO> but is the Open Source edition workable ?
[20:24:05] <Lambda_Aurigae> I have a {cough}hacked set of xc compilers though.
[20:24:05] <clixx_IO> A few people I know complained about it
[20:24:10] <Lambda_Aurigae> it's usable.
[20:24:16] <Lambda_Aurigae> still has some issues.
[20:24:20] <Lambda_Aurigae> but, so does avr-gcc
[20:24:24] <clixx_IO> right
[20:24:52] <Lambda_Aurigae> the mplabx IDE is multiplatform though...where atmel studion is winblows only.
[20:25:28] <Lambda_Aurigae> I still have and use my first ever avr programmer though.
[20:26:25] <Lambda_Aurigae> started with atmega32 and have used many attiny and atmega chips with it since then...12ish years I think.
[20:26:43] <Lambda_Aurigae> can't say that for any pic programmer.
[20:26:52] <Lambda_Aurigae> have had to upgrade that 4 times over the years..
[20:31:52] <clixx_IO> The chinese prices of AVR programmers seems to have take a dive
[20:32:10] <Lambda_Aurigae> they are using vUSB for many of them.
[20:32:25] <Lambda_Aurigae> cheap AVR and software defined/bitbanged usb.
[20:32:34] <clixx_IO> http://www.aliexpress.com/wholesale?SearchText=avr+programmer
[20:32:44] <Lambda_Aurigae> which is neat, but not compatible with all computers.
[20:33:08] <Lambda_Aurigae> yup...usbasp...that's vusb bitbanged usb.
[20:33:23] <Lambda_Aurigae> I have some computers here that won't work with vusb...
[20:33:47] <clixx_IO> iphone? ipad?
[20:33:55] <Lambda_Aurigae> notebooks actually.
[20:34:18] <Lambda_Aurigae> the other problem is, those things don't have official vid/pid
[20:34:36] <Lambda_Aurigae> probably not even legal "commercial" vusb either.
[20:35:04] <Lambda_Aurigae> it's legal to use for personal but if you sell it you are supposed to pay for it,,or that's how it was licensed last time I messed with it several years back.
[20:35:58] <Lambda_Aurigae> http://www.obdev.at/products/vusb/license.html
[20:38:55] <clixx_IO> paying a license to stream serial data - nice
[20:39:11] <Lambda_Aurigae> yup.
[20:39:39] <Lambda_Aurigae> technically, if you use anything USB you are supposed to buy your pid/vid pair.
[20:39:47] <Lambda_Aurigae> for commercial products anyhow.
[20:39:52] <clixx_IO> the $600 option isn't so bad though
[20:41:07] <clixx_IO> I haven't spent any time with V-USB. At the moment I need to ISP program all my Attiny85's
[20:42:49] <Lambda_Aurigae> my avr programmer is a 74ls244 based parallel port stk200 clone device.
[20:45:14] <clixx_IO> that's interesting. custom?
[20:45:24] <Lambda_Aurigae> yeah.
[20:45:50] <clixx_IO> clever
[20:46:10] <Lambda_Aurigae> built that before I realized I could use a 74ls125 and make it smaller.
[20:46:17] <Lambda_Aurigae> the 244 has more gates than needed.
[20:46:57] <Lambda_Aurigae> http://avrprogrammers.com/programmers/all
[20:47:07] <Lambda_Aurigae> stk200 is down there on that page with the 74ls125.
[20:47:46] <Lambda_Aurigae> only mine has no resistors.
[20:49:08] <Lambda_Aurigae> https://www.olimex.com/Products/AVR/Programmers/AVR-PG2B/
[20:49:11] <Lambda_Aurigae> 244 based.
[20:50:48] <clixx_IO> Nice. I'd be happy with an I2C programmer
[20:50:52] <Lambda_Aurigae> https://sites.google.com/site/emrirc/avr-ispdongle.pdf there's the document I used for my first avr programmer.
[20:51:46] <scottstamp> LOL nice power supply
[20:51:57] <Lambda_Aurigae> yeah...it works.
[20:52:03] <Lambda_Aurigae> just limited in your cable length.
[20:53:23] <Lambda_Aurigae> it powers from the circuit, not from the parallel port.
[20:53:25] <scottstamp> You know they make sleds for 18650 batteries, yeah?
[20:53:33] <Lambda_Aurigae> yeah.
[20:54:11] <clixx_IO> you mean Prius cars?
[20:54:20] <scottstamp> And Tesla cars
[20:54:34] <clixx_IO> that's partly why I like them so much
[20:54:46] <clixx_IO> I bought 1400 of them
[20:55:01] <scottstamp> http://mouser.com/ProductDetail/Keystone-Electronics/1042/?qs=sGAEpiMZZMupuRtfu7GC%252bRUTI0DVcFvMpsw3XwriGTM%3d I <3 these
[20:56:25] <clixx_IO> Are they 18650 ?
[20:56:45] <scottstamp> Yep
[20:57:33] <clixx_IO> I've looked everywhere for those - I'm making a note
[20:57:33] <scottstamp> I actually have a product that runs two 18650s in series (yeah yeah I've already gotten an earful about battery safety) and I use Keystone 1048, it's the same thing just a double
[20:58:01] <scottstamp> MPD makes one as well, they're on Digikey. Avoid them. They're total garbage.
[20:58:17] <clixx_IO> I was planning to use 100x in Series
[20:58:30] <scottstamp> haha
[20:58:31] <scottstamp> don't.
[20:59:51] <clixx_IO> well I think the 18650 is the perfect cell for AVR computer projects
[21:00:17] <clixx_IO> but I'm also experimenting with Rechargeable CR-2032's
[21:00:25] <clixx_IO> and Solar Cells
[21:00:26] <scottstamp> Seen the 26650 cells?
[21:00:48] <scottstamp> Fair bit bigger but the capacity is nearly doubled
[21:01:44] <clixx_IO> better imo to spend $2 more on a small solar cell
[21:01:44] <scottstamp> Easily recharged in a sane amount of time from a 1A wall wart, I use an MCP73833 that I drew up a breakout for
[21:02:11] <clixx_IO> I want to do all charging via solar
[21:02:58] <scottstamp> I like being able to charge like a 3Ah cell in 3 hours and have the ability to pull 10A+ out of it no problem
[21:03:25] <clixx_IO> I think you have overclocking issues..
[21:03:36] <scottstamp> LOL not for AVR
[21:03:54] <scottstamp> Output to a heating element.
[21:05:50] <clixx_IO> ah ok
[21:06:15] <clixx_IO> Playing with decent batteries is more fun
[21:07:19] <clixx_IO> I only have about 200x cells left
[21:14:25] <clixx_IO> I'd love to master low-power avr
[21:15:04] <N1njaneer> low-power AVR isn't particularly tricky - most of it is in the board design and supporting circuitry to ensure you are drawing the minimum current when in deep sleep mode.
[21:15:42] <clixx_IO> aha
[21:16:01] <clixx_IO> there's some software too I think
[21:16:12] <clixx_IO> I have this type of program : https://github.com/clixx-io/clixx.io/blob/master/examples_eventframework/timer.cpp
[21:16:37] <N1njaneer> Not really a whole lot, though there's some tricks such as making sure the JTAG port is disabled, etc that will drive you in circles wondering why you're still drawing a few hundred microamps more than you should :)
[21:20:17] <clixx_IO> Ninjaneer: Do you have a blog?
[21:21:03] <N1njaneer> I don't but I really need to start one. There's countless articles I'd like to write on AVR - been working with the parts daily for almost 13 years or so now. Really love them. :)
[21:21:55] <clixx_IO> Ninjaneer: what country are you based in?
[21:22:09] <N1njaneer> Cleveland, OH
[21:22:12] <N1njaneer> USA
[21:25:02] <N1njaneer> clixx_IO: You?
[21:28:56] <clixx_IO> I just mainly use my G+ page - https://plus.google.com/u/0/+DavidLyon/posts
[21:30:53] <clixx_IO> I've been too busy coding and soldering to make something too organised
[21:32:13] <N1njaneer> Yeah, that'll do it :D
[21:32:24] <clixx_IO> I've only been using AVR's for 1 year in native mode, maybe less
[21:32:55] <N1njaneer> They're an amazing series of micros and Atmel is a fantastic company to deal with :D
[21:33:05] <clixx_IO> When I first tried the native AVR-GCC I wasn't having that much fun
[21:33:50] <clixx_IO> I don't think I've managed to use up all the fun that's inside one Attiny85 yet
[21:34:47] <N1njaneer> It took a bit to get dialed in. Atmel Studio 6 now makes doing stuff for AVR or ARM simply amazing, compared to the half-dozen toolchains I've had to suffer from other vendors. And it's still just gcc in the background for all of it, so you still have the same flexibility.
[21:36:16] <clixx_IO> I'd have to endure Windows
[21:36:54] <N1njaneer> I did all my stuff in assembler for the first two years (around 2002) and then switches to ICC's crappy compiler and toolchain and dealt with that for a few more years. Then avr-gcc as a breath of fresh air, but it was hosted under Eclipse which was a step up, but it was... Eclipse. Then AS6 finally came out and Atmel really turned around the toolchain support immensely.
[21:37:01] <N1njaneer> +switched
[21:37:03] <clixx_IO> and for me that would totally remove the fun factor
[21:37:44] <clixx_IO> I just like using my own editor (Geany)
[21:38:15] <N1njaneer> I use Windows because the IDE is fantastic, it lets me work extremely quickly, and because my living depends on me turning around working and reliable hardware to customers. Path of least resistance. :)
[21:38:22] <N1njaneer> IDE = AStudio6
[21:38:51] <N1njaneer> That and because all of our OS Software has to ship on Windows anyhow for the machines we deploy with our products. :)
[21:39:09] <Valen> clixx_IO: I'm hoping to rejigger a solar house number display and path light thing I have
[21:39:25] <Valen> I was going to put a 5Ah lipo into it and new mono solar cells
[21:39:28] <Valen> any suggestions?
[21:39:37] <Valen> (I'll need to cut the cells to fit of course)
[21:39:43] <N1njaneer> Valen: Don't blow yourself up with the lipo? :D
[21:40:00] <Valen> meh, new lipos hardly ever catch fire
[21:40:08] <Tom_itx> feed them to a pannel on the roof and really set them off
[21:40:36] <clixx_IO> Valen: I just use a few tabbed solar cells, make up a perspex mount
[21:41:10] <clixx_IO> unfortunately I used a photo of the girl, and aren't showing my car charger that I made
[21:41:11] <N1njaneer> Lipos can just take mains directly, right?
[21:41:19] <N1njaneer> Charge faster.
[21:41:20] <clixx_IO> um NO
[21:41:25] <N1njaneer> :D
[21:41:35] <Valen> half wave rectify that sh1t
[21:41:55] <N1njaneer> Speaking of things blowing up, has beaky been around lately? I miss hearing about his SMPS adventures with the ATTiny!
[21:42:02] <clixx_IO> Valen: Solar panels are quite fun to make
[21:42:43] <clixx_IO> They can actually be made to whatever size you want
[21:43:15] <clixx_IO> I use clear perspex, lay down the solar-cells, fill with clear epoxy
[21:43:57] <N1njaneer> Man, glad I ran blue LPI on this latest batch of boards. They look so good!
[21:44:06] <clixx_IO> an AVR Attiny85 solar charger is on my next-to complete list
[21:44:23] <Valen> perspex isn't going to last in the sun too long
[21:44:39] <Valen> even the uv treated stuff
[21:44:47] <clixx_IO> it might
[21:45:21] <clixx_IO> never know
[21:45:32] <Tom_itx> just get a piece of tempered glass cut
[21:45:46] <N1njaneer> Nor will the clear epoxy, even UV stabilized, though the perspex will block some of it.
[21:46:49] <clixx_IO> The glass ones are here - https://plus.google.com/photos/109366813998920635083/albums/6022076966443806721/6022076968184479570
[21:47:03] <clixx_IO> I did glass as well - at least I can compare
[21:47:45] <clixx_IO> The glass frames cost $5 each at IKEA
[21:48:09] <clixx_IO> some door thing they had in their 'bargains' department
[21:48:36] <clixx_IO> but way too big for my car battery charger. Just wanted something small to go on the rear parcel shelf
[21:49:02] <Valen> epoxy won't matter too much, it should be behind the cell
[21:49:17] <Valen> cutting the cells difficult?
[21:49:53] <clixx_IO> they are small square plates
[21:50:07] <clixx_IO> no need to cut them
[21:50:31] <Valen> I need to cut them
[21:50:36] <clixx_IO> solder them together with wires - seal it all up
[21:50:41] <Valen> one cell is bigger than the window I have available
[21:52:14] <clixx_IO> most people try not to use solar panels over their windows
[21:53:00] <clixx_IO> I wouldn't cut up a panel. I'd just by new cells and start from their
[21:54:02] <clixx_IO> and I can't install my solar cell in the car till I have the ADC working to check the voltage
[21:54:16] <clixx_IO> as don't really wish to overcharge the battery
[21:54:38] <Valen> there is an existing garden lamp. it has amorphous cells in it. they are not good, and they are put in badly.
[21:54:47] <Valen> I would buy cells, like you have
[21:54:57] <Valen> then cut them up and fit them into the existing lamp
[21:55:15] <clixx_IO> The advantage is that you can match the voltage outputs of the cells to the batteries
[21:55:17] <Tom_itx> how do you cut them?
[21:56:31] <clixx_IO> don't cut them - buy them in a box like this www.ebay.com.au/sch/i.html?_nkw=tabbed+solar
[21:57:14] <Tom_itx> rifraf did that once
[21:57:39] <Tom_itx> you should ask him how he made his pannels
[21:58:13] <Valen> clixx_IO: now fit that into a window thats 40 mm wide, without cutting it
[21:58:15] <Tom_itx> he said several were cracked when he got them though
[21:58:21] <Valen> you cut them like glass aparently
[21:59:18] <Tom_itx> i don't remember how he arranged his diodes either
[21:59:20] <clixx_IO> So yesterday a whole lot of 40mm solar panels arrived
[21:59:47] <clixx_IO> the ones I got were 50mm x 20mm
[22:00:14] <clixx_IO> Valen: So I don't think it would be so difficult
[22:01:24] <clixx_IO> These ones would easily fit : http://www.aliexpress.com/item/SC-3514-VIMUN-new-original/428388946.html
[22:01:56] <Valen> I think I'll just cut them to fit
[22:02:09] <clixx_IO> have fun - they are very brittle
[22:02:22] <Tom_itx> borrow the Mrs' ring to cut em
[22:02:29] <clixx_IO> They can snap just to hold
[22:03:20] <clixx_IO> notice in this photo some snapped just from being picked up : https://plus.google.com/photos/109366813998920635083/albums/6022076966443806721/6022076968184479570
[22:03:53] <clixx_IO> they have the consistency of chocolate biscuits
[22:04:08] <clixx_IO> except more brittle
[22:06:33] <Valen> I was thinking i could get some pre-broken ones to cut up, but they all seem to come from the USA, $1.50 for the cells, $54 for shipping
[22:08:36] <clixx_IO> Valen: I can post you one to try. I'm such a nice guy
[22:09:08] <Valen> one would probably do for the whole project ;->
[22:09:09] <clixx_IO> just email your address to info@clixx.io
[22:10:14] <clixx_IO> but with the big sizes, one is practically useless because you get only 1 volt or thereabouts
[22:10:30] <clixx_IO> 12 are needed to get 12V
[22:10:39] <clixx_IO> or thereabouts
[22:10:44] <Valen> thats why you cut it up
[22:12:15] <clixx_IO> I'm the kindof of guy who never says no to bringing out a cutting tool..
[22:13:17] <clixx_IO> do you want an Attiny85 processor board as well?
[22:13:56] <Valen> never say no to one of those
[22:16:58] <clixx_IO> do you have an ISP programmer?
[22:17:13] <Valen> yes i do in fact
[22:17:26] <clixx_IO> because there is a 6-PIN interface board that's needed
[22:17:36] <clixx_IO> that I will include
[22:19:22] <clixx_IO> well I have to run. I will try to get that in today's post