#avr | Logs for 2016-04-16

Back
[00:12:48] <anonnumberanon> anybody make bipedal robots in here?
[00:14:20] <Lambda_Aurigae> I did back in my lego days.
[00:37:24] <anonnumberanon> doesn't count
[00:40:50] <Lambda_Aurigae> it worked...and walked.
[00:41:01] <Lambda_Aurigae> could even turn and walk backwards.
[00:49:13] <cehteh> i had one of these tin-toys with spring loaded drive :D
[00:57:25] <anonnumberanon> operated by human? if not don't count
[00:58:23] <Lambda_Aurigae> well, the spring didn't wind itself!
[01:00:31] <Lambda_Aurigae> the secret is either having wide feet that kind of overlap the center of gravity or having a swinging mass that can move over one foot or the other.
[01:00:55] <Lambda_Aurigae> wide feet method is easier to work with but turning is a bit tricky.
[01:01:20] <Lambda_Aurigae> the swinging mass method is better for high speed and turning but much harder to implement..takes some serious fun PID.
[01:04:12] <cehteh> puh .. documentation infrastructure is up and kicking
[01:31:51] <inflex> woohoo... got my usbtiny to program my tiny10
[01:36:05] <anonnumberanon> Lambda_Aurigae, and then there is the DrGuero2001 method.
[01:48:29] <cehteh> http://muos.pipapo.org/ ... for a start
[01:48:36] <cehteh> (very WIP)
[02:01:48] <anonnumberanon> WIP..
[02:02:02] <anonnumberanon> oh
[02:02:31] <anonnumberanon> before checking it out, you've added robot stuff to it?
[02:03:57] <cehteh> eh when?
[02:04:20] <cehteh> i worked on setting up all this documentation generating
[02:04:42] <cehteh> and what is 'robot stuff'?
[02:04:58] <cehteh> meep_meep() ?
[02:05:39] <cehteh> i may add servo drivers *some day* .. when i need that
[02:30:37] <anonnumberanon> had to leave fast, back
[02:31:27] <anonnumberanon> robot stuff: make it walk, make it not fall with a gyro, make it make a sound, make it have LEDs
[02:31:31] <anonnumberanon> for starters
[02:31:43] <anonnumberanon> you can add vision but I'm not interested in thaat
[02:32:07] <anonnumberanon> reading the doc on the "concept"
[02:44:24] <anonnumberanon> looks good
[02:44:36] <anonnumberanon> you put a lot of work into this
[03:07:13] <cehteh> anonnumberanon: such things are not really part of the OS .. i may add drivers for gyro/accelerometers and i may add a PID library
[03:08:01] <cehteh> ah an i have no vision :D (sans world domination with a lot ATtinys)
[03:08:20] <anonnumberanon> lol
[03:08:43] <cehteh> its just pragmatic, add whats needed, if you want to use it, feel free to do so
[03:09:06] <anonnumberanon> okay!
[03:09:31] <anonnumberanon> I gotta read about those queus on the doc one day.
[03:09:46] <anonnumberanon> I have no idea what use they could have.
[03:09:58] <cehteh> i think the doc will be ready next days, i now just have to write a bit more
[03:10:06] <cehteh> heh
[03:10:10] <anonnumberanon> kk
[03:10:56] <cehteh> i i'd do a robot i'd use my os for that, i tihnk its pretty well suited for such a task, but of couse lacks a bit at the current state
[03:11:47] <cehteh> ^if
[03:12:01] <cehteh> but yes i am biased :D
[03:15:31] <anonnumberanon> maybe you can add one driver to connect to an lcd
[03:16:59] <anonnumberanon> or serial
[03:17:31] <anonnumberanon> I think it's cute though. I have to try and read the code.
[03:18:33] <cehteh> serial is already there
[03:19:40] <cehteh> i put some efforts into it. it has a fully functional line editor, utf-8 awareness and a tagged transmission queue which can save lots of ram
[03:20:07] <cehteh> (and no documentation yet :D)
[03:21:55] <anonnumberanon> pseudo code >> comments >> documentation
[03:22:33] <anonnumberanon> Maybe for the doc just do a uml diagram of what happens in the program that tells a thousand words
[03:25:01] <anonnumberanon> http://forums.trossenrobotics.com/showthread.php?7864-MX-64-legs-for-biped
[03:28:28] <cehteh> sounds like "how to support the servo manufacturing industry" :D
[03:28:45] <cehteh> .. and i have my own documentation system
[03:29:10] <cehteh> scapes documentation from source and text files, assembles it and generates nice docs
[03:29:22] <cehteh> (also the webpage, the issues list and so on)
[03:30:36] <cehteh> i just say 'make publish' and it generates docs and uploads them to the webserver
[04:05:17] <anonnumberanon> so painful to go through the ones with poor docs: http://www.bt2000.co.uk/datasheets/invensense/RM-MPU-6500A-00.pdf
[04:21:09] <cehteh> looks ok to me
[04:22:43] <anonnumberanon> bed
[04:22:58] <cehteh> they have a shitload of functions. u know some (most) inversense mpu's have some dsp on board for filtering/calibration .. but docs for that are only available under NDA
[07:02:29] <hetii> Hi
[07:03:00] <hetii> Maybe some of you play with esp8266? I stuck with gpio16 issue: https://github.com/SuperHouse/esp-open-rtos/issues/127
[07:18:09] <inflex> can you use signal diodes on AVR ISP programming lines without too much detriment?
[07:18:11] * inflex should just try
[07:18:41] <Lambda_Aurigae> don't see why not.
[07:20:25] <cehteh> ISP is short for "in system programming" ...
[07:31:40] <ljc> hey so i'm trying to load program memory into a register. the memory is pointed to by the Z register, r30 is 0x02, r31 is 0x00, and i'm using the instruction "lpm r16, z"
[07:32:56] <Lambda_Aurigae> what chip?
[07:34:09] <Lambda_Aurigae> remember that data is stored in word format....Z-LSB points to the low byte if 0 and high byte if 1.
[07:34:35] <ljc> ms2560
[07:34:52] <Lambda_Aurigae> assuming you mean atmega2560?
[07:35:00] <ljc> oh yes
[07:35:17] <Lambda_Aurigae> so, what is the problem?
[07:35:25] <ljc> yea, i don't quite get that low byte/high byte thing
[07:35:38] <ljc> so if R31:30 is 00:02
[07:35:51] <ljc> the low bit is 0 right
[07:36:17] <Lambda_Aurigae> yes.
[07:36:52] <Lambda_Aurigae> convert the 02 to binary. 00000010
[07:37:13] <ljc> well, the problem is that there is a character at the 0002 location in program memory, and it's not being loaded into r16
[07:37:44] <Lambda_Aurigae> you are certain it is there?
[07:38:11] <ljc> well i'm looking at the memory dialog box
[07:38:39] <Lambda_Aurigae> "the memory dialog box" ok..never seen one of those on an avr...sorry.
[07:39:05] <ljc> sorry i'm not using the correct technical term
[07:39:30] <Lambda_Aurigae> I am guessing you are using some kind of debugger or simulator or something?
[07:39:33] <ljc> to clarify i'm using avr studio
[07:39:36] <Lambda_Aurigae> oh.
[07:39:41] <Lambda_Aurigae> no clue on that then.
[07:39:43] <ljc> and i select view->memory
[07:39:46] <Lambda_Aurigae> it won't run on my computer.
[07:40:29] <ljc> oh so what are you running then? or how are you using avr
[07:40:38] <Lambda_Aurigae> is that showing memory in 16bit words or 8bit bytes?
[07:40:49] <Lambda_Aurigae> I run linux with a text editor and command line.
[07:41:10] <ljc> so there's an avr compiler?
[07:41:14] <Lambda_Aurigae> yes.
[07:41:16] <Lambda_Aurigae> avr-gcc
[07:41:31] <Lambda_Aurigae> nice little multi-platform program set
[07:41:33] <ljc> that was going to be my second question, i've seen c-avr links around
[07:41:35] <Lambda_Aurigae> it's used by atmel studio.
[07:41:45] <Lambda_Aurigae> avr-gcc, avr-binutils, and avr-libc.
[07:42:13] <Lambda_Aurigae> don't even need a graphic environment to work with avr.
[07:42:29] <Lambda_Aurigae> I do it quite often on older p-4 laptops without any gui installed at all.
[07:42:29] <ljc> and to answer your question it's 16bit words :)
[07:42:48] <ljc> do you code avr as a hobby?
[07:42:49] <Lambda_Aurigae> ok..so, your address of the character in question is what?
[07:42:57] <cehteh> the bad thing: no coffee breaks, waiting for AVR-Studio to start up :D
[07:43:01] <Lambda_Aurigae> yes. it's been a hobby for,,,oh,,,14 years or so now.
[07:43:21] <ljc> 000002 according to the memory view
[07:43:21] <Lambda_Aurigae> cehteh, I don't drink coffee unless I'm camping and then I'm not programming AVRs.
[07:43:29] <cehteh> ok
[07:44:15] <cehteh> anyway i am feeling much more comfortable with the editor of my choice and a makefile too
[07:44:19] <Lambda_Aurigae> ljc, so, if that is a word address....you have to put that word address in the Z register at Z-31...1 not Z-31...0
[07:44:55] <Lambda_Aurigae> the Z-LSB is used to choose the low or high byte of the word.
[07:45:01] <Lambda_Aurigae> so, it looks like you are off by one word.
[07:45:06] <cehteh> addressing flash is fun .. :)
[07:45:15] <cehteh> sometimes its words, sometimes its bytes
[07:45:34] <cehteh> just use the compiler/lib to do the right thing
[07:45:56] <Lambda_Aurigae> cehteh, I'm guessing he is working in assembly here as he asked about lpm directly.
[07:46:10] <ljc> yea, assembly
[07:46:15] <cehteh> fun
[07:47:13] <ljc> ok so z31 should be 0x03 then lambda? but actually the lsb will be ignored and it will actually look at the 0002 memory space
[07:47:39] <Lambda_Aurigae> I didn't say add 1
[07:47:43] <Lambda_Aurigae> I said shift by 1
[07:47:48] <Lambda_Aurigae> 0x04
[07:47:59] <Lambda_Aurigae> move the whole thing over one bit.
[07:49:33] <ljc> coolio i'll try 'rol'
[07:49:57] <Lambda_Aurigae> http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_LPM.html
[07:50:39] <ljc> ok that works. thank you very much
[07:50:54] <Lambda_Aurigae> great site that breaks down each assembly instruction.
[07:51:06] <Lambda_Aurigae> or, you could get the same thing from the avr instruction set pdf.
[07:51:09] <ljc> ok so 0b0101 = 0x04 = memory space 0002
[07:51:38] <Lambda_Aurigae> umm.
[07:51:41] <Lambda_Aurigae> no.
[07:51:55] <ljc> yea, i saw that, but i guess i need more examples
[07:52:07] <ljc> er, 0b0100
[07:52:22] <Lambda_Aurigae> http://www.atmel.com/images/doc1233.pdf
[07:53:54] <ljc> thanks for that
[07:57:36] <ljc> lambda i'm curious about what projects you've been working on?
[08:00:01] <Lambda_Aurigae> mostly I've been working on a C interpreted OS like the old commodore-64 style BASIC OS.
[08:01:23] <ljc> nice man, that's pretty cool
[08:03:07] <Lambda_Aurigae> mostly I'm rewriting a program called picoC
[08:03:21] <Lambda_Aurigae> to fit on an atmega1284p and/or a pic32mx270f256b
[08:07:53] <ljc> so you rewrite picoC and then you'll be able to write C on the avr chip?
[08:11:54] <Lambda_Aurigae> yes, basically.
[08:12:08] <Lambda_Aurigae> it will have a text editor on board, hopefully,
[08:12:34] <Lambda_Aurigae> and I hope to be able to actually write C, or a subset anyhow, and execute the code, all on the chip without having to compile it.
[08:12:37] <Lambda_Aurigae> it will be slow
[08:13:05] <Lambda_Aurigae> mostly it will be something like a C based scripting language, like bash or csh.
[08:18:12] <ljc> hm ok that's interesting
[08:18:40] <Lambda_Aurigae> no real purpose for it other than a personal hobby/challenge.
[08:19:28] <Lambda_Aurigae> will tie it together with Jartza's octapentaveega to make a low res PC
[08:19:47] <Lambda_Aurigae> add a ps/2 keyboard and away I go.
[08:20:13] <Lambda_Aurigae> plans are to have SD card slot for mass storage too.
[08:21:16] <Lambda_Aurigae> if I do it with the pic32 chip then I can actually load native programs into sram and execute them, not just interpreted C.
[08:21:27] <anton02> do you think there'd be signal integrity issues if you were to pulse an esp8266's GPIO at around 50mhz?
[08:21:45] <ljc> yea i'm currently thinking about that interpreted C you mentioned
[08:21:55] <ljc> i haven't heard of it before
[08:21:57] <Lambda_Aurigae> anton02, I think that's a bit excessive.
[08:22:16] <Lambda_Aurigae> not sure what the cpu speed of the esp8266 is though.
[08:22:17] <anton02> Lambda_Aurigae, so 'probably'?
[08:22:29] <anton02> it's 80mhz
[08:22:32] <Lambda_Aurigae> more like, maybe, possibly, have to look at the specs
[08:22:41] <Lambda_Aurigae> yeah..50MHz is gonna be too fast.
[08:22:48] <Lambda_Aurigae> I doubt it will even do it that fast.
[08:23:03] <Lambda_Aurigae> generally you can't toggle an i/o faster than half the cpu speed.
[08:23:12] <anton02> oh, didn't know that
[08:23:15] <Lambda_Aurigae> well.
[08:23:24] <anton02> what parameters should I be looking at in the specs?
[08:23:26] <Lambda_Aurigae> how long does it take to write 1 and 0 to an i/o port?
[08:23:55] <Lambda_Aurigae> if you can do 1 in 1 clock cycle...and 0 in 1 clock cycle, then you can do half the clock speed.
[08:24:14] <Lambda_Aurigae> an AVR can, in theory, do that, if you aren't doing any loops,,,just lots of writes to the port.
[08:24:28] <Lambda_Aurigae> soon as you loop you get jitter in your nice square wave though.
[08:24:54] <Lambda_Aurigae> now, with some processors, like pic32mx, you can just set it up to do it with DMA and let it run.
[08:25:05] <anton02> Lambda_Aurigae, apparently it's really bad. http://www.esp8266.com/viewtopic.php?f=24&t=1486
[08:25:15] <Lambda_Aurigae> then let the processor do other things independently.
[08:25:30] <anton02> cool. i might look at that then
[08:26:14] <anton02> im not sure if sampling a pin would be the same as setting a pin though
[08:26:21] <Lambda_Aurigae> even at that, I think you are still limited to half the main clock speed.
[08:26:24] <anton02> so im not sure if that threads relevant
[08:26:32] <Lambda_Aurigae> which, on the pic32mx270f256b is 50MHz.
[08:26:44] <Lambda_Aurigae> reading a pin is faster.
[08:26:57] <Lambda_Aurigae> but you have to do something with that data...which slows things down.
[08:27:05] <anton02> well according to that thread the esp's sampling speed is 8khz
[08:27:32] <Lambda_Aurigae> I'm guessing that chip is doing other things at the same time too.
[08:28:11] <Lambda_Aurigae> and not sure what that library is with the gpio.write and gpio.read functions.
[08:28:15] <anton02> is there a spec i can look for in the datasheet?
[08:28:22] <Lambda_Aurigae> sometimes.
[08:30:14] <anton02> so an pic32mx270f256b is ideal for pulsing a matrix display?
[08:30:25] <Lambda_Aurigae> might be a bit overkill.
[08:30:55] <Lambda_Aurigae> 50mhz/83dmips 28pin 256K flash, 65K sram, hardware usb
[08:31:31] <anton02> for the board im talking about people need to usually use fpga so probably not overkill
[08:33:29] <Lambda_Aurigae> need more info on what you want to do.
[08:33:38] <Lambda_Aurigae> 50MHz for a matrix seems excessive to me.
[08:33:47] <Lambda_Aurigae> unless you are driving a VGA resolution matrix.
[08:34:29] <Lambda_Aurigae> from what I'm seeing on the forums, absolute max is half cpu clock but not doing anything useful with that.
[08:35:34] <anton02> this is what the boards made of http://bikerglen.com/projects/lighting/led-panel-1up/
[08:35:56] <anton02> under "the led panel"
[08:39:27] <Lambda_Aurigae> only need outputs in the order of 20MHz really.
[08:39:36] <Lambda_Aurigae> and that's doing 200Hz refresh.
[08:39:56] <Lambda_Aurigae> half that at 100Hz refresh which should be more than sufficient.
[08:40:24] <Lambda_Aurigae> that would be pushing hard on an avr running at 20MHz but a pic32 running at 50MHz should handle it nicely.
[08:40:30] <Lambda_Aurigae> specially if you used some DMA tricks.
[08:40:44] <anton02> cool. thanks. ill use that chip then.
[08:40:59] <Lambda_Aurigae> it's a whole different world from AVR though.
[08:41:19] <Lambda_Aurigae> different programmer hardware and 50 reference manuals to dig though for learning the whole thing.
[08:42:03] <Lambda_Aurigae> hell, I would almost do it with some serial sram chips and an external oscillator.
[08:43:11] <Lambda_Aurigae> oh...back up a sec.
[08:43:19] <Lambda_Aurigae> I didn't see the part that it is RGB
[08:43:27] <Lambda_Aurigae> that takes on a whole new world of hurt.
[08:44:04] <Lambda_Aurigae> still, I would think a pic32mx at 50MHz could handle it with DMA
[08:44:14] <anton02> ill use 3
[08:44:19] <anton02> one for each colour
[08:45:23] <Lambda_Aurigae> I could do it with 1 I'm sure.
[08:46:15] <Lambda_Aurigae> heck, a single 23A1024 would have plenty of ram and speed for it
[08:46:27] <anton02> here's some more specific info about the bit banging speed of the esp. I'm not really sure how to interpret his findings though http://www.esp8266.com/viewtopic.php?f=24&t=832
[08:46:38] <Lambda_Aurigae> run it in sqi mode and just use 3 of the 4 bits to clock data out.
[08:47:44] <anton02> what is SQI?
[08:47:50] <Lambda_Aurigae> serial quad interface.
[08:48:04] <Lambda_Aurigae> you can output 4 bits at a time from the chip.
[08:48:14] <Lambda_Aurigae> kinda like spi only doing it 4 bits instead of 1 bit at a time.
[08:48:38] <Lambda_Aurigae> and you can set the chip to an address then tell it to just output data then toggle the clock line and it just feeds data out.
[08:48:46] <Lambda_Aurigae> I've used that for generating VGA signals
[08:49:36] <anton02> i can't find info about that mode in here http://docs-asia.electrocomponents.com/webdocs/1385/0900766b813855a3.pdf
[08:50:13] <Lambda_Aurigae> nono...that's not a pic32 thing.
[08:50:20] <Lambda_Aurigae> although, some pic32mz chips have an sqi interface.
[08:50:31] <Lambda_Aurigae> I meant the 23lc1024
[08:50:35] <Lambda_Aurigae> err.
[08:50:40] <Lambda_Aurigae> 23A1024
[08:51:27] <anton02> why not pic32mx270f256b ?
[08:51:49] <anton02> 23A1024 is only 20mhz
[08:52:02] <Lambda_Aurigae> but it can put out 4 bits at a time at 20MHz
[08:52:23] <Lambda_Aurigae> I am thinking combining a pic32 and the 23a1024
[08:52:43] <Lambda_Aurigae> sorry..my mind is just running away at the moment.
[08:53:21] <anton02> pic32mx270f256b does have DMA though right?
[08:53:23] <Lambda_Aurigae> without actually doing some tests, I am about 86.992% confident that the pic32mx270 series or similar could handle it.
[08:53:26] <Lambda_Aurigae> yes..it has DMA
[08:53:33] <Lambda_Aurigae> 4 channels of it in fact.
[08:54:13] <anton02> oh, yeah, i forgot to mention im putting 3 of these displays together
[08:57:51] <anton02> I'm not really sure how the daisy chaining side of things work. can't seem to find any info on it
[08:58:02] <anton02> for this display
[08:58:18] <Lambda_Aurigae> that's where you get into the higher refresh rates needed I suspect.
[08:59:21] <Lambda_Aurigae> that device also seems to be doing some pseudo-pwm, also requiring the high refresh rates.
[09:00:07] <Lambda_Aurigae> it would take some serious rework to duplicate that.
[09:01:11] <Lambda_Aurigae> the docs say it is doing 12bit color...that's definitely pwm-ish with the hardware layout they are using.
[09:01:19] <Lambda_Aurigae> that just added another level of complexity.
[09:01:37] <Lambda_Aurigae> still doable I would think but just not a simple project.
[09:01:57] <anton02> the good thing is that each display will be showing a single digit so i dont necessarily need to daisy chain
[09:02:28] <Lambda_Aurigae> if you didn't need the 12bit color thingie and could go with 3 bit color then it would be much more doable.
[09:02:33] <Lambda_Aurigae> or, rather, easier to do.
[09:03:10] <anton02> it is 3bits though. where did you see that it's 12bit?
[09:04:46] <anton02> maybe you're looking at the binary code modulation section where he produces more colors
[09:06:13] <anton02> "The above process uses one bit per LED color. This will give you eight possible colors: black; the primary colors red, green, and blue; the secondary colors cyan, magenta, and yellow; and white."
[09:07:38] <Lambda_Aurigae> I know i just saw it dangit.
[09:08:28] <Lambda_Aurigae> last line before GPMC Interface
[09:09:40] <Lambda_Aurigae> what it appears to be doing is refreshing 200 times per second...with 4 pulses in a row for each LED making up something like a PWM signal.
[09:11:08] <Lambda_Aurigae> would have to look a bit closer at the software and how it's generating the image but that's what it kinda looks like so far.
[09:12:54] <anton02> i dont need super complex color anyway
[09:13:05] <Lambda_Aurigae> wish I had some of those RGB LED matrix boards.
[09:13:13] <Lambda_Aurigae> I just thought of another way to do it.
[09:13:30] <anton02> they are only $30 with free postage from ali
[09:13:38] <Lambda_Aurigae> only.
[09:13:52] <anton02> aud sorry
[09:13:53] <Lambda_Aurigae> I want at least 64x64 pixels.
[09:13:57] <anton02> so less for USD
[09:14:13] <Lambda_Aurigae> so, 8 of them.
[09:15:13] <anton02> there's another write up at adafruit where they powered them with a 20mhz avr mega.
[09:15:39] <Lambda_Aurigae> yeah..it's doable...you just don't get that 12bit pseudo pwm or nearly the refresh rate.
[09:15:42] <anton02> thought the board had half the LEDs
[09:15:54] <anton02> though*
[09:16:03] <Lambda_Aurigae> I've run an 8x8 bicolor with an attiny
[09:18:00] <Lambda_Aurigae> with that one you posted, however, you do need a pretty hefty processor, like an FPGA, to get that 12bit color output.
[09:18:24] <Lambda_Aurigae> I suspect the pic32 could do it as well easily enough.
[09:18:45] <anton02> since this PIC is probably at least 3 times faster on the GPIO than a mega, but the display is only twice the size it would probably give me better results still than what adafruit got
[09:18:59] <Lambda_Aurigae> oh, definitely.
[09:19:08] <Lambda_Aurigae> and I can think of 3 or 4 different ways to do it.
[09:19:23] <Lambda_Aurigae> depending on what kind of shift register hardware you use..or don't use.
[09:20:05] <Lambda_Aurigae> there is a version without usb too..
[09:20:09] <Lambda_Aurigae> might be cheaper.
[09:20:31] <Lambda_Aurigae> http://www.microchip.com/wwwproducts/en/PIC32MX170F256B
[09:21:08] <Lambda_Aurigae> if you don't mind surface mount chips then you can get one with lots more i/o pins.
[09:21:39] <Lambda_Aurigae> in which case you can drive all the pins on the display directly(through transistors) and not have to worry with external shift registers.
[09:21:57] <Lambda_Aurigae> makes things much nicer.
[09:22:43] <anton02> those shift registers are hard wired into the display though
[09:22:48] <Lambda_Aurigae> oh.
[09:22:52] <Lambda_Aurigae> that changes things a bit then.
[09:23:46] <Lambda_Aurigae> the column address decoders hard wired too?
[09:24:00] <anton02> yep
[09:24:51] <Lambda_Aurigae> so, for each panel you need 8 i/o pins.
[09:24:56] <Lambda_Aurigae> no.
[09:24:57] <Lambda_Aurigae> 10
[09:25:19] <anton02> really? I thought it was just the 6
[09:25:48] <Lambda_Aurigae> 4-to-16 decoder takes 4 inputs unless it's doing something strange.
[09:26:00] <anton02> the panel is divided into 2 sections where one set of RGB provides data to 1 section and the other RGB provides data to the second section
[09:26:04] <Lambda_Aurigae> got a link for the display panel itself?
[09:26:28] <anton02> there's no datasheets for it. it's all been reverse engineered
[09:26:30] <Lambda_Aurigae> as I'm not seeing actual interface info.
[09:30:18] <Lambda_Aurigae> ok...looks like 4 lines for the row select...and that selects upper and lower row at the same time.
[09:30:38] <Lambda_Aurigae> A[3:0] is 4 address lines.
[09:30:57] <Lambda_Aurigae> so, 6 upper, 6 lower, and 4 address.
[09:31:06] <Lambda_Aurigae> so, 16 i/o pins.
[09:31:27] <Lambda_Aurigae> wait....gotta read UP
[09:31:34] <Lambda_Aurigae> yeah...that's right.
[09:31:38] <Lambda_Aurigae> according to this.
[09:31:47] <Lambda_Aurigae> but my numbers are off.
[09:32:56] <Lambda_Aurigae> address, 4...sclk, latch, blank(common), 3...R0,G0,B0,R1,G1,B1, 6
[09:33:08] <Lambda_Aurigae> so, down to 13..if I am reading this correctly.
[09:33:22] <Lambda_Aurigae> sclk, latch, and blank are common to top and bottom.
[09:33:29] <Lambda_Aurigae> address is common to top and bottom
[09:33:43] <Lambda_Aurigae> only separation is R(0/1), G, B
[09:33:52] <anton02> what is a1,a2,a3? http://bikerglen.com/projects/lighting/led-panel-1up/led-panel-1up-files/rgb-led-panel-display-data-connections.png
[09:34:15] <Lambda_Aurigae> should be A0, A1, A2, A3
[09:34:31] <Lambda_Aurigae> that's A[3:0] the row select.
[09:35:03] <anton02> oh okay
[09:35:15] <Lambda_Aurigae> that turns numbers 0 through 15 into single pin outputs that turn on a single row across the display...actually, one row top and bottom at the same time.
[09:35:56] <anton02> 23$ here http://www.aliexpress.com/item/64-32-F5-pixel-SMD3528-pitch-7-62mm-indoor-dual-color-led-dot-matrix-display-Leeman/32566586496.html
[09:37:33] <Lambda_Aurigae> 64*32..nice...just need 2 of those.
[09:37:40] <Lambda_Aurigae> bit out of my price range at the moment though.
[09:37:50] <Lambda_Aurigae> just spent 800+ on stuff for my deck project.
[09:38:07] <Lambda_Aurigae> and another 400 for stuff for my shed project and I gotta spend more on that to reinforce the floor soon.
[09:38:54] <Lambda_Aurigae> I don't see any reason that an AVR couldn't drive one of those panels though.
[09:39:04] <Lambda_Aurigae> you might not get super high refresh rates or anything
[09:40:11] <anton02> yeah i dont think any atmegas have that many pins though do they? i mean apart from the mega which is $20
[09:40:59] <theBear> how many pins ? oh, 64+32 ? damn
[09:41:24] <theBear> still, there's fast buffer-latchs and if you got the time shift-regs these days
[09:42:05] <Lambda_Aurigae> theBear, the 32x32 pixel version only needs 13 i/o pins.
[09:42:06] <theBear> a comes from (traditional) "address"
[09:42:19] <Lambda_Aurigae> atmega328p could handle it.
[09:42:37] <theBear> oh, heck, even most (all?) the 20pins can handle that, but yeah, 328 was my big finale for this sentence :-*
[09:42:43] <theBear> :-( that is
[09:42:51] <theBear> mr thunder-stealey guy
[09:43:05] <Lambda_Aurigae> atmega64 or atmega1284p could handle the 32x64 version I bet.
[09:43:11] <Lambda_Aurigae> err..64x32 version
[09:43:20] <Lambda_Aurigae> so your refresh rate might be 20 or 25 Hz
[09:43:48] <theBear> i been seeing this whole giant display thing shaping up over more than a couple days now... does it have a desired refresh rate or any of that kinda stuff ?
[09:44:41] <Lambda_Aurigae> no clue..the one anton02 posted with the fpga was doing 200Hz refresh with a pseudo-pwm across multiple refresh cycles to get 12bit color
[09:44:45] <anton02> it doesnt need to be super fast. maybe 10fps
[09:44:59] <Lambda_Aurigae> I would think 25Hz would be sufficient.
[09:45:04] <Lambda_Aurigae> 10Hz would flicker a lot.
[09:45:45] <anton02> i mean i only need 10fps. however many hz that requires
[09:45:59] <Lambda_Aurigae> your fps is different from the refresh rate.
[09:46:15] <theBear> it might be, depends
[09:46:21] <Lambda_Aurigae> refresh rate has to be high enough that the pixels don't fade from sight before being refreshed.
[09:46:30] <Lambda_Aurigae> theBear, yes, but doesn't necessarily have to be.
[09:46:33] * theBear may be ballparking some "dumb" delay/fade tricks here
[09:46:54] <theBear> Lambda_Aurigae, yeah, don't worry, we on the same page, i was more musing out loud there
[09:46:57] <Lambda_Aurigae> theBear, that delay/fade trick is how they were doing the 12bit color.
[09:48:26] <theBear> Lambda_Aurigae, i said tricks <grin> but i suspect you thinking the opposite direction to me, i mean electrical side tricks to do things like make a pulsed led take a lot longer than the pulse to stop being lit
[09:48:28] <Lambda_Aurigae> depending on the LEDs, I would think a 25Hz refresh would be sufficient and I bet an AVR could handle a 32x32 RGB panel just fine.
[09:49:24] <theBear> most basic example, something like caps to make 10% duty cycle look like 100%, kinda changes the game on flicker vs scanning/driving speeds
[09:49:34] <Lambda_Aurigae> hehe...yeah.
[09:49:41] <Lambda_Aurigae> not an option on this particular panel though.
[09:50:09] <theBear> oh yeah, i forgot that bit, i been watching from a distance for many days and many ideas, my mind was roaming
[09:50:47] <Lambda_Aurigae> mine does that a lot.
[09:51:21] <Lambda_Aurigae> now I gotta go work on the deck so I have time tomorrow to work on electronics projects.
[09:51:31] <Lambda_Aurigae> covering and screening in the deck.
[09:52:08] <Lambda_Aurigae> https://drive.google.com/open?id=0BxaP1wMEe_6aaWNmLU81SjlLQWM
[09:52:15] <Lambda_Aurigae> ye olde deck project.
[09:52:21] <Lambda_Aurigae> will get more pics as I work today.
[09:52:59] <theBear> oooh, nice and spacious
[09:53:37] <theBear> i used to make a lot of that kinda thing, that and hardwood floors, you know, without any gaps style
[09:56:52] <theBear> i'm tempted to ask a question about approach/design in one visual aspect, but worried that something you may not have ever considered would then bug you
[09:58:29] <Lambda_Aurigae> ask away
[09:58:31] <Lambda_Aurigae> nothing bugs me
[09:58:43] <Lambda_Aurigae> and if it does I'll just nuke the planet you are on from space and be done with it.
[10:00:02] <theBear> aight, either way works for me <grin> i always have trouble deciding either way, but i think with the 2nd one "behind" (when viewed from the yard) that i woulda opted for vertical umm, slats? fence-post-things on the ramp rather than ones that match the ramp iteself
[10:00:37] <Lambda_Aurigae> yeah.
[10:00:46] <Lambda_Aurigae> I would have gone vertical myself,,,and all the way to the ground.
[10:00:53] <Lambda_Aurigae> but I didn't build the initial deck.
[10:00:58] <Lambda_Aurigae> came with the house.
[10:01:21] <Lambda_Aurigae> I just added a 10x12 foot flat section to it 2 years ago.
[10:01:37] <Lambda_Aurigae> and now adding the roof and screening it in.
[10:01:47] <Lambda_Aurigae> it's a patchwork project at best.
[10:01:59] <Lambda_Aurigae> no plans, just look at it, buy stuff, put together till it all fits.
[10:02:19] <theBear> fwoof, glad i didn't make yer sad
[10:02:23] <Lambda_Aurigae> naaa.
[10:02:28] <theBear> you know how i mean, some things, once they have been seen...
[10:02:38] <Lambda_Aurigae> I want to rip it all down and start from scratch but that's too much money.
[10:03:00] <Lambda_Aurigae> because I would have set 4x4 posts in the ground about 2 feet in concrete and all that.
[10:03:04] <theBear> that's the biggest "trick" i learned in all my building-related work... do the opposite of draw the eye, and everything looks golden
[10:03:30] <theBear> meh, it's wood, if you like the place enough you'll get yer chance one day sooner or later :)
[10:03:31] <Lambda_Aurigae> my biggest trick is not spending too much money.
[10:03:44] <theBear> that's a good one
[10:03:47] <Lambda_Aurigae> yeah..I don't plan on moving from here before I have to go to a nursing home.
[10:03:57] <Lambda_Aurigae> that's another 30 years or so I hope.
[10:04:19] <theBear> me too, i think you got it in yer
[10:04:21] <Lambda_Aurigae> half of the deck is CDA
[10:04:33] <theBear> wtf is that standfor ?
[10:04:36] <Lambda_Aurigae> the extension part is not CDA...
[10:04:39] <Lambda_Aurigae> pressure treated.
[10:04:43] <Lambda_Aurigae> so it will last longer.
[10:04:47] <Lambda_Aurigae> keeps rot and bugs out.
[10:05:28] <theBear> oh, modern cyanide wood, got it
[10:05:47] <Lambda_Aurigae> the railing on the front of the extension was the side railing on the original deck that I just swung out.
[10:05:55] <Lambda_Aurigae> so it's treated as well.
[10:05:56] <theBear> just called treated last time i checked here, but i pretty sure here is far away
[10:06:07] <Lambda_Aurigae> I get CDA from way back when.
[10:06:22] <Lambda_Aurigae> it's not really CDA these days..just pressure treated or treated or green treated
[10:06:58] <Lambda_Aurigae> ok..day's a wasting.
[10:07:03] <Lambda_Aurigae> time to go make sawdust!
[10:07:07] <theBear> ahh.... now i gotta remember what that nasty stuff is called
[10:07:14] <theBear> aiight, may your saw have wings
[10:41:29] <rue_bed2> redbull drinking saw?
[10:49:04] <theBear> ancient mythical drinking saw
[11:26:08] <phinxy> With the simulator, is there some way of showing a simulated display driven with the u8glib library?
[11:27:34] <theBear> which the simulator ?
[11:27:42] <theBear> and what does a u8glib do ?
[11:31:04] <phinxy> i will just jump in and try the atmel studio simulator out.
[11:34:06] <theBear> https://youtu.be/BWX1vhXqe_w?list=PLH5H20k8lifOX9_whrneaiqv-bknz4weY there ya go, that's a bit sciencey, should keep yer going
[12:00:47] <cehteh> real men dont simulate
[12:10:46] <superbia> hi lads
[12:11:00] <superbia> i have a problem
[12:11:34] <superbia> http://www.ebay.com/itm/Mini-USB-Nano-V3-0-ATmega328-CH340G-5V-16M-Micro-controller-board-for-Arduino-/271675478151?hash=item3f411ed087:g:7AsAAOSwaNBUbGvI
[12:11:48] <superbia> got 2. soldered the pins to it
[12:12:06] <superbia> both flash the preloaded firmware
[12:12:10] <superbia> both blink
[12:12:22] <superbia> but im only available to flash one
[12:13:12] <superbia> the error i get on the non-working one is avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory
[12:13:41] <twnqx> well, go and look at dmesg before and after you plug the broken one
[12:13:51] <twnqx> last few lines, check for detection & errors
[12:14:46] <superbia> http://pastie.org/private/h1lpc8jl4m21bq2jdsjvng
[12:14:48] <superbia> dmesg
[12:16:35] <twnqx> lloks normal, 8 seconds after connect the booloader exits and the device disappears
[12:19:18] <theBear> superbia, you plugging them in a sensible order ? and one at a time
[12:19:46] <superbia> theBear: sorry for seing me using arduinos
[12:20:37] <theBear> superbia, i forgive you, reasons if i needed any might include already thinking harder than your average arduino user, or asking a sensible question mentioning relevant facts
[12:21:59] <superbia> i didnt reboot this machine
[12:22:05] <superbia> i reckon arch is the issue
[12:22:25] <theBear> plugging 2 at once then removing (or not) one is an issue
[12:22:28] <superbia> i am unsure if the addition of my user to some groups
[12:23:01] <theBear> if you got a gui generally consolekit handles that stuff "magically" these days i beleive
[12:23:35] <theBear> kinda like a default policy of "he's sitting at the damned computer, he's probly allowed to use the ports or optical drive"
[12:30:35] <superbia> theBear: looks like reboot of my arch fixed it
[12:30:41] <superbia> i flash it without a prob
[12:30:51] <theBear> mm, very nice
[12:30:58] <superbia> indeed mm
[12:31:06] <superbia> i guess avr is k.i.s.s.
[12:31:28] <theBear> tho do remember re: pluggign 2 at once, you may/will sometimes end up with other than ttyUSB0 number
[12:32:03] <superbia> ye the problem mate is that i have more tty's now
[12:32:15] <superbia> the arduino got ttyUSB0 now
[12:32:27] <superbia> the ttyS0 was faulty when i last tried
[12:32:45] <superbia> the ttyUSBX is how arch plots my other stm's
[12:32:50] <theBear> ttyS0 is a physical/traditional comport
[12:33:47] <superbia> either way thanks for the support
[12:33:52] <superbia> in the times of need
[12:34:15] <theBear> these days it probyl trivial to ask/tell udev to do something like link any bootloader-mode avrs on usb to /dev/avrprogmagic or something like that
[12:34:37] <theBear> but still gets confusing at best with multiples plugged at the same time
[12:35:57] <cehteh> dunno if the usb-serial adapters have a unique id, if they do you can configure it very detailed
[12:36:16] <cehteh> but usually not worth the efforts, just plug in only one at a time
[12:36:34] <superbia> or just buy more 2$ avr's
[12:36:46] <superbia> either way i have work to do now
[12:36:48] <superbia> ciao
[12:38:27] <theBear> cehteh, i was kinda thinking the other way, like make only bootloader-id/footprint looking avrs appear as the magicdevname so that other already/still plugged ttyUSB things wouldn't confuse matters, to the extent that you could have several usb-serial avrs "running normally" and just reboot one, and if you hit the program inside the bootloader/timewindow that one would be the magicdevname, whichever one it
[12:38:28] <theBear> may be
[12:39:52] <cehteh> digging in the udev guts make me barf anyway
[12:39:56] <cehteh> simple things yes
[12:40:15] <cehteh> but as soon you want to do some more complex stuff it really starts to be painful
[12:40:33] <lorenzo> udev rules <3
[12:41:11] <theBear> if it was guts i wouldn't even know about it, dabbling in the wings is about as far as i felt any need to go :)
[15:28:37] <WormFood> are there other software only usb drivers for the avr, other than v-usb? If there is, I haven't been able to find it yet.
[15:30:07] <Lambda_Aurigae> igor's
[15:30:31] <Lambda_Aurigae> http://www.cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20%28AVR%29_eng.htm
[15:30:36] <Lambda_Aurigae> that was done before v-usb
[15:30:47] <Lambda_Aurigae> in fact, I think v-usb was taken from that.
[15:30:54] <Lambda_Aurigae> I've never seen any others.
[15:32:19] <Lambda_Aurigae> http://www.cesko.host.sk/IgorPlugUDP/IgorPlug-UDP%20%28AVR%29_eng.htm
[15:32:32] <Lambda_Aurigae> he also does bitbanged udp ethernet transmission
[15:32:33] <theBear> v-usb was inspired by it
[15:32:43] <theBear> igor was the amazing first-dude
[15:33:01] <lorenzo> classic igor
[15:33:14] <theBear> and outside of igors works, and v-usb, and one or two tiny offshoot/derivitive projects, nah, that's yer only soft-only options
[15:33:47] <lorenzo> I've got an atmega32u4 here but I'm not sure what's required for proper usb cdc
[15:33:50] <theBear> and effing ethernet, even dumb udp with no CD stuff built in, my god ! igor is a pioneering micro ninja
[15:34:05] <Lambda_Aurigae> lorenzo, a usb stack.
[15:34:13] <theBear> you should grab abcdudes lufa bundle, and look in the examples dir
[15:34:16] <theBear> probly under cdc
[15:34:45] <lorenzo> nice
[15:34:57] <lorenzo> my only usb experience is with pic (18f2550)
[15:35:08] <lorenzo> but I've figured out these solutions are always a bit painful
[15:35:15] <Lambda_Aurigae> lufa is similar in functionality to the microchip pic usb stack.
[15:35:19] <lorenzo> like, 90% of your code revolves around handling the USB
[15:35:21] <Lambda_Aurigae> only different and for avr.
[15:35:25] <lorenzo> and there's very little room left for anything else
[15:36:23] <theBear> i found lufa very efficient and unobtrusive, what little i played with him so far
[15:41:44] <phinxy> i have a bitmap 32x32 bits. How complex is it to rotate the bitmap 45 degrees ?
[15:42:02] <Lambda_Aurigae> bit of vector math.
[15:42:05] <Lambda_Aurigae> some trig
[15:42:19] <phinxy> Is there floating point math involved?
[15:42:26] <Lambda_Aurigae> could be
[15:42:31] <Lambda_Aurigae> or could be done with fixed point math
[15:42:48] <phinxy> as long as the pixels end up where they should be
[15:42:53] <Lambda_Aurigae> could be done with integer math for that matter but that gets kinda strange.
[15:56:54] <WormFood> thanks for the info guys. Please forgive my slow response.
[16:02:18] <theBear> never !
[16:02:24] <theBear> i mean, sure buddy
[16:42:53] <tester21> hi
[16:45:10] <tester21> ive got a quarz like this: https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTHd9L3-WfCL2an8CFkzpEZfhGXQVjPJYPG_pk0oEt3hKccEAPa looking at http://www.engbedded.com/fusecalc/ whats the right setting for the quarz? is it ext crystal / resonator high frequency?
[16:45:20] <tester21> on a atmega16
[16:53:37] <phinxy> i have a function in a library to draw a line from x1y1 to x2y2. Any tips on how i can map a value to this circle? http://imgur.com/UDqRYF0
[16:56:47] <phinxy> I will probably store a few xy coordinates in an array and then set a threshold value to each one
[16:58:44] <phinxy> or some vector math
[17:00:26] <phinxy> i have been avoiding floating point libs :|
[17:07:24] <Lambda_Aurigae> then get fixed point math libs.
[17:30:34] <apo_> phinxy: Map a value to this circle?
[17:31:17] <apo_> as in, 0 -> (0, -1), 0.66 -> (0, 1), 1 -> (1,0)?
[17:32:20] <phinxy> No, im not talking about mapping like that.
[17:33:13] <Lambda_Aurigae> http://stackoverflow.com/questions/2941237/drawing-circle-without-floating-point-calculation
[17:33:29] <apo_> or https://en.wikipedia.org/wiki/Midpoint_circle_algorithm :p
[17:33:36] <Lambda_Aurigae> was just about to past that too.
[17:33:51] <phinxy> i got the word "map" from unreal engine where there is a function called "map range" which takes a value and some parameters and outputs a new one: https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Float/MapRangeClamped/index.html
[17:34:19] <phinxy> im not sure what i want to do , trying to figure it out
[17:34:26] <phinxy> the first step ..
[17:34:40] <apo_> phinxy: that's... still the same as what I said, except not in 2D
[17:34:46] <apo_> yes, that is the first thing you should figure out
[20:58:59] <Evidlo> Is (!(PINB & 1<<PB5)) the right way to check for a 0 on PB5?
[21:42:21] <lorenzo> Evidlo: yeah, or if((PINB & (1<<PB5)) == 0) { ... }
[22:05:15] <Evidlo> My issue was that I had enabled the internal pullup by accident.
[23:59:49] <anonnumberanon> cehteh, what is the resoslution of MUOS_CLOCK_MICROSECONDS
[23:59:50] <anonnumberanon> (
[23:59:50] <anonnumberanon> t
[23:59:50] <anonnumberanon> )?