#avr | Logs for 2011-12-19

Back
[00:10:28] <abcminiuser> And I'm back
[00:10:38] <abcminiuser> Christmas shopping: NOT EVEN ONCE
[00:10:44] <ziph> Heh.
[00:11:06] <abcminiuser> Also got my Norwegian Monopoly Money
[00:11:08] <ziph> My wife does all of that for me.
[00:11:15] <ziph> All I have to do is get something for her.
[00:12:09] <ziph> abcminiuser: Getting any actual summer there before you have to go to Norway? :)
[00:13:48] <ziph> Or is it pretending to be spring still like it is here?
[00:14:04] <abcminiuser> Urgh, I still need to buy for lots of people, and I'm a horrible gift giver
[00:14:23] <abcminiuser> I have money, but no idea what people would like - first worldian problem ever
[00:14:38] <abcminiuser> ^ Yeah, flew up to QLD for a few days a few weeks ago
[00:14:47] <abcminiuser> Just before I got my official results
[00:14:51] <ziph> Ahh.
[00:14:59] <ziph> How'd you go on your thesis?
[00:18:03] <abcminiuser> 94 IIRC
[00:18:38] <abcminiuser> Nope, 96
[00:19:54] <abcminiuser> Which means I qualify for first class honors in EE
[00:19:58] <abcminiuser> And regular bach in CS
[00:25:37] <ziph> Not going to do that I take it? :)
[00:28:05] <Casper> abcminiuser: gift cards
[00:28:25] <ziph> Some of those can be annoying.
[00:28:36] <abcminiuser> ziph, I got the EE honours (automatic, based on 4th year score) but opted out of CS honours which needs another year
[00:28:39] <abcminiuser> Casper, bleh
[00:28:53] <abcminiuser> "It's LIKE money, only more restrictive..." - Dilbert's mom
[00:28:54] <ziph> abcminiuser: Oh, ok.
[00:29:23] <ziph> abcminiuser: Good thing you went through before they switched to 3 years undergrad and then 2 years extra just to get straight EE. :)
[00:29:59] <abcminiuser> Definitely :P
[00:30:20] <Casper> those web comic can be quite funny :D
[00:31:03] <Casper> if only they could update them more than twice a week
[00:39:30] <abcminiuser> Casper, which ones?
[00:44:17] <Casper> twokinds, el goonish shive and goblin comic
[02:26:58] <raden> Casper, how would i set a value on a button press on a AVR in C ?
[02:35:28] <inflex> depends on how you're listening for it
[02:35:47] <inflex> PCINT types can be done via interrupts, else just a loop
[02:35:59] <inflex> eg, if (PORTB & (1<<PB4)) button_pressed = 1;
[02:36:07] <inflex> erm
[02:36:12] <inflex> s/PORTB/PINB
[02:37:15] <raden> hmm i have someything like that not working
[02:37:19] <raden> have to relook at it
[02:37:23] <raden> inflex, thank you sir
[02:37:53] <inflex> it's all in the I/O section of the AVR datasheet
[03:04:27] <raden> inflex, thanks for the kick in the right direction got it :)
[03:04:54] <inflex> np
[03:15:40] <raden> inflex, if I have a while loop running and press a momentary button is there a way to break the running code ?
[03:17:50] <inflex> sure... "break;"
[03:18:21] <inflex> or, while (PINB & (1<<PB3));
[03:18:35] <inflex> (that assumes you're using internal pullups and the button then shorts the pin to GND)
[03:30:00] <raden> inflex, using a momentary in that situation
[03:30:14] <raden> then a delay timer runs in my while loop
[03:30:24] <raden> I want another button to be able to stop that loop
[04:55:00] <spow> Hi, I don't understand the behaviour of my atmega32 here : I can't seem to correctly divide 250000 by 50000 with every variable being of type uint16_t
[05:00:02] <karlp_> 250000 is >> 16bits.
[05:00:46] <spow> oh god
[05:00:59] <karlp_> moah bits!
[05:01:01] <spow> more coffee needed, thanks for reminding the obvious
[05:01:12] <karlp_> double allll the longs!
[05:02:11] <spow> I smell some meme there :)
[05:02:24] <spow> double-check ALL the code !
[07:53:17] <spow> in asm, what do I use to set multiple bits of a register and keep the code readable ?
[07:53:52] <grummund> asm... readable?
[07:54:50] <spow> well, i'm using LDI temp, 1<<REG_BIT then OUT REG, temp
[07:55:27] <spow> but I don't how to set more bits since LDI will overwrite temp
[07:56:34] <spow> so I could directly load a hardcoded 8bit constant, but it's going to be unreadable
[07:58:04] <grummund> so you want something like (1<<FOO)|(1<<BAR) perhaps
[07:58:35] <pc_magas> Hello do all avr microcontrollers have ccommon assembly commands?
[07:58:40] <spow> am I allowed to do that in an asm instruction ? that's what I'd do in C
[07:58:58] <grummund> i don't know... it was a guess.
[07:59:33] <spow> this is what the datasheet says : LDI Rd, K Load Immediate Rd ← K None 1
[07:59:59] <pc_magas> Because int AtMega328 datasheet I cannot find any asm command but there is a another datashees with the asm commands
[08:00:15] <pc_magas> Tht's why I asked
[08:01:38] <OndraSter> what is the Q :)
[08:02:10] <pc_magas> <OndraSter>If all avr microcontrollers have common assembly commands
[08:02:15] <OndraSter> oh
[08:02:17] <OndraSter> not all of them
[08:02:23] <OndraSter> newer ones have more stuff usually
[08:02:25] <OndraSter> like FMUL :)
[08:02:25] <grummund> pc_magas: http://www.atmel.com/dyn/resources/prod_documents/doc0856.pdf
[08:02:34] <OndraSter> go to your device's datasheet
[08:02:39] <OndraSter> and there is instruction summary in it
[08:02:40] <OndraSter> on the end
[08:02:56] <grummund> http://www.atmel.com/dyn/products/product_docs.asp?category_id=163&family_id=607&subfamily_id=760&part_id=4720
[08:04:13] <spow> grummund: grmf ... it's actually possible to do what I assumed wasn't with LDI, so the OR op with bit shifting works like a charm for multiple bits setting :)
[08:04:24] <spow> thanks
[08:05:25] <pc_magas> I was hust curious because in Atmega328 datasheet there is no assembly commands but all assembly commands are in a separate datasheet
[08:05:56] <OndraSter> really? No instruction summary on the end?
[08:06:15] <OndraSter> I was/still am confused about SPM instruction
[08:06:16] <pc_magas> In this datasheet I downloaded no not at all
[08:06:27] <OndraSter> original datasheet said that there is ELPM that uses also RAMPZ (atmga128a)
[08:06:34] <OndraSter> and ESPM
[08:06:38] <Kevin`> pc_magas: all of the 8-bit ones have a common cpu core
[08:06:39] <grummund> spow: also check out SBI/CBI if you haven't already
[08:06:49] <pc_magas> <Kevin`>Oh that's why
[08:06:55] <OndraSter> but in newer datasheets (and in newer instruction details) are just ELPM and SPM
[08:06:57] <OndraSter> no more ESPM
[08:07:03] <OndraSter> plus compiler doesn't know ESPM either
[08:07:21] <OndraSter> Kevin`, no
[08:07:22] <Kevin`> pc_magas: btw, c on avr is rather nice compared to c on certain other microcontrollers that shall remain nameless
[08:07:27] <OndraSter> take a look at FMUL
[08:07:30] <OndraSter> it is not on the older ones
[08:07:37] <grummund> pc_magas: look at the Atmel documents page for the Atmega328, here:
[08:07:40] <grummund> pc_magas: http://www.atmel.com/dyn/products/product_docs.asp?category_id=163&family_id=607&subfamily_id=760&part_id=4720
[08:07:46] <pc_magas> <Kevin`>Also Arduino uses Avr ;)
[08:07:51] <grummund> pc_magas: scroll down to "AVR Instruction Set"
[08:08:24] <OndraSter> first link on google for "atmega328 datasheet"
[08:08:27] <OndraSter> contains "instruction set summary"
[08:08:34] <spow> grummund: I tried SBI MCUCR, ISC11 but I think it failed
[08:08:41] <OndraSter> SBI can set only some registers
[08:08:43] <OndraSter> I think
[08:08:48] <grummund> taht's true
[08:08:51] <spow> LDI is a more elegant one-liner here
[08:09:48] <grummund> grr, when coders say "elegant" they usually mean "obfuscated"
[08:10:07] <pc_magas> I wonder how can you add 2 16 bit numbers with 8 bit microprocessor?
[08:10:19] <grummund> as in... "it's neat and compact, who cares if no-one else can read it"
[08:10:46] <spow> LDI tmp, (1<<ISC11) | (1<<ISC10) ; fine to me :)
[08:11:23] <pc_magas> At least Atmega have more cappabilities from pic16f84a that we use in The univercity I go
[08:11:34] <grummund> spow: ya ;)
[08:12:14] <Kevin`> pc_magas: I had a feeling you were using something like that. or 8051..
[08:12:23] <OndraSter> http://www.atmel.com/dyn/resources/prod_documents/AVR202.ASM
[08:12:28] <OndraSter> 16bit "instructions"
[08:12:55] <pc_magas> Actually I am using Arduino
[08:13:24] <grummund> pc_magas: coding in C ?
[08:13:47] <pc_magas> Yes and I leard some instructions for MIPS Microprocessor
[08:13:59] <pc_magas> I have nit done any Intel Asm
[08:14:35] <grummund> then gcc takes care of the 16-bit math (or 32-bit, or even 64-bit) using built in routines
[08:14:44] <Kevin`> there's no reason to do intel asm
[08:17:40] <Kevin`> huh, the uart suddenly started working today, with the same code that didn't work yesterday. I suppose I shouldn't complain
[08:18:07] <grummund> no, but you should figure out *why* :p
[08:18:08] <pc_magas> I was wondering can I use asm in avr-gcc with the use of macros?
[08:18:28] <pc_magas> Is yes then it is very easier to bo bit set and bit clear
[08:18:29] <OndraSter> well
[08:18:34] <OndraSter> copmared to normal ASM synta
[08:18:34] <OndraSter> x
[08:18:37] <OndraSter> it needs some haxing
[08:18:42] <OndraSter> and looks "weird" to my eyes
[08:19:13] <grummund> pc_magas: http://www.nongnu.org/avr-libc/user-manual/assembler.html
[08:19:15] <Kevin`> pc_magas: I have to ask, why use asm instead of normal (non-arduino) c?
[08:19:32] <pc_magas> I was just currious
[08:19:57] <Kevin`> there are of course things that require it, but normally it's just wasting time :)
[08:20:01] <grummund> pc_magas: but note you don't need to use inline asm for that... gcc will automatically use sbi/cbi whenever possible.
[08:20:24] <pc_magas> Oh
[08:21:40] <grummund> for example PORTA &= ~(1<<3); should resolve to a single cbi instruction.
[08:24:24] <pc_magas> I know I know I tried to blink a led sucessfulle with this way
[08:24:26] <pc_magas> ;)
[08:29:54] <Kevin`> it seems that either avrdude or the dragon remembers the previous bit clock setting from.. somewhere.
[09:22:10] <spow> I'm trying to measure an interrupt latency and I think my result is wrong. The output is steady and I would have expected it to vary, (also I measured 40 ms... hem)
[09:23:55] <spow> is it appropriate to use the PORTD pin2 interrupt, manually set it in the code and read/display the counter in the interrupt ?
[09:24:50] <OndraSter> how often does the interrupt fire up?
[09:27:09] <spow> it should fire up a lot since I emulated it being triggered from the main loop, no waiting
[09:29:44] <karlp_> how much were you expecting it to vary, and what are you using to keep track of time, and what's it's resolution?
[09:30:40] <OndraSter> spow, I'd say, try with external generator first :)
[09:31:14] <spow> timer is clck/64 for 16MHz => 0.000 004s per step, I expected it to vary at least in TCNT1L
[09:32:00] <spow> OndraSter: isn't INT0 (PORTD pin2) an interrupt on external generator ?
[09:32:35] <OndraSter> it works the same, but I am not sure whether the INT is fired up when next instruction is being executed or already before that... that is some possible error
[09:37:05] <spow> OndraSter: well, I sort of need to startmy counter before the interrupt is triggered, so that rules out causing the external interrupt myself (with push button)
[09:37:51] <amee2k> mmh, why can't C on AVR have a 24 bit data type :/
[09:38:23] <amee2k> i mean, all types larger than 16 are faked with multiple instructions anyway, right?
[09:41:18] <amee2k> spow: if you have a scope, you could feed a squre wave into the int pin and have the ISR strobe another pin, then measure the latency with the scope
[09:42:05] <spow> don't have a scope :(
[09:42:19] <spow> first thing I buy when I get a job though
[09:42:41] <amee2k> no place where you can get access to one, like at school/university/workpace?
[09:42:54] <Kevin`> that's hardcore. i'd expect food or something to be bought first
[09:43:19] <amee2k> you could probably rig a second AVR to measure the latency between the two pulses
[09:43:27] <Kevin`> ..you can often get analog scopes cheap or free on craigslist and similar
[09:43:48] <amee2k> Kevin`: strongly depends on where you live, from my experience anyway
[09:44:16] <spow> amee2k: not easily no
[09:44:21] <Kevin`> well, always on ebay, but you'll have to pay a bit more
[09:44:32] <spow> i'll keep trying until it works ...
[09:44:38] <amee2k> around here (germany) used scopes were either in pretty poor condition, really old (->shitty specs), or still quite expensive
[09:44:59] <amee2k> and if there still is a ham scene alive around here, then it has an annoying way of keeping to itself
[09:45:57] <amee2k> so i went for one of these cheap digital ones for my first scope and i like it
[09:47:35] <amee2k> at least there is no fucking way here i could walk away with a 100MHz tek for 50$ lol
[10:57:42] <amee2k> why don't all MCUs just come with like 1MB flash or so? i mean, memory is cheap these days and except for some ridiculously small packages the size doesn't make much of a difference anyway
[11:04:38] <OndraSter> they would need 20bit PC register
[11:04:46] <OndraSter> or do you mean MCUs globally
[11:04:48] <OndraSter> not just AVR
[11:04:56] <OndraSter> remember that into small die has to fit MANY features
[11:20:09] <karlp_> memory's not that cheap.
[11:20:23] <karlp_> not for on core.
[11:20:44] <karlp_> not for the sort of reliability demanded for mcu on board flash.
[11:24:34] <OndraSter> why don't we have some board like arduino but based on x86? :)
[11:24:34] <OndraSter> sure
[11:24:38] <OndraSter> it needs external memory
[11:24:40] <OndraSter> and address decoder
[11:24:43] <OndraSter> and a lot of peripherals
[11:24:50] <OndraSter> but eg for teaching at school
[11:24:53] <OndraSter> it would be perfect
[11:24:56] <ziph> You've already got one.
[11:25:03] <OndraSter> (PC?)
[11:25:08] <ziph> Yes. :)
[11:25:18] <OndraSter> PC doesn't have too much GPIOs :P
[11:25:29] <karlp_> they do if you put them on a bus device
[11:25:30] <ziph> It does when you stick a GPIO board on it.
[11:25:32] <OndraSter> and simple access to pushbuttons and LEDs for showing stuff to students
[11:25:36] <karlp_> that's what we used in uni
[11:25:37] <OndraSter> hmm
[11:25:55] <Steffanx> That sounds boring karlp_
[11:25:58] <karlp_> old 486s with cables hanging out and a breakout board for the XT bus
[11:26:04] <OndraSter> :D
[11:26:09] <karlp_> let us play with DMA, that sort of stuff
[11:26:13] <karlp_> it worked,
[11:26:16] <karlp_> it was a while ago :)
[11:26:24] <karlp_> we learnt how to write our own device drivers,
[11:26:27] <karlp_> made our own graphics cards
[11:26:28] <krumeltee> dma on x86 is a very ugly and horrible thing...
[11:26:32] <OndraSter> haha
[11:26:42] <karlp_> it was sufficient to show us the rough idea
[11:26:45] <OndraSter> karlp_, we had 80C196 from Intel and now we switched to ARM
[11:26:49] <karlp_> x86 is ugly if you want to go down that path
[11:27:03] <OndraSter> on high school/middle school
[11:27:07] <OndraSter> (depends on where are you from lol)
[11:28:07] <krumeltee> i learned a bit of x86 while trying to write an operating system... after 2 years i had a working multitasking-kernel, an elf loader, binary loader, dma, sb-drivers, mouse/keyboard/vesa-vga...
[11:28:13] <krumeltee> then i stopped...
[11:28:58] <OndraSter> wow
[11:29:08] <OndraSter> must've taken a lot of time during those 2 years :P
[11:29:43] <OndraSter> how do tasks switch? Is there some timer that fires up interrupt for task switch?
[11:29:48] <krumeltee> now such a thing should be done i 4 weeks :D most of the time was taken by reading documentation...
[11:29:52] <OndraSter> that switches to kernel, that decides what runs next
[11:30:09] <krumeltee> the x86 arch has a "tss" segment, this holds the stack information and all the other context of a task
[11:30:14] <OndraSter> I know tss
[11:30:21] <krumeltee> you have to switch manually via a timer irq
[11:30:22] <OndraSter> but how it knows "it is time"
[11:30:24] <OndraSter> ok
[11:30:45] <OndraSter> it is that 19.2ms?
[11:30:54] <OndraSter> or whatever was it calibrated to
[11:30:56] <ziph> Or when you do a syscall that makes the thread unrunnable due to having to wait for some IO.
[11:30:58] <krumeltee> on most systems this timer is 250hz oder 1000hz
[11:31:10] <krumeltee> you mean the clock signal for the pit "programmable interval timer"
[11:31:21] <OndraSter> ohh
[11:31:34] <OndraSter> btw, I have here old motherboard
[11:31:43] <OndraSter> I am wondering, how hard would it be to use the VIA AC97 codec :P
[11:31:46] <OndraSter> from let's say AVR
[11:31:54] <krumeltee> this is an ugly value, it's used to get the right timing for the bus, this frequency is very very ancient
[11:32:06] <ziph> Find a chip with actual I2S, OndraSter.
[11:32:14] <OndraSter> this has SPI
[11:32:14] <ziph> Otherwise you're wasting time doing something no engineer would.
[11:32:16] <krumeltee> i would say, i will need 6 months on pc :D
[11:32:21] <ziph> They aren't the same.
[11:34:20] <krumeltee> try a mos sid chip :D http://www.mikrocontroller.net/topic/230426 theres also a sound sample from mine :)
[11:42:40] <norbi> hi guys
[11:43:12] <Steffanx> *hide*
[11:44:13] <norbi> i need your advice/ideas
[11:44:24] <norbi> there will be a school contest about robotics
[11:44:37] <norbi> avr/pic/8051arhitectures etc
[11:44:54] <norbi> this week is the sign up
[11:45:06] <Steffanx> Yes...
[11:45:12] <norbi> i would like to participate, but i dont have any "great" idea to signup with
[11:46:02] <norbi> do you have any ideas, if you would be the judge, what would you like to see or think that would be interesant?
[11:46:36] <Steffanx> Give it a try
[11:47:02] <norbi> i have 2 rf antennas, one pic32mx4 board, one atmega64 board, some atmega chips, serial modul, usb modul, adc modul etc
[11:47:25] <norbi> Steffanx: do you think is in my depth to participate?
[11:47:52] <norbi> i would not disturb you to create my project:P but i may ask for help in some cases
[11:47:53] <norbi> :D
[11:48:43] <norbi> my idol is einstein and tesla, im allways thinking of some kind of project that relates to them, but didnt figured out yet
[11:49:26] <Steffanx> Uhm, to be honest… i'm not sure. It took you very long and you needed a lot of help to get your accelerometer functional (is it functional yet?)
[11:49:36] <norbi> im thinking at some wireless charger or something, but im not good enough to create that and that is not something really new
[11:49:38] <Steffanx> So, I don't know :)
[11:50:58] <norbi> Steffanx: my accelerometer is functional :) just my opengl program is not yet, and from a year i didnt worked with avrs, i was working with intel 8051 and forgot the avr lib, studio, worked with keil uVision
[11:51:39] <Steffanx> It has to be something 'new' ?
[11:51:52] <norbi> yea, 'new'
[11:52:19] <krumeltee> wireless accelerometer with a simple, but nice, gui to visualize the accelermeter data
[11:52:21] <norbi> because line following robots and these kind of thins are exploated already in this school contest
[11:52:55] <Steffanx> That's not really a robot-ish thing krumeltee
[11:53:11] <norbi> krumeltee: that would fine, as a module
[11:53:18] <norbi> its not enough
[11:53:25] <norbi> the contest is in months
[11:53:32] <krumeltee> i think it is, not a whole robot, but it shows how to use a accelermeter and write a gui
[11:53:32] <norbi> but we need to presint the idea
[11:53:41] <norbi> to get hardware from school to the project
[11:53:54] <norbi> *present
[11:55:01] <norbi> i have sharp ir sensors
[11:55:04] <Steffanx> norbi abcminiuser did some work for his thesis on a bluetooth controlled robot, maybe you make something based on his bluetooth stack?
[11:55:08] <norbi> 6 motors
[11:55:16] <norbi> 2 servos
[11:55:17] <norbi> etc
[11:55:26] <norbi> i have some components to work with
[11:55:44] <norbi> Steffanx: i will check out his project now :)
[11:56:02] <norbi> i have 1 year until i need to make my thesis :D
[11:56:25] <Steffanx> His project is on google code somewhere
[11:57:38] <norbi> its nice his gui
[11:57:48] <Steffanx> It's simple :)
[11:57:54] <norbi> lufa lib on fourwalledcubicle
[11:58:22] <norbi> i can use bluetooth module too
[11:58:29] <norbi> but this is really simple
[11:58:37] <norbi> it would be not enough...
[11:59:05] <norbi> other made digital logic analizer, and spectrum analizer embedded in robotics
[11:59:09] <norbi> and things like that
[11:59:23] <Steffanx> yay
[12:00:27] <norbi> (im almost done with my library - uart,interrupts,timers,pwm,spi - not twi, i dont have anything on twi yet so.. that can wait)
[12:01:28] <norbi> (i know that there are some libs online for that, phleury, but i like to know my code, all parts of it)
[12:01:39] <amee2k> hmmm novel robot ideas... stalker robot with a camera that you can point at a person and it follows that person?
[12:02:07] <norbi> amee2k: that would be ok :) but i dont have camera
[12:02:22] <amee2k> the image recognition might need an ARM board for the extra memory... AVRs suck on that end, really
[12:02:24] <norbi> and the robots "brain" has to be the avr
[12:02:28] <norbi> or other mcu
[12:02:55] <amee2k> a while ago i saw camera modules with SPI interface
[12:03:00] <Steffanx> norbi, the stm32F4 is pretty cheap
[12:03:03] <norbi> i cant use webcam on pc to do that, guys from computer sciense do that, we at electronics need to do that via hardware
[12:03:05] <Steffanx> And has a camera interface
[12:03:12] <Steffanx> You can get cheap camera's from sparkfun
[12:03:16] <Steffanx> ~10$
[12:03:20] <amee2k> same junk that mobile phones use, and other gadgets that shouldn't have a camera but do have one anyway for marketing reasons
[12:03:35] <krumeltee> ack
[12:04:06] <amee2k> but to follow a shilouette or shape you don't need much more than VGA i'd say
[12:04:09] <Steffanx> You can probably do some nice stuff with it
[12:04:41] <amee2k> if in doubt, make the person it has to follow wear a hi vis vest
[12:04:51] <Steffanx> http://www.sparkfun.com/products/8667 how tiny do you want it?
[12:04:52] <amee2k> or a tee shirt with a large red dot on the back >_>
[12:04:56] <Steffanx> You can get them from ebay too
[12:04:59] <krumeltee> these cams are working properly only with a good light. direct sunlight on the "target" is too much, a simple 60W bulb is not enough
[12:05:04] <norbi> lol: http://www.sparkfun.com/products/8668
[12:05:12] <Steffanx> Yeah, that one
[12:06:02] <Steffanx> There are some projects that use the version i mentioned norbi
[12:06:09] <Steffanx> (the 640*480 version)
[12:06:26] <grummund> do any line following bots or micromouse actually use cameras?
[12:06:47] <Steffanx> Line following robots.. not really
[12:06:59] <norbi> Steffanx: 640*480 is better because i would need minimal 5fps?
[12:07:07] <Steffanx> 'need' :)
[12:07:14] <amee2k> i'd see if i could get samples for the camera modules, or digi/farnell. no point in paying the arduino fanboy tax at sparkfun for a last-generation module
[12:07:25] <amee2k> grummund: this was supposed to be a person-following robot :)
[12:08:05] <Steffanx> You can get similar modules on ebay too
[12:08:07] <Steffanx> :)
[12:08:10] <grummund> in that case a short piece of rope should do well enough :)
[12:08:19] <Steffanx> Even 3mp camera's for the same price
[12:08:21] <amee2k> >_<
[12:08:51] <Steffanx> Most of the time you can lower the resolution though
[12:09:11] <norbi> i will order one of those cameras
[12:09:29] <amee2k> or discard every other line and pixel while reading it from the camera
[12:09:32] <norbi> do you know anywhere to buy robot chasis?
[12:09:50] <norbi> not robot on weels, but on feets
[12:09:58] <Steffanx> The camera can do that for you, so.. :)
[12:10:06] <norbi> i have one, but its big and not quite good
[12:10:14] <amee2k> well, if it couldn't it would still be trivial
[12:10:20] <Steffanx> Just read something about it before you buy it norbi
[12:10:27] <norbi> http://www.sparkfun.com/products/8667/images.txt
[12:10:39] <Steffanx> Don't you like that?
[12:10:44] <norbi> i do :D
[12:11:26] <norbi> but probably i would need a faster avr
[12:11:43] <amee2k> i'd go for an ARM board for this, really
[12:11:48] <norbi> my 8mhz board can handle this, but then i need to write code in asm
[12:11:57] <Steffanx> What kind of ARM board?
[12:12:02] <Steffanx> cortex-m4 amee2k ?
[12:12:05] <Steffanx> or even a big ass one?
[12:12:35] <norbi> that camera is on I2C :D
[12:12:46] <amee2k> Steffanx: doesn't really matter, but for image stuff you need a lot of RAM and (depending on framerate) you need it fast
[12:13:02] <amee2k> and as i said before, AVRs imo suck on that end
[12:13:07] <norbi> its so tiny, i need to improve my soldering skills
[12:14:03] <norbi> i wouldnt like to use pic32mx,:P but that board has ethernet and usb too :D i really dont want to use that board
[12:14:53] <amee2k> stick a bluetooth dongle on the USB port. so you can let it make snapshots of the person it is stalking
[12:16:10] <grummund> is this going to be like the asimo bot?
[12:16:42] <amee2k> kinda? i never really got into the pet robot thing
[12:16:53] <norbi> ive used usb before on pic, with usb flash/fat
[12:17:23] <norbi> ive readed a text file and writed in it
[12:17:53] <norbi> but after job done, im learning other things and forget the work done before completely, every time i need to retake it from scratch
[12:18:02] <norbi> my merory is very bad:D
[12:20:31] <norbi> i dont really like any of these: http://www.robotshop.com/robot-kits.html
[12:40:41] <norbi> i thought it would be nice if i would build a plane or helicopter...
[12:46:46] <norbi> what would you do, dont thing about me and my depth
[12:46:58] <norbi> what would you do for this kind of contest to win it?
[12:52:55] <norbi> toshiba did a great work with this camera, onboard jpeg compression, thats nice
[12:53:41] <norbi> filtering colors, you can get 640*480 pixelrate, no need of 3 colors
[12:53:47] <norbi> just one is enough
[12:54:56] <norbi> ahh, the other one, the 1.3mp has jpeg compression, this one doesnt http://www.sparkfun.com/products/8667
[12:58:56] <norbi> guys, really? nobody wants to discuss this with me?:P
[13:01:16] <OndraSter> nope :D
[13:01:24] <OndraSter> we are greedy and we want to win in too!
[13:02:35] <Kevin`> http://kwzs.be/~kevin/interrupts.png - suddenly I find myself wanting those nice multi-level prioritized interrupts :/
[13:03:25] <Steffanx> Dont enable interrupts inside an interrupt :)
[13:04:36] <norbi> OndraSter: :))
[13:04:40] <Kevin`> i'm not, but the interrupt that controls the serial data transfer needs to run at exactly the right time, even if there's another interrupt running. at least I think that's the problem right now
[13:04:58] <norbi> Kevin`: serial problems too?
[13:05:26] <norbi> Kevin`: you can set priority, right? interrupt priority
[13:05:45] <OndraSter> I wish I could set some interrupts that HAVE to run even when in the middle of another interrupt
[13:05:46] <Kevin`> norbi: not on an attiny45, I don't think
[13:05:50] <norbi> if serial interrupt is working, then other interrupt will be flushed or on waiting, depends on architecture
[13:06:12] <OndraSter> aka when timer shows data, data on serial will not fire up interrupt
[13:06:24] <OndraSter> but when serial is receiving data, timer interrupt should run
[13:06:33] <Kevin`> OndraSter: some chips can do that
[13:06:41] <OndraSter> atmega128a is the only I care about
[13:06:44] <norbi> Kevin`: yea, as i know some chips can do that
[13:06:47] <Kevin`> (eg xmega)
[13:06:51] <norbi> even 8051 arhitecture ones
[13:06:53] <Kevin`> or most of the fancier ones
[13:07:00] <OndraSter> even x86 can do it :P
[13:07:20] <norbi> Kevin`: so on tiny you cant set interrupt order?
[13:07:41] <OndraSter> no
[13:07:41] <Kevin`> norbi: nafaik, do tell me if you find something for it
[13:09:02] <Kevin`> I set up the other interrupt to allow other interrupts to interrupt it (like Steffanx said not to) and it seems to work fine, at least for now. fortunately it's a constant time thing, and can't randomly fill up the stack instantly
[13:09:23] <grummund> is the proble with serial tx or rx?
[13:09:27] <Kevin`> tx
[13:09:35] <grummund> buffered?
[13:09:50] <OndraSter> I wish AVR had some few bytes FIFO for tx and rx
[13:09:53] <Kevin`> there's an interrupt that has to trigger in the middle of each byte to load the second half of the byte
[13:09:56] <OndraSter> xmega has, doesnt it?
[13:09:57] <Kevin`> no uart on this chip at all :)
[13:10:09] <grummund> oh wait... attiny, so this is software uart?
[13:10:10] <Kevin`> if it had a hardware uart this wouldn't really be an issue
[13:10:28] <Kevin`> grummund: usi uart
[13:11:16] <Kevin`> bah, it's still possible to get errors
[13:12:21] <grummund> make sure all interrupts complete as fast as possible
[13:13:01] <grummund> only do the minimum necessary to serve the interrupt and do all other processing in main loop
[13:14:08] <Kevin`> how can I get a view with the generated asssembly shown along with the c code?
[13:14:15] <Kevin`> (not in avr studio)
[13:14:45] <OndraSter> hmm good Q
[13:15:17] <grummund> avr-objdump -h -S file.elf > file.list
[13:15:19] <norbi> Kevin`: as how i can see in many of avr's there is no option to set interrupts priorities, thats kinda stupid
[13:15:35] <norbi> avr lets you choose the best interrupts for you in order you need
[13:15:39] <norbi> that kinda stupid
[13:15:53] <norbi> cant even beleive this
[13:16:12] <norbi> an mcu from 70's let you do that, and modern avr's dont?
[13:16:20] <Kevin`> hmm, the way it's set up now, the problem has to be in the few instructions between the start of the interrupt and interrupts getting enabled again
[13:16:26] <Kevin`> must be really really tight
[13:16:44] <grummund> race condition
[13:16:47] <Kevin`> norbi: honestly it's normally not an issue
[13:16:55] <BusError> whats the need for it ? Only on OS that have huge, crappy handlers do you need that sort of stuff
[13:17:06] <norbi> Kevin`: as how i think it is not normal
[13:17:29] <norbi> but maybe pros are thinking other
[13:17:42] <OndraSter> my firmware now has to run like... "waiting for interrupt to happen from some timer" and in the main loop it goes "wait for data on UART... wait for data on UART.... PARSE THEM!"
[13:17:44] <norbi> i would be interested anyway why thats normal
[13:17:54] <OndraSter> that's why each message has to be confirmed from the MCU to PC
[13:18:00] <OndraSter> because if it gets interrupted in the middle of it...
[13:18:41] <norbi> OndraSter: and how would you get confirmation from the pc?
[13:18:52] <OndraSter> I send some byte to PC
[13:19:02] <norbi> would you conenct some external int on the pc serial?
[13:19:03] <OndraSter> I am actually sending inverted value of what I received
[13:19:05] <OndraSter> at least in bootloader
[13:19:07] <BusError> norbi, basicaly, if you start to need to use interrupt priority so your stuff work, you did something very wrong. Typicaly, you are hoarding the cycles in the IRQ request
[13:19:13] <OndraSter> plus I connected RTS (I think) line
[13:19:23] <OndraSter> that will be used in the application, not in bootloader
[13:19:54] <norbi> BusError: ive learned at the university that interrupts priority is very important in some cases
[13:20:20] <norbi> any mcu has internal int priority and you can to reorder it in case
[13:20:55] <norbi> for exactly these kind of cases, when you have external int, timer int
[13:21:38] <norbi> and the flags do remain on, and buffer take care of firts interrupt, the others will be flushed
[13:22:23] <norbi> timer int has buffer and flag, if one timer int and one ext int comes, and you set ext int to highest priority, then you first process that then you can process the timer int
[13:22:34] <norbi> depends on application, not in much cases is usefull
[13:22:44] <norbi> as how i remember from school class
[13:22:48] <norbi> but maybe im wrong
[13:30:17] <Kevin`> running at a lower rate than 115200 seems to help
[13:33:32] <OndraSter> so
[13:33:50] <OndraSter> will be 115200 enough to cover up 3072 pixels, with 30 FPS? :P
[13:33:53] <OndraSter> time to do the math
[13:34:29] <OndraSter> (yes it will... it is actually 384B per screen, with 30 FPS that is like 11520B per second)
[13:34:47] <Kevin`> http://pastebin.com/bAucFLf0 - much better :D
[13:38:37] <norbi> still cant figure out what to make:D for the contest
[13:40:22] <Kevin`> what contest?
[13:40:35] <norbi> robot contest
[15:09:08] <gkwhc> Hi, how can I play a note with a MCU that is interfaced to a DAC? Would I need to send every sample of that note?
[15:12:25] <_Shurik_> yes
[15:12:44] <_Shurik_> you would be effectively sending a WAV to it
[15:34:23] <gkwhc> thats quite alot of data to send
[15:48:01] <_Shurik_> gkwhc: what's the quality you're looking for?
[15:48:07] <_Shurik_> and, is it just a note?
[15:48:21] <_Shurik_> CD quality = 44 khz
[15:48:44] <_Shurik_> 44 Kbytes per second for 8 bit DAC
[15:59:56] <RikusW> http://swizec.com/blog/why-programmers-work-at-night/swizec/3198
[19:26:00] <Ralith> Is there a major distinction between the at90usb series and the atmega series?
[19:47:20] <vectory> sure, afaik the 90 series is outdated
[19:53:39] <TeknoJuce> if the lockbits are set on an ATTINY2313 can you just unset them and write over the current code?\
[19:53:43] <TeknoJuce> on flash
[19:54:06] <vectory> that wouldnt make much sense, eh?
[19:54:25] <CMiYC> the lockbits are so you can't reprogram
[19:54:26] <Tom_itx> HVPP will
[19:54:27] <vectory> i think you need high voltage programming if you messed with the fuses
[19:55:14] <TeknoJuce> Im using a parallel port is that the same thing?
[19:56:04] <TeknoJuce> with the isp interface
[19:56:15] <vectory> isp != hvpp
[19:56:21] <TeknoJuce> I can read the chips signature
[19:56:37] <Tom_itx> good for you
[19:56:41] <Tom_itx> can you program it?
[19:57:03] <TeknoJuce> wow Tom_itx very polite
[19:57:44] <Tom_itx> well you seem to be defending what we're telling you
[19:57:47] <TeknoJuce> I wasnt responding to vectory with that comment
[19:58:00] <TeknoJuce> i was just telling you guys where I was at
[19:58:10] <Tom_itx> oh alright
[19:58:41] <TeknoJuce> what is the difference between isp programming and hvpp?
[19:58:57] <Tom_itx> 7v
[19:59:14] <Tom_itx> and alot more wires
[19:59:21] <TeknoJuce> does the chip suppor that high of voltage?
[19:59:30] <Tom_itx> i'm not sure
[19:59:36] <vectory> only for programming with hvpp
[19:59:49] <vectory> what chip you have there?
[20:00:01] <Tom_itx> i'm not sure it supports HVPP is what i meant
[20:00:04] * vectory just sits in front of the parameter page for megas
[20:00:04] <TeknoJuce> Said above
[20:00:07] <Tom_itx> 2313
[20:00:11] <Tom_itx> pay attention
[20:00:15] <vectory> :S
[20:00:19] <Tom_itx> heh
[20:00:42] <TeknoJuce> so the ATTINY doesnt support HVPP
[20:00:44] <Tom_itx> i'm just giving you a hard time
[20:01:00] <Tom_itx> i didn't check
[20:01:28] <Tom_itx> what's the data sheet say about the lock bits?
[20:02:53] <TeknoJuce> Do you know of an easy schem pinout for hvpp with out buffer chips etc or that would be required for the highvoltage would blowout the parallel port
[20:03:13] <Tom_itx> attiny2313 supports HVPP
[20:03:18] <Tom_itx> according to atmel
[20:04:25] <vectory> Tom_itx: does you page say something about compiling asm with avr-gcc?
[20:04:50] <Tom_itx> i looked in the studio help file
[20:05:22] <TeknoJuce> Name=ATtiny2313
[20:05:22] <TeknoJuce> Sig0=30 Sig1=145 Sig2=10
[20:05:22] <TeknoJuce> [Fusebits] Lo=255 Hi=219 Ext=255
[20:05:22] <TeknoJuce> [Lockbits] Value=252
[20:06:29] <TeknoJuce> trying to update a usbtinyisp to 1.6 f/w so I can use it in a virtualbox because 1.4 which it comes with does not support that
[20:06:59] <vectory_> !log
[20:07:52] <vectory_> have atmel datasheets no tabe of content? >_<
[20:08:27] <vectory_> oh, at the end, how unconventional
[20:08:45] <vectory_> !log
[20:08:51] <Tom_itx> ask zlog
[20:09:36] <Tom_itx> or !thislog
[20:09:37] <Tom_itx> zlog
[20:10:05] <vectory_> thanks
[20:17:59] <TeknoJuce> http://www.frank-zhao.com/fusecalc/fusecalc.php?chip=attiny2313&LOW=FF&HIGH=DB&EXTENDED=FF&LOCKBIT=FC
[20:18:20] <TeknoJuce> guess thats defo a lock
[20:18:47] <TeknoJuce> stupid company locking down a chip that uses opensourced code :D
[20:19:45] <TeknoJuce> wanted to update with this http://dicks.home.xs4all.nl/avr/usbtiny/
[20:23:42] <Tom_itx> get a fresh attiny2313?
[20:25:43] <TeknoJuce> would rather break theirs first :D
[20:26:07] <Tom_itx> get a dragon and HVPP it
[20:26:30] <TeknoJuce> oh well it did force me to solder a socket onto their board at least so easy to change chips
[20:26:49] <TeknoJuce> sounds expensive
[20:27:25] <TeknoJuce> as that is why I bought the usbtiny
[20:27:49] <Tom_itx> $50 iirc
[20:28:19] <Tom_itx> but at the time of purchase you didn't know it was locked
[20:28:29] <TeknoJuce> too rich for my blood
[20:29:17] <TeknoJuce> I didnt know much about chip locking when I bought
[20:31:01] <TeknoJuce> so that wouldnt be something I would know about to ask before buying it
[20:31:19] <TeknoJuce> I emailed the company about it but they never responded back
[20:31:40] <TeknoJuce> www.robotbase.cn
[20:31:53] <TeknoJuce> Hey CapnKernel!
[20:32:04] <TeknoJuce> still in china?
[20:32:17] <CapnKernel> TeknoJuce: Hi there!
[20:32:25] <CapnKernel> Yep. Flying home in two days for Christmas.
[20:32:56] <TeknoJuce> Ah very nice what are you bring home for the kids?
[20:35:38] <CapnKernel> Hand gyroscopes: http://item.taobao.com/item.htm?id=1770936173
[20:38:35] <TeknoJuce> ah haha I guy I worked with @ 3M always used those at his desk
[20:39:56] <TeknoJuce> no crazy aZn tech?
[20:40:16] <TeknoJuce> like the koncho arcade machine?
[20:40:44] <TeknoJuce> http://en.wikipedia.org/wiki/Boong-Ga_Boong-Ga
[20:49:31] <doublebe1a> http://en.wikipedia.org/wiki/Kancho What the ACTUAL fuck?
[20:49:39] <TeknoJuce> haha
[20:49:45] <doublebe1a> Thankyou TeknoJuce, I just woke up.
[20:49:50] <doublebe1a> :D
[20:50:24] <TeknoJuce> now type it into youtube and watch bastid jap kids do it to their teachers
[20:50:58] <TeknoJuce> I aim to please
[20:51:15] <doublebe1a> Yeaaah, no.
[20:51:17] <doublebe1a> :D
[20:51:56] <TeknoJuce> haha
[20:52:57] <TeknoJuce> pretty sure a pedobear created that game for jap kids
[20:57:27] <TeknoJuce> should your alternate be doublebe7a ?
[20:58:00] <doublebeta> I didn't do it; irssi did it automatically
[20:58:24] <TeknoJuce> unless bella is slexy
[20:59:00] <doublebeta> *s1exy
[21:01:24] * vectory_ sneaks up behind doublebeta
[21:01:26] <vectory_> kan
[21:01:34] * vectory_ assumes the position
[21:01:37] <vectory_> CHO
[21:01:40] <TeknoJuce> haha
[21:01:45] * vectory_ vectory *******
[21:02:06] <vectory_> that had to be censored, sorry
[21:02:52] <TeknoJuce> I dont want to visit japan after finding out about that subject assraped on vacay doesnt sound like a good time to me just saying
[23:50:49] <Ralith> vectory_: AT90USBs are outdated?
[23:50:54] <Ralith> how so?
[23:51:04] <vectory_> hm, wasnt sure
[23:51:23] <vectory_> pure at90 is, tho, isnt it?
[23:58:26] <raden> Casper, you around bro ?
[23:58:54] <Casper> am I?
[23:58:58] <raden> lol
[23:59:15] <raden> I cannot get interrupt to work for the life of me on AVR
[23:59:28] <raden> I have read like 4 - 5 tutorials and they all have something different
[23:59:32] <Casper> have you actually enabled it with sei() ?
[23:59:41] <raden> so i need to include more than interrupt.h ?
[23:59:58] <Casper> no