#avr | Logs for 2015-07-11

Back
[04:48:49] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxU3RuTWl2U3ZIMTg/view?usp=sharing
[04:48:52] <Jartza> with 2 attinys :D
[04:49:39] <Santh> Neat :)
[04:52:01] <Jartza> more colors if I add third one :D
[05:06:15] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxVHZXYWdzV0xNQTg/view?usp=sharing
[05:06:19] <Jartza> maybe a better pic
[05:21:57] <Santh> That’s the same pic ;)
[05:22:17] <Santh> Oops, no :)
[05:24:32] <Jartza> yeah, fixed the colors
[05:45:41] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxZDhjbG1saGNjQWM/edit
[05:45:43] <Jartza> nicer colors
[05:45:50] <Jartza> maybe 2 attinys is enough, no need for third :)
[05:57:18] <twnqx> nice
[05:57:35] <twnqx> one tiny per color? :P
[05:57:58] <Jartza> no, it's 2 tinies
[05:58:11] <Jartza> but 3 colors! (or 4 if black counts)
[05:58:53] <twnqx> one tiny per basic! (r/g/b)
[05:58:58] <twnqx> and then you can do 16M colors!
[05:59:25] <twnqx> with 8bit r/2r DAC
[06:06:53] <Jartza> too much external components :)
[06:08:10] <twnqx> there's no such thing as too many :P
[06:09:18] <twnqx> noooo
[06:09:30] <twnqx> why are my pcb edits of yesterday gone
[06:09:34] <twnqx> i saved it before exiting!
[06:11:15] <twnqx> ... the .brd/.sch are two days older than the most recent backup file
[06:11:17] <twnqx> wtf
[06:43:40] <Jartza> https://slack-files.com/T02FEAMUS-F07FQ5E5U-a51743c596
[06:43:42] <Jartza> well yeah
[06:43:48] <Jartza> 3 attinys can be synced just like 2
[06:44:10] <Jartza> I was lazy to make more colors than 4, but 7 (+black) can be made with those 3
[06:50:04] <Lambda_Aurigae> Jartza, how are you doing the sync?
[06:50:08] <Lambda_Aurigae> and good work too!
[06:52:17] <Jartza> Lambda_Aurigae: first of all, running all chips with same cloxk, daisy-chained
[06:52:33] <Jartza> I enabled fuse that outputs clock from other pin
[06:52:55] <Jartza> the two "slaves" only draw pixels, not sync signals
[06:53:04] <Lambda_Aurigae> kewl.
[06:53:47] <Lambda_Aurigae> spi hardware can be abused to get similar results too as I recall.
[06:54:46] <Jartza> slaves don't start the timer at boot, instead they enable pcint pin change happens with vsync-signal from master and pcint then waits n cycles and fires the same timer as master is running, and disables further pcints
[06:54:59] <Lambda_Aurigae> aahh..
[06:55:50] <Jartza> and as they all run with precisely same clock, after initial sync they "tick together"
[06:56:48] <Lambda_Aurigae> yup.
[07:11:46] <Jartza> well, that was fun
[07:16:45] <Lambda_Aurigae> now, to do 2 tinys per color with an r2r dac for each color....
[07:24:41] <Lambda_Aurigae> https://www.youtube.com/watch?v=TlCCpCB-Gr4
[07:24:47] <Lambda_Aurigae> the ultimate cd/dvd eraser!
[07:26:14] <Jartza> heh
[07:37:34] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxN01oN0FyYTJPSHM/view
[07:37:38] <Jartza> mmkay. there's the colors
[07:46:31] <Lambda_Aurigae> 3 chips?
[07:53:44] <Jartza> yea
[07:53:47] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxdlFQOEtkNFMyY00/view
[07:54:28] <Jartza> but now I'm outta here, laters!
[08:38:44] <serivich> hihi all
[08:47:12] <Lambda_Aurigae> hello serivich
[08:50:50] <Jartza> darn
[08:50:55] <Jartza> started to rain
[08:54:07] <serivich> hi Lambda_Aurigae
[08:54:11] <serivich> hi Jartza
[08:54:22] <Lambda_Aurigae> been raining here for a couple of hours now.
[08:54:25] <Lambda_Aurigae> just light sprinkle.
[08:54:41] <Lambda_Aurigae> but annoying enough that I can't mow and need to get a shelter setup to work on my AC.
[08:56:41] <Jartza> hello serivich
[08:57:14] <serivich> I'm pretty much getting started with AVRs
[08:58:15] <serivich> Able to fiddle with the registers, but right now trying to find an easier way to allow for pin switching by changing one hash define or something
[08:58:20] <serivich> wonder what you guys are up to
[08:59:12] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxZ3BlZTg3OWw3dVE/view?usp=sharing
[08:59:22] <Jartza> I'm up with this :)
[09:00:01] <Jartza> three attinys drawing :)
[09:03:30] <serivich> attinys! I def recall about those 6 pins mcus
[09:03:45] <serivich> brain dead indeed. Can't even use C :/
[09:04:12] <serivich> nice work Jartza !
[09:18:38] <Jartza> serivich: thanks :)
[09:18:46] <Jartza> but they do have 8 pins!
[09:18:52] <Jartza> :D
[09:19:02] <serivich> that's all ya need
[09:19:04] <Jartza> attiny85
[09:53:01] <serivich> oh btw Jartza what's your code typically like? Just wonder if you use any macros to make pin handling easier
[09:53:07] <serivich> or good practice etc...
[09:56:50] <Jartza> I do have some magic macros
[09:58:24] <Jartza> I don't always use them, though
[09:59:37] <Jartza> serivich: https://github.com/Jartza/aldler
[09:59:44] <Jartza> there is some macros
[10:00:11] <Jartza> the code itself is not finished though, but anyway
[10:00:33] <Jartza> (I'm not home currently, so can't search for better example)
[10:03:19] <Jartza> check firat the common.h and then uart.h for their usage and then .c files
[10:05:00] <serivich> fair enough
[10:06:03] <Jartza> I also have more "magic" ones, but I don't know if they are online
[10:43:00] <red-lichtie> Hi, I can't get LUFA to compile on linux. I'm using the ADAFRUIT breakout board and make says fatal error regarding a file not being found
[10:43:30] <Lambda_Aurigae> so find that file.
[10:43:34] <red-lichtie> This is what I'm inputting "make MCU=atmega32u4 F_CPU=16000000 BOARD=ADAFRUITU4 FLASH_SIZE_KB=32 BOOT_SECTION_SIZE_KB=4"
[10:43:42] <red-lichtie> Lambda_Aurigae: It is there
[10:43:58] <red-lichtie> But something seems wrong with the environment
[10:44:04] <Lambda_Aurigae> what file?
[10:44:16] <red-lichtie> ../../../../LUFA/../LUFA/Drivers/Board/Buttons.h:163:30: fatal error: Board/Buttons.h: No such file or directory
[10:44:51] <Lambda_Aurigae> ahd this board you have is supported by the lufa basic configurations?
[10:45:43] <red-lichtie> Lambda_Aurigae: Yes : LUFA/Drivers/Board/AVR8/ADAFRUITU4/Board.h
[10:46:04] <red-lichtie> and LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
[10:49:56] <red-lichtie> First time at trying to use LUFA and it won't even build the demos for my board. I must be missing something but I can't figure it out
[10:51:25] <osteri> red-lichtie: remove all the led definitions, i had to do the same, allthough my board (leonardo) was supported
[10:52:44] <red-lichtie> osteri: LEDs ? It is complaining about Buttons.h, how do I remove the LED definitions ?
[10:54:57] <Lambda_Aurigae> red-lichtie, may I PM you with a snippet from several months ago in this channel with a similar issue?
[10:54:58] <osteri> red-lichtie: in your case remove the buttons definitions then, IIRC i had to remove led definitions as well, but your board is different
[10:55:00] <red-lichtie> It looks like an include path is wrong or something
[10:55:18] <red-lichtie> Lambda_Aurigae: Sure
[10:58:19] <red-lichtie> osteri: remove the definitions from where ?
[11:00:05] <Lambda_Aurigae> I'm suspecting a / where it wants a \ or something equally silly.
[11:00:10] <osteri> i had to remove "#define buttons.h", because my board didn't have the needed buttons
[11:01:12] <osteri> there wasn't even that file IIRC
[11:06:10] <osteri> red-lichtie: i checked, so i copied some LUFA demoproject, which had #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/Board/Joystick.h>
[11:06:30] <osteri> which i didn't have, so do you have copied a demoproject?
[11:08:09] <osteri> for e.g. here: https://github.com/abcminiuser/lufa/blob/master/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
[11:08:34] <red-lichtie> osteri: I'm trying to compile out of the Demos directory, and LUFA/Drivers/Board has the missing files there, that is why I think it is a path issue
[11:12:50] <osteri> but i would check first if commenting out "#define Buttons.h" compiles, then try to figure out the board problem
[12:14:19] <Lambda_Aurigae> aaand, another repair project bites the dust.
[12:14:25] <Lambda_Aurigae> AC stopped working earlier in the week.
[12:14:37] <Lambda_Aurigae> so, I fixed it with a part from a dead copier power supply!
[12:14:45] <Lambda_Aurigae> which, the wifey wanted me to throw away a year ago.
[12:59:31] <stevejobsinhell> moin.
[12:59:44] <stevejobsinhell> How is pwm implimented in the avr? Is it manually bit banged with a timer?
[12:59:58] <Lambda_Aurigae> it can be done that way.
[13:00:04] <Lambda_Aurigae> they have pwm integrated into the timers too.
[13:00:23] <stevejobsinhell> I wasn't sure if there were libraries like the beaglebone.
[13:00:30] <stevejobsinhell> or built in commands/registers.
[13:00:58] <Lambda_Aurigae> read the datasheet
[13:01:01] <Lambda_Aurigae> it's all in there.
[13:01:18] <stevejobsinhell> I'm looking for a function call that takes as input the width of the pulse in ms, rather than as a percentage.
[13:01:54] <Lambda_Aurigae> I don't have anything like that handy.
[13:02:12] <Lambda_Aurigae> it's all a matter of math really.
[13:02:42] <Lambda_Aurigae> depending on the clock frequency of the processor, prescaler settings, and such.
[17:25:48] <Hexum064> Hey all. Anyone around?
[17:27:11] <Lambda_Aurigae> nope.
[17:27:15] <Lambda_Aurigae> we are all square.
[17:30:25] <antto> some are triangle
[17:31:50] <Lambda_Aurigae> only the more stable ones.
[17:32:48] <Hexum064> anyone here rationally divisible by pi?
[17:33:06] * antto hides under the carpet
[17:33:40] * Lambda_Aurigae is irrationally divisible by planck's constant.
[17:34:24] <Hexum064> real question. I have a few of these Arduino Nano boards. I'd like to program them with normal C/Asm. Is that possible?
[17:43:02] <Lambda_Aurigae> if you have the software and hardware, yes.
[17:43:22] <Lambda_Aurigae> it's just an avr with an ardweeny bootloader on it.
[17:44:59] <Lambda_Aurigae> you can use avrdude to upload through the ardweeny bootloader.
[17:45:37] <Lambda_Aurigae> and just use avr-gcc with avr-libc and associated software to compile standard C code...avr-as t compile assembly.
[17:45:48] <Hexum064> Hmm. So potentially, I could just load the atmel DFU on it
[17:46:08] <Lambda_Aurigae> isn't the dfu a usb bootloader?
[17:46:44] <Lambda_Aurigae> I don't know what chip is on the ardweeny nano.
[17:46:51] <Hexum064> The Arduino Nano has that FTDI chip on it. That's where I'd be pushing the bootloader, right?
[17:47:04] <Lambda_Aurigae> ftdi chip is just a usb-serial adapter.
[17:47:10] <Hexum064> And yes, the DFU is a usb bootloader
[17:47:13] <Hexum064> Aah
[17:47:16] <Lambda_Aurigae> so dfu is useless...dfu is for avr with hardware usb.
[17:47:23] <Hexum064> ok, that does clear up the ambiguity there
[17:48:13] <Lambda_Aurigae> that ardweeny has an arduino bootloader on it that runs over the usart through the usb-serial adapter chip.
[17:48:40] <Hexum064> I wonder if I'm looking at this wrong, but isn't that the same for the AVR MKII?
[17:48:48] <Lambda_Aurigae> no.
[17:49:22] <Lambda_Aurigae> avrisp mkII uploads through the SPI interface and doesn't require a bootloader on the chip.
[17:49:39] <Hexum064> damn, that's right
[17:50:02] <Hexum064> Trying to think if there's a way to make this thing work with AS6
[17:50:15] <Lambda_Aurigae> you would need such a programmer to upload a bootloader to the chip to start with.
[17:50:28] <Lambda_Aurigae> no clue on that.
[17:50:36] <Lambda_Aurigae> atmel studio is windows only.
[17:50:41] <Lambda_Aurigae> doesn't run on linux
[17:50:45] <Lambda_Aurigae> and I don't run windows.
[17:50:51] <Hexum064> avrdude runs on win though
[17:50:56] <Lambda_Aurigae> yeah,
[17:51:01] <Lambda_Aurigae> but you mentioned AS6.
[17:51:04] <Hexum064> so same process starting form there
[17:51:07] <Hexum064> right
[17:51:23] <Hexum064> so I was thinking standard avr programming models
[17:51:26] <Lambda_Aurigae> avrdude can upload through arduino bootloader.
[17:52:01] <Lambda_Aurigae> someone else will need to tell you how to do that though.
[17:52:08] <Lambda_Aurigae> I avoid arduino as much as I avoid windows.
[17:52:11] <Hexum064> I guess I could just go that route
[17:53:59] <Lambda_Aurigae> I use an stk200 clone programmer for programming AVRs usually.
[17:54:22] <Hexum064> Mine is in the mail right now
[17:54:41] <Lambda_Aurigae> I made mine with a scrounged 74ls244 chip about 12 years ago.
[17:54:47] <Lambda_Aurigae> maybe longer.
[17:55:29] <Hexum064> That is ancient!
[17:55:33] <Lambda_Aurigae> yeah.
[17:55:35] <Lambda_Aurigae> but it works.
[17:55:39] <Lambda_Aurigae> always has worked.
[17:56:08] <Lambda_Aurigae> never had a problem with it like people have with usbasp programmers and such.
[17:56:32] <Hexum064> OOH. I forgot I had that too
[17:56:33] <Hexum064> hmmm
[17:56:37] <Hexum064> fallback for now
[17:57:09] <Hexum064> Well, actually, it looks like my programmer is out for delivery right now, so I should get it shortly.
[17:57:25] <Lambda_Aurigae> I bought a programmer from Tom_itx a few years back.
[17:57:33] <Lambda_Aurigae> only use it very occasionally.
[17:57:52] <Lambda_Aurigae> it's usb interfaced and based on lufa with a usb-avr.
[17:57:53] <Hexum064> It would really be nice though to hijack these little Nano boards so I could program them with C/Asm
[17:58:37] <Lambda_Aurigae> people program ardweenies with avr-gcc all the time.
[17:59:18] <Hexum064> I'm going to check out what I can do along those lines right now. One hello world blink program for the mega328p coming up
[18:00:22] <Hexum064> IMHO, "ardweenies" are great for quick time to market and high level PoCs but it really is a waste of hardware.
[18:00:42] <Hexum064> Great starting off point though. I think way better than Parallax
[18:01:30] <Lambda_Aurigae> too many people start with an arduino then can't figure out the hardware under the multiple layers of abstraction from the arduino libraries.
[18:02:47] <Lambda_Aurigae> that wiring library is just,,,,,horrid.
[18:03:10] <Hexum064> I understand what you mean. We get a bunch of "script kiddie" versions of embedded systems designers.
[18:03:13] <Lambda_Aurigae> great to make things simple to use....but huge and bulky and just,,,abstracted abstractions...like windows.
[18:03:44] <Hexum064> But those who are really interested in it will dig deeper.
[18:04:11] <Hexum064> It's funny you should say Like Windows
[18:04:28] <Hexum064> I felt the same way, so I went to MCUs instead of Linux
[18:05:40] <Lambda_Aurigae> I've done programming in windows, linux, system V and System VII unix, pic, avr, 8052, 6502, 68000, 4004, and 8008
[18:05:59] <Lambda_Aurigae> of them all I prefer the 6502
[18:06:00] <Lambda_Aurigae> then avr
[18:06:26] <Hexum064> 6502 is RISC?
[18:06:50] <Lambda_Aurigae> 6502 is c-64, apple-2, and such
[18:07:06] <Lambda_Aurigae> it's pre risc/cisc differentiation really as I recall.
[18:07:49] <Hexum064> You're right
[18:08:04] <Lambda_Aurigae> considered cisc these days I would think.
[18:09:53] <Hexum064> just a year newer than the 6808, and I guess that would be more cics as well
[18:10:03] <Hexum064> sry, got distracted. BRB
[18:10:03] <Lambda_Aurigae> yup.
[18:20:23] <sebus> The only thing I didn't like in 6502 is... Stack. Only $FF bytes long
[19:30:10] <Hexum064> Well, that took a lot longer than expected (And a shower), but I got the blink program to work. Programmed in AS6, pushed to the Arduino Nano vai avrdude.
[22:59:59] <serivichi> yea stevejobsinhell, PWM hardware has no concept of ms or percentage. Its more of a counter that is driven by a certain fraction of the mcu clockspeed
[23:01:15] <serivichi> you do the calculation yourself, usually with some macros
[23:22:23] <Guest36630> I need an avr. My program requirements are 27kbytes flash, 108 bytes eeprom, 892 bytes sram, 4+ pwm channels, uart and i2c. I would prefer to use the internal clock and the chip must run down to 3v
[23:24:01] <Casper> Guest36630: check the atmel parametric table
[23:27:32] <Guest36630> Casper, where is that?
[23:29:20] <Casper> on the atmel web site, but, take a look at the atmega32 or I think it's the 324 or something like that?