#avr | Logs for 2013-02-18

Back
[00:04:11] <k-man> does avr-gcc implement the full c langauge?
[00:05:58] <k-man> http://gcc.gnu.org/wiki/avr-gcc#Deviations_from_the_Standard
[00:09:44] <Casper> not the full, but enought of it
[01:58:13] <Rif> well i discovered why these led modules do not die and keep a constant brightness at all voltages
[01:58:48] <Rif> they have a 6pin IC as well as a resistor and diode in each led lodule, wonder what the ic is
[01:59:44] <Rif> need to get microscope out to try see what it is though, just looks like some chinese on the chip
[02:00:07] <Rif> oh wrong room, lol
[02:00:25] <Rif> i did make a new avr thing as well
[02:01:30] <Rif> http://www.youtube.com/watch?v=Pv-yhr7GGdg and http://www.youtube.com/watch?v=AalBO4x4K5s
[02:11:23] <sabesto> hm, just tried to setup printf following this example; http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html , i get "implicit declaration of function 'FDEV_SETUP_STREAM'" and "_FDEV_SETUP_WRITE' undeclared here (not in a function)"
[02:12:56] <sabesto> this is avr32 : http://pastebin.com/Xh9v2FeL
[02:17:33] <Rif> you don't seem to have any uart file included to process that function?
[02:17:45] <Rif> but i dunno much about avr32
[02:18:14] <sabesto> its the usb cdc thing
[02:18:30] <sabesto> dont think the problem is there
[02:18:35] <Rif> k
[02:19:20] <sabesto> think they did something to the libs to make it more portable for 32-bit avrs
[02:19:38] <sabesto> i only just started with them
[02:20:20] <Xark> sabesto: Yeah, that example is out of date. I have a working "workaround" if you would like it...
[02:20:41] <sabesto> hehe, workaround
[02:21:08] <sabesto> the reason why i wanted to use printf was because utoa has been removed too :P
[02:21:43] <sabesto> but if you could paste it i would be happy :)
[02:23:05] <dioxide> rif: what channel did you mean that for originally
[02:23:33] <dioxide> looks like interesting convo goes on there
[02:23:36] <Xark> http://pastebin.com/A6f7rmA8
[02:26:00] <Rif> dioxide i had meant for robotics or electronics
[02:26:15] <dioxide> robotics hm
[02:26:16] <dioxide> alright
[02:26:17] <Rif> is a bloody cool led system i can tell you
[02:26:38] <Rif> i work with em and been destroy testing, and could not kill these
[02:27:16] <Rif> well a few that would not die, they seem to use the same idea, wanna work it out, taking some pictures now
[02:27:45] <Rif> most 12V leds use a single resistor to limit the voltage/current
[02:28:21] <Rif> but these have resistor, diode and 6 pin sot, must be a bypass system to limit current to the leds
[02:30:31] <sabesto> Xark: __file undeclared, same with _FDEV_SETUP_WRITE
[02:32:10] <Xark> sabesto: Here are the includes I have : http://pastebin.com/04k2jfPt
[02:33:36] <sabesto> Xark: thats not avr32 is it?
[02:34:16] <Xark> sabesto: D'oh, sorry no, not AVR32. But the error you got may be related to the same issue.
[02:35:10] <sabesto> it may be a lot worse
[02:35:18] <sabesto> i'm looking at this: http://support.atmel.no/knowledgebase/avr32studiohelp/AT32UC3A_Software_Framework/APPLICATIONS/EVK1100-CONTROL-PANEL/DOC/html/a00169.html
[02:37:44] <Xark> sabesto: Yeah. Looks like "not implemented yet"...
[02:38:02] <Xark> sabesto: You can always use sprintf (or vsprintf) with a buffer...
[02:38:10] <sabesto> there is a "USART Debug strings" afs module
[02:38:19] <sabesto> *ASF
[02:38:46] * Xark has never looked at any ASF stuff...
[02:50:10] <sabesto> Xark: to be honest me+asf=http://mondaybynoon.com/wp-content/uploads/xVyoSl.jpg
[02:50:30] <Xark> Hehe. :)
[02:50:47] <Xark> Nice tie though...
[02:50:58] <sabesto> not used to not know whats going on
[02:51:40] <Xark> I have only done a little bit with AVR32, but none of it really involved the standard library (I have an Aery32 board).
[02:52:34] <sabesto> yeah, like i said earlier i think they removed the none standard c from the libs
[03:57:00] <creep> Casper<< double is only 32 bits wide and implemented in the same way as float - :(
[03:57:22] <creep> anyway there is fixedpoint :)
[03:59:25] <Richard_Cavell> creep: Isn't there some sort of rule that double has to be at least 64 bits?
[03:59:35] <Richard_Cavell> Or it works out that way given the guaranteed minimums
[03:59:37] <creep> yes it is 64 bits
[04:00:42] <creep> it would take some time to calculate with it on a 8 bit microcontroller ;)
[04:01:13] <jacekowski> Richard_Cavell: yes, double is double precision float
[04:01:21] <jacekowski> Richard_Cavell: and standard IEE float is 32 bits
[04:01:28] <Richard_Cavell> sorry I thought I was on ##c
[04:01:31] <jacekowski> IEEE*
[04:01:43] <jacekowski> http://en.wikipedia.org/wiki/IEEE_floating_point
[04:01:48] <Richard_Cavell> I realize that on an 8-bit microcontroller you have to make some sacrifices
[04:01:49] <jacekowski> IEEE 754
[04:09:22] <creep> what do you think about using a 64 bit fractional part with a 64 bit whole part as a number ?
[04:09:36] <creep> and 32/32 bit ...
[04:12:08] <Valen> so I'm making a single cell Lipo powered widget, no microcontrollers involved and rather space constrained. I want an undervoltage protection something for the cell
[04:12:20] <Valen> currently I'm thinking some kind of voltage reference, a voltage divider and a comparator, but it seems overly complex
[04:12:24] <creep> good uestion...
[04:12:32] <krphop> Valen: many lipo packs have undervoltage protection built in
[04:12:34] <creep> there is no simpler way :P
[04:12:47] <Valen> krphop: I'm using a bare cell
[04:12:50] <OndraSter__> and there are one-chip voltage comparators
[04:12:53] <Valen> any info on whats in those?
[04:12:55] <creep> tl431, and a comparator
[04:13:44] <creep> well mobile phone batteries have uvlo, but they let it drain down to 2-2.5V. that is way too low, you'd want 3.3-3.6V
[04:13:46] <Valen> one chip comparator?
[04:14:03] <Valen> I was thinking of shooting for around 3 volts
[04:14:28] <creep> they will die soon if you let them drain too low
[04:14:40] <Valen> i know thats why I wanted to limit it to 3V
[04:14:48] <Valen> it should still get ~500 cycles
[04:14:58] <creep> new xells should contain <5% charge below 3.5V at low current
[04:16:42] <Valen> http://www.rc-performaxx.com/assets/images/RC_Performaxx_Single_Cell_5000-40C_Discharge_Graph.jpg seems to indicate that 3.5v is ~40% remaining
[04:17:21] <Valen> call it 3 and change
[04:18:12] <Valen> but yes, I'm rather curious whats in the things they put on the end of AAA sized cells
[04:20:02] <Valen> ask and ye shall recieve spake lord google
[04:20:05] <Valen> http://s61.beta.photobucket.com/user/pike444/media/AW8.jpg.html
[04:20:08] <Valen> http://s61.beta.photobucket.com/user/pike444/media/AW11.jpg.html
[04:35:11] <Chat7813> Hey
[04:39:17] <Valen> OndraSter__: you meant a one chip comparator with inbuilt voltage reference
[04:39:20] <Valen> aka http://au.element14.com/microchip/mcp65r41t-2402e-chy/ic-comp-lp-single-6sot23/dp/1863965
[04:39:22] <Valen> nice
[04:43:52] <OndraSter__> probably
[04:45:13] <Valen> sorry there was meant to be a ? on that
[04:45:29] <Valen> was that what you had in mind OndraSter__?
[04:45:49] <OndraSter__> maybe)
[04:45:56] <OndraSter__> I can't check the datasheet right now
[04:46:19] <Valen> its a comparator with a voltage refrence in it
[04:46:40] <Valen> or was there some other kind of thing you were talking about?
[04:48:24] <Valen> i like microchip datasheets
[04:48:28] <Valen> they feel so complete
[04:49:36] <OndraSter__> atmel datasheets are even better
[04:49:46] <OndraSter__> too bad atmel doesn't do much other than MCUs/memories
[04:49:52] <Valen> i didn't find that for their mcu's
[05:09:21] <qartis> anybody worked with mcp2515 before?
[05:09:35] <qartis> microchip spi CAN transceiver
[08:52:23] <alexavr> hi, anyone ever had problems with the atmega48a? If I connect Vcc and Gnd, not programmed, it draws 6-9ma which doesn't seem normal. If I try with a 3v battery it draws 0.7-1ma.
[08:52:50] <alexavr> problem is that the usbtiny isn't detecting it, so very weird
[08:56:56] <OndraSter__> 6 - 9mA is fine
[08:57:19] <OndraSter__> at 3V battery it might be BODding
[08:57:45] <alexavr> hmm but shouldn't it be at 1mhz by default?
[08:57:54] <alexavr> and bod disabled, and 1.8v-5.5v?
[09:16:12] <OndraSter__> no idea alexavr
[09:16:21] <OndraSter__> don't know default fuses
[09:33:02] <alexavr> oh well, thanks anyway
[09:33:03] <mashku> Hi
[09:33:05] <mashku> how to reset atmega168 fuses to factor defaults ?
[09:58:37] <Malinuss> mashku, are you using atmel studio?
[09:58:45] <mashku> nope
[09:59:16] <Malinuss> mashku, then I don't know ;P. Only changed fuses with the atmel studio GUI
[09:59:39] <mashku> Malinuss, what does avrdude -c usbtiny -p atmega168 -U lfuse:w:0xE2:m do on atmega168 ?
[10:03:46] <Malinuss> mashku, one of the other will know, like I said, I only changed the fuses using the atmel studio GUI, and I would sugest you to do the same... as far as I can see, it changes one of the fuses to 0xE2...
[10:04:00] <Malinuss> I don't know which one of the fuse registers though
[10:04:58] <mashku> Malinuss, low fuse
[10:07:10] <mashku> Malinuss, well it disables CKDIV8
[10:07:28] <mashku> Malinuss, I dont know how would that make my atmega unresponsive
[10:07:56] <mashku> Malinuss, how many times I can reconfigure these fuses?
[10:13:40] <creep> about 10000 times
[10:19:39] <creep> 27 times every day for a whole years sounds enough for development
[10:20:21] <mashku> I would like to know what does arudino software call avrdude with when I ask for burning bootloader
[10:20:56] <creep> try strace
[10:21:50] <ali1234> mashku: are you asking what command line arduino ide uses to burn bootloader?
[10:21:52] <creep> well.. it is opensource ?
[10:30:25] <Malinuss> mashku, look in the datasheet, maybe it makes it use a external clock, while you don't have one?
[10:34:28] <mashku> ali1234, yes
[10:34:49] <mashku> ali1234, exactly what command, does it set atmega to use external clock? I dont have one
[10:35:56] <ali1234> depends on version
[10:36:10] <ali1234> the fuses it uses are in boards.txt: https://github.com/arduino/Arduino/blob/master/hardware/arduino/boards.txt
[10:37:25] <mashku> ali1234, thanks !
[10:40:20] <mashku> ali1234, how to decode what specific fuses setting does ?
[10:40:42] <ali1234> read the datasheet for your chip
[10:43:41] <mashku> ali1234, one more question
[10:44:16] <mashku> ali1234, if I change fuses of atmega to use external clock, can atmega be unresponsive for programmer that I can't even change the fuses anymore without connecting crystal?
[10:44:30] <mashku> ali1234, or even detect chip
[10:45:11] <ali1234> i don't think so
[10:47:43] <jacekowski> mashku: yes it can
[10:47:58] <jacekowski> mashku: if you changed fuses to external clock, you need external clock for chip to work
[10:48:11] <jacekowski> mashku: only way of recovering now is external clock or high voltage programming
[10:48:25] <mashku> jacekowski, well I tried to burn bootloader and it seems that arduino software by default enables external clock
[10:48:32] <mashku> jacekowski, but I didnt have one connected
[10:48:40] <jacekowski> well, get one connected
[10:48:46] <mashku> ok that makes sense now
[10:48:50] <jacekowski> you can use another avr to generate it
[10:49:04] <mashku> by the ways I dont have 22 pf caps, will it work with 2x 33 pF caps in series ?
[10:49:21] <jacekowski> if it's set to external clock you don't need caps
[10:49:26] <jacekowski> you need external clock source
[10:49:30] <jacekowski> not a crystal
[10:49:36] <mashku> oh
[10:49:58] <jacekowski> you can use another AVR to drive it
[10:49:59] <mashku> well its set to external cyrstal oscilator
[10:50:07] <jacekowski> ahm
[10:50:12] <mashku> sorry for confusion
[10:50:12] <jacekowski> then yes, you need crystal
[10:50:21] <jacekowski> and 2x33 pF in series should be ok
[10:50:43] <jacekowski> although, even if it's set to external oscillator it will work with external clock source
[10:51:11] <mashku> also if its 8Mhz external crystal oscilator can I attach 16 one ?
[10:51:40] <jacekowski> you can, although it may not work
[10:51:41] <mashku> I mean from the fuse calculator I see it's set to use 8Mhz external crystal
[10:51:54] <mashku> it's just arduino's default when burning bootloader
[10:52:11] <mashku> I think I have only 16Mhz ones
[10:52:19] <mashku> jacekowski, thanks for help
[10:53:12] <creep> jacekowski<< like an inverting cmos gate with schmitt trigger. a capacitor and resistor? :)
[10:53:41] <mashku> creep, you mean to use capacitor + resistor as external clock?
[10:53:47] <jacekowski> creep: yes
[10:53:58] <jacekowski> mashku: and shmitt trigger
[10:54:13] <creep> btw cd4011 can be used as quartz oscillator
[10:54:44] <jacekowski> mashku: basically if you set CKOPT to 0, it will not run in full swing mode
[10:54:54] <jacekowski> mashku: and it may have problems driving 16MHz crystal
[10:55:37] <creep> http://www.supplierlist.com/product_view/resonator/85120/100520/Quartz_Crystal_Clock_Oscillators.htm
[10:55:51] <creep> or one of these magic components from an old 286 on 5V power
[10:56:23] <jacekowski> if you are really hardcore you can use microswitch
[10:56:43] <mashku> jacekowski, I dont have "Schmitt trigger"
[10:57:11] <mashku> jacekowski, well I think I will eventually get 8Mhz crystal if with 16 it does not work
[10:57:22] <creep> mashku<< ne555
[10:57:26] <creep> cd4093 ...
[10:57:33] <mashku> 555 ?
[10:57:38] <jacekowski> there is 10000000000s of ways of generating some sort of clock signal
[10:57:45] <jacekowski> in acceptable format
[10:57:49] <mashku> well I have 555
[10:58:19] <creep> that is like a schmitt triggered inverter with 2 and 6 connected
[10:59:05] <mashku> thanks
[10:59:43] <creep> i'd pick some capacitor 100pf-1nf and a resistor 1k-10k and make an osc then
[11:00:35] <mashku> creep, I have to read about it, because I dont have background in electronics
[11:00:51] <mashku> creep, but it's valuble tip, to know where to look for info
[11:01:12] <mashku> creep, I think I will try 16Mhz and if it does not work, I will google how to make a clock
[11:01:15] <creep> http://newelectronicdesings2011.blogspot.hu/2010/12/latest-alternate-555-oscillator.html
[11:01:24] <mashku> haha thanks:D
[11:01:37] <creep> well this can do around 1MHz
[11:01:44] <creep> tops
[11:02:16] <mashku> yeah I see
[11:02:21] <mashku> I need 8Mhz
[11:03:07] <creep> you need external clock to reprogram to internal clock...
[11:03:08] * OndraSter__ would use one inverter gate + xtal + two loading capacitors (not needed, just to tune it to the closer frequency)
[11:03:08] <OndraSter__> feedback 1M resistor could be also handy
[11:03:12] <creep> then no external clock needed
[11:04:17] <creep> atmegas have 8MHz internal rc osc i remember
[11:04:25] <mashku> yes
[11:04:48] <mashku> but arudino software burned fuses to use external one;/
[11:05:12] <mashku> ok I am going home, and I will try these things out
[11:05:13] <mashku> thnaks
[11:05:28] <creep> that sounds stupid if it does not have external clock
[11:06:03] <creep> i'd definitely make a bash script named arduino that sets correct fuses
[11:06:17] <creep> *avrdude
[11:07:30] <creep> haha
[11:07:30] <creep> http://www.therosedress.com/shop/products/itemCD.asp?id=4069&vendorid=CD
[11:07:40] <creep> Item# CD-4069 Price: $147
[11:08:07] <creep> that is not cheap
[11:09:45] <specing> wrong channel?
[11:10:32] <creep> small mems oscillator http://medicaldesign.com/electrical-components/alternative_quartz_oscillators/
[12:27:44] <turutk> hi. i am trying to compile a program with eeprom but i don't get main.eep file when i compile
[12:28:20] <specing> look at the symbols in the ELF file
[12:28:52] <Casper> your makefile is probably incomplete
[12:30:01] <specing> it is missing one objcopy line
[12:31:41] <turutk> how do i look at anything in the elf file
[12:32:01] <turutk> it says it is executable file and i cannot open it
[12:32:23] <turutk> i used a template to get started so makefile should be good
[12:32:51] <Casper> the template is incomplete most probably
[12:33:02] <Casper> as the eeprom is not a basic stuff
[12:34:19] <turutk> i am trying a different makefile
[12:39:25] <turutk> it works. thanks
[12:46:07] <turutk> is it true that there is a limit i can burn eeprom?
[12:49:30] <Casper> yes
[12:49:34] <Casper> 100k times per cell
[12:49:46] <Casper> compared to 10k times for the flash
[12:53:40] <turutk> that almost means i can use them for lifetime
[12:57:07] <Malinuss> atmel studio should have a counter
[13:41:58] <turutk> do i have to flash .eep every time i flash .hex
[13:44:01] <LoRez> depends on if you're moving things around in the eeprom
[13:44:11] <Aleks> turutk, if the content of the EEPROM doesn't change - no
[13:49:36] <turutk> i don't touch eeprom content but it keeps resetting to all 0xff s
[13:50:24] <LoRez> you need to change the fuse that lets the eeprom not get erased with a chip erase
[13:52:15] <turutk> i am afraid of fuse bytes for now
[13:52:30] <turutk> lfuse: 0b11101111
[13:52:31] <turutk> hfuse: 0b11001001
[13:52:35] <LoRez> unless you do that, then yes, you have to flash them both after every chip erase.
[13:52:40] <turutk> these are how they are set now
[13:52:52] <LoRez> which chp?
[13:53:00] <turutk> atmega32
[13:53:05] <turutk> it says high fuse bit 3
[13:53:09] <turutk> in the datasheet
[13:53:35] <LoRez> yeah
[13:53:40] <mashku> jacekowski, works with crystal and 33 pF caps
[13:53:49] <LoRez> http://www.engbedded.com/fusecalc
[13:53:55] <turutk> 0b11000001 so this should be my high fuse?
[13:56:36] <turutk> tried that and worked out
[14:14:36] <Malinuss> any ideas why my adc seems to get stuck/crashes the uC, when the adc value gets below ~430 (it works fine from ~430< though)... My setup uses a attin13a, and a LM317 to convert from 6V -> about 4.35V... I use the power from the LM317 to a voltage divider, I use a 10k resistor...
[14:15:27] <Malinuss> this is my adc function, I'm pretty sure it's right http://pastebin.com/CYvaX24q
[14:25:11] <LoRez> Malinuss: what's the other resistance in the voltage divider?
[14:25:38] <Casper> Malinuss: do you actually have a decoupling cap on your µC power pin?
[14:39:38] <Malinuss> Casper, no.. should I?
[14:39:46] <Casper> yup
[14:39:54] <Casper> mandatory for proper function
[14:40:10] <Malinuss> Casper, what value? between vcc and ground?
[14:40:21] <Malinuss> LoRez, about ~10k too
[14:40:37] <Casper> 0.01-0.1µF ceramic
[14:42:23] <Malinuss> CapnKernel, between VCC and ground, right?
[14:42:27] <LoRez> yes
[14:43:41] <Malinuss> LoRez, and you guys think that might be the issue here?
[14:44:01] <LoRez> it doesn't make sense to me that you have 10k resistors on both sides of your voltage divider.
[14:45:00] <Malinuss> LoRez, I have 10K as the pulldown, and different values for different effects between the 10k and VCC
[14:47:50] <LoRez> you really should decouple the power just outside the chip anyway
[14:49:02] <Malinuss> LoRez, okay, but you think that will solve the issue?
[14:49:47] <Casper> Malinuss: it may, it may not
[14:49:52] <Casper> without it your avr is unstable
[14:49:55] <LoRez> no idea. you could be somehow shorting out your supply or doing something else that's causing it.
[14:59:15] <Malinuss> LoRez, I just counter, I have a 10K pulldown, and then 17K between the VCC and the pulldown, that gives me about the treashold value (480)
[15:01:32] <abcminiuser> So, my printer bootloader works
[15:01:42] <abcminiuser> I "printed" Mouse.hex to my USBKEY and it worked
[15:07:14] <Malinuss> so maybe I should try with a lower value pulldown?
[15:48:51] <Malinuss> Casper, LoRez, placing the capacitators didn't help at all
[15:51:01] <LoRez> capacitators? are those high capacity potatoes?
[15:52:20] <Casper> Malinuss: you used ceramic?
[15:55:54] <Malinuss> Casper, no, the other ones... the datasheet of the LM317 tells you to put 10uF between Vin and GND, and 100uF between Vout and ground.. I only have 10uF and 430uF of the big ones, so I just used the 10uF instead of 100...
[15:56:24] <Casper> so you didn't added the decoupling cap
[15:56:46] <Casper> 0.01-0.1µF ceramic, as close as possible to the avr power pin
[15:57:11] <Malinuss> Casper, but I just added the 100uF there... but okay I add a 0.1uF too
[15:57:44] <Casper> need to be ceramic
[15:58:08] <Casper> electrolytic have way too high ESR and are useless for decoupling
[16:01:13] <Malinuss> Casper, still doesn't solve the problem. it won't spit out values below ~430
[16:01:34] <Malinuss> Casper, no problem with values 430->1023 though
[16:01:50] <Casper> Malinuss: do you have your code avail somewhere? and your schematics?
[16:05:30] <Malinuss> Casper, here is the whole code: http://pastebin.com/uDRKXSsb pretty short, but you should only worry about the read_adc function, I think... As of the schematic - I do not have one, it would take some time (15min?) to make one, but I am willing to, if you think it might help
[16:07:12] <Casper> you know that "ADC" exists instead of "ADCL" and "ADCH" ?
[16:07:30] <Casper> and also
[16:07:39] <Casper> *high = ADCL;
[16:07:39] <Casper> *low = ADCH;
[16:07:43] <Casper> explain? :D
[16:07:43] <Malinuss> Casper, yeah atmel are good people like that, but as you can see, I send 1 byte at a time, so I rather not use that ;D
[16:08:24] <Malinuss> Casper, I assign the adress high and low is pointing to, to the values of ADCL, and ADCH?
[16:08:52] <Casper> yeah, but it's weird that you swap the bytes
[16:08:53] <LoRez> whut?
[16:09:20] <LoRez> also, if you read them individually, aren't you supposed to read High first, then low?
[16:09:37] <Casper> LoRez: that's was also my second thing I was going to say
[16:09:43] * Malinuss looking in the datasheet
[16:09:55] <Casper> I personally wouln't have used the 2x 8 bits
[16:09:58] <LoRez> if you read from ADC instead, it takes care of that for you, btw
[16:09:59] <Casper> but a single 16 bits
[16:10:01] <Casper> less issues
[16:10:20] <Casper> bbl, food is almost ready, and I have a freshly baked bread to slice
[16:12:32] <Malinuss> Casper, okay so you think that changing my whole transmission protoc is easier then shifting a couple of bits into a int at the other end?
[16:12:40] <Malinuss> *ol
[16:14:04] <Malinuss> yeah you guys were right, ADCH is high by default, no idea how I missed that
[16:17:14] <wakko> i read on avrfreaks "During the ISR, no other IRQs are serviced." does it means that calling a function from an ISR reenable IRQ ?
[16:19:31] <Malinuss> Casper, change the value reading order to the recommended... it still doesn't work..
[16:21:49] <Malinuss> nope LoRez
[16:21:51] <Malinuss> "When ADCL is read, the ADC Data Register is not updated until ADCH is read. Consequently, if
[16:21:52] <Malinuss> the result is left adjusted and no more than 8-bit precision is required, it is sufficient to read
[16:21:52] <Malinuss> ADCH. Otherwise, ADCL must be read first, then ADCH."
[16:24:27] <LoRez> whichever it is, using ADC instead makes it "just work"
[16:27:42] <Malinuss> LoRez, I would almost give my right arm if that is the issue
[16:32:06] <LoRez> well, it is rather obvious, but you're using ADC0?
[16:32:48] <LoRez> (you're going to feel really dumb after my next question, btw)
[16:34:39] <LoRez> have you disabled the other functions of that pin?
[16:42:11] <LoRez> Malinuss: eh?
[16:43:01] <Malinuss> LoRez, I don't use any other functions on that pin, and as I said, it works flawless between (about) 450 all the way up to 1024
[16:43:05] <Malinuss> *1023
[16:44:04] <LoRez> yes, you do use the other function on that pin unless you've turned it off.
[16:44:19] <LoRez> section 8.1.2 of the ATTiny13 data sheet.
[16:45:54] <Malinuss> LoRez, but that makes no sense, it should reset if the value becomes too big, not too low. neverless, I better disable the ability to reset the pin ;P
[16:46:05] <Malinuss> *reset the uC on that pin
[16:46:18] <LoRez> no, the reset pin is inverted. a low resets while a high is "normal"
[16:46:47] <LoRez> disabling reset probably disables ICSP programming
[16:47:15] <LoRez> When programming the RSTDISBL fuse, High-voltage Serial programming has to be used to
[16:47:17] <LoRez> change fuses to perform further programming.
[16:47:54] <Malinuss> LoRez, okay I better just change to adc1 or whatever other pin, yeah this is propably the issue then, and I owe you a big one, thanks. I get back to you when it works :)
[16:48:05] <LoRez> I'm sure it'll work fine now.
[16:48:31] <OndraSter__> LoRez> disabling reset probably disables ICSP programming
[16:48:31] <OndraSter__> not just probably
[16:48:31] <OndraSter__> but for sure
[16:49:08] <LoRez> yeah, as shown by my subsequent paste
[16:49:31] <Malinuss> so you can't disable it in code
[16:49:36] <LoRez> no.
[16:49:40] <LoRez> it's a fuse.
[16:50:24] <Malinuss> LoRez, thanks again, pretty stupid of me not thinking about it... and pretty funny too ;D
[17:03:03] <Malinuss> LoRez, yay it did work <3
[17:03:07] <Malinuss> hue
[18:40:19] <dunz0r> Is enable pin-change interrupts on a port where I use auto-triggered ADCs a bad idea?
[18:40:37] * dunz0r imagines there might be quite a lot of pin-change interrupts triggered
[18:41:00] <Tom_itx> umm i'm not sure how that works if they're not configured as io
[18:41:13] <Tom_itx> if you use the 2nd pin funciton the behavior may change
[18:42:04] <dunz0r> Well... I've got half configured as outputs and the other half configured as AD-channels. One pin left in the AD-channel-part that I didn't end up using.
[20:34:31] <SoCo_cpp> I get the following "Invoking: AVR Compiler" "echo: write error: Broken pipe" in Eclipse 3.5.2 on Linux using AVR Eclipse Plugin 2.4.0 and Debian packages avr-gcc avrdude etc. Is this a toolchain issue, eclipse plugin issue, or something else?
[20:36:02] <Horologium> looks like a problem with eclipse not able to find something.
[20:40:14] <Tom_itx> so don't use eclipse
[20:40:37] <Tom_itx> i tried it on something once and didn't like it at all
[20:47:59] <diametric> I also never had luck using the AVR plugin for eclipse. Sublime Text 2 for me + makefiles.
[20:48:10] <Horologium> vim for the win
[20:49:01] <dirty_d> ive been using sublime-text as an editor, pretty sweet
[20:49:28] <dirty_d> i never got comfortable with vim for heavy coding
[20:50:05] <Horologium> I've been using vi for many many years...since the early 90s.
[20:50:43] <SoCo_cpp> Well, I've confirmed that I have the latest version of the plugin and several parts of it seem to be buggy including properties sections for the plugin.
[20:51:03] <dirty_d> yea ive used it for a long time, i just dont like the feel
[20:51:05] <Horologium> go back one version.
[20:51:09] <dirty_d> i need a graphical editor for coding
[20:52:19] <Horologium> my main microcontroller dev computer doesn't even have a gui on it.
[20:52:30] <Horologium> just a basic debian install with no X.
[20:52:38] <Horologium> on a p-2
[20:55:03] <SoCo_cpp> Its looking like I need to find a tutorial to refresh my Makefile usage. I like Geany as an editor when I can.
[20:55:37] <SoCo_cpp> bah, eclipse has hung sucking cpu....
[20:56:15] <SoCo_cpp> ..gone now, screw eclipse :P
[20:56:20] <Tom_itx> heh
[21:52:09] <BigHugeDog> Hi, channel.
[21:52:22] <BigHugeDog> Does xmega has dip packages?
[22:02:23] <Casper> not as far as I know
[22:11:17] <ziph> I think abcminiuser has an xmega in a DIP. ;)
[22:11:45] <ziph> But that's more of a stamp-with-an-upside-down-biplane thing rather than something you can actually get.
[22:13:32] <BigHugeDog> thank you Casper and ziph.
[22:13:58] <ziph> BigHugeDog: You can get ARM Cortex M0's in DIP.