#avr | Logs for 2013-04-21

Back
[00:00:34] <stanreg> How is 0 different from 0000?
[00:01:02] <Casper> the compiler see it differently
[00:01:09] <Casper> 0x00 is a 8 bits number
[00:01:17] <Casper> 0x0000 is a 16 bits number
[00:01:25] <stanreg> I see
[00:01:43] <Casper> and... dosen'T that just zero out the bits?
[00:01:59] * Casper is tired, can't think straight
[00:02:07] <Casper> and isn't or simply | ?
[00:02:40] <stanreg> According to this page, || for OR works --> http://msdn.microsoft.com/en-us/library/z68fx2f1.aspx
[00:02:57] <stanreg> Also, it wouldn't zero out the bits.
[00:03:18] <stanreg> an AND would.
[00:05:58] <Casper> | = bitwise or
[00:06:07] <Casper> || = logical or
[00:06:38] <stanreg> hm
[00:06:55] <Casper> ADC_read() || 0x00 = if ADC_read() == 0x00 ? true : false;
[00:07:23] <Casper> http://winavr.scienceprog.com/short-introduction-to-c/c-language-operators-and-expressions.html
[00:08:00] <stanreg> so || is for comparing purposes?
[00:08:17] <stanreg> similar to ==?
[00:09:04] <Casper> yup
[00:12:31] <stanreg> Thanky
[00:41:19] <MarkX> hmm
[00:41:27] <MarkX> this is pretty basic
[00:41:34] <MarkX> but it doesn't seem right to me
[00:41:35] <MarkX> PORTD ^= (1 << PORTD6);
[00:41:58] <Casper> wrong
[00:42:07] <Casper> I think...
[00:42:14] <Casper> set or clear?
[00:42:35] <MarkX> well i want it to go from 1 -> 0 -> 1 -> 0
[00:42:43] <MarkX> in the while (1) loop
[00:42:55] <MarkX> but i only want that to happen on portd6
[00:43:02] <Casper> PORTD |= (1<<PD6) PORTD &= ~(1<<PD6); iirc...
[00:43:53] <MarkX> hmmm but i replaced both of those with 1 line
[00:43:56] <MarkX> is that still wrong?
[00:44:38] <Casper> just toggle it?
[00:44:55] <MarkX> yea
[00:44:55] <Casper> write to PIND instead (badly documented function)
[00:45:07] <MarkX> can you explain that please?
[00:45:37] <Casper> writting 1 to PIN cause the state of the bits at 1 to change state on the output
[00:46:41] <MarkX> but isn't PIN usage only for reading from PINs?
[01:56:24] <cluelessperson> hey guys
[02:00:00] <cluelessperson> does anyone know how to use the onboard processor here?
[02:33:05] <cluelessperson> Casper, it has an onboard processor that uses proprietary code. I've been waiting to use it at its full potential
[02:33:17] <Casper> good luck :D
[02:34:22] <cluelessperson> Casper, you can get sensor data directly
[02:34:29] <cluelessperson> but the onboard processor would help
[02:38:10] <Casper> did you checked the datasheet?
[02:38:32] <cluelessperson> Casper, It's proprietary, unreleased.
[02:38:44] <cluelessperson> They only release it to large manufactures under license
[02:39:13] <Casper> the datasheet?
[02:39:30] <cluelessperson> Casper, things in relation to the processor, yes
[02:40:32] <Casper> I always wondered why compagny do that
[02:40:58] <Casper> it do not seems to have any advantage for them
[02:41:37] <cluelessperson> Casper, Yeah, the datasheet explains communication used for sensor data, but not interfacing with the DPM
[02:41:49] <cluelessperson> DMP* digital motion processor
[02:42:50] <Casper> http://www.i2cdevlib.com/devices/mpu6050
[02:45:07] <cluelessperson> Casper, God, its use is far out of my capability right now.
[02:46:08] <Casper> so, I got a good page for you? didn't checked much
[02:46:23] <cluelessperson> Casper, https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino
[02:46:26] <cluelessperson> sorta
[02:46:43] <cluelessperson> doesn't use the compass, so the DMP is still locked up, but it's helpful
[04:03:50] <OndraSter> Volume update registers R06h and R07h are unavailable in SPI control mode. To use volume update in
[04:03:50] <OndraSter> software control mode, I2C mode must be used.
[04:03:51] <OndraSter> WHAT
[04:03:52] <OndraSter> WHY?!
[04:04:15] <OndraSter> oh well, I will switch to I2C then
[04:56:07] <megal0maniac> Hah :)
[04:56:13] <megal0maniac> OndraSter: Time to learn ;)
[05:02:23] <OndraSter> well, I2C has got two more registers than SPI :P
[05:02:51] <megal0maniac> And two fewer wires :)
[05:03:46] <OndraSter> yep
[05:03:46] <twnqx> one, you can hardwire ss
[05:03:52] <twnqx> also two more reistors :P
[05:03:54] <OndraSter> not really, if you have got multiple devices
[05:04:05] <twnqx> (you don't really need the pullup/pulldown)
[05:04:41] <OndraSter> you need pullup for the i2c
[05:04:46] <OndraSter> should I go for 4k7?
[05:04:50] <OndraSter> or put two in parallel :P
[05:04:55] <OndraSter> there will be only 2 devices on the bus
[05:04:58] <OndraSter> 4k7 should be enough
[05:05:05] <megal0maniac> 4k7 is good
[05:05:06] <twnqx> it's open drain
[05:05:13] <twnqx> current doesn't matter
[05:05:22] <twnqx> so yeah, 4k7 will do as well as anting
[05:05:23] <OndraSter> it does
[05:05:36] <OndraSter> because at high speeds too high resistance+high capacitance = not enough charging speed
[05:05:51] <twnqx> i2c doesn't have high speeds :P
[05:05:57] <megal0maniac> i.e. 400khz
[05:06:03] <OndraSter> yep
[05:06:10] <OndraSter> high enough for it to 10k sometimes be too much
[05:06:13] <twnqx> that's not something i consider high :/
[05:06:13] <OndraSter> but I am 4k7 person
[05:06:17] <OndraSter> all my pullups are 4k7
[05:06:28] <OndraSter> twnqx, well I am not using 50Ohm terminated buses :P
[05:06:36] <twnqx> hm, i often go with 100k
[05:06:46] <twnqx> but yes, that's static :P
[05:06:46] <megal0maniac> 10K here
[05:06:48] <OndraSter> I have got a reel of 4k7
[05:09:27] <OndraSter> http://clip2net.com/s/4WYTcF
[05:09:32] <OndraSter> I am having hard time trying to figure out the table
[05:09:46] <OndraSter> oh
[05:09:46] <OndraSter> OH
[05:11:08] <OndraSter> nvm
[05:12:22] <megal0maniac> Who the hell is this Alice3 person?
[05:12:53] <twnqx> i am stumped at this one thing here...
[05:13:03] <twnqx> let's say i have a 32 signed integer
[05:13:30] <twnqx> and run abs() on it, defined as i >= 0 ? i : -i
[05:13:40] * megal0maniac is already lost
[05:13:48] <twnqx> a 32bit*
[05:13:56] <twnqx> this code says
[05:14:28] <twnqx> overflow = (result > 7FFFFFFFH) OR (result < -80000000H);
[05:14:36] <twnqx> but... that can't ever happen, can it? :S
[05:16:44] <OndraSter> huh
[05:16:54] <OndraSter> <-8000?
[05:16:56] <OndraSter> >7FFF?
[05:17:23] <OndraSter> it would have to be interpreted as a unsigned
[05:17:28] <twnqx> yes
[05:17:31] <OndraSter> and then if result > 7FFFF
[05:17:44] <twnqx> yes, but that could never happen
[05:17:47] <twnqx> imho
[05:18:18] <twnqx> hm
[05:18:27] <twnqx> what is the output of input value 7fffffff
[05:19:32] <OndraSter> hmm, there are three available GPOs on the receiver. I can put there either ZERO FLAG indicator, interrupt signal, validity bit, user bit, channel status bit, subframe clock or 192 block flag... or general error.
[05:19:36] <OndraSter> none of them are useful
[05:21:09] <OndraSter> dear wolfson. Why do you have one chip as 16bit registers and one as 8bit registers? :(
[05:21:15] <twnqx> ok, that doesn't even cover he only real overflow condition
[05:21:49] <twnqx> which is -maxint => 0
[05:22:50] <twnqx> unless you expand to >32bit first... hm
[06:07:00] <skroon> hi
[06:15:52] <skroon> is SPI purely a software thing, or does it also have todo with specific hardware on the AVR ?
[06:31:23] <OndraSter> skroon, you can do software SPI, but all non-attiny AVRs have got it
[06:36:23] <OndraSter> hardware SPI
[06:36:25] <OndraSter> which is much better
[06:51:55] <twnqx> s/much/somewhat/ :X
[06:52:06] <OndraSter> haha
[06:52:12] <OndraSter> well, it takes single instruction cycle to send off the data
[06:52:16] <OndraSter> on your core
[06:52:21] <OndraSter> and it is much faster
[06:52:25] <twnqx> and then you poll until it's finished
[06:52:30] <OndraSter> s/is/can be/
[06:52:40] <OndraSter> you can create simple queue :)
[06:52:42] <OndraSter> FIFO
[06:52:46] <OndraSter> and interrupts
[06:52:58] <twnqx> not if you "i send this to get data back" :X
[06:53:05] <OndraSter> then nope
[06:53:15] <OndraSter> but still, it is faster to check flag than to manually send the data
[06:53:22] <twnqx> mmhhh
[06:53:33] <twnqx> i haven't benchmarked it
[06:53:34] <OndraSter> you need to shift the data, grab the lowest bit, either set or clear the pin, ..
[06:53:46] <twnqx> i posted my code before
[06:54:11] <twnqx> given the ridiculous divider for spi i wouldn't be sure that software is slower
[06:55:24] <twnqx> if you could run the spi clock strictly at system clock, or /2, no question...
[06:57:19] <OndraSter> since that the SPI can run at fcpu/2
[06:57:24] <OndraSter> the hw is faster
[06:57:34] <OndraSter> I ran SPI on 8MHz on 16MHz atmega
[06:57:41] <OndraSter> and you can do 16MHz SPI on 32MHz xmega
[07:05:31] <twnqx> mh
[07:05:44] <twnqx> i think my can128 couldn't
[07:19:39] <RikusW> http://www.worldometers.info/
[07:23:52] <OndraSter> hmm, maybe the SPI on xmega is 8MHz only too -- would have to check datasheet. But UART in SPI mode can do 16MHz :P
[08:16:12] <cluelessperson> What the fack. http://www.youtube.com/watch?feature=player_embedded&v=DfPeprQ7oGc
[08:35:44] <Horologium> quantum physics for kindergarden
[08:36:34] <theBear> you watched the full version where he does flatland too ? that guy is a WEIRDO !
[08:36:55] <theBear> i'm not sure if he's just disturbed or really a danger to society !
[08:37:29] <theBear> i do like how he explains stuff tho, that woulda been a whole lot simpler than reading books when i was a kid
[08:42:48] <theBear> i think i like to watch him... he's kinda like the powerpuff girls but with a less annoying voice and a few less laser guns
[08:50:09] <Horologium> but, I like laser guns!
[08:50:20] <Horologium> never watched more than a couple of seconds of powerpuff girls, however.
[08:50:43] <Horologium> and, no, I didn't watch the full version..just skipped through bits of that one with the sound off.
[08:53:05] <theBear> oh, is this from that movie eh ? they shoulda put that guy in the ads, i woulda seen it then :)
[08:54:23] <theBear> i like samurai jack better than the powerpuff girls, but they make me laugh, i mean, a villian named mojo-jojo that is a monkey with a clear bubble over his brain where his skull should be ! they both by the same dude
[08:55:56] <theBear> and why has it got the deaf lawyer from my name is earl ?
[08:58:04] <Horologium> umm.
[08:58:09] <Horologium> no clue what you are talking about.
[08:58:34] <theBear> not sure it was in that version, regularly cuts to a girl and a black kid and a basketball (real people)
[08:59:05] <Horologium> still no clue.
[08:59:17] <theBear> don't worry :)
[08:59:22] <Horologium> although, I don't watch a lot of TV.
[08:59:52] <Horologium> I find most TV to be only slightly less annoying than having my toenails pulled out.
[09:00:02] <theBear> i just (almost completely) fixed a tv i was given yesterday, first one i had for a LONG time, well technically first ever, but i had capture cards and tuners before....
[09:00:29] <Horologium> wife has the TV on almost constantly but I have learned to ignore it.
[09:00:31] <theBear> cheap stuff is amazing... it weighs less than any monitor i have, but it's a huge 32" tv !
[09:01:00] <theBear> yeah, in the past that's how i worked, or when i'm staying with mum :) but i like cartoons
[09:01:08] <theBear> most of them you don't see on tv tho :)
[09:01:35] <theBear> and i don't mean manga, tho technically both the cartoons i mentioned so far are of that animation style, while american in source
[09:02:34] <Horologium> give me bugs bunny and the road runner.
[09:03:04] <theBear> indeed, an old favourite
[09:03:12] <Horologium> although, lately I've gotten hooked on "digital graphic novels" aka webcomics.
[09:03:32] <Horologium> have about 30 or so of them on my rss feed so far since I started collecting them a year ago.
[09:03:42] <Horologium> just caught up one that I started 3 days ago.
[09:03:59] <Horologium> some actual talent out there,,,if you can filter out the chaff.
[09:04:46] <Horologium> I sware, the duckies grow noticeably every day.
[09:05:12] <Horologium> got 5 rouen ducklings in my living room right now.
[09:05:30] <Horologium> they are just over a week old..and have more than doubled in size in the 7 days since we got them.
[09:08:54] <megal0maniac> Horologium: Wikipedia tells me that they're "General purpose ducks"
[09:09:01] <megal0maniac> I like that :)
[09:09:12] <theBear> hehe
[09:09:35] <twnqx> is "replacing the rubber duckies in the bath tub" on of the purposes?
[09:09:47] <megal0maniac> GPDs. Let it be known
[09:09:47] <theBear> GENERAL purpose ! of course it is !
[09:10:33] <theBear> heh, this movie aint bad, they got all the most charismatic quantum scientists on the planet
[09:10:51] <Horologium> megal0maniac, yeah...lay eggs and good eating.
[09:11:40] <megal0maniac> "they are not prolific egg layers"
[09:11:52] <Horologium> no,,,about 1 egg every 3 days or so.
[09:12:09] <theBear> hmm, so you'll need at least 6 of them :)
[09:12:20] <Horologium> not like the other ducks we have that are about 6 weeks old...when they start laying they should lay about 1 egg a day.
[09:12:21] <theBear> make them breed ! quikc !
[09:12:33] <Horologium> didn't get them for the eggs though..mostly decorative..
[09:12:43] <Horologium> we have 45 chickens for the eggs.
[09:16:59] <theBear> damn ! you must have a lot of breakfasts
[09:17:26] <Horologium> I eat about 2 eggs a week.
[09:17:30] <Horologium> we sell lots though.
[09:17:35] <Horologium> get between 24 and 30 eggs a day.
[09:23:10] <theBear> my stupid nose keeps sneezing :(
[09:23:26] <theBear> that's never happened before !
[09:25:50] <megal0maniac_afk> A:detach
[09:26:04] <megal0maniac_afk> Silly keyboard :)
[09:26:18] <Tom_itx> did it all by itself?
[09:28:36] <theBear> totally ! i just woke up and it's all sneezing ! feels all err, tickly on the inside
[09:29:16] <megal0maniac_afk> Tom_itx: ctrl didn't happen, shift did. What I get for doing it with my left hand
[09:29:30] <theBear> hehe
[09:30:39] <Horologium> theBear, snort a nodoze.
[09:31:31] <theBear> hmm, assuming that's serious, i don't got that... might be able to find a demazin or something
[09:31:56] <theBear> and it sure sounds serious :)
[09:32:01] <theBear> not to be taken lightly
[09:33:10] <Horologium> nodoze isn't available anymore...at least, not in this country I think.
[09:33:18] <Horologium> it's basically concentrated sudafed.
[09:33:43] <Horologium> truck drivers would take them to stay awake on long overnight runs.
[09:34:05] <theBear> hmm, sudafed is the other one not ephedrine right ?
[09:34:40] <Horologium> pseudoephedrine.
[09:34:46] <Horologium> which is used to make meth.
[09:34:52] <theBear> seriously ? it must be something different here
[09:34:58] <Horologium> so they pulled it off the counter...is available behind the pharmacy counter now.
[09:35:05] <theBear> well yeah, it's basically chemist grade speed
[09:35:17] <theBear> kids can buy it at 711's here
[09:35:26] <theBear> but you need a license for cold pills
[09:35:33] <Horologium> aaww man..nodoze is now just caffeine.
[09:36:06] <theBear> at least the ones that work... the new alternative 'normal' ones make me feel like i'm gonna have a heartattack, like a caffine overdose, it's horrible, AND that's a half dose AND they don't stop my nose running
[09:36:18] <theBear> but i don't think i got a cold, just something wrong with my stupid nostrils
[09:36:36] <theBear> dehydrated maybe ? cos i could fix that quicker than i am
[09:36:41] <Horologium> the new ones are caffeine...old ones might have been pseudoephedrine and caffeine combo.
[09:37:27] <theBear> but on a more serious note, will any of this really stop it being tickly and sneezing all over the shop ?
[09:37:33] <Horologium> the snorting nodoze suggestion....was supposed to be a joke, but it would remove the sneezing problem most likely...as you would be more interesting in washing out your sinuses than worrying about sneezing.
[09:37:42] <theBear> hehe
[09:37:57] <theBear> times like that you always end up doing both and it's a general disaster area :)
[10:09:15] -barjavel.freenode.net:#avr- [freenode-info] why register and identify? your IRC nick is how people know you. http://freenode.net/faq.shtml#nicksetup
[11:33:47] <langoliers> is it cool to tie the 1k5 pullup resistor to a port using vusb?
[11:34:28] <langoliers> the "disconnect function"
[11:53:58] <Tom_itx> langoliers, not sure why you would need that
[12:49:10] <langoliers> Tom_itx<= me neither ;/
[13:42:01] <s5s> Hey guys hi. I'm trying to get an avr to work with an LCD display (16x2). I got it working from first time with arduino but I like doing it with a bare MCU. I did it with a bare MCU using this library -> http://winavr.scienceprog.com/example-avr-projects/avr-gcc-4-bit-and-8-bit-lcd-library.html
[13:42:10] <s5s> is that a good LCD library?
[13:42:26] <s5s> What do people normally use
[13:44:04] <Tom_itx> use peter fleury's lib
[13:45:08] <s5s> Tom_itx: OK but his lib only supports 4 bit
[13:45:15] <Tom_itx> not true
[13:45:18] <s5s> this one seems to support 8 bit
[13:45:30] <Tom_itx> why not use 4 bit anyway?
[13:45:37] <Tom_itx> saves pins
[13:45:44] <Tom_itx> lcd's are slow anyway
[13:45:57] <s5s> I've looked at his too but this one was very easy to modify and configure because of the well laid out header file
[13:46:11] <Tom_itx> use it then
[13:46:13] <s5s> Tom_itx: I'm not saying you should - i'm just saying it's supported
[13:46:47] <s5s> I think this library is a derivation of Pete's library anyways
[13:47:33] <s5s> I was thinking of actually writing a makefile to get the arduino libraries to work without the IDE...and with a bare .c file
[13:47:46] <s5s> but there are libraries for that
[14:03:23] <iSaleK> I have a code that is running PWM on OC0A (PB2), how can I change the code to run on OC0A and OC1A at the same time?
[14:03:48] <Tom_itx> set the time 1 up too
[14:03:56] <Tom_itx> OC0 is timer1
[14:04:02] <Tom_itx> OC1 is timer2 probably
[14:04:24] <langoliers> 2k in series with all icsp pins if fine for protection?
[14:04:29] <langoliers> *is
[14:04:33] <Tom_itx> otherwise set up the OC1x registers up
[14:04:51] <Tom_itx> 1k is probably enough
[14:05:09] <langoliers> they might tie them in any way ;/
[14:05:14] <Tom_itx> but why?
[14:05:20] <langoliers> because... technicians
[14:05:37] <langoliers> oh snap, this output went to +12V ...
[14:05:44] <iSaleK> At the moment I have OCR0A and OCR0B set up, but only one PWM (OCR0A) is working and other one isn't... :\
[14:06:35] <langoliers> currently the weak point of my design is the +5V output ;/
[14:06:59] <langoliers> if they tie that to gnd, things will some
[14:07:04] <langoliers> *smoke
[14:07:34] <Tom_itx> iSaleK, http://tom-itx.dyndns.org:81/~webpage/avr/mega128/pwm_test/
[14:07:56] <langoliers> i don't need that, - if i would drive an led with + output not needing Vdd
[14:08:06] <Tom_itx> iSaleK, that uses OCR1A B & C
[14:08:16] <Tom_itx> same idea
[14:08:16] <langoliers> but atmels don't like to drive more than 5mA
[14:08:29] <Tom_itx> 5A!
[14:08:51] <langoliers> and i think i should use an N-fet
[14:08:52] <iSaleK> Can someone please take a look why doesn't my OCR0B work on Tiny2313 ? -> http://pastebin.com/HJyJKW38
[14:09:48] <langoliers> p-fets and pnp transistors are only used when nothing else works
[14:11:56] <iSaleK> Could anyone please help?
[14:14:01] <RikusW> iSaleK: TCCR0A = 0b11110011; // Fast PWM 8 Bit
[14:14:05] <Tom_itx> OC0B is on PORTD
[14:14:10] <Tom_itx> dude
[14:14:25] <Tom_itx> set the DDRx reg
[14:14:57] <Tom_itx> you set it for B but not D
[14:15:35] <Tom_itx> if that don't get it, i'll read line 2
[14:16:50] <RikusW> TCCR0A = (1<<COM0A1) | (1<<COM0A0) | (1<<COM0B1) | (1<<COM0B0) | (1<<WGM01) | (1<<WGM00);
[14:17:01] <RikusW> iSaleK: this is the right way to do it
[14:17:14] <Tom_itx> saiz u
[14:17:20] <Tom_itx> but i concur
[14:17:36] <RikusW> I've seen bits move around between different AVRs
[14:17:47] <RikusW> so for portability its a good thing
[14:17:49] <Tom_itx> yeah
[14:18:04] <Tom_itx> i sometimes have to change a name or two but most things work
[14:18:16] <RikusW> doing hex/bin on port registers may be allowable ;)
[14:18:56] <OndraSter> RikusW, unless it moves between registers
[14:19:08] <Tom_itx> yeah i've run across that
[14:19:49] <Tom_itx> waiting for boards
[14:19:59] <RikusW> he forgot the COM0Bx bits...
[14:20:14] <Tom_itx> possibly, i didn't look past the DDRx regs
[14:20:17] <RikusW> and ddR bits..
[14:20:19] <RikusW> DDR
[14:20:34] <RikusW> look at TCCR0!
[14:20:35] <RikusW> !
[14:20:36] <RikusW> A
[14:20:49] <Tom_itx> waiting to hear back from him before i waste any more time
[14:21:04] <RikusW> yep
[14:21:08] <iSaleK> DDRD is now working :)
[14:21:20] <iSaleK> Thank you, I'm tired and didn't see that :\
[14:35:31] <stanreg> Once my ADC params are configured; if I want to sample on, say PA0 and PA1, all I have to do is change the channel in ADMUX?
[14:36:29] <specing> What does the datasheet say?
[14:37:04] <stanreg> specing: incomprehensible :P
[14:37:21] <specing> wait
[14:37:23] <specing> WAIT
[14:37:26] <specing> WHAT
[14:37:36] <specing> ATMEL datasheets incomprehensible?
[14:37:51] <specing> where? I want to see that marvell
[14:37:57] <stanreg> Well that section wasn't very friendly, to say the least.
[14:38:02] <stanreg> Oh, was that sarcasm? :)
[14:42:43] <specing> my chips' ds is quite clear on what to do
[14:43:23] <specing> So I wonder what weird chip you are using to have such incomprehensible instructions
[14:43:35] <OndraSter> yes
[14:43:59] <Malinuss> stanreg, stanreg you need to 1) set the mux 2) turn the adc on 3) start read. also wait, after each change of mux for x msec, it needs to settle
[14:44:28] <stanreg> Malinuss: gotcha
[14:45:15] <Malinuss> stanreg, I have a "read adc" function somewhere, not optimal (using delay), but you will get the point, if you want it
[14:45:49] <stanreg> Malinuss: similar to this? http://www.edaboard.com/thread278171.html#post1192304
[14:46:06] <Malinuss> yeah, something like taht
[14:46:52] <s5s> Guys, I'm using an LCD (16x2 text) and I'm programming it through a library. I can read (and have) the source code of the library and some things are very clear. However, I'd like to look at a tutorial/specification of how LCDs work. Anyone know one? All I find is examples using libraries
[14:47:10] <stanreg> Malinuss: How do you establish which channel goes to which pin? Is there a table that I missed in the datasheet?
[14:47:16] <specing> s5s: search for HD44780 datasheet
[14:47:18] <Malinuss> s5s, 1) google the datasheet 2) success
[14:47:19] <specing> s5s: Hitachi
[14:47:26] <Malinuss> ^
[14:48:08] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/pdf/hd44780.pdf
[14:48:11] <Tom_itx> look no further
[14:48:19] <Malinuss> stanreg, yes, there is a table you missed in the datasheet (normally the table is 0.5-2 pages, so it's a pretty big miss, since the adc chapter is only like ~10 pages)
[14:48:53] <s5s> specing: Malinuss thank you very much :)
[14:49:39] <specing> s5s: code your own library for it
[14:49:48] <specing> s5s: see if you brake my 44 byte record
[14:50:05] <Malinuss> ^that is in general the best thing you can do
[14:50:21] <s5s> Malinuss: coding your own library?
[14:50:40] <Malinuss> s5s, aye. Only way to learn the hardware to known, actually
[14:51:07] <s5s> Yep...And from the looks of it this hardware is going to be around for a while
[14:52:27] <s5s> I think I might code myself a world clock :P
[14:55:44] <specing> s5s: Nice, you'll be able to code a nice time-drift adjustment/synchronization algorithm
[14:56:26] <kdehl> So, once again I'm developing a PS/2 keyboard driver. I use an interrupt that receives the scancode bit by bit, and when a finished scancode is received I signal this by setting a flag that I keep checking in the main loop.
[14:56:40] <kdehl> Now, question is, should I also parse this scancode inside of the interrupt, and only signal to the main loop when a complete key code is created or is that too much to do in an interrupt routine?
[14:57:22] <Tom_itx> how fast can you type?
[14:57:46] <specing> kdehl: need any PS/2 mice? I need to get rid of my "collection"
[14:58:10] <kdehl> specing: Actually, yes. I'd love to have a real PS/2 mouse.
[14:58:19] <kdehl> Tom_itx: You mean if I get a lag if I type too fast?
[14:58:34] <Tom_itx> if you miss characters
[14:58:39] <kdehl> No, I don't.
[14:58:56] <kdehl> But right now I just dump the scan code. I haven't even started converting them into key codes yet.
[14:59:24] <kdehl> And I do put scancodes into a buffer.
[14:59:50] <langoliers> anybody got a clue wtf is avr-geany doing?
[15:00:01] <specing> kdehl: too bad you are so far away
[15:00:09] <langoliers> it compiles elf executables lol
[15:00:19] <langoliers> with avr-gcc
[15:00:48] <langoliers> avr-gcc -Wall -c "%f"
[15:19:27] <specing> magic.
[15:54:13] <stanreg> [ADC] So, if I get this right, selecting channel 0 on the ADC's mux means that it will be processing PA.0, whereas selecting channel 7 means it will be processing PA.7, is that right?
[15:56:51] <specing> stanreg: depends on the chip
[16:00:05] <Malinuss> stanreg, one of the few first pages of datasheet shows all the pins (and their alternative functions)... so PINA0 = ADC0 (that is not right, just an example)
[16:00:27] <stanreg> AHH, yes.
[16:00:29] <stanreg> Got it
[16:00:42] <stanreg> Thanky
[16:01:02] <Malinuss> np stanreg , just got your first uC :)?
[16:02:32] <stanreg> Malinuss: heh, well I've programmed with the 2313 in assembler before to do simple things, but now looking at the atmega32 in class and using 'intermediate' functions (ADC, USART) -- Also, doing it in C, which is, IMHO, terrible. You miss a semicolon somewhere, your code doesn't work.
[16:05:09] <Malinuss> stanreg, haha oh wow, you are propably the only currently person on the planet with that opinion, enjoy. Also it will go away soon, when you get used to C (obviously I assume you don't program in general?). Also for the record, the "functions" are called peripherals, and are like, "additions" to the uC you can play with.
[16:06:23] <specing> stanreg: from now on, I will use you as -O4
[16:06:27] <specing> (for my C code)
[16:07:03] <stanreg> specing: is that an optimise flag?
[16:07:13] <specing> Now it is
[16:07:54] <stanreg> Lack of syntax on assembler is great
[16:08:12] <stanreg> IIRC, Python wasn't too anal on syntax either.
[16:09:07] <Malinuss> stanreg, wut? The only thing about C, you have to remember the ; and the {} have to pair. in pyton - you place a accidental space, and you are fucked
[16:10:10] <stanreg> Malinuss: hah, fine. Just seemed to me that Py was easier to learn than C.
[16:10:20] <stanreg> Also, there's something I'm struggling with..
[16:10:36] <Malinuss> it might be, I started with C, so I wouldn't know
[16:10:38] <stanreg> For example, this syntax: ADCSRA|=(1<<ADEN)
[16:10:42] <stanreg> What the hell does that mean?
[16:11:07] <stanreg> In assembler, if you wanted to place a bit, you simply place an immediate in the register.
[16:11:12] <Malinuss> stanreg, ah, let me link
[16:11:43] <Malinuss> stanreg, some bit math explenation, and how to do it in C: http://playground.arduino.cc/Code/BitMath
[16:11:49] <Malinuss> nice tutorial
[16:12:25] <stanreg> Thanks, I'll have a look. I prefer logical operations, by far.. to this << stuf.
[16:13:06] <stanreg> Hmm, so << is a logical shift left.
[16:13:30] <stanreg> Good page, thanks!
[16:13:34] <Malinuss> stanreg, at least read the article I lined to, pleas
[16:13:40] <stanreg> Yep
[16:13:47] <Malinuss> If you have further question, I will try to help
[16:13:58] <stanreg> Thanky!
[16:33:34] <langoliers> Tom_itx<= how do you program your fuses with avrdude ?
[16:34:12] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/using_avrdude_index.php
[16:34:43] <Tom_itx> http://www.engbedded.com/fusecalc/
[16:34:48] <Tom_itx> verify what you want there first
[16:35:00] <langoliers> thanks
[16:35:12] <langoliers> i read that changing fuse needs -u turning off safe mode
[16:35:13] <Tom_itx> it will give you an avrdude string at the bottom
[16:36:04] <langoliers> i just want my lowfuse to e2 now, so i disable the clkdiv8 and have 8MHz internal osc
[16:36:30] <Tom_itx> then just program the one fuse
[16:36:34] <Tom_itx> lf
[16:37:18] <langoliers> it is nice to always specify my fuse settings with the program?
[16:37:32] <Tom_itx> you mean in the notes?
[16:37:34] <langoliers> eg. fuse don't change
[16:37:47] <Tom_itx> in a year it will be
[16:38:09] <Tom_itx> then you'll remember what you did
[16:39:40] <langoliers> :)
[16:40:07] <langoliers> avrdude chip erases before programming and resets fuse bytes to default?
[16:40:26] <Tom_itx> chip erase doesn't affect the fuses
[16:40:32] <Tom_itx> afik
[16:40:44] <langoliers> oh okey, so it only clears the lock bits
[16:41:14] <Tom_itx> not sure about the lock bits, i've never used them
[16:41:29] <langoliers> well it must, otherwise you can't program your flash anymore
[16:41:45] <Tom_itx> may require HVPP etc to clear them
[16:42:25] <Tom_itx> that's kinda the idea behind the lock bits :)
[16:43:39] <langoliers> is there any diff between 168p 168a 168pa in avr-gcc ? or just write whatever of these?
[16:43:45] <OndraSter> jadew, http://clip2net.com/s/4Xb02m
[16:43:49] <OndraSter> you might appreciate it :P
[16:43:53] <OndraSter> it requires mysql though..
[16:44:07] <OndraSter> (fastest to use for me)
[16:44:12] <OndraSter> and the easiest one
[16:44:19] <Tom_itx> there may be suttle differences, i'm not sure
[16:44:35] <Tom_itx> probably not
[16:44:40] <langoliers> my avr-gcc don't like atmega168pa, but works with -mmcu=atmega168p
[16:44:51] <Tom_itx> there is no pa header
[16:44:56] <Tom_itx> that i'm aware of
[16:44:59] <OndraSter> pa ~= p
[16:45:05] <OndraSter> just uses less power
[16:45:06] <OndraSter> I think
[16:45:12] <OndraSter> (at least with mega128/128a)
[16:45:20] <langoliers> hm, yeah, the difference is well hidden by atmel :)
[16:45:38] <langoliers> and the docs are formatted differently
[16:45:53] <Tom_itx> different indian authors
[16:45:57] <langoliers> ^^
[16:46:31] <Tom_itx> who can't speak english to begin with
[16:47:04] <Tom_itx> </slam> against tech support
[16:47:21] <langoliers> OndraSter<= yeah the p suffix thing uses microwatts and they work down to 1.8V
[16:48:50] <langoliers> avrdude -y nice feature? http://www.nongnu.org/avrdude/user-manual/avrdude_4.html
[16:49:03] <langoliers> Tells AVRDUDE to use the last four bytes of the connected parts’ EEPROM memory to track the number of times the device has been erased.
[17:01:55] <OndraSter> better
[17:01:56] <OndraSter> http://clip2net.com/s/4XbbBY
[17:04:28] <MarkX> in atmel studio 6, i went to the extension manager, and installed this >> http://gallery.atmel.com/Products/Details/59f92368-9427-4c61-b03b-e75ad6329199? << but i don't know where i can start said training. can someone please point me to the right direction
[17:05:07] <specing> OndraSter: lolfarnell
[17:05:18] <OndraSter> @prices? :P
[17:05:26] <specing> @yep
[17:05:31] <OndraSter> hehe yep
[17:05:36] <OndraSter> I am getting it off german one, because czech one converts it to CZK
[17:05:41] <OndraSter> which nobody wants, since mouser works in € :P
[17:05:52] <specing> I get weekly offers from them
[17:06:03] <specing> 25% discount on 200 MHz scope
[17:06:09] <specing> YAY *click*
[17:06:09] <OndraSter> wow
[17:06:12] <OndraSter> but still more expensive :P
[17:06:22] <specing> find out it costs 2000 eur
[17:06:27] <specing> /facepalm
[17:06:36] <vsync_> lol
[17:06:45] <OndraSter> digikey: 1500 eur
[17:06:45] <OndraSter> lol
[17:06:45] <vsync_> why not digikey
[17:07:46] <OndraSter> shipping
[17:07:46] <OndraSter> I am an european
[17:07:59] <specing> *monster
[17:08:26] <vsync_> well buy a bigger bunch so you can sink the shipping costs
[17:08:47] <OndraSter> *a monster
[17:08:47] <OndraSter> that maybe too
[17:08:47] <OndraSter> I wish farnell and mouser and everybody else would do proper XML exports
[17:08:53] <OndraSter> of all their products (or categories, or whatever)
[17:09:15] <vsync_> that thing you posted screens out of, some sort of a program of yours? a crawler?
[17:09:27] <OndraSter> search, ..
[17:09:27] <OndraSter> parsing HTML sucks
[17:09:27] <OndraSter> I just regex the prices
[17:09:43] <vsync_> well some would say that'd be almost redundant
[17:12:33] <langoliers> http://www.nongnu.org/avrdude/user-manual/avrdude_4.html < why they write "The typical limit for Atmel AVR FLASH is 1000 cycles." while the atmel atmega datasheet states: Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
[17:12:46] <OndraSter> vsync_, shipping.. I would order above $200 to get zero shipping
[17:12:46] <OndraSter> BUT
[17:12:47] <OndraSter> in order to import it
[17:12:47] <OndraSter> you need to have some form
[17:12:49] <OndraSter> that needs to be made for each combination of <some identification number of the type of the product> and the origin country
[17:12:49] <OndraSter> so if you have got 29 items on your list
[17:12:50] <OndraSter> you'd need maybe 10 forms
[17:12:51] <OndraSter> last time it took him 1 hour to make one for everything, which was not properly legal. But they did not notice
[17:12:52] <OndraSter> and it took bloody $20
[17:12:52] <OndraSter> it should have been $40 for the paper
[17:12:53] <OndraSter> then $40 for the VAT
[17:12:55] <OndraSter> yeah
[17:12:56] <OndraSter> joys of importing
[17:13:14] <specing> that was some fast typing
[17:13:41] <langoliers> lag
[17:14:06] <vsync_> OndraSter: true, i'm EU too, and they tightened up importation laws over here this january
[17:14:13] <vsync_> in finland that is
[17:14:52] <vsync_> so now i'd have to pay a customs fee (unsure of the amount, under 10% though), + VAT 24%
[17:15:15] <w|zzy> ouch
[17:15:22] <vsync_> some say that some packets go through the customs unnoticed but so far each parcel i've gotten has gone through the customs and got held up there
[17:15:45] <specing> 24% VAT? ouch.
[17:15:49] <OndraSter> vsync_, and that is mine app that you will give link, it will download the name (maybe as an option). THen you will be grouping them into projects as BOMs
[17:15:49] <OndraSter> it will be calculating where to order from for it to be the cheapest for given amount of boards
[17:15:49] <OndraSter> I am sick of keeping excel tables and manually updating prices every now and then
[17:15:50] <OndraSter> and not crossreferencing the same items etc
[17:16:25] <vsync_> alright :)
[17:16:33] <specing> Please code it in some normal language so we can all use it
[17:16:38] <vsync_> specing: yeh, 24%. But we do have quite the nice public healthcare... rofl
[17:16:55] <OndraSter> why is everybody so quiet
[17:17:10] <specing> AAAAAAAAAAAA
[17:17:12] <specing> AAAAAAAAAAAAAAAAAAAAAAAAAAA
[17:17:14] <specing> there
[17:17:15] <vsync_> I get a small share back outta that when I go pick up my meds :) since the government pays ~95% for them :)
[17:17:37] <w|zzy> What about those who don't need meds?
[17:17:49] <vsync_> well, they'll just pay some for mine then
[17:17:55] <w|zzy> Tax in finland is ridiculous
[17:17:58] <vsync_> too bad, they oughta catch something
[17:18:24] <specing> we have 20% here and its still ridiculous
[17:18:25] <Tom_itx> farnell ran a sale on some stuff i wanted but they didn't have stock on the sale items
[17:19:02] <vsync_> thing is, you can't please everyone. Now I'm all satisfied with the tax levels being as they are. I wouldn't want the greek, italian or american systems
[17:19:08] <Tom_itx> they probably would have shipped from the factory but still..
[17:19:21] <vsync_> greeks, where anything goes. Italy, where no-one pays em, and in America, everything's just fubar'd by default
[17:19:26] <Tom_itx> you're happy with taxes????
[17:19:27] <Tom_itx> wtf
[17:19:33] <vsync_> public healthcare is something i highly value
[17:19:47] <Tom_itx> how long a line do you have to wait in?
[17:19:57] <vsync_> it all depends
[17:20:11] <Tom_itx> if you need a heart transplant are you gonna die first?
[17:20:15] <vsync_> i'm not saying it's as good as the private sector, but it's there
[17:20:33] <vsync_> Tom_itx: well, that's a highly hypothetical question
[17:20:45] <vsync_> don't think anyone can answer that
[17:20:54] <nevdull> ask jeeves
[17:21:04] <vsync_> i'll ask devnull
[17:21:18] <nevdull> 2 &> /me
[17:21:28] <vsync_> !
[17:21:39] <OndraSter> specing, yes, C# with mysql database
[17:21:45] <specing> oh my
[17:21:50] <OndraSter> simple code, MONO compatible :P
[17:22:19] <specing> OndraSter: how about using C++ with QT for gui and SQLite so you don't have to keep a database server up and running all the damn time?
[17:22:36] <OndraSter> because mysql was easier for me
[17:22:53] <OndraSter> I will be having exams in a few weeks, I should be learning linear algebra right now
[17:23:10] <Tom_itx> yes you should be
[17:23:34] <vsync_> hmmm, sounds boring
[17:23:54] <Tom_itx> so does sitting here chatting but i'm here
[17:24:02] <OndraSter> ;)
[17:24:07] <OndraSter> yeah, linear algebra sucks
[17:24:12] <OndraSter> I think I will be repeating it
[17:24:15] <OndraSter> just as math analysis :D
[17:24:25] <OndraSter> I focused on all the other subjects
[17:24:27] <OndraSter> other than math crap
[17:24:33] <OndraSter> like.. programming :P
[17:24:35] <specing> I love that math crap
[17:24:36] <OndraSter> (C++)
[17:24:38] <OndraSter> I hate it
[17:24:49] <vsync_> life is a math course
[17:24:53] <vsync_> wait
[17:24:58] <OndraSter> lies
[17:25:00] <vsync_> life's like a math course
[17:25:04] <vsync_> you never know
[17:25:09] <OndraSter> lol
[17:25:16] <Roklobsta> math rawks. pay close attention in your numerical anaysis classes
[17:25:19] <specing> I know pretty well
[17:25:24] <vsync_> :D
[17:25:31] <OndraSter> haha
[17:25:33] <OndraSter> the thing is
[17:25:34] <Roklobsta> math*s*
[17:25:41] <OndraSter> it is all theory -- learning all the theorems and definitions
[17:25:46] <specing> yes
[17:25:50] <OndraSter> almost no counting
[17:25:55] <specing> that is the foundation of everything
[17:25:56] <OndraSter> GIMME NUMBERS OR LETTERS TO COUNT WITH
[17:26:00] <OndraSter> I do not want your definitions
[17:26:25] <specing> Our professor once made an example of the definition
[17:26:27] <OndraSter> linear algebra is a mindfuck - they tell you that in some linear space a*b is defined as a+b*3
[17:26:31] <OndraSter> as an example
[17:26:40] <specing> he swapped all the a,b,c with x,y,z -- there you go
[17:27:11] <specing> OndraSter: what is wrong with that?
[17:27:20] <OndraSter> mindfuck
[17:27:29] <specing> ...and?
[17:27:33] <OndraSter> it is like if in C++ somebody would write
[17:27:35] <specing> Its cool.
[17:28:05] <OndraSter> yourtype operator+(const yourtype& c) { return this->a*c.a; }
[17:28:19] <OndraSter> which, in the programming classes, is defined as a bad code
[17:28:26] <OndraSter> (unless it is really how it should be)
[17:28:54] <specing> how it should be == makes sense on the objects you are dealing with
[17:28:59] <OndraSter> heh
[17:29:04] <OndraSter> I prefer not to deal with them at all.
[17:29:10] <specing> which could very well be one of those vector spaces ;)
[17:29:29] <OndraSter> OT: Anybody wants a job as a security person for a big company? (viaForensics)
[17:29:50] <OndraSter> I was offered a job based on one article about me on the internet... but they require bachelor degree etc
[17:30:00] <langoliers> ah, waterfall of text
[17:33:15] <OndraSter> so, which country (english speaking) would you move out to? UK -- europe, would not help myself much. Aus -- spiders, dropbears, snakes. USA - fubar supposedly by many people
[17:33:18] <OndraSter> leaves NZ and CAN
[17:33:57] <vsync_> can too cold
[17:34:01] <vsync_> nz too upside down
[17:34:20] <vsync_> i'd happily move to somewhere in the bahamas
[17:34:41] <OndraSter> haha
[17:34:52] <OndraSter> ofc job required there
[17:34:55] <specing> OndraSter: mars
[17:34:59] <OndraSter> I don't mind "too upside down"
[17:35:20] <OndraSter> can too cold... I use shorts anytime over 5°C
[17:35:28] <OndraSter> err, over 10°C
[17:35:35] <OndraSter> t-shirt above 5 °C
[17:36:52] <vsync_> these winters under -20 C, and the darkness
[17:36:57] <vsync_> don't really dig it that much
[17:37:23] <vsync_> i need a beach, white sand and clear waters
[17:37:28] <vsync_> that'll do
[17:37:58] <OndraSter> haha
[17:38:02] <OndraSter> and money where from?
[17:38:11] <vsync_> dunno, lottery i guess
[17:38:15] <OndraSter> :P
[17:38:23] <OndraSter> so, Prague bought some "nice notification signs"
[17:38:27] <OndraSter> with colour display
[17:38:28] <OndraSter> LEDs
[17:38:32] <OndraSter> well, one was $150k
[17:38:47] <OndraSter> I spoke with one person who works in a company who made an offer to the govt
[17:38:54] <OndraSter> guess what is the manufacturing price for each of these signs..
[17:39:05] <OndraSter> or at least what was their offer
[17:39:08] <OndraSter> which DID NOT win
[17:39:51] <OndraSter> ..
[17:39:53] <OndraSter> $1k5
[17:39:53] <vsync_> um
[17:39:58] <vsync_> yea
[17:40:07] <OndraSter> bribing at its best
[17:40:11] <vsync_> well, there's been some backrubbing action
[17:40:13] <vsync_> usually is
[17:42:04] <vsync_> mmm
[17:42:57] <vsync_> well, this one philosopher (and his 'agency') was paid 700 k€ for doing a sort of a thesis on future views...
[17:43:32] <vsync_> the result is this blue book...
[17:43:45] <vsync_> which offers nothing new on any views of mostly anything
[17:43:50] <OndraSter> lol
[17:44:02] <vsync_> and there were rivalling agencies who would have pulled that off with 50-200k
[17:44:31] <vsync_> the thing as a whole was nonsense anyway. But someone collected taxpayer's money... :p
[17:44:34] <specing> OndraSter: Maribor bought some stationary radars (for vehicles)
[17:44:38] <specing> they bought 30
[17:44:46] <specing> 1 million eur each....
[17:44:55] <specing> /facepalm
[17:45:14] <vsync_> well, chances are they're some hella hi-tech radars!
[17:45:58] <RikusW> Tom_itx: Chip erase sets fuses to 0xFF
[17:46:09] <RikusW> err lockbits
[17:46:15] <RikusW> fuses are unaffected
[17:46:19] <Tom_itx> does it?
[17:46:24] <Tom_itx> i've never used lock bits
[17:46:33] <RikusW> it needs to
[17:46:48] <RikusW> otherwise locking goes one way only...
[17:47:09] <RikusW> I've used the bootloader lockbit and CE resets it to 0xFF
[17:47:14] <RikusW> instead of 0xEF
[17:47:38] <OndraSter> RikusW, http://clip2net.com/s/4XbbBY
[17:48:05] <RikusW> OndraSter: seen it it #hv whats it for ?
[17:48:13] <RikusW> load cells ?
[17:48:15] <OndraSter> for keeping BOMs
[17:48:19] <OndraSter> with prices
[17:48:24] <OndraSter> that can be easily updated
[17:48:26] <RikusW> I meant the part nr
[17:48:39] <OndraSter> huh?
[17:48:47] <RikusW> TLV2372
[17:48:54] <OndraSter> oh, it is opamp
[17:49:06] <OndraSter> for VU meter :P
[17:49:38] <RikusW> Tom_itx: and then there is the EESAVE fuse which prevents CE from erasing the eeprom
[17:49:54] <OndraSter> yep
[17:50:09] <Tom_itx> don't complicate the poor noob
[17:53:33] <MarkX> in atmel studio 6, i went to the extension manager, and installed this >> http://gallery.atmel.com/Products/Details/59f92368-9427-4c61-b03b-e75ad6329199? << but i don't know where i can start said training. can someone please point me to the right direction
[18:30:44] <MarkX> anyone?
[18:37:44] <Horologium> ??
[18:37:49] <Horologium> http://www.youtube.com/watch?v=oF0pMILT7_Y
[18:43:34] <Tom_itx> MarkX, ask abcminiuser when he logs in
[18:43:48] <MarkX> Tom_itx: kk will do! thanks!
[18:43:54] <Tom_itx> he works for them
[18:44:30] <MarkX> neat
[18:52:45] <Tom_itx> MarkX, what are you trying to do?
[18:54:05] <MarkX> well i want to start working on USB communications
[18:54:21] <MarkX> but there are 3 different things that i've found
[18:54:33] <MarkX> v-usb, lufa, and pjrc
[18:54:41] <MarkX> since im using atmega32u2 i don't need v-usb
[18:55:15] <MarkX> so i'm trying to the pjrc one, but while reading up on it, i came across the extension manager which had the USB integration training
[18:55:21] <MarkX> so i figured i'd watch/try that
[18:55:29] <MarkX> but after installing, i can't seem to find out how to start said training
[18:59:25] <Tom_itx> go with lufa
[18:59:52] <MarkX> why do you say that?
[19:00:13] <Tom_itx> cause abcminiuser wrote it
[19:00:18] <Tom_itx> and he's here alot
[19:00:19] <MarkX> ah
[19:00:23] <MarkX> hehehe
[19:00:41] <Tom_itx> and it's free
[19:00:51] <Tom_itx> unless you plan to use it commercially
[19:01:23] <MarkX> well so far the examples i've learned from have been using the pjrc usb.c file
[19:01:33] <MarkX> is that deprecated?
[19:01:40] <Tom_itx> no clue
[19:01:57] <Tom_itx> lufa is in the studio gallery now though
[19:01:59] <Tom_itx> :)
[19:02:12] <MarkX> yea i saw that
[19:02:23] <Tom_itx> i think he did that a week or two ago
[19:03:18] <MarkX> oh ok
[19:05:15] <MarkX> hmm
[19:05:31] <MarkX> i think the pjrc usb.c is a custom implementation of usb into the project design
[19:06:19] <Tom_itx> i know his bootloader is proprietary and he doesn't wanna share it
[19:06:26] <Tom_itx> enough reason for me to walk
[19:06:46] <MarkX> oh? didn't know that
[19:06:57] <MarkX> the device i got just uses DFU
[19:07:01] <MarkX> cause its not a teensy
[19:07:32] <s5s> Oh geez I don't know why I can get an simple LCD to work with arduino (using the arduino only as a programmer for avr-gcc + makefile) but the same damn makefile (sligtly fixed) and same exact chip doesn't work....
[19:07:36] <MarkX> its almost like the one you have on your website
[19:07:38] <s5s> same pinout too
[19:09:55] <MarkX> welp looks like lufa it is
[19:12:02] <Tom_itx> he's got quite a few examples in it
[19:12:25] <MarkX> yep
[19:12:33] <MarkX> do you know how i can access them in atmel studio?
[19:12:45] <Tom_itx> http://www.fourwalledcubicle.com/LUFA.php
[19:13:04] <Tom_itx> he's got a doxygen on it
[19:13:41] <Tom_itx> trunk\demos or trunk\projects
[19:14:05] <MarkX> yea i got the doxygen integrator as well
[19:23:21] <MarkX> oh nice! all the projects show up in "new example project from ASF or Extensions"
[19:42:12] <s5s> Why cab U drive a LCD though arduino but not through a stand alone MCU...am I missing fuses?
[19:42:19] <s5s> arduino fuses show as all set
[19:42:23] <s5s> *programmed
[19:42:45] <Tom_itx> i noticed one of the lines wasn't used in arduino stuff
[19:42:50] <Tom_itx> or vice versa
[19:42:55] <Tom_itx> lemme see here...
[19:43:00] <Tom_itx> maybe RW
[19:43:30] <s5s> Tom_itx: RW is always set to GND
[19:43:34] <s5s> on arduino
[19:43:56] <Tom_itx> well i was looking at the reprap code that supported lcd
[19:44:00] <s5s> But I just use the arduino as a programmer. I write my code in pure C with avr-gcc libraries
[19:44:11] <Tom_itx> mine all work
[19:44:12] <Horologium> what speed is the chip running at?
[19:44:14] <Tom_itx> what chip is it?
[19:44:21] <s5s> Horologium: 1MHz
[19:44:28] <Tom_itx> you got F_CPU defined?
[19:44:31] <s5s> Horologium: yea I thought about that
[19:44:40] <s5s> Tom_itx: yes 1000000
[19:44:44] <Tom_itx> what chip?
[19:44:48] <Horologium> 4bit or 8bit mode?
[19:44:54] <s5s> 328p PU
[19:45:01] <s5s> Horologium: 8 bit
[19:45:02] <Tom_itx> i think he was using 8 bit
[19:45:04] <Tom_itx> or asking about it anyway
[19:45:17] <Horologium> then out of my area...I always use 4bit..
[19:45:42] <s5s> Horologium: I can swtich to 4 bit but I used 8 bit on arduino too
[19:45:43] <Tom_itx> same here but fleury's lib should support both
[19:45:52] <Horologium> it does.
[19:46:18] <Horologium> what I use is a stripped down modded fleury lib.
[19:46:35] <Tom_itx> mine is a derivative of it as well
[19:46:47] <Horologium> but, I stuff it through i2c to a pcf8574 chip that drives the lcd.
[19:54:58] <Tom_itx> well it does say his lib doesn't support 8bit io port mode
[19:56:07] <s5s> Ohhhh that piece of shit works....it only doesn't display shit (for some reason) when I've applied the LEDs on
[19:56:49] <s5s> Why??? It had no problems to display text when I had arduino + LEDs
[19:59:35] <s5s> THe LED kills the contrast...
[20:04:37] <vectory> vref is too low, that kills the contrast
[20:04:42] <vectory> can that be?
[20:05:06] <Tom_itx> could be
[20:06:13] <s5s> vectory: funny both my arduino and this board use a usb...I wonder why the arduino was fine
[20:06:13] <vectory> and the led backlight increases the effect by altering the voltage/current which vref sees
[20:07:01] <vectory> s5s: well, at least you know now that your programming is fine :)
[20:08:00] <vectory> s5s, if in doubt, dont pay me attention ;)
[20:09:00] <vectory> s5s: or you could meassure the lines on both boards
[20:14:58] <s5s> vectory: OK yeah got this
[20:15:14] <s5s> The thing that got me is that it worked on ubuntu but didn't work here.
[20:15:22] <s5s> *arduino
[20:15:33] <s5s> arduino must have some extra resistors
[20:22:12] <vectory> that should be easy to trace on the board. could it be internall pullups/downs, tho?
[20:22:45] <vectory> dont really know the internals, too long ago that i looked at a datasheet or tutorial. shame on me
[20:22:47] <Tom_itx> or just look at their schematic
[20:26:45] <vectory> can you german? "Bei einem positiven Temperaturkoeffizienten
[20:26:45] <vectory> (TK) der Spannung UZ
[20:26:48] <vectory> "
[20:28:17] <vectory> oh, well. you prolly dont know we use U instead of V.
[20:35:16] <langoliers> why can't atmel put a mux in the microcontrollers that sets default fuses for programming mode ?
[20:37:16] <vectory> because they have bootloaders for that, maybe
[20:39:21] <langoliers> oh probably
[20:44:57] <stanreg> Got a 3v relay that seems to memorises its position even when turned off. Pins are: [A] [In1] [Out] [In2] [B]. As soon as A=3v and B=0v, Out & In1 conduct. You can hear a click when that happens. Disconnecting A and B does not hamper that conductivity. By inversing A and B, eg: A=0v and B=3v, a new click is heard, now Out & In2 conduct.
[20:45:14] <stanreg> Err, I think my last msg got cut.. let me retry.
[20:45:25] <stanreg> Got a 3v relay that seems to memorises its position even when turned off. Pins are: [A] [In1] [Out] [In2] [B]. As soon as A=3v and B=0v, Out & In1 conduct. You can hear a click when that happens.
[20:45:31] <stanreg> Disconnecting A and B does not hamper that conductivity. By inversing A and B, eg: A=0v and B=3v, a new click is heard, now Out & In2 conduct.
[20:45:38] <stanreg> According to the datasheet, that relay only needs 17mA to 'work' (to 'click'). Then, I believe the port can be disconnected.
[20:45:44] <stanreg> My question is: can one connect it directly to an AVR port? Is it too much current for a split second?
[20:46:46] <Tom_itx> you need a diode on the relay or you may likely blow the port pin from back emf
[20:47:43] <stanreg> Tom_itx: Will I need to put a diode on the two lines? (A and B)
[20:48:45] <Tom_itx> i don't know what sort of relay you have
[20:48:55] <Tom_itx> but you need a diode across the coil
[20:49:01] <stanreg> hmm
[20:49:30] <Tom_itx> to prevent spikes from getting back to the avr pin from the coil
[20:50:17] <stanreg> Would that mean a diode on the two lines exiting the avr?
[20:50:24] <stanreg> One on each line?
[20:51:40] <Tom_itx> http://www.hamlin.com/specsheets/HE700.pdf
[20:51:50] <Tom_itx> look at P2 for a wiring example of the diode
[20:52:16] <Tom_itx> those relays come with the diode inside
[20:53:12] <stanreg> hmm
[20:53:25] <stanreg> Here's mine.. let's look: http://datasheet.octopart.com/TXS2-L2-3V-Panasonic-datasheet-10129838.pdf
[20:53:55] <stanreg> doesn't mention having a diode, that I can see.
[20:55:26] <Tom_itx> so you need to add one
[20:55:44] <stanreg> So I'll have to put a diode on the control pins on mine.. eg between A and B.. does the direction matter?
[20:56:05] <Tom_itx> my connection is slow, the page still hasn't loaded
[20:57:34] <Tom_itx> i'm not sure about that one
[20:57:38] <Vutral> hi
[21:10:45] <MarkX> uggh
[21:11:02] <MarkX> Tom_itx: can you explain bit shifting to me like i'm 5 please?
[21:12:30] <MarkX> from my understanding if i have 1010 and i left shift 2, i should get 1000. but how does that work when i'm doing "PORTD |= (1 << PORTD6)" for example...
[21:14:10] <stanreg> MarkX: I was given this url earlier, check it out: http://playground.arduino.cc/Code/BitMath
[21:14:32] <MarkX> looks great, thanks stanreg
[21:17:06] <MarkX> aaahhhh i get it
[21:17:17] <Tom_itx> PORTD |= (1<<PD6) will shift the '1' PD6 number of places in portd
[21:17:31] <MarkX> (1 << PORTD6) isnt just 1, its 100000
[21:17:37] <MarkX> right?
[21:19:06] <Tom_itx> remember it starts with 0
[21:19:12] <Tom_itx> PD0..PD7
[21:19:18] <Tom_itx> not PD1..PD8
[21:20:03] <MarkX> yep i got that
[21:21:00] <MarkX> so it would be 1000000
[21:21:02] <MarkX> ?
[21:22:07] <Tom_itx> looks better
[21:22:25] <MarkX> man, that has been confusing me all day
[21:22:46] <Tom_itx> you read the bit manipulation page i posted?
[21:23:15] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/c_bits/bits_index.php
[21:25:01] <MarkX> yep i did. bytes just confused me. that's why i needed the breakdown of the binary per operation
[21:31:07] <langoliers> atmel micros like 5mA load
[21:31:18] <langoliers> why not add a transistor, or n-fet too ?
[21:38:28] <stanreg> langoliers: who's that directed to?
[21:49:15] <langoliers> stanreg> According to the datasheet, that relay only needs 17mA to 'work' (to 'click'). <
[21:52:08] <stanreg> langoliers: and you're suggesting that avrs can't push up to 17mA?
[21:55:05] <langoliers> is this fine in your opinions? uint8_t tm=8; while (tm > 0) { tm--; }
[21:55:56] <langoliers> stanreg<= it might work, but the ports are not really for driving relays
[21:56:11] <stanreg> > DC Current per I/O Pin ................................................ 40.0mA
[21:56:39] <vectory> stanreg: watch the measurement conditions, like Vxx
[21:56:54] <langoliers> yes, and it will cause heating of the device, and it will not output 5V at 20mA
[21:57:18] <stanreg> vectory: hmm?
[21:57:43] <vectory> stanreg, that might look different for different supply voltages
[21:57:47] <stanreg> As long as it outputs 3v/17mA for 100ms, I should be fine.. surely it can do that?
[21:57:51] <vectory> or not, im not sure
[21:58:19] <vectory> stanreg: 17mA doesnt sound an awful lot, yes
[21:59:48] <langoliers> this will compile to nothing in avr-gcc assembly output ;/ uint8_t tm=8; while (tm > 0) { tm--; }
[22:00:22] <vectory> langoliers: because of optimisations
[22:00:34] <vectory> it will just init tm to 0
[22:00:59] <langoliers> stanreg<= what are you up to? this sounds like a 15mA SSR input
[22:02:12] <langoliers> vectory<= uint8_t tm; tm=8; while (tm > 0) { tm--; }
[22:02:24] <langoliers> so, this compiles to nothing too
[22:02:46] <vectory> while (tm-- > 0); one way to shorten it. for (tm=8; tm > 0; tm--); also possible
[22:03:13] <vectory> while (tm-- > 0) { PORTA = tm; } shouldnt get optimimized
[22:03:14] <langoliers> yeah it has optimize for size switch on
[22:03:18] <langoliers> ;/
[22:03:22] <langoliers> but it was meant to be a delay
[22:03:55] <vectory> register uint8_t tm = 8; might help (or was it volatile?)
[22:04:28] <vectory> then theres delay.h
[22:05:36] <langoliers> thanks i need more reading
[22:11:45] <vectory> damn thats good stuff, 8bit music ftwin :D http://www.creamhq.de/ymrockerz/download.php?file=mp3/tymewarp/beast-oldie.mp3
[22:14:01] <langoliers> stanreg<= if you get a 2n7002 or bs170, you can switch up to 500mA relays at 30V, you ofc still need the flyback diode
[22:15:37] <langoliers> http://forum.allaboutcircuits.com/showthread.php?t=29461
[22:15:40] <langoliers> looks like this
[22:16:25] <langoliers> ( the resistor is optional in case a tiny mosfet )
[22:17:37] <langoliers> uh what i found http://rorinaldi.ro/wp-content/uploads/htssop-i7.jpg ugly ?
[22:20:17] <vectory> trying to calculate which two resistors of a set to combine to get a certain value. isnt there a trick besides trial and error
[22:32:20] <dioxide> langoliers: ack
[22:33:17] <dioxide> vectory: er what? its math
[22:36:34] <vectory> i broodforced it with python. took only 15 minutes O_o
[22:36:39] <vectory> _only)\
[22:46:08] <langoliers> avrdude: Yikes! Invalid device signature.
[22:46:08] <langoliers> avrdude: Expected signature for ATMEGA168 is 1E 94 06
[22:46:09] <langoliers> o yea
[22:46:13] <langoliers> found a difference
[22:46:21] <langoliers> the PA has a different signature
[22:46:50] <Tom_itx> well of course. it's a different part
[22:47:17] <langoliers> my avrdude don't know m168p ;<
[22:47:48] <Tom_itx> you could add it to the config
[22:49:10] <Tom_itx> it's in the newer one
[22:49:22] <Tom_itx> just checked
[22:50:35] <langoliers> it is 5.1
[22:50:47] <Tom_itx> i could post this one
[22:51:59] <langoliers> 5.11.1 fine?
[22:52:07] <langoliers> compiling then
[22:52:09] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/avrdude/
[22:52:12] <Tom_itx> grab that .conf
[22:52:15] <Tom_itx> it's in there
[22:56:13] <langoliers> ty
[22:56:22] <langoliers> already updated my avrdude
[22:56:30] <langoliers> m168p
[22:57:04] <langoliers> one question reamains
[22:57:09] <langoliers> i have PA ending.
[22:57:30] <langoliers> this ds does not mention separately http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet.pdf
[22:57:53] <langoliers> nah lets try
[22:58:43] <langoliers> ok looks like it is compatible yeah
[23:06:44] <langoliers> what is the use of the bodlevel 110? 1.7V-2.0V ? that is too high for an 1.80V power source
[23:06:51] <langoliers> ;/
[23:29:20] <TechIsCool> \join ##rtlsdr
[23:29:22] <TechIsCool> woops