#avr | Logs for 2015-12-13

Back
[00:03:52] <sabor> Casper: let a timer run, enable input capture, it will capture the timer value in the ICR when the input changes
[00:05:33] <Casper> that exist on avr? never seen that feature
[00:05:42] <Casper> will have to check that tomorrow
[00:05:55] <sabor> in the input capture intterrupt you read ICR, calculate the difference to the previous ICR value to get the time, and change ICES
[00:06:11] <sabor> atmega48 and some other devices have it
[00:06:27] <sabor> at least the 16 bit timer 1 has it
[00:07:26] <Casper> I'll check if those I have have that
[00:07:41] <sabor> atmega8 too, so i guess most devices with a 16 bit timer have ot
[00:12:57] <Casper> I wonder if I'll be forced to install some security camera...
[00:13:07] <Casper> ... my cable got cut today
[00:23:01] <Casper> thanks for the hint
[00:23:29] <sabor> you're welcome
[00:25:32] <Casper> now, do you have tips to fall asleep instantly and safelly? :D
[06:13:54] <apo_> anaesthetics
[06:14:06] <apo_> s/ae/e/
[06:34:52] <RikusW> apo_: both seems to be spelled right ;)
[06:35:17] <RikusW> my pidgin got spell checking
[06:36:25] <Lambda_Aurigae> Casper, falling asleep is the easy part...it's waking up that gets hard after enough drugs.
[07:31:01] <DKordic`> :D
[12:40:05] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxSUtNM2toUWJlcVU/view
[12:40:06] <Jartza> yea
[12:43:07] <Jartza> fugly self-etched board, but I can get to prototyping xmega
[15:20:13] <Krampus> Jartza: how did you make it?
[15:21:26] <Jartza> Krampus: laser toner transfer and sodium persulfate
[15:22:31] <Krampus> Jartza: I've never tried, but I think I may need to do some quick 'n' dirties in the near future.
[15:23:11] <Jartza> yea, the board itself turned out quite nice
[15:23:20] <Jartza> the soldering of the chip was ugly :D
[15:24:05] <Krampus> I doubt my first turn will be much better and if it works on the cheap, rad!
[15:24:28] <Jartza> although big part of the ugliness comes from very liberal use of flux-paste
[15:24:43] <Jartza> yeah, I got these chips as a gift
[15:25:11] <Jartza> I already ordered some tqfp44-dip breakout boards, but while I'm waiting for them to arrive from china, I can start testing with this
[15:27:35] <Jartza> normally I use solder-paste but it doesn't work that brilliantly on self-etched boards
[15:27:43] <Jartza> especially with fine pitch it tends to solder bridge
[15:28:04] <Jartza> and in the end my chip aligning wasn't that great either
[15:31:00] <Jartza> but hey, it works.
[15:31:00] <Jartza> led blinks. yay.
[15:31:00] <Krampus> heh. That's the milestone I'm fighting to achieve right now. :P
[15:31:00] <Jartza> :)
[15:33:23] <Krampus> Or rather an LED is flashing, but the data I'm sending to these programmable LEDs is still garbage.
[15:33:34] <Krampus> I'm trying to bitbang it using an RTOS.
[16:06:27] <hetii> hi
[16:06:42] <hetii> I have a UDA1330 24bit, but I want to ask about I2S bus, do I need also some special 0chip (USB or SPDIF) that will handle 24bit, or it can be any bridge to i2s ?4
[16:11:45] <Lambda_Aurigae> umm.
[16:11:50] <Lambda_Aurigae> your data gets sent 8 bits at a time.
[16:12:18] <Lambda_Aurigae> well, really, 1 bit at a time in 8 bit blocks with a stop block between them.
[16:15:05] <hetii> hmm, for eg if I take PCM2706 and use it as a USB2I2s I be able to use 24bit capabilites of my DAC ?
[16:15:09] <Lambda_Aurigae> aahh..it seems i2s can do up to 20bits.
[16:15:39] <Lambda_Aurigae> which is different from i2c it seems.
[16:15:56] <hetii> yep I talk about I2S
[16:16:25] <Lambda_Aurigae> yeah..forget what I said.
[16:16:33] <Lambda_Aurigae> not really familiar with i2s specs.
[16:16:42] <hetii> me to :)
[16:16:51] <Lambda_Aurigae> read the datasheets.
[16:17:36] <hetii> well I just wonder what type of bridge I should use to use full capabilites of that DAC
[16:18:14] <Lambda_Aurigae> an i2s bridge I suppose.
[16:18:22] <Lambda_Aurigae> don't think avr has i2s onboard any of them.
[16:18:33] <Lambda_Aurigae> not sure about xmega chips though.
[16:25:41] <Jartza> hehe, I need to start cleaning my desk(s)
[16:25:55] <Jartza> I've now lost too many things to my desk
[16:26:05] <Jartza> avr-isp-mk2... not just one, but two
[16:26:12] <Jartza> xmos devkit
[16:26:20] <Jartza> flyswatter jtag
[16:26:23] <Jartza> and segger jtag
[16:26:37] <Jartza> almost all programmers are now somewhere not to be seen :D
[17:11:49] <Lambda_Aurigae> I got my flyswatter.
[17:11:53] <Lambda_Aurigae> but no jtag interface on it.
[17:21:23] <Krampus> Is there a way to get AVRDude + Dragon to reset the target after programming via jtag?
[17:28:49] <Lambda_Aurigae> dunno.
[19:14:28] <Jartza> yay
[19:14:34] <Jartza> blinkenlight on xmega
[19:23:30] <Tom_itx> blinken is good
[19:25:42] <Lambda_Aurigae> should be able to blinken lots of lights really fast.
[19:25:59] <Lambda_Aurigae> Jartza, with dma you should be able to do vga too.
[19:28:12] <Jartza> :)
[19:28:16] <Jartza> sure
[19:28:20] <Jartza> colors with one chip
[19:28:36] <Jartza> but too bad the max SPI speed is 1/2 cpu clock
[19:28:51] <Jartza> 32Mhz chip, I still can't get more than 16MHz pixel clock
[19:29:04] <Lambda_Aurigae> you can get 320x240 then.
[19:29:12] <Lambda_Aurigae> do half vga.
[19:29:20] <Jartza> yea, something like that
[19:29:53] <Jartza> or 400 x 320
[19:29:56] <Lambda_Aurigae> although with dma feeding data out a gpio port you should be able to go faster.
[19:30:20] <Lambda_Aurigae> 400x300 would be half 800x600...doable at 10MHz.
[19:30:28] <Lambda_Aurigae> or even 400x600
[19:31:31] <Jartza> how come 10MHz?
[19:31:50] <Jartza> 640x480 has pixel clock of 25.125MHz
[19:31:58] <Lambda_Aurigae> grrr.
[19:32:05] <Lambda_Aurigae> I meant 20MHz...so, won't work.
[19:32:18] <Lambda_Aurigae> 800x600 is 40MHz I do believe.
[19:32:26] <Lambda_Aurigae> you need a faster chip.
[19:32:39] <Jartza> not sure if I'm trying another vga :D
[19:32:44] <Lambda_Aurigae> hehe.
[19:32:55] <Jartza> but I haven't used xmega yet, so I wanted to get to know it
[19:34:13] <Lambda_Aurigae> I kinda skipped that and went to 32bit mips core.
[19:35:18] <Jartza> for 32bit I mainly use cortex m arm
[19:35:58] <Lambda_Aurigae> nifty if you have a good hardware platform to use for it.
[19:36:40] <Lambda_Aurigae> I'm still trying to figure out how to do low level programming on an android tablet or phone.
[19:39:49] <Casper> So, I have a signal that I need to decode, it's an ir signal from a split unit heat pump remote control. The signal is basically a start, 36 bits, "pause bit", 32 bits, "pause bit", then a second identical copy (except a bit is changed in the first packet). Start bit is high/low of about 8/5ms, 0 bit is high/low of 0.5/0.5 and 1 bit is 0.5/1.5ms, the "pause bit" is high 0.5 low.... didn'T mesured, but about 20ms, the second pause is longer...
[19:39:58] <Casper> how would you go about capturing that?
[19:40:20] <Lambda_Aurigae> is it just plain flashing IR LED?
[19:40:28] <Lambda_Aurigae> or is it on top of a carrier?
[19:40:40] <Casper> top of carrier, that I have suppressed
[19:40:55] <Casper> so now I have a clean signal
[19:41:40] <Lambda_Aurigae> the start should give you a bit width....using timer to watch and measure such..then start capturing the data according to that timing.
[19:41:42] <Casper> http://i.imgur.com/qxAi7hw.png <=== that's the signal once the carrier has been dirtily suppressed
[19:41:54] <Lambda_Aurigae> several different ways to do it I suppose.
[19:42:23] <Lambda_Aurigae> AVR410
[19:42:26] <Casper> the timing will change once I get a real IR receiver module... it is a bit slow to turn on
[19:43:06] <Lambda_Aurigae> even includes assembly code to do it.
[19:43:55] <Casper> hmmm need to change alot but... might be kinda of a good start, but will be a good start for another project...
[19:44:02] <Casper> RC5 use manchester
[19:44:07] <Casper> this one use PWM
[19:44:18] <Lambda_Aurigae> should give you an idea on how to do it though.
[19:44:23] <Lambda_Aurigae> there are other things out there.
[19:44:39] <Casper> I think what I need to care is really only the low time
[19:44:50] <Lambda_Aurigae> avr135...using timer capture to measurepwm duty cycle.
[19:45:14] <Casper> when pin goes low, mesure time... if 5ms then it was a start bit.... if 0.5 then 0, if 1.5 then 1...
[19:46:27] <Jartza> oh
[19:46:32] <Jartza> xmega supports external ram
[19:46:38] <Jartza> which can be twice the speed of cpu
[19:46:53] <Jartza> (or I'm reading this totally wrong)
[19:47:01] <Lambda_Aurigae> pic32 does too if you have the right chip.
[19:47:22] <Jartza> and DMA could be used to read external ram
[19:47:43] <Lambda_Aurigae> yup.
[19:47:49] <Lambda_Aurigae> and it should be able to execute from ram too.
[19:48:09] <Lambda_Aurigae> which makes for a nifty little toy to dynamically load programs without wearing out the flash.
[19:48:43] <Jartza> but that then means up to 64MHz pixel clock? :)
[19:48:52] <Jartza> _almost_ 1024x768
[19:48:58] <Jartza> that's 65MHz
[19:50:42] <Jartza> the internal memory can only work at cpu speed
[19:50:56] <Jartza> but if just directly pushing data from external memory to pin
[19:51:03] <Jartza> with dma
[19:51:19] <Lambda_Aurigae> push it out to a whole 8bit port a byte at a time...you can do RGBI
[19:51:23] <Lambda_Aurigae> 8bit color.
[19:51:35] <Jartza> :)
[19:51:40] <Jartza> darn
[19:51:44] <Jartza> started to rething vga
[19:51:53] <Jartza> maybe not, I have too many unfinished projects :D
[20:42:22] <TechIsCool> http://pastebin.com/hVcFbdgA So I have this code working with a single command and a single returned string now I am trying to send two commands and return 8 bytes of data
[20:42:25] <TechIsCool> can anyone help me?
[20:42:59] <TechIsCool> if I change line 95 from || to && and then use write and read it works
[20:43:04] <TechIsCool> almost
[20:43:15] <TechIsCool> I get a buffer overflow after 3 bytes read in
[22:58:20] <Casper> woah
[22:58:31] <Casper> I think something is really brolken
[22:59:35] <Casper> http://pastie.org/private/4obnktmqgdvovuavzydjtq <=== shrunk version of the peter fleury's uart lib example
[23:00:46] <Casper> anyone have an idea of what might be wrong?
[23:17:27] <Casper> why is that every single time I want to code... something is broken?
[23:18:24] <Thrashbarg> all software is shit :P
[23:20:24] <Casper> did you saw the paste?
[23:21:26] <Casper> ... might be a bug of peter fleury's lib...
[23:21:43] <Casper> no..
[23:31:58] <Casper> found the issue! yay
[23:36:35] <Thrashbarg> yay
[23:37:24] <Thrashbarg> I had a problem last night with an ATmega MIDI to CV adapter I was making. Turned out when I read MIDI data, I read one more character than what I was supposed to. Silly human!
[23:37:31] <Thrashbarg> was driving me nuts having it not working
[23:38:39] <Xark> Thrashbarg: D'oh. So it was hanging waiting for input that would not come (or come from next "packet")?
[23:39:22] <Thrashbarg> yup
[23:47:24] <Casper> yay! got uart working... now... to figure out input capture