#avr | Logs for 2014-12-19

Back
[03:47:55] <DO9XE> Hey there, I got a LUFA questin :) My Compiler made an error, when i tried to compile the HID-Example for xMega, but i worked arround that. Now a makefile tells me, that LUFO doesn't really support the xMegas yet and after that a bunch of errors. So this is my Question: Does the current master on github support xMegas and can someone please take a look at the Errors? They only accure, when I compile for xMega.
[03:53:41] <Tom_itx> not sure where he left off on xmega support to be honest
[03:55:31] <DO9XE> can i give you a pastebin with my errors/gcc-output? :)
[03:55:50] <DO9XE> just for looking, wether I made a dumb mistake :D
[03:55:57] <Tom_itx> won't do me any good
[03:56:07] <Tom_itx> email dean himself about it
[03:58:13] <DO9XE> I'm in IRC channels nearly the whole day :D I'll write him a mail and wait here :) too bad he is australian :D I hope for a few moments he might be at the 31C3 from the chaos computer club :D
[11:57:27] <hetii> I wonder, If its possoble tranform soundcard to spi programmer? :) left channel use as sck, right as mosi and mic as a miso ?:)
[11:58:18] <LeoNerd> That sounds insanely slow
[11:58:41] <LeoNerd> You can buy cheap little USB SPI programmers for about $3
[11:59:41] <hetii> you can buy everthing this day, thats not the problem
[12:00:22] <malinus> hetii: sounds like a fun project. Make some tests with a logical analyzer and see.
[12:01:03] <hetii> yep, currently I change country whre I`m and have no my toys :(
[12:01:48] <hetii> but will test this idea in the future :)
[12:02:56] <hetii> btw keep in mind that C64 or other 8 bit comuter use analog tape to store games
[12:03:13] <hetii> and was possible to get/store data by this way
[12:03:20] <hetii> so why not to build programmer :)
[12:04:27] <LeoNerd> Sure; those had analog input circuits to decode it
[12:04:36] <LeoNerd> Those were asynchronous signals; signals that encode the data along with the clock
[12:07:26] <hetii> yep, sometimes i want to back in time. :) I remmeber when I build additional "hard driver" for my C64 :)
[12:08:29] <hetii> was 10 or something memmory chips one of the top on another, just CS signal was exposed separate from each of them and soem unit to control
[12:09:19] <hetii> Or usnig the black box v8,
[12:09:33] <hetii> that was able to talk to you when type some word
[12:10:14] <hetii> I even have some code: https://bitbucket.org/hetii/s.a.m
[12:11:21] <hetii> online version at: http://simulationcorner.net/index.php?page=sam
[12:11:54] <LeoNerd> My general point being: SPI is synchronous, so not so easy to fit into that
[12:13:14] <hetii> well all depends on timmings
[12:14:04] <LeoNerd> I believe that's effectively what I'm saying yes :)
[12:15:27] <apo_> hetii: not easily, because soundcards try to get rid of the DC component. Not a problem for SCK, but MOSI and MISO might get tricky
[12:16:25] <apo_> I guess you can just create some output and take a look at it
[12:16:30] <apo_> if it looks fine, go for it
[12:16:50] <apo_> but syncing your mic up with the clock might get tricky
[12:17:06] <hetii> if you add some timer that will hold last state enought time for next SCK signal then should work
[12:18:26] <hetii> general the idea is to use just transistors + RC component to have it done ;)
[12:18:46] <hetii> without any uC or other IC that you would need to order
[12:38:08] <Lambda_Aurigae> hetii, you are better off using an IDE port or parallel port if you are going to the point of older hardware without having new stuff to work with.
[12:43:46] <Lambda_Aurigae> hetii, what ports do you have on the computer you will be working with? serial, parallel, ide, etc?
[12:45:42] <hetii> Lambda_Aurigae: Its not for me just for new guys that don`t have any stuff to start working with avr
[12:46:20] <Lambda_Aurigae> well, if they have a spare IDE port they can make a programmer through that.
[12:46:33] <Lambda_Aurigae> or an older computer with a parallel port would be even better and simpler.
[12:46:41] <hetii> to complex and who have now IDE ? its almost dead like LPT
[12:46:56] <Lambda_Aurigae> all you need is a few wires between the parallel port and the AVR.
[12:47:18] <Lambda_Aurigae> I have a new computer as of last year that has serial, parallel, and IDE on it...along with lots of USB and SATA ports.
[12:47:27] <apo_> or you could just buy some arduino for five bucks and you have your programmer
[12:47:33] <Lambda_Aurigae> that too.
[12:47:47] <hetii> buy == wait for shipping
[12:48:03] <Lambda_Aurigae> or, a 4 port usb hub and turn it into a programmer.
[12:48:11] <hetii> yep, try this one
[12:48:18] <Lambda_Aurigae> http://hackaday.com/2011/09/09/program-an-arduino-using-your-sound-card/
[12:48:20] <hetii> but works badly
[12:48:33] <Lambda_Aurigae> but that requires a bootloader.
[12:48:51] <Lambda_Aurigae> so you have to have a pre-programmed chip or a programmer.
[12:49:06] <hetii> ha
[12:49:22] <Lambda_Aurigae> but not too hard to make a few up and post them to your friends.
[12:49:53] <hetii> sure but then I would use other bootloaders like usbasploader
[12:49:57] <Lambda_Aurigae> http://tiny.systems/article/soundProgrammer.html
[12:50:05] <Lambda_Aurigae> there...hope you read german.
[12:50:17] <hetii> then again make no sense if you need some additional mcu preprogrammed
[12:50:54] <Lambda_Aurigae> if you are in an area where stuff isn't really available then I bet you will have older computers....older computers means parallel ports usually.
[12:51:28] <Lambda_Aurigae> but there is a link to a way to program an AVR with the sound card...
[12:52:45] <twnqx> i'd rather use an ftdi in GPIO mode for that
[12:52:57] <Lambda_Aurigae> that works too.
[12:53:07] <Lambda_Aurigae> again, have to order and wait for shipping, which he doesn't want to do.
[12:53:14] <hetii> yep
[12:53:28] <twnqx> i thought everyone has ftdis at home
[12:53:35] <twnqx> well ok, maybe my boxes are unusual...
[12:53:39] <hetii> this german site what you paste build project that fit my requirments
[12:53:52] <Lambda_Aurigae> I have an ftdi 242 chip...older parallel gpio with no serial on it..
[12:53:58] <twnqx> 245*
[12:54:00] <twnqx> :P
[12:54:05] <twnqx> i have thatm too
[12:54:09] <twnqx> and 2232
[12:54:13] <twnqx> and 230x
[12:54:26] <Lambda_Aurigae> problem with ftdi chips for me is they are surface mount so either I buy board or futz around soldering them.
[12:54:35] <hetii> And I have maybe just one ftdi232 but never solder it
[12:55:26] <Lambda_Aurigae> these days I use pic18f45k50 and pic32mx250f128b chips to build USB i/o devices.
[12:56:51] <Lambda_Aurigae> hetii, do they have some old usb keyboards around they can rip apart?
[12:57:01] <Lambda_Aurigae> http://wiki.steve-m.de/hidkey_gpio
[12:58:01] <hetii> this one I also test :)
[12:58:02] <Lambda_Aurigae> should work with any keyboard that has 3 LEDs for num lock, caps lock, and scroll lock.
[12:58:03] <hetii> in paste
[12:58:06] <hetii> *in past
[12:58:14] <hetii> http://elektronik-labor.de/AVR/Soundprog2.html
[12:58:15] <malinus> Lambda_Aurigae: what's wrong with the megaUx?
[12:58:42] <Lambda_Aurigae> malinus, no USB hardware in a dip package.
[12:58:51] <malinus> ah
[12:58:55] <Lambda_Aurigae> choo
[12:59:48] <Lambda_Aurigae> I can throw together a pic18f45k50 chip with a few resistors and capacitors and have a functional usb interface in 5 minutes...no crystal needed...and have full speed USB.
[13:00:22] <hetii> what is max speed there ?
[13:00:27] <Lambda_Aurigae> hell, the chip even has a 3.3V LDO regulator onboard.
[13:00:48] <Lambda_Aurigae> 12Mb/s in theory but I doubt the chip can handle that full throughput for more than short bursts.
[13:01:24] <Lambda_Aurigae> if I need real fast throughput I use a pic32mx250f128b at 50MHz..it's not even a pic core really...it's a mips core with pic peripherals on it.
[13:03:45] <Lambda_Aurigae> the pic18f45k50 would be equivalent to using a mega AVR with hardware usb and 32k program memory. it just comes in a 40pin dip...or for a smaller 28pin dip I can go with the pic18f25k50...same processor specs, smaller package.
[13:04:43] <hetii> nice
[13:05:25] <Lambda_Aurigae> those chips have an onboard pll much like the attiny85 that can sync the onboard clock to the usb clock and makes the need for a crystal go away.
[13:05:40] <malinus> Lambda_Aurigae: but is there even a free toolchain out yet?
[13:05:45] <Lambda_Aurigae> yup.
[13:05:48] <Lambda_Aurigae> I use SDCC.
[13:06:07] <malinus> what about flashing?
[13:06:14] <Lambda_Aurigae> the XC8 compiler toolchain is built on gcc..
[13:06:24] <Lambda_Aurigae> you CAN compile it yourself but it's a bitch to get setup right.
[13:06:36] <Lambda_Aurigae> if you use the precompiled then it costs or you hack it.
[13:07:03] <Lambda_Aurigae> mplabX for uploading or, lately I've been using the pinguino bootloader.
[13:07:35] <Lambda_Aurigae> I would much rather work with AVR though
[13:07:42] <Lambda_Aurigae> I like the AVR chips much better overall.
[13:08:08] <Lambda_Aurigae> and usually just use the pic chips to build usb-serial/parallel/i2c/spi interfaces.
[13:09:31] <hetii> I start some time ago with LPC* family , nice hardware but the IDE and bugy lpcopen framework are a pain in my as:)
[13:09:40] <Lambda_Aurigae> yeah.
[13:09:59] <Lambda_Aurigae> I've stayed away from arm chips for the most part other than the occasional play around with stm stuff.
[13:10:06] <Lambda_Aurigae> mostly because I got the stm stuff free.
[13:20:14] <Lambda_Aurigae> overall I've found it easier to get kids started on AVR than it is on PIC or 8052 mostly due to the tools and documentation available.
[13:20:19] <Lambda_Aurigae> AVR docs ROCK.
[13:20:25] <Lambda_Aurigae> PIC docs are horrid.
[13:21:14] <Lambda_Aurigae> having the code snippets in C and assembly also helps me teach kids how to work with both.
[13:37:54] <malinus> Lambda_Aurigae: ever tried any ARM-based mcu's? STM?
[13:41:20] <Lambda_Aurigae> yeah
[13:41:25] <Lambda_Aurigae> I have a couple of STM boards here.
[13:41:33] <Lambda_Aurigae> other than speed, nothing impressive.
[13:41:49] <Lambda_Aurigae> for what I do, excessive speed isn't a necessity.
[13:42:18] <Lambda_Aurigae> web connected sensors and motor controllers using enc28j60 ethernet to spi adapters.
[13:42:32] <Lambda_Aurigae> or robotics controllers.
[13:42:36] <Lambda_Aurigae> just play toys mostly.
[13:42:46] <Lambda_Aurigae> been working on a few toys to go with my rPI lately.
[13:45:22] <Lambda_Aurigae> 2 years ago the kids and I built a 4 station ethernet connected intercom system based around atmega1284p chips with enc28j60 ethernet interfaces.
[13:45:45] <Lambda_Aurigae> used the ADC to record audio and an r2r DAC to play back.
[13:46:10] <Lambda_Aurigae> 4 stations, 4 buttons on each station so you could send to any one of the other stations or all at once.
[13:46:52] <malinus> Lambda_Aurigae: well the STM usually also have many high(er) definitions timers, high(er) definition ADC, DAC etc. etc.
[13:46:54] <Lambda_Aurigae> we did cheat and used serial sram chips to do a store and forward for the audio.
[13:47:12] <Lambda_Aurigae> STM is also usually surface mount.
[13:47:24] <Lambda_Aurigae> so hard to just throw something together on a whim.
[13:47:37] <Lambda_Aurigae> we do a lot of build and teardown and rebuild on solderless breadboards around here.
[13:47:42] <malinus> but pcb's are so cheap now, you can make your own dev board for 10$
[13:47:48] <Lambda_Aurigae> I know.
[13:47:58] <Lambda_Aurigae> I've been making my own PCBs for 30 years.
[13:48:02] <Lambda_Aurigae> longer.
[13:48:05] <Lambda_Aurigae> since I was 12.
[13:48:09] <Lambda_Aurigae> 35 years.
[13:48:22] <twnqx> that makes you *calculates* OLD
[13:48:25] <twnqx> :S
[13:48:28] <malinus> lol
[13:48:34] <Lambda_Aurigae> started with radio shack kit full of ferric chloride, peel and stick black trace thingies and a magic marker.
[13:48:42] <Lambda_Aurigae> almost as old as dirt.
[13:48:45] <Lambda_Aurigae> and twice as dirty!
[13:49:18] <twnqx> i think i ever made
[13:49:19] <twnqx> 1
[13:49:22] <Lambda_Aurigae> most of what I do with electronics and microcontrollers these days is teaching kids in the range of 10 to 18 about how electronics works.
[13:49:23] <twnqx> PCB myself
[13:49:28] <malinus> there is this guy in #arduino, he is the oldest person I know the age of on IRC. now he's old!
[13:49:45] <malinus> like 75+
[13:49:52] <Lambda_Aurigae> 5 years ago I modified an hp laserjet 8100 to print toner straight to copper clad board and fuse it on in one pass.
[13:50:32] <Lambda_Aurigae> worked great for about 20 boards then the excessive stress blew out the high voltage board.
[13:50:57] <Lambda_Aurigae> had to crank the high voltage waaay up to get an even transfer because of all the leakage around the edges of the copper clad board.
[13:52:01] <Lambda_Aurigae> I have another printer project in the works for that but haven't gotten around to it beyond collecting parts...I got a couple of zebra label printers that have 4 inch wide thermal printheads.
[13:52:17] <Lambda_Aurigae> they print by melting wax from the thermal ribbon onto the label.
[13:52:36] <twnqx> they once were hailed the best for color picture printing
[13:52:39] <Lambda_Aurigae> I figure a copper clad board should accept it just as easily..even did a test with a soldering iron and drew it on.
[13:53:05] <Lambda_Aurigae> yeah.I had a 4 color wax ribbon printer in the commodore days.
[13:53:17] <Lambda_Aurigae> slow as it had to make 4 passes for every line.
[13:53:21] <Lambda_Aurigae> but it did print nice for the time.
[13:53:32] <Lambda_Aurigae> could put a black ribbon in it and it wasn't too shabby for speed.
[13:53:41] <Lambda_Aurigae> wish I had one of those.
[13:54:04] <Lambda_Aurigae> but these zebra label printers are only 150dpi so resolution for making PCBs is bear whiz.
[13:55:30] <Lambda_Aurigae> should be a fun little project once I get to it...even found a linux driver for the printers.
[13:55:48] <Lambda_Aurigae> so all I gotta do is modify the paper path so it can feed thicker stock.
[13:56:11] <Lambda_Aurigae> wish I could find a ticket printer version like they use for printing airline boarding tickets...or used to use anyhow.
[13:56:52] <Lambda_Aurigae> those would be simple to mod as they are designed for heavy card stock to start with...just separate the feed system 1.5mm or so and away you go.
[13:57:12] <Lambda_Aurigae> could even do mass produce as it could feed copper clad tickets from the stack holder.
[15:01:22] <megaTherion> Hi, Im new to µC programming - atm. Im trying myself on generating a PWM signal thru ISR - this all works fine. However I've a question, Im using ISR(TIMER2_COMPA_vect) how do I make it time dependent, like every nSec - do I have to implement my own counter or is there some register to use for?
[15:03:02] <N1njaneer> You need to set up the time to fire the interrupt at the interval you need, or at least at a multiple of the interval and then do a software counter inside, etc. Useful often if you need multiple intervals or you need an interval which isn't easily configurable straight on the timer.
[15:04:21] <megaTherion> N1njaneer: well right now its fired up - is there a default value? All Im doing right now is incrementing OCR2A within the ISR...
[15:04:39] <megaTherion> I think Im using CTC mode, but I've yet to figure out how to manipulate this timing