#avr | Logs for 2016-03-05

Back
[00:15:00] <Jartza> morning
[02:01:21] <boodllebat> i'm trying to use enc28j60 with avr, but unable to find any library for it, do you guys know any popular library for this ?
[02:05:12] <h4x0riz3d> there was something.. tuxgraphics
[02:06:01] <h4x0riz3d> i use wiznet w5500..
[08:14:56] <Lambda_Aurigae> tuxgraphics has a nice tcp/ip stack for avr and enc28j60
[11:55:59] <Lambda_Aurigae> totally non-avr related query....spartan-6 board with 600K gate fpga, 32MByte sdram, and 8Mbit flash along with microsd card...worth $70.00 price tag?
[11:57:06] <Lambda_Aurigae> http://store.hackaday.com/products/xula2-lx9
[13:05:41] <Lambda_Aurigae> it's a tossup on that board or a 6 channel 2.4ghz RC plane radio.
[13:09:39] <Jartza> ahh
[13:09:49] <Jartza> I've been thinking of trying to learn fpga thingies
[13:15:56] <Lambda_Aurigae> me too
[13:16:12] <Lambda_Aurigae> and the price at hackaday store is much lower than other places.
[13:16:18] <Lambda_Aurigae> 70 USD vs 119
[13:16:43] <Lambda_Aurigae> has a usbpic chip onboard for management and usb connection, plus plenty of external ram and flash.
[13:17:12] <Lambda_Aurigae> looks like one heck of a deal to me.
[13:17:19] <Lambda_Aurigae> just gotta talk the wifey into it.
[13:17:48] <Lambda_Aurigae> she wants to spend that much on garth brooks ticket next week...maybe if she gets that I can get the fpga board.
[13:18:35] <Lambda_Aurigae> but I'm really liking this... http://www.hobbypartz.com/79p-t6-6ch-radio-lcd.html
[13:19:03] <Lambda_Aurigae> and drooling over this one... http://www.hobbyking.com/hobbyking/store/__8992__Turnigy_9X_9Ch_Transmitter_w_Module_8ch_Receiver_Mode_2_v2_Firmware_.html
[13:22:06] <Lambda_Aurigae> anyhoo, time to go make sawdust.
[13:31:36] <Jartza> sawdust is always good
[14:22:12] <WormFood> When programming my arduino with the "ArduinoISP" package, does it rewrite the bootloader, or did I fuck up with something?
[14:23:36] <WormFood> not only after programming it with ArduinoISP did it stop accepting commands via usb, but it also refused to run any software loaded via ISP, which was rather unexpected. (no doubt, because it was running the borked bootloader code, causing it to hang or something)
[14:24:11] <liwakura> how does it "refuse" running software?
[14:24:22] <liwakura> ah
[14:24:23] <liwakura> sorry
[14:24:27] <liwakura> did not read
[14:25:01] <WormFood> yeah, that bit caught me by surprise. I wasn't sure the bootloader was fucked, until just now when I reprogrammed it, and it started working again.
[14:41:56] <Alex1992> Hi, I'm having some trouble understanding what could be wrong with my atmega16 setup. I can successfully upload my .hex to the chip, and I know the .hex file works (I had it working on an m32) but I don't get any output on any pins after the upload
[14:42:16] <Alex1992> I'd appreciate any debug tips
[14:43:02] <WormFood> Alex1992, double check your fuses.
[14:45:05] <Alex1992> Worm: Sorry, how do I do that?
[14:45:07] <Alex1992> I ran avrdude -c usbtiny -p m16 -U lfuse:w:0xef:m
[14:45:18] <Alex1992> and avrdude -c usbtiny -p m16 -U hfuse:w:0xc9:m
[14:45:33] <Alex1992> which to my knowledge defaulted to an external clock
[14:45:43] <Alex1992> which I do have
[15:04:01] <Alex1992> do those fuse commands do what i think they do?
[15:12:49] <WormFood> Alex1992, the syntax looks correct, however I don't know if the values are correct or not.
[15:14:38] <h4x0riz3d> Alex1992 google for "avr fusecalc" it's an online fuse calculator thing.. select your chip, put the fuse values in, and see them translated
[15:15:03] <WormFood> good idea
[15:15:34] <Alex1992> thanks for the help, I'll look that up now
[15:20:19] <Alex1992> ok, so it means that I've got an external oscillator/crystal
[15:20:23] <Alex1992> and JTAG is disabled
[15:21:54] <Alex1992> I'm also realizing that LEDs that I've got connected to PB0 and PB1 are not flashing at all on upload, which I believe they did before
[15:22:16] <Alex1992> so far I'm not seeing anything light up or activate even with avrdude saying it's a successful upload
[15:22:20] <Lambda_Aurigae> you did recompile the code for the atmega16, yes?
[15:22:32] <Lambda_Aurigae> code compiled for an atmega32 might not actually run on the atmega16
[15:23:04] <h4x0riz3d> you need two of them ;P~
[15:23:09] * h4x0riz3d hides
[15:23:46] <Lambda_Aurigae> atmega16 cluster!
[15:23:57] <h4x0riz3d> dual-core avr ;P~
[15:24:41] <Lambda_Aurigae> go propeller if you need that.
[15:24:55] <Lambda_Aurigae> but if you go propeller, keep on going...don't come back... :}
[15:25:18] <h4x0riz3d> prop-wat?
[15:25:46] <learath> Lambda_Aurigae: hey, we let VHDLers in here :P
[15:26:18] <Lambda_Aurigae> learath, yeah, I've had such discussions in the past...my main query was, is that board worth $70.00 USD as a beginner learner board?
[15:26:26] <Alex1992> lambda: I'm using someone else's code, but I don't see anything that makes it avr specific
[15:26:41] <Alex1992> lambda: Is this what you meant, or am I misinterpreting?
[15:26:59] <Lambda_Aurigae> Alex1992, when you compile from source, you select the processor it is going to be compiled for.
[15:27:06] <learath> Lambda_Aurigae: so we kick all the windows users out first?
[15:27:07] <Lambda_Aurigae> every avr is slightly different from every other one.
[15:27:14] <Lambda_Aurigae> learath, of course, just for the fun of it.
[15:28:22] <Lambda_Aurigae> Alex1992, if you compile for an atmega32 and load it on an atmega16, some registers might be in different places and the memory amount will be different, specially the sram where the code puts the stack...stack goes at top of ram...stack pointer starts at top and moves down...
[15:28:32] <Lambda_Aurigae> on an atmega16, I believe there is less ram than atmega32
[15:28:48] <Lambda_Aurigae> so, once it's compiled, the stack pointer is going to point at different locations depending on which chip it is compiled for.
[15:28:57] <Lambda_Aurigae> that's just one thing that can be wrong.
[15:31:17] <Alex1992> lambda: That makes sense, and I believe that is an oversight I made. Thanks for the suggestion
[15:31:38] <Alex1992> the makefile MCU field has atmega32 in it
[15:32:32] <Lambda_Aurigae> so change it to atmega16 and recompile.
[15:32:33] <Lambda_Aurigae> make clean
[15:32:34] <Lambda_Aurigae> make
[15:34:32] <Alex1992> i opened it in notepad and changed it and saved, but I think I totally destroyed the tabbing format
[15:36:05] <Alex1992> yes! alright, tabs all sorted out and everything is working again
[15:36:19] <Alex1992> thanks a lot, appreciate your help
[15:37:02] <Lambda_Aurigae> welcome.
[15:42:46] <cehteh> mhm
[15:43:46] <Lambda_Aurigae> when I'm helpful it always makes me feel so,,,,
[15:43:49] <Lambda_Aurigae> horrible.
[15:44:00] <Lambda_Aurigae> I just hate actually being helpful.
[18:46:52] <Emil> Hello
[18:47:22] <Emil> After doing some digging I couldnt find one direct enough
[18:47:57] <Lambda_Aurigae> one what?
[18:48:00] <Emil> Does anyone have an example of getting the usb working on an atmega32u4 or othher similar broad without any abstractions from libraries such as lufa
[18:48:17] <Lambda_Aurigae> umm.
[18:48:24] <Lambda_Aurigae> most people use lufa.
[18:48:27] <Emil> I know
[18:48:48] <Lambda_Aurigae> don't think I've ever seen an implementation without it actually.
[18:48:55] <Emil> Damn
[18:49:01] <Lambda_Aurigae> not to say it's not out there.
[18:49:06] <Lambda_Aurigae> I just haven't looked really.
[18:49:19] <Lambda_Aurigae> the whole usb stack is kind of black magic really.
[18:49:34] <Lambda_Aurigae> challenge/response/reply/etc.
[18:49:42] <Emil> Nah, it's just a shitton of stuff to keep an eye on
[18:49:50] <Lambda_Aurigae> yeah.
[18:50:20] <Lambda_Aurigae> if you understand how usb comms work then you could probably do one on your own.
[18:50:48] <Lambda_Aurigae> or dig through an existing and re-engineer it.
[18:50:53] <Emil> I know, but that's what V-USB is for
[18:51:00] <Lambda_Aurigae> no
[18:51:07] <Lambda_Aurigae> v-usb is a whole different implementation.
[18:51:15] <Lambda_Aurigae> doing low speed usb without any usb hardware.
[18:51:21] <Lambda_Aurigae> bitbanging usb
[18:51:23] <Emil> I know
[18:51:26] <Lambda_Aurigae> lufa uses the usb hardware.
[18:52:14] <Emil> But it's much faster to get around to implementing it if I could see a quick one off example
[18:53:09] <Lambda_Aurigae> look at how the arduino leonardo does it maybe?
[18:53:27] <Lambda_Aurigae> or not...it uses lufa
[18:55:34] <Lambda_Aurigae> http://www.freaklabs.org/freakusb/html/
[18:55:41] <Lambda_Aurigae> different usb stack library.
[18:56:02] <Lambda_Aurigae> made for at90usb but should be compatible with the atmega32u4
[19:11:16] <Emil> Lambda_Aurigae: hmm, thanks. I'll take a look