#avr | Logs for 2012-12-12

Back
[00:07:30] <TeknoJuce> well you have one more chance this afternoon Casper :P
[00:07:42] <TeknoJuce> that or change timezones
[00:07:46] <TeknoJuce> hah
[00:08:29] <TeknoJuce> https://twitter.com/WessleeT/status/278735462036807681/photo/1
[00:08:36] <Casper> wait
[00:08:45] <Casper> I did NOT missed it!
[00:09:07] <Casper> we use 24 hours clock here, meaning it's not 121212121212212 but 121212001212 :D
[00:09:15] <Casper> so it's comming! :D
[00:09:51] <TeknoJuce> will you miss the end of the world on the 21?
[00:11:14] <Casper> who knows
[00:11:22] <Casper> might be fun to be the only survivor
[00:12:45] <Casper> bed time, nite
[00:52:26] <asteve> anyone here familiar with using an arduino as an isp?
[00:52:40] <asteve> I'm using avrdude and I'm getting: avrdude: stk500v2_ReceiveMessage(): timeout when trying to burn the chip
[00:53:58] <abetusk> asteve, it thinks it's trying to communicate with an stk500? Try using a different '-t' option from avrdude?
[00:54:28] <asteve> do you mean -c?
[00:54:38] <asteve> <programmer>
[00:54:42] <abetusk> I sure do! sorry bout that
[00:55:01] <asteve> what do you think the correct programmer should be?
[00:55:21] <abetusk> You're following a tutorial on using the Arduino as an ISP? Give us the link
[00:55:46] <asteve> I'm following a bunch of tutorials right now; let me find the most relevant
[00:57:18] <asteve> http://arduino.cc/en/Tutorial/ArduinoISP that's for the circuit layout
[00:57:32] <asteve> http://www.ladyada.net/learn/avr/avrdude.html for the avrdude stuff
[00:58:15] <asteve> one of the programmer options in avrdude is "arduino" when I choose that as the programmer I get avrdude: stk500_recv(): programmer is not responding
[00:58:29] <asteve> if I choose stk500v2 I get a timeout error
[00:58:54] <abetusk> yeah, I see 'arduino board, similar to STK500 1.x'
[00:59:03] <abetusk> put the complete output into a pastebin so we can see it
[00:59:16] <asteve> output of the make flash?
[00:59:34] <asteve> http://pastie.org/5514642
[01:00:43] <abetusk> yeah, hmm. What Arduino are you using?
[01:00:51] <abetusk> http://arduino.cc/forum/index.php/topic,37586.0.html
[01:01:05] <asteve> duemilanove with the 328
[01:01:13] <asteve> I'm reading that now as well
[01:02:30] <asteve> I'm on osx
[01:04:27] <asteve> maybe I need -B 56000?
[01:05:12] <asteve> nope :/
[01:06:15] <asteve> I'm using avrdude v 5.11.1 which should have this patch installed: http://www.mail-archive.com/avrdude-dev@nongnu.org/msg01815.html which is supposed to fix this problem
[01:07:04] <abetusk> confirm that you're using the version you think you are. Output with more verbose output
[01:07:15] <asteve> avrdude version 5.11.1, URL: <http://savannah.nongnu.org/projects/avrdude/>
[01:08:19] <asteve> abetusk: http://pastie.org/5514669
[01:11:27] <asteve> ah, it's -b for baud rate, not -B
[01:11:34] <asteve> but now I have a new error which is probably trivial
[01:11:59] <asteve> http://pastie.org/5514679
[01:12:36] <abetusk> http://lists.freebsd.org/pipermail/freebsd-questions/2012-May/240873.html
[01:13:23] <abetusk> didn't you say you had a 328 in the thing?
[01:13:36] <asteve> 328 is in the dueminalove; I'm trying to program a 168
[01:13:51] <abetusk> ah, I see
[01:14:27] <asteve> the chip says 168-20pu; so it should definitely be a 168
[01:15:16] <abetusk> ok, I don't think this is your problem, but this is certainly needed: you need to specify the proper chip to program '-p m328' (or '-p m328p' if appropriate)
[01:15:57] <asteve> could be a 168p?
[01:16:14] <abetusk> you're trying to program a 328 or a 168?
[01:16:23] <asteve> I'm trying to program a 168
[01:16:32] <abetusk> you just said you were trying to program a 328...
[01:16:44] <asteve> [02:01:15] <asteve> 328 is in the dueminalove; I'm trying to program a 168
[01:17:08] <asteve> I'm attempting to use the dueminalove (arduino) to program the atmega168
[01:17:21] <abetusk> why am I such an idiot
[01:17:49] <abetusk> yes, so, I think it should be '-p m168' or '-p m168p'. I don't know why you aren't getting errors with the 'atmega168'
[01:17:52] <asteve> you are definitely not; there's a lot of information that I may have missed
[01:23:09] <abetusk> yeah, this looks like it's not even finding the programmer
[01:23:36] <abetusk> make sure you have the proper device in /dev. Try reading fuse bits, try changing the clock, etc.
[01:23:45] <abetusk> and of course, try turning it off and on again
[01:25:10] <asteve> is it possible that a 168 would actually be a 328?
[01:25:27] <asteve> because apparently the signature I'm getting back is the one for the 328p
[01:25:55] <abetusk> describe your setup
[01:29:11] <abetusk> alright, bed time. Good luck asteve
[01:29:25] <asteve> darn
[01:29:31] <asteve> I was in the process of taking pictures
[01:30:29] <abetusk> yeah, sorry, I'm fading. If you're getting a signature back that says 328, then maybe you're inadvertently trying to program the arduino instead of the chip you want to program.
[01:30:45] <asteve> http://i.imgur.com/PSQfg.jpg
[01:31:06] <asteve> abetusk: I think you're right
[01:31:12] <Essobi> asteve: Got a raspberry pi?
[01:31:21] <asteve> Essobi: I actually do
[01:31:22] <asteve> http://i.imgur.com/cwATf.jpg
[01:31:37] <asteve> http://i.imgur.com/cYP9z.jpg
[01:31:49] <abetusk> The Arduino is connected directly to your computer via USB?
[01:31:53] <Essobi> asteve: I've got a blog post up about programming a 328p @ 3.3V over GPIO.
[01:32:03] <asteve> abetusk: yes
[01:32:07] <Essobi> asteve: with linux and AVRdude.
[01:32:40] <asteve> Essobi: I would like to see it
[01:33:02] <Essobi> asteve: http://www.repyoblog.com/index.php/2012/10/raspberry-pi-with-avr-328p-using-spi-and-gpio/
[01:33:04] <asteve> so, abetusk you were right, I'm inadvertently programming the 328p inside the arduino and not the target 168
[01:33:36] <abetusk> sorry to bail, gotta sleep. Good luck
[01:33:47] <asteve> thanks
[01:34:21] <asteve> Essobi: before I add another unknown with the ras pi; maybe you could help me debug the current setup
[01:34:31] <Essobi> asteve: the original setup extfs ate itself.. I just set it up again last night. I need to post the example led.c and associated makefiles..
[01:35:07] <asteve> I uploaded ArduinoISP to the duemilanove; then I created a demo avrdude project that should blink an led on portd4
[01:35:12] <Essobi> asteve: Honestly I've never used a arduino. just bare AVRs with homemade parallel port wigglers and rpi gpio.
[01:35:17] <asteve> bummer
[01:35:22] <Essobi> Hmm.
[01:35:40] <asteve> well avrdude is programming the chip inside the arduino and not the destination
[01:35:58] <Essobi> asteve: http://arduino.cc/en/Tutorial/ArduinoISP That the page your'e using?
[01:36:11] <asteve> yes, in its worthless entirety
[01:36:34] <Essobi> asteve: right so you'll need to set a different -c option...
[01:36:44] <asteve> right, do you know what that should be?
[01:36:49] <Essobi> when you program avrdude..
[01:36:52] <Essobi> what line are you using?
[01:37:11] <asteve> PROGRAMMER = -v -v -v -c arduino -P /dev/tty.usbserial-A700e1CL -b 57600 is what i've been doing
[01:38:06] <Essobi> hmm...
[01:38:09] <Essobi> something like...
[01:38:11] <Essobi> avrdude -P comport -b 19200 -c avrisp -p processor -v -e -U flash:w:hexfilename.hex
[01:38:22] <asteve> hmm, I think I know what I've done wrong
[01:38:28] <Essobi> it's the -c
[01:38:29] <Essobi> :D
[01:39:08] <asteve> I should be taking the chip out of the arduino
[01:39:43] <asteve> this my setup http://i.imgur.com/eSTiN.png
[01:44:00] <asteve> I just got a kernel panic, that's no good
[01:56:45] <Essobi> Ew.
[01:56:51] <Essobi> Wait..
[01:56:55] <Essobi> Panic on what?!
[01:57:23] <Essobi> asteve: Your linux box?
[01:57:24] <Essobi> O_o
[01:57:30] <asteve> osx actually
[02:04:25] <Essobi> Oh.. Esh.
[02:04:27] <Essobi> Uh..
[02:04:32] <Essobi> You might need to run it as root...
[02:04:59] <Essobi> But yea.. use the settings I gave you above on command line and see what error is?
[02:05:49] <asteve> I might have missed those
[02:06:17] <Essobi> 02:26 < Essobi> avrdude -P comport -b 19200 -c avrisp -p processor -v -e -U flash:w:hexfilename.hex
[02:06:38] <Essobi> change comport/processor/hexfilename where appropriate
[02:08:01] <abetusk> ok, I can't sleep
[02:08:22] <abetusk> asteve, what's the current state of affairs?
[02:08:46] <asteve> fucking MAGIC
[02:08:49] <asteve> just got it working :)
[02:09:08] <abetusk> what was the issue?
[02:09:31] <asteve> http://playground.arduino.cc/Code/MegaISP has a snipit about "problem with auto reset" and the solution is to get tie 120ohms between reset and +5v
[02:09:40] <asteve> blinking leds! they are the coolest
[02:10:29] <asteve> I'm making an led christmas tree with the uC, sr, voltage regulator and battery as presents :)
[02:10:29] <abetusk> interesting. Nice
[02:11:02] <asteve> time for me to head to bed
[02:11:08] <asteve> thanks for all your help abetusk and Essobi
[02:11:24] <abetusk> yeah, sure, not like it did much good
[02:20:11] <Essobi> np
[07:45:04] <OndraSter> I need $12k
[07:45:08] <OndraSter> to build a nice LED screen
[07:45:10] <OndraSter> http://www.ebay.com/itm/New-3528-SMD-SMT-1210-LED-highlighting-RGB-4-pin-Common-Anode-1000-pcs-/261139522903?pt=LH_DefaultDomain_0&hash=item3ccd20e557
[07:45:13] <OndraSter> with 640x480 resolution :)
[08:05:35] <tld> Yay, shapeways ships to Norway! :)
[08:05:49] <Richard_Cavell> that's a tongue twister
[08:08:24] <tld> Super! Shapeways ships stuf to Norway! :)
[08:08:28] <tld> stuff*
[08:09:12] <Corwin> OndraSter, where would you put it? would be pretty big
[08:10:51] <OndraSter> my wall
[08:10:51] <OndraSter> better than projector
[08:12:04] <Corwin> would be power eater too
[08:13:01] <OndraSter> but.. but... OLED without O!
[08:14:57] <OndraSter> Corwin, have you seen my arduino-sized XBoard?
[08:14:58] <OndraSter> http://clip2net.com/page/m12051/37705440
[08:15:06] <OndraSter> it is XBoard Mini... 128K flash, 8K RAM
[08:15:11] <OndraSter> SMPS instead of LDO, microSD slot
[08:15:14] <Corwin> its ugly
[08:15:37] <OndraSter> it is arduino.
[08:16:36] <Corwin> its green
[08:16:41] <OndraSter> I know
[08:16:46] <OndraSter> but color for that price was much more expensive
[08:16:53] <OndraSter> PLUS it is revA and I was not sure if the SMPS would work :)
[08:25:36] <tld> Anyone used shapeways or similar for 3D-printing?
[08:29:03] <Corwin> OndraSter, power only from usb?
[08:30:02] <OndraSter> Vin pin too
[08:30:13] <OndraSter> but no power jack, no
[08:30:22] <OndraSter> there was not enough space if I wanted to keep all the holes as they should be
[08:36:13] <Corwin> hmm... now with LCD/touchscreen shield i would like to have it
[08:36:25] <Corwin> and BT interface would be nice too
[08:49:15] <OndraSter> heh
[08:49:25] <OndraSter> what about making sandwiches
[08:49:34] <Malinuss> anyone got an idea, how I would edit the *raw* SD card data? Under windows that is (with linux it wouldn't be too hard).. I've tried google, you guys think there might be software for this out there?
[08:49:45] <Malinuss> so I could just have a text editor (or hex, whatever), and put that raw data on the SD card, and that would be the only thing there (no filesystem)
[08:50:04] <OndraSter> doubt it
[08:50:29] <Malinuss> OndraSter, so it isn't possible ? I really have to install linux for this ;D?
[08:50:37] <OndraSter> I am afraid you will have to
[08:50:43] <OndraSter> the drivers won't let you go that deep
[08:50:45] <Malinuss> really? wow...
[08:50:46] <OndraSter> on windows
[08:50:51] <OndraSter> although
[08:50:58] <OndraSter> you can try cygwin + dd
[08:51:12] <OndraSter> I know that there is RawWrite for windows for floppies
[08:51:15] <OndraSter> no idea how it works
[08:51:34] <Malinuss> OndraSter, found this: http://support.microsoft.com/kb/100027
[08:52:05] <OndraSter> hmm
[08:52:11] <OndraSter> I forgot about \\.\PhysicalDrive
[08:52:24] <OndraSter> well, I forgot completely about \\. :D
[08:52:26] <OndraSter> \\.\
[08:54:10] <Malinuss> OndraSter, so using that method it would be possible, right?
[08:54:42] <OndraSter> yes
[09:12:33] <Casper> Malinuss: hiren's boot cd have some tool for that
[09:12:52] <Casper> I forgot which app in it, but shouln't be hard to find
[09:41:25] <asteve> what's the form of using the pins on a microcontroller to mux leds?
[09:41:31] <asteve> sorry, the name of the form*
[09:52:21] <r00t|home> "charlieplexing"?
[10:02:13] <_abc__> Hello. Does anyone know about how much space 32 bit integer multiply and divide take on atmega?
[10:14:36] <Malinuss> _abc__, ehh I don't think you can easliy figure out how much even a single asm function takes up in the machine code...
[10:15:48] <Malinuss> not sure though. try writing a cuple of instruction and figure out what the .hex file size it, you could make a chart, maybe
[10:30:01] <asteve> can portd do pwm on an atmega168?
[10:30:07] <asteve> I'm reading the datasheet and don't know how to determine that
[10:30:34] <asteve> I see that the pins are labeled pcintXX
[10:31:56] <asteve> looks like the answer is no, only port a and b can do pwm
[10:32:03] <r00t|home> only a few PINS have hardware pcm (the output compare outputs), not whole ports
[10:32:13] <r00t|home> *hardware pwm
[10:32:27] <asteve> I would like to control the brightness of leds with pwm
[10:32:44] <r00t|home> the OCnx pins are pwm outputs
[10:32:47] <asteve> maybe it's more difficult than I want to take on now
[10:33:02] <r00t|home> if you have lots of LEDs, you might want to look into dedicated led controller chips
[10:33:47] <asteve> I have 13 leds, I plan on charlieplexing 12 of them and keeping one constantly on
[10:34:18] <r00t|home> combining charlieplexing and pwm - no idea how complex that is
[10:35:04] <asteve> I need to setup a timer to control when to switch the leds; the fact that I'm using portd for the output shouldn't be affected by that right?
[10:36:40] <r00t|home> you can do pwm in _software_ on _any_ pin... but the OCnx pins can do pwm in hardware while the cpu does other things
[10:37:24] <r00t|home> if you have nothing else to do, you can do pwm with delay loops...
[10:37:35] <r00t|home> otherwise from interrupts generated by timers
[10:37:54] <r00t|home> or using timers and output compare
[10:41:07] <asteve> I want to do interrupts generated by timers
[10:41:53] <asteve> when tick hits X cause the interrupt which updates PORTD to the next led
[11:14:42] <asteve> should I give aref the same voltage as vcc?
[11:14:48] <asteve> for an atmega168?
[11:31:44] <r00t|home> asteve: it only matters if you are using the analog parts of the chip anyway, in which case you should add filters to isolage it from noise on the normal vcc line
[11:31:54] <r00t|home> *isolate
[11:32:59] <r00t|home> so far i got away with simply not connecting it - in my breadboard projects
[12:47:02] <tld> asteve: What r00t|home said, except I'd connect it to Vcc. The part about filter (inductor+cap for example, datasheet has details) is correct, but mostly only matters if you want to use the ADC with any kind of accuracy.
[12:48:05] <asteve> i need to use the adc to determine speed, pot all the way open = fast, all the way closed = off; anything in between is fine as long as it's linear
[12:49:09] <asteve> I have 3 pin switch, should I tie the unused pin to ground?
[12:52:21] <r00t|home> define "unused"
[12:53:07] <tld> asteve: I'd add the inductor and cap if you have them around, but for pot-control it probably doesn't matter.
[12:53:47] <tld> asteve: If you don't have them around, a 0.1uF decoupling cap, or close to it, could be good, but again, probably not needed.
[12:53:57] <asteve> I have a 0.1uf
[12:54:04] <tld> good, that'll do nicely.
[13:06:08] <tld> what am I saying!?!?
[13:06:17] <tld> aref you can leave unconnected, aVcc you should connect.
[13:06:48] <tld> doesn't hurt to connect both, and good practice to do so, but worth mentioning that there's both Vcc, aVcc and aref.
[13:07:36] <tld> cooking a generic rule out of things; it's good to never leave pins unconnected, and with all chips, Vcc, aVcc and the like, should be decoupled with a 0.1uF, if datasheet doesn't say anything else, or you don't feel like looking it up.
[13:07:42] <tld> often doesn't matter, but nice to keep in mind.
[13:08:04] <OndraSter_> avcc *has* to be connected (I know it does not, but it is a good thing to remember that it has to be)
[13:08:09] <OndraSter_> aref doesn't have to be, but should too :)
[13:08:15] <OndraSter_> avcc powers the analog part of the chip
[13:08:21] <OndraSter_> it is separate so you can do further filtering etc
[13:10:18] <tld> I try to wire like I try to program; make things clear, keep best practices, even when I don't have to, just to get and keep the habit. Connecting aref not only is good for EMI issues, but also makes it clear what aref is actually fed, etc.
[13:10:33] <tld> I'm not saying I'm *good* at keeping things clear and follow best practices, just saying I try. ;)
[13:15:14] <OndraSter_> mine AVCC pins are connected via some high-impedance inductor
[13:15:21] <OndraSter_> to further reduce the noise on analog supply
[13:15:32] <OndraSter_> since it is powered from SMPS with about 5 - 20mV ripple
[13:15:37] <OndraSter_> (still better than USB's 100mV lol)
[13:16:11] <tld> ferrite might be better, lower risk of oscilations?
[13:16:19] <tld> (I'm asking, not telling)
[13:16:20] <OndraSter_> yes, ferrite
[13:16:23] <tld> :)
[13:17:33] <tld> If I need accurate input, I like the idea of using a 4.096 or 2.048 reg on aref. Things align more nicely. Then again, if you need accuracy, another adc might be a good thing.
[13:20:06] <OndraSter_> ;)
[13:20:13] <OndraSter_> with separate supply
[13:20:17] <OndraSter_> it is not just about aref
[13:20:28] <tld> true.
[13:23:14] <OndraSter_> you can use fairly precise 1.0V or something similar references on (x)megas
[13:44:16] <Tom_itx> http://www2.electronicproducts.com/How_much_power_does_it_take_to_keep_the_Internet_running-article-fajb_power_internet_dec2012-html.aspx
[13:44:24] <Tom_itx> picket the interweb!
[13:44:51] <asteve> does anyone have an example doc on setting up adc on an atmega168?
[13:45:00] <Tom_itx> absolutely
[13:45:37] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_adc_index.php
[13:46:31] <asteve> wow
[13:49:06] <asteve> you're using an overflow interrupt in that example but I don't see the overflow vect specified?
[13:52:27] <asteve> Tom_itx: ^
[13:53:59] <asteve> ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0); divides what by 128?
[13:54:16] <asteve> my system clock which should be set at 8MHz/128?
[13:57:40] <asteve> "AVCC with external capacitor at AREF pin" I should tie this capacitor to what?
[13:58:13] <Tom_itx> gnd
[13:59:19] <OndraSter_> caps go "in parallel" to power
[13:59:24] <OndraSter_> inductors go "in serial" to power
[13:59:43] <asteve> so, what should aref be? 5v?
[14:00:00] <OndraSter_> depends on what do you want :)
[14:00:26] <Tom_itx> not more than 5v
[14:00:27] <asteve> I have a 50k ohm pot that I want to read; it's connected to +5V and gnd
[14:00:38] <asteve> avcc and vcc are 5v on the m168
[14:00:47] <Tom_itx> look at the breadboard wiring there
[14:00:55] <Tom_itx> it's quite clear
[14:01:01] <asteve> I see yours but it's hard to distinguish the connections with the angle of the shots
[14:01:55] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/adc_top.jpg
[14:02:37] <asteve> you're reading off of adc2?
[14:03:06] <Tom_itx> i don't think so but it's been a couple years since i did that so who knows
[14:04:15] <asteve> it looks like your cap is connected to ground and avcc, not aref
[14:04:44] <Tom_itx> looks like it is adc2
[14:05:12] <Tom_itx> also true
[14:05:14] <asteve> it's a very useful writeup that would benefit greatly with a circuit diagram; maybe if I use it I'll make one
[14:05:49] <asteve> it looks like aref is connected to a resistor which goes to +
[14:05:55] <asteve> if red/black mean what they should
[14:06:03] <Tom_itx> yeah i think that's just a 1k or something
[14:06:06] <Tom_itx> they do
[14:06:12] <Tom_itx> on purpose for the tutorial :)
[14:06:29] <asteve> so you're not using an external cap on aref?
[14:06:42] <Tom_itx> i guess not in that demonstration
[14:07:00] <asteve> heh
[14:07:20] <Tom_itx> mind you, i was focusing on the very basics for the tutorials
[14:07:39] <asteve> right, and I don't know the "basics" so I'm not sure what is required and what is nice to have
[14:07:53] <Tom_itx> it's probably a good idea
[14:08:26] <asteve> so the capacitor should go in parallel to ground while aref goes to +5 and maybe a resistor in place?
[14:08:31] <asteve> something to knock it lower than 5v?
[14:08:56] <Tom_itx> i don't recall why i put a resisor there now
[14:09:02] <Tom_itx> you could tie it to 5v
[14:09:35] <Tom_itx> if i were gonna make it something less than 5v it would have been a resistor divider
[14:10:43] <asteve> ok, now about the timers, why did you set them? you didn't specify the overflow vect?
[14:11:15] <Tom_itx> hard to tell
[14:11:35] <Tom_itx> i'd have to sit down and look it over
[14:11:41] <Tom_itx> and i'm not gonna right now
[14:11:54] <asteve> that's understandable
[14:12:14] <asteve> hopefully one last question, why aren't you reading ADCH?
[14:12:27] <Tom_itx> 8 bit
[14:12:44] <asteve> right, aren't you shifting everything into adch?
[14:16:27] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/tiny10/test/tn10_pwm_test.asm
[14:16:31] <Tom_itx> there's an asm version :)
[14:16:37] <Tom_itx> adc control of pwm
[14:17:33] <Tom_itx> how funny. firefox scroll bar on the right is stuck but the window still scrolls
[14:22:48] <asteve> hmm, looks like I'm doing something wrong still; I'm lighting an led if the read in value is < 128 and turning it off if it is > 128
[14:22:55] <asteve> no matter what the led is staying lit
[14:27:49] <asteve> cool
[14:28:04] <asteve> starting to get this ball rolling! :)
[14:33:35] <Tom_itx> maybe it's just blinking really fast
[14:34:00] <Tom_itx> oh.. nevermind
[14:34:05] <asteve> I need to scale this drastically but I'm not sure which way
[14:34:18] <asteve> I think I need to remove the prescaling possibling
[14:34:21] <asteve> possibly*
[14:34:32] <asteve> it's functioning as I want now which is very cool
[14:35:43] <asteve> I need a serial connection to read the values that it's getting because this is just a guessing game at this point
[14:35:59] <asteve> I could probably setup an arduino to read serial from the thing
[14:36:09] <asteve> just to add complexity to the situation
[14:52:11] <asteve> ok, I have a general design question now
[14:52:32] <asteve> I'm using a pot to determine how fast I blink lights; I want to use timer interrupts to control the blink
[14:52:58] <asteve> should I have an interrupt setup that reads the ADC signal which then sets another interrupt that blinks lights?
[14:53:05] <asteve> or can I do both tasks from the same interrupt?
[15:01:23] <Tom_itx> not a good idea to fire an interrupt inside another one
[15:01:28] <asteve> Tom_itx: right, I know
[15:01:47] <Tom_itx> set a value on the adc in a var
[15:02:15] <Tom_itx> then read that to do whatever you want
[15:03:38] <asteve> I want to turn off pin3 but leave pin4 on; PORTD |= 0 << 3; will still leave 3 lit; right?
[15:03:51] <Tom_itx> test it
[15:04:09] <asteve> well it's an or so I don't think I need to
[15:04:22] <asteve> perhaps I should & with a mask of all ones except the pin I want off?
[15:05:17] <Tom_itx> PORTD |= ~(1<<3);
[15:05:21] <Tom_itx> is better
[15:05:22] <Tom_itx> i think
[15:05:53] <asteve> portd &= ~(1<<3) should be right?
[15:05:56] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/c_bits/bits_index.php
[15:06:02] <Tom_itx> could be
[15:06:10] <Tom_itx> yeah
[15:06:18] <Tom_itx> because or wouldn't clear it
[15:06:21] <Tom_itx> if either was 1
[15:07:29] <Tom_itx> PORTD = PORTD ^0x3;
[15:07:34] <Tom_itx> will toggle it
[15:08:30] <Tom_itx> PORTB ^= 0xFF;
[15:08:34] <Tom_itx> will toggle the whole port
[15:08:53] <asteve> right, I don't want to toggle it because I don't know if it will be on or off; I want to guarantee that it's off
[15:09:08] <Tom_itx> i'm leaving
[15:09:13] <asteve> PORTD &= ~(1 << 3); is not what I want though; heh
[15:09:28] <asteve> it actually turns off the high bit
[15:10:15] <jadew> so you want that or not?
[15:11:31] <asteve> I should be anding with 11111011
[15:11:48] <jadew> what do you want to do?
[15:12:21] <asteve> I have two leds, when ADC is less than 100 I want to blink one led, when it's greater then 100 I want to turn off the blinking led and blink another led
[15:12:33] <asteve> so in both states I need to turn off the led that shouldn't be on
[15:13:38] <asteve> the pins I'm using are PORTD4 and PORTD3 respectively
[15:14:15] <asteve> is there a #def for PORTD3?
[15:14:18] <asteve> is it PORTD3? :)
[15:14:49] <jadew> if (val > 100) { blinkLed = 1; PORTD &= ~(1 << LED0); } else { blinkLed = 0; PORTD &= ~(1 << LED1); }
[15:15:10] <jadew> that if you're blinking the leds with an interrupt timer
[15:15:15] <jadew> if you're blinking them in the main loop
[15:15:30] <jadew> you can check the ADC and decide which led to blink, while the leds are in the off state
[15:15:42] <jadew> so you read the ADC and decide which one to light up
[15:15:48] <jadew> then you turn BOTH off
[15:15:58] <jadew> then check the adc again, etc
[15:16:22] <jadew> asteve, it's PD3
[15:16:30] <jadew> but it only holds the bit number
[15:16:37] <jadew> it's 3, nothing fancy
[15:16:40] <jadew> you still have to shift it
[15:17:39] <asteve> let me paste what I have because I think I'm doing it correctly but may have a logic gap
[15:18:08] <asteve> http://pastie.org/5517605
[15:18:55] <jadew> wth is this: if (ADC/100 < 100)?
[15:19:23] <asteve> well, I need to properly scale my adc because my values are definitely not 0-255
[15:19:46] <asteve> and I haven't gotten to that part yet; I also don't have a way to read a serial from this chip so it's a shot in the dark to try and scale the value
[15:20:01] <jadew> ok, so 1) you need to wait for the conversion to end
[15:20:27] <asteve> ok, I assume that's explain in the datasheet and I missed it?
[15:20:35] <jadew> yes
[15:20:48] <jadew> 2) that IF there seems wrong, the value you're gonna get won't be bigger than 1024
[15:20:55] <jadew> so 1024 / 100 = 102
[15:21:08] <asteve> I agree
[15:21:10] <jadew> that means one led will blink all the time
[15:21:23] <asteve> which is not the case, it turns off
[15:21:26] <jadew> while the other one will blink when you are close to max value
[15:21:54] <jadew> now for the togling part
[15:21:55] <asteve> what's happening is the led with the clause <100 is turning on for a small range on the pot
[15:21:57] <jadew> there's no toggling
[15:22:31] <jadew> ah, wait, missed the ^
[15:22:39] <asteve> good, you had me worried
[15:23:12] <jadew> the else block however looks weird
[15:23:25] <jadew> what are you trying to do there?
[15:24:01] <asteve> first, this is testing to understand how the ADC works; it will be moved into a timer and handled appropriately; second you can't use _delay_ms with a variable, only constants
[15:24:18] <jadew> that's not true
[15:24:31] <jadew> you can, but it will generate big code
[15:24:38] <asteve> I would pop in _delay_ms(ADC) if I the compiler would let me
[15:25:03] <jadew> ok, I see what you mean
[15:25:12] <jadew> so what's happening when you run this thing?
[15:25:35] <asteve> a red led blinks for a small range of the the pot and then it turns off and the green led does not blink
[15:25:41] <asteve> red being PD3, green PD4
[15:26:26] <jadew> DDRD = 1 << 4; //set 4 output
[15:26:26] <jadew> DDRD = 1 << 3; //set 3 output
[15:26:31] <jadew> that's your problem
[15:26:35] <asteve> bah!
[15:26:36] <asteve> |=
[15:27:50] <asteve> jadew: thanks!
[15:27:54] <jadew> np
[15:28:41] <asteve> now with the pot reading 5V, what should my ADC be?
[15:28:55] <jadew> depends on the reference you chose
[15:29:13] <asteve> aref is tied to +5v with a capacitor tied to ground in parallel
[15:29:26] <jadew> then it should be close to 1024
[15:29:33] <jadew> 10 bit adc, right?
[15:29:59] <asteve> ADMUX |= (1 << ADLAR); I thought would switch to 8bit?
[15:30:28] <OndraSter_> no
[15:30:31] <OndraSter_> it just left aligns the result
[15:30:37] <jadew> it looks like it just switches the bytes
[15:30:44] <jadew> so you don't have to read both of them
[15:30:52] <OndraSter_> you get 8 bits in one register
[15:30:54] <OndraSter_> the MSB
[15:31:02] <jadew> normally, it won't go ahead with the next conversion until you read the MSB
[15:31:03] <asteve> so ADCH?
[15:31:07] <OndraSter_> yes
[15:31:19] <jadew> so you would read ADCL and then ADCH
[15:31:34] <jadew> when you read ADCH the device knows he can go to the next conversion
[15:31:34] <OndraSter_> or just ADCH
[15:31:37] <OndraSter_> if 8bit is enough
[15:31:46] <asteve> 8bits is all I require
[15:32:03] <asteve> do I want to keep ADMUX |= (1 << ADLAR)?
[15:32:08] <asteve> and then read from ADCH?
[15:32:52] <jadew> btw, 255 / 100 will always be < 100
[15:32:57] <asteve> right
[15:33:08] <asteve> that's what I was expecting
[15:35:52] <asteve> I switched to adch and now I'm getting results I expect, only the red led will light
[16:07:21] <asteve> ok, now it's time to implement timers
[16:07:32] <asteve> so, I have a pot that is going to control how fast leds blink
[16:08:03] <asteve> should I setup a timer overflow that is set to the value of the ADCH?
[16:08:27] <asteve> the downside to this is that if I turn the pot to quickly while it's going slow it will turn lose some granularity
[16:09:22] <OndraSter_> you want to set OCRxx register to the ADCH value
[16:09:28] <OndraSter_> and set PWM mode for the timer
[16:09:36] <OndraSter_> and set output compare match action (low/high)
[16:10:58] <asteve> hmm
[16:12:16] <asteve> I don't need pwm to blink the leds; I just need a timer to kick off every ADCH milliseconds so that I can toggle bits
[16:13:17] <asteve> the problem I'm facing is that if ADCH is something high like 255 and I scale it by 10; that's 2.5seconds of delay
[16:13:46] <iSaleK> One offtopic questino, if I connect my multimeter between A1 and A2 pins on my Triac and my multimeter beeps, it means that my Triac has blown?
[16:13:59] <asteve> which means during that 2.5 seconds no matter what my ADCH is reading I'm not measuring it and applying it
[17:32:29] <asteve> if I'm using a 8MHz clock and I set TCCR0B = (1 << CS02) it should divide 8MHz/256 = 31.25KHz which means once every 32 microseconds the timer will increase?
[17:33:05] <OndraSter_> sounds appropriate
[17:33:38] <asteve> is the default clock frequency for the m168 8 or 16MHz?
[17:34:09] <OndraSter_> 8MHz with internal oscillator
[17:34:15] <OndraSter_> maybe with /8 prescaler in default in fuses
[17:34:21] <OndraSter_> (can be configured in fuses or via CPU registers)
[17:35:32] <asteve> hmm, then the max my timer can count to is 8.16 milliseconds, right?
[17:35:49] <asteve> 32us * 255 = 8.16ms
[17:35:50] <OndraSter_> hmm?
[17:35:57] <OndraSter_> 32us?
[17:35:59] <OndraSter_> yes
[17:36:00] <OndraSter_> sounds about right
[17:36:05] <OndraSter_> well
[17:36:07] <OndraSter_> *256
[17:36:12] <asteve> yes, sorry 256
[17:36:39] <asteve> so I don't want to prescale by 256
[17:39:59] <soul-d> http://www.calctool.org/CALC/other/converters/freq although you would need to do 32*255 yourself but nifty tool
[17:40:00] <asteve> are there 16bit timers available? I think not
[17:40:32] <jadew> there are
[17:40:34] <OndraSter_> at least one is
[17:40:46] <jadew> check the datasheet for your device
[17:44:00] <OndraSter_> offtopic question: Any tips how to do crossword solving app? 100% Speed is the #1 requirement. (and 100% reliability of course)
[17:44:05] <OndraSter_> I am trying some algorithms
[17:44:18] <OndraSter_> they will take maybe a week before I debug them (in C#) and then another week to rewrite it to C ...
[17:44:37] <OndraSter_> but I am wondering if anybody has got some tips for time reduction :)
[17:44:39] <OndraSter_> about the algo
[17:44:49] <OndraSter_> (I tried few other chats, nobody knows nothing)
[17:46:32] <NullMoogleCable> hello i need some help with getting some code to work with my mega
[17:46:43] <OndraSter_> aSK
[17:46:46] <OndraSter_> ask
[17:47:07] <NullMoogleCable> I downloaded the code from this project. It looks like AtmelStudio 4
[17:47:25] <NullMoogleCable> converted it so atmelstudio 6 likes it
[17:47:46] <NullMoogleCable> http://www.harmlesslion.com/cgi-bin/onesoft.cgi?118
[17:48:06] <NullMoogleCable> im getting Error 2 undefined reference to `pollserial'
[17:54:35] <NullMoogleCable> is this a mistake on my part or?
[17:57:06] <Tom_itx> woo hoo always fun to get parts
[17:57:18] <NullMoogleCable> :)
[17:57:54] <Tom_itx> is pollserial a function?
[17:58:03] <Tom_itx> maybe you forgot to include a header or c file
[17:58:15] <Tom_itx> i didn't look at the paste yet...
[17:59:22] <Tom_itx> what is GROM?
[17:59:35] <NullMoogleCable> its a custom chip used by TI in the 80'
[17:59:48] <NullMoogleCable> s for the game carts on the TI99/4a
[18:00:20] <NullMoogleCable> http://nouspikel.group.shef.ac.uk//ti99/groms.htm
[18:00:48] <Tom_itx> which is the main file?
[18:01:42] <NullMoogleCable> GROM.c i think
[18:01:57] <Tom_itx> why not bring it in studio4?
[18:02:24] <Tom_itx> lemme get settled in here... just walked in
[18:10:27] <Tom_itx> i get a no elf file error
[18:17:44] <Tom_itx> it failed in 5.1 as well
[18:17:46] <Tom_itx> i give up
[18:17:54] <NullMoogleCable> :-/
[18:18:22] <Tom_itx> it compiled in 4 but didn't build an .elf file apparently
[18:18:38] <Tom_itx> because it tried to convert the .elf to .hex and said it wasn't found
[18:19:03] <Tom_itx> hello trashbin
[18:24:50] * Tom_itx fondles his encoder and decides to draw an eagle part for it
[20:24:56] <asteve> when you're inside of a timer based interrupt can read the value that caused the interrupt?
[20:25:59] <Casper> what do you mean? you can read everything...
[20:26:11] <asteve> I'm wondering if it has been reset to 0 when the interrupt is called
[20:26:35] <asteve> I need to delay for 2 seconds and the biggest prescaler available is 1024 for my 8MHz clock
[20:27:02] <asteve> which means it ticks every 128 microseconds
[20:27:03] <Tom_itx> so make a loop inside a loop
[20:27:09] <Tom_itx> but don't do it inside an interrupt
[20:27:10] <Casper> there is several way to do it
[20:28:31] <asteve> my thought process is to put a variable that gets incremented every time the interrupt is called and when it reaches TCINT0*scale_factor it does something and clear the variable
[20:28:35] <Casper> you can make a software prescaller too
[20:28:48] <asteve> so every 128 microseconds the interrupt will fire and the variable is incremented by one
[20:29:08] <Casper> iirc, with 16MHz and a /1024, doing 125 counts of 125 give 1 second
[20:29:21] <asteve> I'm running at 8MHz
[20:29:31] <Casper> do you have a /512?
[20:29:48] <asteve> not that I saw, 256 and 1024
[20:30:06] <asteve> I do have a 16bit timer but that seemed too complicated to understand right now
[20:30:41] <Casper> 8 and 16 bits timer is exactly the same
[20:30:57] <Casper> the only difference is one count from 0 to 255, and the other is 0-65535
[20:32:08] <asteve> I'm using ADCH to set OCR0A; and ADCH is 8bit
[20:34:02] <asteve> hmm, I guess I can use OCR0A as my multiplier
[20:34:24] <asteve> and then the scale factor of 60; OCR0A = 256*60 = ~2s until change
[20:44:11] <Casper> asteve: you use C right?
[20:44:15] <asteve> Casper: yes
[20:44:24] <Casper> ADC is 16 bits
[20:44:33] <Casper> no need to mess with ADCH and ADCL
[20:54:33] <asteve> Casper: before I get into 16bit timers and 16bit ADC values I'd like to try getting this 8bit solution to work
[20:54:46] <asteve> I've used it in the past and I must be forgetting something because it's not working the way I want it to
[20:54:47] <asteve> http://pastie.org/5518652
[20:55:02] <asteve> maybe I'm completely off-base and need to use 16 ADC and timer1
[20:57:59] <Casper> timer 16 bits would help
[20:58:22] <Casper> but it's doable with 8 bits with an extra variable and more coding, and higher cpu usage
[20:58:42] <asteve> did you see my pastebin?
[21:02:16] <Casper> no, doing other stuff
[21:03:00] <asteve> ok, is there a way that I can verify I'm using an 8MHz clock?
[21:03:31] <asteve> I'm using avrdude with FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m on an atmega168
[21:07:50] <Casper> do you use a crystal or internal clock?
[21:10:43] <asteve> internal
[21:13:07] <Casper> be sure that if you have a ckdiv8 fuse that it's not set
[21:13:37] <yunta> asteve: why are you multiplying scale factor by ocr0a ?
[21:13:41] <NullMoogleCable> hi
[21:14:08] <yunta> your isr will be called only once per ocr0a ticks
[21:14:20] <asteve> right, OCR0A can be, at most 255, right?
[21:14:45] <yunta> so, your counter will be incremented by one for every adch ticks
[21:15:23] <asteve> and with my prescaler a tick happens every 128microseconds
[21:16:23] <asteve> adch can be at most 256; so 256 * 128us = 32.7 milliseconds; every 32.7 milliseconds the light will blink
[21:16:24] <yunta> so, right now if your adch is, let's say 10, you increment your counter once per 1280 us
[21:16:56] <yunta> 256*256*128....
[21:17:10] <yunta> uh, I lost scale factor
[21:17:36] <asteve> maybe the right thing to do is use the 16bit timer but it scares me; I can't get this timer to work :)
[21:17:47] <asteve> maybe I should remove my scale factor and see if it blinks the light every 32ms
[21:17:57] <yunta> see, if adch is 10, your counter is incremented once per 10 clicks, so 1280us, and then you wait for it to be 60 * 10 before you switch port state
[21:18:08] <yunta> 1280 * 60 * 10
[21:18:46] <yunta> or better: 128 * 10 * 10 * 60
[21:19:01] <yunta> so you effectively square your adch
[21:19:09] <yunta> is that your intention?
[21:21:20] <asteve> my intention is to make a light blink every 10ms -> 2s
[21:21:28] <asteve> that's the problem I'm trying to solve
[21:21:34] <asteve> I may be attempting to solve it in the wrong way
[21:21:47] <yunta> that time should be based on adch, right?
[21:21:56] <asteve> yes
[21:23:13] <yunta> I didn't read your program carefully, but in general I think you have 2 problems there:
[21:23:38] <yunta> you update OCR0A all the time, which may result in lost ISRs
[21:24:03] <yunta> you should drop OCR0A from your if, just check counter against scale factor
[21:24:38] <asteve> let me make it even simpler; my ISR only has PORTD ^= (1 << PORTD4);
[21:24:40] <yunta> I may try to explain why I think so, if you wish.
[21:25:00] <asteve> I will update OCR0A when I'm in the ISR
[21:25:31] <yunta> ok
[21:26:44] <yunta> that should give you 128us * ADCH , right?
[21:27:57] <asteve> yes
[21:28:24] <asteve> and ADCH can be at most 256 so that's 32 milliseconds
[21:28:43] <yunta> ok
[21:29:32] <asteve> http://pastie.org/5518744
[21:29:49] <yunta> ok
[21:29:50] <asteve> ok, there's an update of my code; I have a resistor wired to PORTD4 it should be blinking every 32 milliseconds but it is not
[21:30:39] <Casper> it blink every how many?
[21:30:45] <asteve> it never blinks
[21:30:59] <asteve> did I set the timer up correctly? am I using the right timer vector?
[21:31:17] <yunta> ohshit, timer setup is really not something I'd like to debug :)
[21:32:02] <asteve> it's something that I think I understand until I have to get it working
[21:32:03] <asteve> hah
[21:32:32] <yunta> did you verify your isr is called at all?
[21:32:45] <yunta> gets called at least once?
[21:32:54] <asteve> how could I verify that?
[21:33:18] <asteve> I don't have a programmer that can debug so I have to use LEDs to debug
[21:33:22] <asteve> and my LEDs aren't blinking :/
[21:33:23] <asteve> hhe
[21:33:30] <yunta> PORTD = 0 at the beginning of program, and PORTD = 0xFF in isr?
[21:33:50] <asteve> sure I'll try that
[21:34:20] <yunta> ehm, can't see interrupts enable btw :D
[21:34:40] <asteve> what's that?
[21:34:50] <yunta> http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
[21:34:52] <yunta> sei / cli
[21:35:15] <yunta> or read about global interrupt flag in SREG or something
[21:36:34] <asteve> maybe I should be using this vector: TIMER0_OVF_vect
[21:37:17] <asteve> no, it should be TIMER0_COMPA_vect
[21:38:13] <yunta> see, you have to enable interrupts
[21:38:54] <yunta> globally
[21:39:08] <yunta> setting timsk is not enough
[21:39:40] <asteve> ah, how do I do that?
[21:39:56] <asteve> sei();?
[21:40:57] <asteve> magic! :)
[21:40:59] <Tom_itx> enable interrupts
[21:41:02] <Tom_itx> SEI()
[21:41:29] <asteve> this is awesome
[21:41:33] <asteve> now I can try my ugly hack again
[21:43:38] <asteve> and it works!
[21:43:52] <asteve> now to get this charlieplexing working and I'm in the home stretch
[21:44:05] <asteve> yunta: you were correct about the scale factor; I should never have multiplied OCR0A by the scale factor
[21:56:35] <yunta> uh, got disconnected
[21:57:30] <yunta> asteve: any luck ?
[21:57:38] <asteve> yes
[21:57:45] <asteve> thank you very much for the help
[21:57:56] <asteve> as well as Tom_itx and Casper and everyone else
[21:58:22] <yunta> uh, so you found proper solution?
[22:04:28] <asteve> yunta: yes
[22:04:44] <asteve> interrupts weren't enabled; using the scale factor works well enough for my solution
[22:06:04] <yunta> ok
[22:11:44] <asteve> if I have PORTD6 set to output and I want to set PORTD2 and PORTD3 to output, how would you do that?
[22:12:05] <asteve> DDRD |= (1 << PORTD2) & (1 << PORTD3)?
[22:12:30] <asteve> rather, DDRD |= (1 << PORTD2) | (1 << PORTD3)
[22:13:29] <asteve> so, DDRD = 00100110
[22:13:49] <asteve> now lets say I want to set PORTD3 to input and PORTD4 to output
[22:14:22] <asteve> DDRD &= ~(1 << PORTD3); followed by DDRD |= (1 << PORTD4);
[22:14:26] <asteve> but is there a way to do that in one line?
[22:14:33] <yunta> sure
[22:14:58] <yunta> DDRD &= ~( 1<<PORTD3 || 1<< PORTD4);
[22:15:02] <yunta> s/||/|/
[22:16:18] <asteve> do you mean DDRD &= ~(1 << PORTD3) | (1 << PORTD4)?
[22:16:27] <yunta> yes
[22:16:30] <yunta> no
[22:16:31] <yunta> :)
[22:16:46] <yunta> DDRD &= ~( (1 << PORTD3) | (1 << PORTD4) )
[22:16:53] <yunta> that's better
[22:18:03] <asteve> 1 << PORTD3 = 00000100; 1 << PORTD4 = 00001000; 00000100 | 00001000 = 00001100; the not of the that is 11110011; that will turn portd4 into input
[22:18:30] <yunta> ohshit
[22:18:37] <yunta> sorry, misunderstood your question totally
[22:18:40] <asteve> my way won't work either
[22:18:45] <asteve> well, my shortened way
[22:19:23] <yunta> so you want to set D3 to input and D4 to output?
[22:19:29] <asteve> yes
[22:19:48] <asteve> when D3 is currently output
[22:20:33] <yunta> I think you need minimum 2 lines for that.
[22:21:04] <yunta> unless you know previous value for both d3 ad d4, or others on that port....
[22:22:08] <yunta> essentially you want to force some bits to selected values, so you need at least 2 input bytes: force-mask, and forced-values
[22:22:29] <yunta> so, 2 operations minimum
[22:22:55] <yunta> let me think how it would look in 1 line...
[22:24:31] <yunta> DDRD = (DDRD & (~( 1 << PORTD3 | 1<< PORTD4 ))) | (1 << PORTD4);
[22:24:45] <yunta> 2 lines version would be much cleaner
[22:26:00] <yunta> bleah
[22:26:41] <yunta> you're also setting portd4 to 1 so you could very well skip cleaning it...
[22:27:11] <yunta> DDRD = (DDRD & (~( 1 << PORTD3))) | (1 << PORTD4);
[22:27:30] <asteve> I'm doing charlieplexing which is very particular about the inputs and outputs of the pins
[22:27:51] <asteve> so, how do you turn only PORTD4 to input when it was output?
[22:28:07] <yunta> DDRD = (DDRD & (~(ored list of inputs))) | (ored list of outputs)
[22:28:24] <asteve> does that work?
[22:28:59] <asteve> that's the same as DDRD &=
[22:29:08] <yunta> you answered that question already, didn't you? DDRD &= ~(1 << PORTD4)
[22:29:21] <asteve> ah, ~(1 << PORTD4) is really 11110111; that's where I was tripping up
[22:29:28] <yunta> nah, DDRD &= does & after r-value is computed
[22:29:44] <yunta> so it would do | first, and then & with result
[22:31:47] <asteve> I think that's ok
[22:31:56] <asteve> hopefully, I'm going to write this all out then test it
[22:31:57] <asteve> heh
[22:32:06] <yunta> test it on paper :)
[22:32:14] <asteve> I did
[22:32:18] <yunta> ok
[22:32:20] <asteve> I can take a picture for you if you'd like hah
[22:32:26] <yunta> nah
[22:32:38] <yunta> = no, thanks :)
[23:09:18] <asteve> man I'm so close I can taste it
[23:09:32] <asteve> I have 12 charlieplexed LEDs plus a single LED on a pin
[23:09:48] <asteve> 6 out of the 12 LEDs are working
[23:09:52] <asteve> which is a good sign :)
[23:11:00] <yunta> halfway there
[23:14:08] <asteve> now the question is do I stay up all night trying to get this to work
[23:14:14] <asteve> or go to bed and wake up at 4 or 5am
[23:14:51] <yunta> lol, that one would be obvious for me :)
[23:15:14] <asteve> this is a gift for someone that I have to deliver to at work tomorrow
[23:15:17] <asteve> which I'll still have to do
[23:15:27] <asteve> so it's a tough choice but it may be time to go to sleep
[23:15:59] <yunta> if you go to sleep now you won't have enough time tomorrow
[23:16:12] <yunta> it always takes more time than you expect
[23:17:32] <yunta> and I'll try to sleep for 30min before boarding...
[23:42:39] <asteve> bingo lights work
[23:42:47] <asteve> now it's time to sleep to wake up early and make this thing look pretty