#avr | Logs for 2014-04-05

Back
[00:19:39] <abcminiuser> Man house hunting sucks
[00:50:27] <Roklobsta> abcminiuser: yes it does, especially in mebl
[00:50:52] <abcminiuser> Modern, cheap, good area, pick two
[00:51:55] <Roklobsta> go for an old victorian. high ceilings cannot be beat.
[00:52:09] <Roklobsta> i can't stand low ceilings any more
[00:53:24] <abcminiuser> I like modern style
[00:53:31] <abcminiuser> But can't find any in a nice area
[00:54:58] <Roklobsta> pining for the fjords in norway now?
[00:55:37] <abcminiuser> Nah, those were all tiny houses
[00:55:42] <abcminiuser> Scenery was nice, but
[01:35:39] <megal0maniac_afk> abcminiuser_: That's the main criticism I've heard about AU in general, property is stupid expensive.
[01:36:20] <abcminiuser_> Norway is worse
[01:37:04] <megal0maniac_afk> Unlucky you, then
[01:37:43] <megal0maniac_afk> Although it's "cheap" in za, so everything seems expensive
[01:40:49] <megal0maniac_afk> Ah, that's it! Move here! It's similar enough to AU that you might not even notice :P
[01:42:51] <abcminiuser_> Pfft
[01:44:14] <megal0maniac_afk> You can have a nice big back yard
[01:44:39] <megal0maniac_afk> And up to 40mbps DSL!
[01:44:47] <Roklobsta> riiiiiight
[01:48:29] <megal0maniac_afk> Roklobsta: What? You think I'm lying?
[01:49:07] <Roklobsta> last i heard 4Mbit is the quickest
[01:50:49] <megal0maniac_afk> On the old exchanges, yeah
[01:51:20] <megal0maniac_afk> They've upgraded a lot of them. I think we can get 20
[01:52:19] <megal0maniac_afk> Baseline minimum is 2
[02:26:39] <twnqx> megal0maniac_afk: i just switched to 100mbps on cable
[02:29:25] <megal0maniac_afk> sssshh!
[02:36:18] <twnqx> also, i am in china with 2mbit in the hotel atm :|
[02:50:54] <megal0maniac_afk> Shenzen?
[02:51:01] <twnqx> yeah
[02:51:09] <megal0maniac_afk> Maker faire :)
[02:51:24] <twnqx> really? lol
[02:51:35] <twnqx> nah, work...
[02:51:43] <twnqx> full month again
[02:51:46] * twnqx sighs
[02:54:32] <megal0maniac_afk> :(
[03:59:28] <demultiplexer> hey abcminiuser_
[03:59:47] <abcminiuser_> Yahoyhoy
[04:00:01] <OndraSter_> ahoy
[04:00:18] <demultiplexer> I have a LUFA question that I kind of already put on the google groups but maybe you have thoughts on it
[04:01:07] <demultiplexer> it's about an xmega behind a USB isolator
[04:02:03] <abcminiuser_> I have half a brazillion emails to go through :P
[04:02:08] <abcminiuser_> Lemme search for it, one sec
[04:02:38] <demultiplexer> thanks :)
[04:03:08] <abcminiuser_> Hrm, you can't pass through an isolated VBUS signal?
[04:03:39] <demultiplexer> I'm sure I can, I just didn't design it in
[04:03:53] <demultiplexer> so now I am stuck with just the USB data signals isolated and VBUS always 'on'
[04:04:35] <demultiplexer> now, I don't know enough about the USB protocol to know if the host still sends USB reset commands on a reattachment attempt
[04:05:10] <demultiplexer> I kind of assumed it did, so this wouldn't be an issue, but I am not getting any event triggering on physical reattachment
[04:08:43] <abcminiuser_> Hrm, I would have expected the host to eventually do that, too
[04:09:00] <abcminiuser_> Are you using an external pullup?
[04:09:08] <demultiplexer> this may be PEBKAC on my end as well
[04:09:20] * abcminiuser_ thinks
[04:09:41] <demultiplexer> the USB isolator has built-in pullup stuff going on
[04:09:54] <demultiplexer> (it is the most awesome plug and play device ever for this application)
[04:10:46] <abcminiuser_> Can you see if ISR(USB_BUSEVENT_vect) fires at all when you re-connect?
[04:11:06] <abcminiuser_> If not you may be in a pickle, since that's the only hardware indication of connections/disconnections
[04:11:07] <demultiplexer> sure, sec
[04:12:55] <demultiplexer> oh I see you are already triggering on that in USBInterrupt_XMEGA
[04:13:02] <demultiplexer> I'll just patch it in there
[04:17:20] <demultiplexer> at a glance it doesn't seem to fire
[04:17:28] <demultiplexer> let me make a better indication, sec...
[04:28:12] <anton02> what should I change in this USART program template to simply send away a string containing "AT" and then wait for the response and check to see if the response received is "OK" and if so turn on PORTF = 0xFF?
[04:28:38] <anton02> do you guys like arduino?
[04:32:03] <megal0maniac_afk> clixxIO needs to come back. I want to tell him why UART won't work on an attiny85 :)
[04:34:27] <megal0maniac_afk> anton02: Arduino has its place, but it also lets people do complicated things without understanding much of the basics, and that often leads to annoying questions
[04:37:22] <demultiplexer> abcminiuser_ how often is that interrupt supposed to fire when the device is idle?
[04:38:13] <abcminiuser_> Oh right, multiplexing too much in my brain
[04:38:26] <abcminiuser_> Ok, if that interrupt doesn't fire, it means the XMEGA physically isn't sensing the disconnect
[04:38:50] <abcminiuser_> It's an exception like interrupt - fires for connects, disconnections, suspensions, wakeups and bus errors
[04:39:11] <demultiplexer> okay, that is a great indicator then
[04:39:36] <demultiplexer> I am for some reason failing to make a LED blink in an otherwise production fairly complex project, so lemme mess around with it some more
[04:39:45] <abcminiuser_> Heh
[04:39:47] <abcminiuser_> Been there
[04:40:03] <abcminiuser_> anton02, what template?
[04:40:21] <abcminiuser_> Arduino would be easy for something simple like this
[04:40:31] <abcminiuser_> Otherwise you can use my USART tutorial to get you started
[04:44:40] <megal0maniac_afk> How crucial is ground in a differential pair?
[04:44:58] <megal0maniac_afk> (Talking SATA specifically)
[04:45:34] <OndraSter_> a lot
[04:46:01] <OndraSter_> it is there for a good reason :P
[04:46:21] <OndraSter_> and to reach 6Gbps takes some courage
[04:47:33] <megal0maniac_afk> Hmmm
[04:49:10] <abcminiuser_> AND MY AXE
[04:50:15] <OndraSter_> :D
[04:50:23] <OndraSter_> and my sata cable!
[04:50:47] <megal0maniac_afk> I just cut mine in half
[04:50:53] <megal0maniac_afk> WITH AN AXE
[04:51:34] <OndraSter_> on completely unrelated rage: who decided to put "SNR Margin" instead of SNR into the bloody ADSL router should hang in the air
[04:51:52] <OndraSter_> I saw SNR and was like "seriously, 4dB SNR and 10Mbit?"
[04:51:58] <OndraSter_> ... then I realized it is SNR Margin, not SNR
[04:56:45] <demultiplexer> I think I am going crazy
[04:56:53] <OndraSter_> too much demultiplexing?
[04:56:56] <demultiplexer> a LED is turning on while I am not telling it to turn on anywhere
[04:57:04] <OndraSter_> is it floaty?
[04:57:18] <demultiplexer> nope, and it worked before!
[04:57:32] <demultiplexer> I must be doing something with that output register *somewhere*, but I can't find where
[04:57:45] <OndraSter_> I had funky problem once - when I connected JTAG everything would work. When I disconnected it it would stop
[04:57:47] <OndraSter_> working
[04:57:58] <OndraSter_> took me quite some time to realize where the issue was
[04:58:16] <OndraSter_> I was enabling SPI before setting the pin to output and it kept falling into slave mode and waiting for bit :P
[04:58:32] <demultiplexer> I wish I had the luxury of JTAG here...
[04:58:44] <OndraSter_> PDI?
[04:58:50] <demultiplexer> I have PDI, that's true
[04:58:53] <demultiplexer> should probably use that
[04:58:55] <OndraSter_> well then there's your JTAG
[04:59:12] <megal0maniac_afk> abcminiuser_: GDP?
[04:59:19] <abcminiuser_> GDP!
[04:59:27] <abcminiuser_> Yeah yeah, all my crap only arrived last week
[04:59:37] <abcminiuser_> I can get back to it once I dig out all the Atmel stuff
[04:59:39] <anton02> abcminiuser_: oops http://codepad.org/l5oleFo1
[04:59:40] <megal0maniac_afk> :)
[05:00:24] <anton02> megal0maniac_afk: why wouldnt clixxIO's attiny85 work?
[05:00:52] <megal0maniac_afk> anton02: Because attiny85 doesn't have a UART
[05:01:00] <anton02> lol
[05:01:07] <megal0maniac_afk> That's what I said
[05:01:35] <anton02> maybe my one doesn't either
[05:01:50] <anton02> it's an atmega64
[05:01:54] <megal0maniac_afk> anton02: Read the datasheet
[05:02:19] <funfunctor> howdy
[05:02:38] <anton02> i didn't notice that it's sometimes "USART' and sometimes "UART"
[05:03:12] <abcminiuser_> S is for Synchronous
[05:03:21] <abcminiuser_> It's an alternative mode offered on all the modern devices
[05:03:52] <anton02> so does the attiny85 not have USART or UART?
[05:03:58] <megal0maniac_afk> anton02: Nope
[05:04:00] <megal0maniac_afk> It has USI
[05:04:53] <anton02> my atmega64 has USART so i at least know im not having the same problem as him
[05:05:20] <megal0maniac_afk> anton02: It wouldn't compile if you had the same problem ;)
[05:05:23] <anton02> is FOSC and F_CPU the same?
[05:05:55] <megal0maniac_afk> specing: I have a Cubieboard-like thing :)
[05:06:57] <funfunctor> I have one of these "LeoStick"s, is it possible to avoid all this arduino crap and just program it with ASM in AVR Studio like usual?
[05:07:16] <megal0maniac_afk> funfunctor: Yes
[05:08:04] <funfunctor> megal0mania: perfect! anything I should know, like what to set in AVR Studio to just work?
[05:08:30] <funfunctor> I am teaching someone young about how CPU's work so I rather program directly in ASM
[05:08:49] <anton02> how much easier is USART in arduino than in atmel studio? Maybe i should just try make my board work with arduino.
[05:09:35] <Jurika> Hi, just wondering if anyone here is familiar with Xilinx? I'm just drawing up a few schematics for an FPGA, with the I/O markers, what effect does deleting the box around a marker have? ie. after having set a marker down, pressing delete.
[05:09:47] <anton02> what's the difference between #define F_CPU 8000000UL and #define FOSC 1843200
[05:10:35] <megal0maniac_afk> funfunctor: It won't "just work", you've got the wrong board if that's what you want. You'll need to build the .hex file in studio, then use something else to program it
[05:11:11] <abcminiuser_> anton02, nothing as far as the compiler is concerned
[05:11:20] <anton02> ok
[05:11:23] <abcminiuser_> Those are just abitrary defines unless some part of your software references them
[05:12:23] <anton02> it's just that i was wanting to change the clockspeed
[05:12:42] <anton02> i was wondering if i could replace 1843200 with 8000000UL
[05:12:57] <anton02> which is the clock of my microchip
[05:13:10] <demultiplexer> alright I am stupid
[05:13:19] <megal0maniac_afk> You're not setting anything, you're just telling the compiler what the frequency is
[05:13:34] <megal0maniac_afk> So if it isn't 1843200 then don't put 1843200 in
[05:13:43] <demultiplexer> abcminiuser_ it is firing the USB bus event vector on both disconnect and connect
[05:14:20] <funfunctor> megal0mania yes so external tooling is needed then, ok would that be something like gcc-avr?
[05:14:51] <abcminiuser_> demultiplexer, that means it should be transitioning into the disconnected state properly
[05:14:59] <abcminiuser_> Can you set a breakpoint in the disconnection handler?
[05:15:02] <funfunctor> megal0mania I was wondering about the arduino bootloader stuff, will I overwrite that?
[05:15:42] <demultiplexer> do you mean the EVENT_USB_DEVICE_Disconnect event, or a handler in LUFA itself?
[05:15:43] <funfunctor> megal0mania I want to teach him about setting up the interrupt table, setting the right flags and hopping to the correct org offset
[05:16:17] <megal0maniac_afk> funfunctor: No. avr-gcc is the compiler, avrdude handles uploading.
[05:16:19] <specing> megal0maniac_afk: I have one too, too bad it is pretty much useless
[05:16:28] <megal0maniac_afk> specing: I know, right?
[05:16:32] <funfunctor> megal0mania I just want to avoid trying to explain toolchains and playing about this that too much, if I can set it up behind the senses that would be good
[05:16:45] <abcminiuser_> Actually inside that ISR see which of the HasOccurred sections are being run
[05:17:17] <funfunctor> megal0mania ok, avrdude supposes the board then
[05:17:31] <demultiplexer> well this is awkward... about to do what you asked but: it is properly firing the connect and disconnect events as well, so something else is going on
[05:18:35] <demultiplexer> over PDI it is a bit shaky unfortunately, so I'll use a hardware method
[05:18:58] <megal0maniac_afk> funfunctor: Okay, here's a suggestion
[05:19:10] <megal0maniac_afk> funfunctor: Get this: http://russemotto.com/xloader/
[05:19:57] <megal0maniac_afk> funfunctor: Replace avrdude.exe and avrdude.conf with the ones in your Atmel or Arduino program directory (doesn't matter which one)
[05:20:00] <demultiplexer> it is receiving 3 bus resets
[05:20:26] <demultiplexer> and firing USB_INT_BUSEVENTI_Reset accordingly
[05:20:36] <megal0maniac_afk> funfunctor: Then add this line to devices.txt: LeoStick (ATmega32u4);m32u4;AVR109;57600;
[05:20:50] <abcminiuser_> That should in theory allow it to reconnect
[05:21:09] <abcminiuser_> Ah, it would go back to the default state, but retain its address
[05:21:30] <funfunctor> thanks megal0mania yes I found https://github.com/arduino/Arduino/blob/master/hardware/arduino/boards.txt
[05:21:36] <megal0maniac_afk> Choose the correct serial port (it is only there for about 8 seconds after a reset) and the hex file and upload
[05:21:56] <abcminiuser_> Wait no, I reset the address as expected
[05:22:10] <funfunctor> megal0mania but I guess that is slightly different.. why do I need to replace avrdude.*
[05:22:17] <demultiplexer> can I reliably trigger on something to just reset the entire AVR?
[05:22:35] <funfunctor> megal0mania do you mean with a more modern version to get board support?
[05:22:44] <megal0maniac_afk> funfunctor: Because the one that is packaged with xloader is old and doesn't work with anything useful
[05:23:33] <abcminiuser_> Disconnect would do it
[05:23:50] <abcminiuser_> But in theory it should work - have you got a *nix machine handy?
[05:23:56] <abcminiuser_> If so get the dmesg output after replugging it
[05:24:02] <funfunctor> ah ok, isn't avrdude a spi flasher? can't I configure the "upload" button in avr studio to invoke avrdude with the correct arguments?
[05:24:04] <abcminiuser_> (phrasing)
[05:24:28] <demultiplexer> I could... bit of work though
[05:24:37] <megal0maniac_afk> funfunctor: No
[05:24:38] <demultiplexer> if I reset on disconnect it never attaches
[05:24:42] <anton02> is there a way to find out what frequency your microchip is running at other than looking at the corresponding voltage in the datasheet?
[05:24:42] <funfunctor> megal0mania sorry, I am not a Windows user so don't actually use these tools normally..
[05:24:57] <abcminiuser_> anton02, wha?
[05:25:04] <anton02> e.g. have your microchip display its frequency on a seven seg display
[05:25:05] <abcminiuser_> Voltage affects the internal osc I guess
[05:25:23] <abcminiuser_> You need a stable reference such as an external 32KHz watch crystal
[05:25:35] <abcminiuser_> If you have a reference you can use it and two timers to determine the CPU freq
[05:25:37] <funfunctor> megal0mania thanks for the advice!
[05:25:55] <anton02> two crystals?
[05:25:55] <megal0maniac_afk> funfunctor: np
[05:26:12] <anton02> are timers == crystals?
[05:26:26] <abcminiuser_> Ok, fundamentals
[05:26:36] <abcminiuser_> The AVR CPU core runs from a selectable clock
[05:27:04] <abcminiuser_> For traditional AVRs that means either an internal (inaccurate) oscillator, or an external clock/crystal/resonator/et.c
[05:27:11] <anton02> will it auto to max if the voltage is sufficient?
[05:27:51] <abcminiuser_> The clock for traditional AVRs is generally fixed via a configuration setting inside the chip itself called the "fuses"
[05:28:02] <abcminiuser_> These can be set with an external programmer, and in some cases in software
[05:28:23] <abcminiuser_> By default, newer AVRs come preconfigured to run from their internal oscillator which is usually 1MHz
[05:28:42] <demultiplexer> abcminiuser_: the EVENT_USB_Device_Disconnect event fires 2 times as part of attachment/enumeration, so if I trigger on that, it always fails enumeration
[05:28:42] <abcminiuser_> However, that 1MHz is about +/-10%, so it's not good for timing sensitive apps
[05:29:02] <abcminiuser_> If you don't care about clock accuracy just give the chip power and you have a ~1MHz clock
[05:29:19] <abcminiuser_> If you want to use a more accurate external crystal, you must first change the device fuses
[05:29:52] <abcminiuser_> Again, all the above comes with caveats, some special AVRs can switch their clock in software on the fly, some ship with a different clock source selected by default
[05:30:46] <abcminiuser_> You can demultiplexer set a flag in the callback to configure endpoints, and check it in disconnect?
[05:30:54] <abcminiuser_> Then reset if the device was previously configured
[05:31:45] <anton02> hey, my board has an 8mhz crystal oscillator on it but the datasheet says 7.3728Mhz
[05:31:53] <demultiplexer> well that worked
[05:31:56] <demultiplexer> thanks
[05:32:37] <demultiplexer> now let's rename these 'uint8_t testvar0 = 10' lines to something more descriptive :P
[06:07:38] <anton02> is RXD0 where the microchip received information from?
[06:07:45] <anton02> receives*
[06:12:26] <anton02> can you break your serial device by accidently outputting to the rxd pin on your chip?
[06:44:45] <Jurika> Hi, just wondering if anyone here is familiar with Xilinx? I'm just drawing up a few schematics for an FPGA, with the I/O markers, what effect does deleting the box around a marker have? ie. after having set a marker down, pressing delete.
[06:48:41] <megal0maniac_afk> Jurika: This is probably the wrong channel
[06:52:35] <Jurika> megal0maniac_afk: thought I'd try my luck, thanks anyway :>
[07:26:18] <megal0maniac_afk> specing: Graphics acceleration is an absolute hack, nand isn't handled properly because allwinner haven't released sources for... well, anything and nothing is straightforward as a result.
[07:27:00] <megal0maniac_afk> In fact I don't think that it's officially supported by anything other than Android
[07:27:19] <Lambda_Aurigae> is that the rPI chip?
[07:27:38] <megal0maniac_afk> Lambda_Aurigae: Allwinner Axx boards
[07:27:51] <Lambda_Aurigae> hmmm.
[07:27:58] <megal0maniac_afk> Cubieboard, Olinuxino, ibox, pcduino
[07:28:12] <Lambda_Aurigae> aahh..ok...I know of the olinuxino boards.
[07:28:24] <Lambda_Aurigae> would never bother with 3D on something like that myself..
[07:28:36] <megal0maniac_afk> Video playback would be nice
[07:29:53] <megal0maniac_afk> And they support full hd, but at that resolution the CPU and GPU fight for memory as there is no dedicated memory for graphics so the picture drops out every now and then
[07:30:41] <megal0maniac_afk> And the bootloader seems to chainload through minimum 3 different bootloaders because too much of the low-level stuff is abstracted
[07:30:51] <Lambda_Aurigae> ouch.
[07:31:09] <Lambda_Aurigae> I've considered getting an olinuxino board but they tend to be rather pricy.
[07:31:29] <Lambda_Aurigae> instead I've ended up acquiring several old android cellphones.
[07:31:51] <Lambda_Aurigae> working on putting a usb i/o dongle on them.
[07:32:45] <megal0maniac_afk> I have a Seagate Dockstar (commercial product) which I've hacked Linux onto and it works beautifully. Mainstream support for everything, and it takes 10 minutes to get from stock firmware to a distro of your choice, with gigabit ethernet
[07:33:26] <megal0maniac_afk> It's lovely and it isn't even meannt to be hacked. Whereas this "development platform" is an effing nightmare
[07:33:43] <megal0maniac_afk> If this hardware was software, then I'd ragequit it
[07:36:06] <megal0maniac_afk> Lambda_Aurigae: So let this be a cautionary tale against anything made by AllWinner (A10, A13, A20, A31 etc)
[07:36:17] <Lambda_Aurigae> hehe..yeah.
[07:36:38] <Lambda_Aurigae> we need a teeny tiny p-4 platform
[07:36:45] <megal0maniac_afk> Their SoCs are meant for TV boxes, nothing else
[07:36:49] <Lambda_Aurigae> something that will run regular x86 OSs.
[07:36:52] <specing> megal0maniac_afk: it isn't supported by android :P
[07:37:36] <megal0maniac_afk> specing: What is it supposed to run? OS/2?
[07:37:37] <specing> megal0maniac_afk: buy an ATMEL ARM9
[07:38:02] <specing> megal0maniac_afk: Android, but from your statement it sounded like Google officially supports it
[07:38:29] <megal0maniac_afk> specing: No, but the chip is designed to run Android
[07:39:03] <Lambda_Aurigae> I wish the AVR32 were a more hobby friendly chip.
[07:39:16] <megal0maniac_afk> Lambda_Aurigae: How so?
[07:39:38] <Lambda_Aurigae> I have a pic32 in a 28pin dip package....no such animal in the avr32 world.
[07:41:17] <specing> If only Microchip's software would be more hobby friendly...
[07:41:40] <Lambda_Aurigae> yeah.
[07:42:10] <Lambda_Aurigae> I've gotten into using mplabx and the xc compilers...their docs are waaaay complex though.
[07:42:27] <megal0maniac_afk> Lambda_Aurigae: There are always breakout boards :)
[07:42:36] <sjokkis_> abcminiuser?
[07:42:38] <megal0maniac_afk> The chips themselves are pretty straightforward to code for
[07:43:54] <Lambda_Aurigae> megal0maniac_afk, yeah, breakout boards cost more money.
[07:44:29] <Lambda_Aurigae> some of us have issues with surface mount work,,,namely the shaky hands of neurological damage.
[07:44:57] <megal0maniac_afk> Lambda_Aurigae: http://www.aery32.com/ ?
[07:45:28] <sjokkis_> is it possible to store a byte in some register so that i can read it after a wdt reset?
[07:45:54] <Lambda_Aurigae> megal0maniac_afk, looks interesting but the double row headers are a putoff.
[07:46:00] <Lambda_Aurigae> sjokkis_, store it in eeprom
[07:46:18] <sjokkis_> Lambda_Aurigae: for what i'm intending, that would wear out the eeprom too fast
[07:46:29] <Lambda_Aurigae> 100000 writes?
[07:46:39] <sjokkis_> yea
[07:48:07] <sjokkis_> i notice here (https://code.google.com/p/optiboot/source/browse/optiboot/bootloaders/optiboot/optiboot.c) on line 805 it writes the reason for the reset to a register. can i write anything i want to one of the other registers, and have that still be there after the reset, or is that particular register special?
[07:54:20] <sjokkis_> oh y helo there. all registers are unchanged after a watchdog reset
[08:09:42] <anton02> if im running an 8mhz clock what should i set oc1a to if i want to count to 10?
[08:09:49] <anton02> OCR1A
[08:13:23] <antto> 10 wat?
[08:34:05] <anton02> antto: seconds