#avr | Logs for 2015-05-20

Back
[00:00:16] <MarkX> 25
[00:00:23] <MarkX> robotics engineer
[00:00:31] <Valen> ok, thats good ;->
[00:00:53] <MarkX> been really into aliens and fox mulder shit lately
[00:00:59] <MarkX> gotta get into space
[00:01:00] <MarkX> ahahha
[00:01:23] <Valen> read that thread, it'll give you an idea about what is possible and what isn't
[00:01:32] <Valen> understand the rocket equation and mass ratios
[00:02:16] <MarkX> will do
[00:02:49] <MarkX> haha the first google result is a moving company
[00:03:27] <Valen> for what?
[00:03:37] <MarkX> arocket
[00:03:46] <Valen> ahh
[00:03:49] <MarkX> http://arocket.com/
[00:03:50] <MarkX> heh
[00:04:00] <Valen> http://www.freelists.org/list/arocket
[00:05:14] <MarkX> gotcha
[00:23:59] <MarkX> a fuse does not act like a diode preventing electricity to go in an incorrect direction right?
[00:29:40] <timemage> MarkX, not sure i get the question. you've see fuses used devices that accept AC right?
[00:33:14] <MarkX> timemage: well i'm looking at this schematic >> https://cdn.sparkfun.com/datasheets/Prototyping/USB_LiPolyCharger_SingleCell21.pdf << there they use a diode on VBUS. In another schematic there is a fuse there.
[00:33:44] <MarkX> the schematic i'm referencing uses a fuse between the usbvin and the mcu
[00:34:03] <MarkX> so i'm wondering if i should throw in a diode as well or leave it at just a fuze
[00:34:42] <MarkX> fuse*
[00:42:08] <Mr_Sheesh> Why would you want to add a diode?
[00:43:02] <MarkX> i'm assuming they added it to prevent current going into the usb?
[00:43:17] <aandrew> there are better ways to do that
[00:43:34] <MarkX> i can understand the reason for a fuse being used but no idea why they used a diode
[00:44:34] <Thrashbarg> reverse polarity protection
[00:44:56] <timemage> MarkX, i'm not sure why they bothered to use a diode there. perhaps they wanted to handle situations where someone had a usb to pigtail assembly and hooked it up backwards (a bit of a stretch). a fuse of some type probably isn't bad idea, since you don't know whether or not the usb source has proper overcurrent protection.
[00:45:04] <MarkX> looks like its a schottky diode...
[00:45:38] <MarkX> timemage: right. the fuse is already there. not getting rid of that. just wondering if i should throw in that diode as well..
[00:46:00] <Thrashbarg> if you had both USB and power plugged in, and the power was higher, without the diode there it'd blow your USB chipset
[00:46:09] <MarkX> ahhhhhh
[00:46:11] <timemage> MarkX, or they wanted to let you exceed 5v on the barrel jack.
[00:46:20] <Thrashbarg> same with the power, which if it was lower, would draw current from the USB port
[00:46:33] <MarkX> i gotcha i gotcha
[00:46:36] <MarkX> that makes sense
[00:47:07] <Thrashbarg> I don't like the LEDs in parallel though... if they're different types you'd need a resistor for each
[00:47:30] <MarkX> i'm not using the jack so i guess i'm good with the fuse alone
[00:47:52] <MarkX> Thrashbarg: i'm going to use only a single LED so i'm good in that regard as well :)
[00:48:01] <Thrashbarg> ok
[00:48:09] <MarkX> thanks for the clarification!
[01:35:03] <MarkX> http://electronics.stackexchange.com/questions/121189/how-can-i-read-a-tristate-output-with-microcontroller
[01:35:11] <MarkX> found that while googling how to read STAT pin
[01:35:20] <MarkX> the last post might be helpful to others
[01:55:09] <aczid> wow I'm really irked by the fact that ubuntu upgraded avrdude to 6.0.1. now my arduino clones based on ch340 usb2serial chips won't work :(
[01:55:34] <aczid> wish avrdude would give that bug a little more priority :(
[01:56:19] <Casper> aczid: fix it?
[01:56:33] <aczid> I've looked into it, but I'm not really the right person to fix it
[01:56:40] <aczid> for good, I mean
[01:57:29] <aczid> I can work around it, but am not really that well versed in the low level serial stuff
[02:02:48] <MarkX> aandrew: still awake?
[02:13:26] <aczid> it works fine if I take down the ser_posix.c source file by 1 revision in SVN trunk (to reverse the 'high-speed' hack they introduced) btw ^^
[02:37:52] <osteri> Ubuntu is good for beginners, I don't find any other reasoning for using it
[02:56:32] <EI24> Mint is good also
[03:02:29] <arrome> @jadew
[04:30:50] <pepijndevos> Is there a library that can generate AVR machine code?
[04:33:07] <LeoNerd> Surely avr-as ?
[04:39:08] <pepijndevos> LeoNerd can it be used as a library, or only as a binary form assembly to machine code?
[04:39:19] <LeoNerd> Define "used as a library"
[04:39:21] <LeoNerd> I'm not sure I follow
[04:40:13] <pepijndevos> LeoNerd, like, write my own compiler, and call some functions to generate code.
[04:40:50] <pepijndevos> Or... maybe I'll just make my compiler output assembly and compile it with avr-as
[04:41:04] <LeoNerd> Outputting assembly in a file is likely easiest; that way you can manually inspect it
[06:05:41] <LeoNerd> https://twitter.com/cpan_pevans/status/600974479016222720 might be relevant to folks here; anyone who uses avrdude on a Pro Micro board.
[10:37:24] <hypermagic> hi
[10:37:33] <hypermagic> why are you angry_specing ? ;>
[10:37:49] <hypermagic> your mcu blown again because of reverse power applied?
[10:37:55] <angry_specing> lately because AMD has reference board designs under NDA
[10:38:02] <hypermagic> hahaha
[10:38:07] <angry_specing> I mean wtf
[10:38:11] <angry_specing> Its almost like they dont want you to design your product around AMD parts
[10:38:24] <hypermagic> no, it is trade secret
[10:38:28] <hypermagic> at least, confidential
[10:38:42] <hypermagic> ofc there will always be plan stealing
[10:38:55] <learath> We call that "China"
[10:39:01] <hypermagic> :)
[11:52:12] <hypermagic> hi
[13:11:35] <pepijndevos> How do I compile an assembly file to a hex file using avr-gcc?
[13:31:27] <hypermagic> pepijndevos, will this work? http://www.neuraladvance.com/creating-compiling-and-linking-your-first-avr-assembly-program-on-mac-os-x.html
[13:36:52] <pepijndevos> I think I have it working... I get a hex file and it gets uploaded, now I'm trying to make it do anything
[13:37:05] <hypermagic> ;>
[13:37:22] <hypermagic> do you have a led in series with a resistor ?
[13:37:38] <pepijndevos> How would I turn on a LED? Something like this? sbi _SFR_IO_ADDR(DDRD),6 sbi _SFR_IO_ADDR(PORTD),6
[13:38:20] <pepijndevos> https://www.pjrc.com/teensy/pinout2a.png says led on PD6
[13:39:39] <hypermagic> yes, set port pin as output, and set port logic level
[13:39:57] <pepijndevos> Nothing happens when I run that.
[13:40:41] <hypermagic> if you tie your led between v+ and pin in series with a resistor, the led will light up when the port is 0
[13:41:23] <pepijndevos> I think it goes to ground...
[13:41:23] <hypermagic> it is standard to do so, and ports can sink more current to gnd
[13:41:30] <pepijndevos> oh
[13:42:10] <hypermagic> also you need your infinite loop
[13:42:25] <hypermagic> or the mcu will overrun and do undefined things
[13:42:53] <hypermagic> and depending on fuse settings, an interrupt table might be needed and a jump over to start:
[13:43:05] <pepijndevos> https://www.refheap.com/101358
[13:44:24] <hypermagic> did you get the port/pin number right? :P
[13:45:12] <pepijndevos> I tried the onboard LED and my external LED on F1, nothing
[13:45:25] <hypermagic> http://www.elecrom.com/2008/02/12/avr-tutorial-2-avr-input-output/
[13:45:48] <hypermagic> you set DDR and PORT, and it should change.
[13:45:55] <hypermagic> no magic
[13:46:36] <hypermagic> http://maxembedded.com/2011/06/port-operations-in-avr/
[13:48:21] <pepijndevos> Right, so I set the direction to output and then turn it on. So if my code is at all correct and running, it should probably work.
[13:49:08] <hypermagic> well you can wire up your led backwards and it will not work
[13:49:55] <pepijndevos> It works from C... using the Arduino API, lets see if it works with port registers too.
[13:55:51] <pepijndevos> hypermagic, this works: PORTD |= _BV(6); DDRD |= _BV(6);
[13:58:10] <pepijndevos> But then when I upload my hex file, nothing happens.
[13:58:37] <pepijndevos> So I think my hex file is broken.
[14:00:17] <pepijndevos> Maybe someone can see through the code matrix-style? https://www.refheap.com/101360
[14:00:48] <pepijndevos> I have a bootloader in there, if that matters at all.
[14:04:33] <bugzc_EC> has anyone here used IAR for Atmel/AVR at all?
[14:05:06] <bugzc_EC> I'm having an issue installing the samples and wanted to see if anyone else has run into the same issue
[15:34:33] <hypermagic> hi
[15:49:46] <EI24> I'm trying to make a interrupt handler. I'm trying to test it, by simply flashing a led. However the LED does nothing when i upload the code. https://gist.github.com/anonymous/dc570ad36b12fd94b048
[15:50:33] <EI24> srry for the ugly code, it automatically got formated when i uploaded it
[20:06:57] <cernme1> I'm getting this error too...