#avr | Logs for 2013-04-05

Back
[00:00:22] <dunz0r> With just 500µA, couldn't you power it with some caps and a solar cell?
[00:00:58] <langoliers> i think the sun should shine for some time every week :)
[00:05:07] <R0b0t1> Heh
[00:05:31] <R0b0t1> Actually the RTC might be drawing more current than the µC
[00:08:42] <langoliers> only if power save mode
[00:08:51] <langoliers> and aref disabled ...
[00:09:13] <langoliers> weak pullups off, no things sinking them
[00:10:14] <langoliers> anybody know if usb cares about the pullup current ? on the data pins? or it just needs to be <=1.5k to 3.3V ?
[00:28:12] <R0b0t1> langoliers: As commercial products has oft shown me, you can break the spec quite badly and have it work
[00:37:49] <Casper> R0b0t1: I proved it to my boss about usb
[00:38:36] <Casper> took 2 10' usb extension cord, then put a passive hub, then put a 6' extension, then a 12' cord that go to a joystick
[00:38:39] <Casper> work flawlessly
[00:39:09] <R0b0t1> lol
[01:10:13] <R0b0t1> Any avr with memory interface?
[01:54:59] <langoliers> reset is a weak pullup by default? i saw some guys leave reset floating
[01:55:01] <langoliers> http://www.waitingforfriday.com/index.php/C64_VICE_Front-End :)
[01:57:08] <Richard_Cavell> langoliers: You should attach it to +5V
[01:57:17] <Richard_Cavell> (through a resistor)
[01:57:23] <langoliers> okey
[01:57:47] <langoliers> i was just browsing some projects and they used to let it floating
[01:58:10] <langoliers> well even if it is a weak pullup, it may collect noise and reset at random
[02:12:51] <langoliers> c64 keyboard usb :)
[04:07:10] <twnqx> meh
[04:07:47] <twnqx> note to self: if a problem is bugging for hours and hours until late at night, just go to bed
[04:09:47] <RikusW> finally solved it ?
[04:11:17] <twnqx> yes
[04:11:27] <twnqx> i misread my diagnostics on multiple occasions
[04:11:50] <twnqx> i simply had to implement RTS/CTS handshake on both sides (PC software and AVR)
[04:12:14] <twnqx> i noticed around 2am...
[04:12:47] <twnqx> a bit sad i didn't expect that and so didn't route RTS to an extint pin :(
[04:14:40] <twnqx> i guess the other usb2serial does better double buffering so it can still receive data while transmitting on the usb side
[04:15:19] <twnqx> still doesn't explain why it worked with the other chip, but meh
[04:18:57] <langoliers> what is the difference between atmega168pa and atmega168a ?
[04:18:58] <langoliers> ;/
[04:19:44] <langoliers> atmel fixed a typo in the microcode?
[04:19:45] <twnqx> langoliers: why don't you just add another supply symbol for the RST pullup?
[04:19:57] <twnqx> (re: your post from ~9h ago)
[04:20:27] <langoliers> twnqx-< because i want a single sided board with a groundplane ;/
[04:20:46] <RikusW> langoliers: low power
[04:20:49] <twnqx> but that's a schematic :X
[04:21:03] <RikusW> and a is for newer version
[04:21:36] <langoliers> twnqx<> yeah but i was thinking about board design too on it, this is why the pins resemble the tqfp
[04:21:45] <twnqx> i see
[04:22:43] <langoliers> it is doable with a groundplane
[04:23:02] <twnqx> i know, i am always surprised what's doable with double layer
[04:23:30] <langoliers> without a ground plane it would be not that cool, and could pick up noise easily
[04:23:32] <twnqx> i the thing i am playing with at the moment
[04:23:39] <twnqx> like the thing*
[04:25:05] <twnqx> two bytes every ms... how can that cause a buffer overrun
[04:25:11] <twnqx> at 115200
[04:25:11] <langoliers> also you can always use 0 ohm resistors too and make it single layer with crossed wires
[04:25:49] <twnqx> those FTDIs can't be that bad
[04:26:07] <twnqx> sometimes 0 ohms don't cut it any more :P
[04:27:13] <twnqx> ttp://imageshack.us/a/img405/1097/leerd.jpg http://imageshack.us/a/img407/4453/fixup.jpg
[04:27:24] <twnqx> plus h for the first one
[04:28:20] <langoliers> i hade vias more than 2 layered boards
[04:29:03] <twnqx> no way to avoid them at times
[04:29:22] <langoliers> twnqx<< vusb with 3.3V reg? :)
[04:29:37] <twnqx> nah
[04:29:42] <twnqx> FT230X has that on-chip
[04:30:01] <langoliers> so you run an 5V system?
[04:30:05] <twnqx> yes
[04:30:39] <twnqx> though it will live with ~3.5-28V power supply, hence the someone larger L1 :P
[04:31:05] <twnqx> somewhat* need more coffee
[04:31:57] <langoliers> RikusW<< so smaller transistors right?
[04:32:42] <RikusW> no idea
[04:33:42] <twnqx> so, 4kB AVR serial buffer. good i have 32kB external RAM :P
[04:35:09] <RikusW> m162 and m128 can have external ram
[04:35:24] <twnqx> can128 too :)
[04:36:50] <RikusW> you just need to add the ram chip and 573
[04:37:01] <twnqx> like i said, i HAVE 32kB extended :)
[04:39:22] <twnqx> ugh
[04:39:45] <twnqx> ftdi signaling "stop sending" for... multiple seconds?
[05:05:13] <twnqx> wow. PC fails to read single bytes at 10k/s
[05:05:44] <RikusW> thats because of USB...
[05:05:52] <twnqx> select() syscall takes ~400µs
[05:06:10] <RikusW> sending single bytes over USB slows it down dramatically
[05:06:13] <twnqx> and i drop two chars into the buffer every 1000µs
[05:06:48] <twnqx> reading two bytes at once helps
[05:06:55] <twnqx> maybe i have to redeisgn some software here ;)
[05:07:13] <twnqx> and it's not the one on the avr
[05:07:15] <RikusW> buffer the bytes
[05:07:21] <RikusW> and send in blocks
[05:07:49] <twnqx> then i have to timestamp them on the avr :X
[05:08:48] <twnqx> ok, with the direct unbuffered connection i can run the serial line at 2mbps...
[05:09:59] <RikusW> high speed usb using ft2232 ?
[05:10:11] <twnqx> ft230x
[05:10:25] <twnqx> but yeah, i see the packets come in in groups of 2
[05:10:42] <twnqx> so there is ome kind of timeout involved after which the ftdi transmits the packet up
[05:10:49] <twnqx> so it does some coalescing
[05:10:58] <twnqx> if the data comes in fast enough ;)
[05:11:16] <twnqx> converting can->serial is challenging
[05:12:49] <RikusW> is CAN timing sensitive ?
[05:41:26] <twnqx> well, there are some things with 5ms timeouts...
[05:41:34] <twnqx> on higher protocol layers
[06:20:50] <tsmz> Hi, I seem to be having a strange timer interrupt related problem again. I'm running the 16-bit timer1 on an attiny84a in fast pwm mode with icr1 as top. The timer seems to run, but the enabling sei(); breaks the code: http://www.pastebin.ca/2350284
[06:22:13] <tsmz> there's some code toggling pins on the timer value in the while loop from line 18 on. When I comment sei(); this code seems to run--I can measure about 2 kHz on these pins, which I expect if the CPU runs at 8 MHz.
[06:22:32] <tsmz> if I remove everything inside the while loop and enable sei();, nothing happens.
[06:24:59] <specing> tsmz: watchdog, maybe?
[06:25:24] <tsmz> do I need to do anything about the watchdog? Isn't it supposed to be disabled by default?
[06:44:58] <specing> tsmz: check fuses to be sure
[06:52:57] <tsmz> specing: totally sure, no watchdog enabled.
[06:53:10] <specing> well then
[06:53:19] <specing> it is either your brain that messed up
[06:53:24] <specing> or GCC is acting funny
[06:53:32] <specing> check disassembly for the latter part
[06:53:43] <tsmz> I do suspect that I did something wrong somewhere.
[06:53:49] <tsmz> but I'm really not sure where.
[07:04:37] <specing> that you did, otherwise it would work
[07:06:34] <tsmz> the only question remaining now is: Where did I do something wrong?
[07:11:52] <specing> tsmz: disasm
[07:22:10] <tsmz> specing: What should I look for in the disassembly?
[07:23:14] <cluelessperson> Tom_itx, can you link me again? I'll buy it
[07:26:12] <specing> tsmz: differences between what the code should be doing and what it is doing
[07:26:37] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/index.php
[07:27:43] <Tom_itx> cluelessperson, where are you located?
[07:28:04] <cluelessperson> Tom_itx, Texas, US
[07:28:41] <tsmz> specing: would you mind being a bit more specific? I'm not into AVR assembly, and I also can't see anything that's obviously wrong with the code on a cursory look. The program stops working as soon as the interrupts are enabled, so I'm quite clueless. Enabling the interrupts is a single instruction.
[07:29:52] <cluelessperson> Tom_itx, why's that?
[07:30:03] <Tom_itx> i'm nosey
[07:30:19] <cluelessperson> Tom_itx, you're going to spit on the upcoming order to Texas? :D
[07:30:22] <Tom_itx> some foreign places are hard to ship to
[07:30:39] <cluelessperson> are you involved with hackaday?
[07:30:57] <Tom_itx> i read a few posts when ppl post them
[07:31:11] <cluelessperson> Tom_itx, which revision would you suggest?
[07:31:22] <Tom_itx> there is only one available atm
[07:31:24] <Tom_itx> 1.1c
[07:31:40] <cluelessperson> 2 isn't available?
[07:31:57] <Tom_itx> they're the same, one is in a box
[07:32:06] <cluelessperson> one is in a neat box.
[07:32:22] <cluelessperson> Tom_itx, what does it come with?
[07:32:29] <Tom_itx> what you see
[07:32:42] <cluelessperson> but, but, don't I need a 10 pin cable?
[07:32:53] <Tom_itx> what for?
[07:33:09] <cluelessperson> how come the one I have now is 10 pin?
[07:33:31] <cluelessperson> Tom_itx, so no cable. :(
[07:33:32] <Tom_itx> the 6 and 10 are the same. the 10 has extra grounds and a status led. atmel doesn't use that plug much anymore if at all
[07:33:43] <Tom_itx> no usb cable
[07:33:46] <Tom_itx> it has the ribbon
[07:33:51] <cluelessperson> ribbon cable?
[07:33:52] <cluelessperson> okay
[07:33:58] <cluelessperson> I'll live with that.
[07:34:05] <Tom_itx> are you gonna breadboard it?
[07:34:08] * twnqx uses 10pin JTAG
[07:34:25] <cluelessperson> Tom_itx, might, not sure yet. probably both.
[07:34:29] <Tom_itx> i'll toss in a breadboard adapter
[07:34:40] <Tom_itx> if you mention your nick in the order
[07:34:49] <cluelessperson> Tom_itx, Also, I apologize if I seem like an ass.
[07:35:00] <cluelessperson> I'm merely trying to get started, and want something that'll be the end of it.
[07:35:05] <Tom_itx> no, you're just clueless
[07:35:12] <cluelessperson> not totally sure ..what.. I need... thanks.
[07:35:34] <cluelessperson> now why can't I have rev 2?
[07:35:43] <Tom_itx> cause i don't have any ready
[07:39:55] <Tom_itx> i actually do have one left if you want it
[07:40:13] <Tom_itx> i need to finish up the boxes on some more
[07:40:32] <Tom_itx> i try to keep one on hand in case i need it for testing
[07:42:48] <cluelessperson> Tom_itx, I do want! :D
[07:42:59] <Tom_itx> pm
[08:15:20] <Kev---> Hmm what are we talking about? The mini programmer?
[08:33:48] <qubit_> hi
[08:34:33] <qubyte> hi
[08:40:43] <qubyte> I'm a newbie in electronics/avr coding. I want to fade an rgb led. Lets say I have an 8bit uc with a timer which counts to 255 (since it is 8bit) and I want to dimm it via PWM, then one timer cycle represents one PWM pulse. Right? How can I calculate the frequency out of this? Since the eye's perception isn^t linear but descriped by Stevens' power law, I need to calculate the values from 0-255 according to the brightness I want. Does a
[08:46:03] <seldon> The frequency isn't so important (as long as it's high enough), it's the part of each interval that the LED is on (let's call it intensity). As for the progression, use a lookup table.
[08:46:46] <seldon> There are some tables in the code samples here: https://www.mikrocontroller.net/articles/LED-Fading (sorry for german text if you don't speak german. Code at the bottom), and also an excel spreadsheet that allows you to compute your own table here: https://www.mikrocontroller.net/wikifiles/e/e4/Pwm_table.zip
[08:48:06] <seldon> Depending on what you want to do, you may not want to start at zero in the table. The steps are noticeable at the bottom with an 8 bit counter.
[08:55:52] * twnqx pats seldon
[08:56:04] <seldon> *sniff*
[08:57:28] * twnqx is amazed that these abonimation of code works
[08:57:40] <twnqx> ... i also wonder how many errors still are lurking
[08:59:38] <seldon> I haven't audited it. The tables should work okay, though.
[08:59:58] <twnqx> no, this 3500+ lines i wrote the past... two month or so
[09:00:06] <seldon> Oooh.
[09:00:33] <twnqx> or more than 5000 if you count the PC part that goes together with it in
[09:01:10] <twnqx> and still so much missing :/
[09:04:04] <seldon> 3.5k lines of C doesn't sound *too* terrible. And it's pretty normal to rewrite code properly after you got it to sort of work in hacky ways.
[09:04:57] <seldon> Because it's only the second time you actually know htf to solve the problem.
[09:05:05] <twnqx> the core that is roughly 10% of it already is in rewrite stage...
[09:05:36] <twnqx> in fact, the rewrite just finsihed :P
[09:05:46] <seldon> \o/
[09:05:48] <twnqx> or well, almost. just realized i missed one thing
[09:14:56] <twnqx> once i'm out of the time-critical section
[09:15:03] <twnqx> i will do a proper rewrite
[09:15:21] <twnqx> that does have 95% of the action in interrupt handlers :X
[09:15:32] <qubyte> hi, did someone answer at my LED Dimming value calculation question? I lost connection.
[09:15:39] <twnqx> but then i need multitasking... on AVR :P
[09:15:45] <twnqx> yes, someone did
[09:15:54] <seldon> <seldon> The frequency isn't so important (as long as it's high enough), it's the part of each interval that the LED is on (let's call it intensity). As for the progression, use a lookup table.
[09:15:54] <seldon> <seldon> There are some tables in the code samples here: https://www.mikrocontroller.net/articles/LED-Fading (sorry for german text if you don't speak german. Code at the bottom), and also an excel spreadsheet that allows you to compute your own table here: https://www.mikrocontroller.net/wikifiles/e/e4/Pwm_table.zip
[09:15:54] <seldon> <seldon> Depending on what you want to do, you may not want to start at zero in the table. The steps are noticeable at the bottom with an 8 bit counter.
[09:16:42] <qubyte> seldon I don't want to use these tables but calculate my own.
[09:17:04] <twnqx> read the second line to the end.
[09:17:10] <qubyte> But thanks
[09:55:34] <xpoqp> where do you guys buy good quality component kits? Need to expand components selection...
[09:56:05] <xpoqp> in europe
[10:04:00] <julius__> hi
[10:04:44] <qubyte> I'm currently looking ad a demo led fading tool/code, atmega32 8bit with 8mhz. using prescaler 256 results in 122hz pwm, how do they get 122hz?
[10:43:55] <qubyte> What could be wrong if the code shown in this article doesn't work/my led just lights up but never changes its brightness? http://www.mikrocontroller.net/articles/LED-Fading
[10:49:41] <[w_w]> you used the code exactly as shown?
[10:56:01] <[w_w]> My guess is you didn't hook up the led to wherever OC1A goes... PD5 in this example
[10:58:08] <qubyte> [w_w]: i copied the code, of course i read it, I also debuged it but it works nicely. I'm using an atmega8, anything i have to care about? its developed for atmega32. It just glows. It's connected to pd5
[11:02:52] <[w_w]> have you looked at pd5 with a scope?
[11:03:31] <[w_w]> I am not familiar with the differences between atmega8 and atmega32...
[11:06:16] <qubyte> [w_w]: scope? Sry im new to electornics and don't know all the english words.
[11:06:54] <[w_w]> ein Oscillosope.
[11:07:03] <[w_w]> err. Oscilloscope
[11:08:52] <qubyte> [w_w]: that would be nice but unfortunately I don't have one here atm.
[11:13:10] <qubyte> [w_w]: thanks anyway.
[11:13:32] <[w_w]> you are running at the correct clock frequency? are compiling with optimization?
[11:19:48] <[w_w]> maybe 0x81 doesn't do fast pwm on the atmega32s...
[11:31:25] <qubyte> [w_w]: yes using a external 8mhz quarz and i do have 1. optimization
[11:33:08] <[w_w]> verify that you can make the led blink by writing a small program while(1){ TOGGLE(PD5)... _delay_ms(1000); }
[11:38:44] <kdehl> Okay, the $2 programmer I bought on ebay is about 10 times faster than the $40 SEK one I bought in Sweden.
[11:38:45] <qubyte> [w_w]: Using b1 and just set/unset it blinks
[11:39:30] <[w_w]> b1? why use b1?
[11:40:09] <qubyte> [w_w]: als oworks with d5
[11:40:17] <qubyte> *also works
[12:30:02] <[w_w]> hm. How do I set a board for a project?
[12:30:14] <[w_w]> in avrstudio?
[12:34:32] <kline> [w_w]: you just set the uc type
[12:34:41] <kline> (and speed etc)
[12:34:57] <kline> when you create a new project itll be part of the wizard
[12:36:47] <[w_w]> Also when I use an example project? I didn't see it anywhere. Really I'm trying to get the DFU bootloader to work, but under details it says unknown board, and when compiling it does not use the correct -D option.
[12:43:35] <DrLuke> can anyone help me with includes in avr studio 6? When I include a header file, it doesn't automatically also include the source file. How can I change that?
[13:13:52] <kdehl> DrLuke: You're not supposed to do that. Header files are the ones you include in your source file in order to be able to refer to functions in other source files.
[13:14:37] <kdehl> You compile all source files separately, then link them all together into a complete binary file.
[13:38:21] <DrLuke> kdehl: but I'm writing the library as I go
[13:40:38] <twnqx> that doesn't change anything
[13:41:02] <kdehl> DrLuke: You could always do an #include "sourcefile.h" as well as #include "sourcefile.c", but it's ugly and I wouldn't recommend it.
[13:41:04] <[w_w]> anyone playing with the DFU example projects? I've been trying to get it to work for the past few days. I build it, upload it, reset the chip, but there's no new dfu usb device... I'm probably just missing something really basic but can't figure out what it is :/.
[13:41:24] <twnqx> xpoqp: i just buy what i need from digikey
[13:41:50] <DrLuke> kdehl: so I'm back at square 1
[13:42:09] <DrLuke> because avr studio still tells me that the functions are undefined references
[13:42:29] <twnqx> that means you have to add the .c to the project, i guess
[13:42:30] <[w_w]> I think what DrLuke wants is to add a source file to his avrstudio project.
[13:42:41] <specing> DrLuke: don't compile seperately as that creates overhead when stuff could be inlined
[13:42:51] <twnqx> what...
[13:42:56] <specing> write static functions in header files instead
[13:43:08] <DrLuke> what?
[13:43:25] <RikusW> [w_w]: what avr with DFU do you have /
[13:43:29] <twnqx> that's one of the worst recommendations i have seen so far :P
[13:43:32] <DrLuke> I have one main.c and a seperate mymaths.h and mymaths.c
[13:43:43] <RikusW> http://www.wikihow.com/Make-Your-Own-Cell-Phone-Jammer
[13:43:48] * RikusW wonders if thats legal....
[13:43:53] <twnqx> no
[13:44:02] <specing> twnqx: What makes it bad?
[13:44:14] <twnqx> -Wall -Werror and enjoy
[13:44:14] <[w_w]> RikusW, at32uc3c0512.
[13:44:35] <twnqx> and of course code bloat, having the same functions over and over if not inlined
[13:44:40] <specing> RikusW: It is also illegal to hate the government in many countries
[13:45:06] <specing> RikusW: and it is illegal to kill people (though NATO does plenty of that and noone was prosecuted yet)
[13:45:08] <DrLuke> it's illegal to deny the holocaust in germany and other european countries
[13:45:15] <xpoqp> twnqx, I just wanted to buy a bunch of common components to have a wide variety of selection and I found it rather time consuming browsing these parts one by one from e.g mouser or farnell
[13:45:19] <specing> so go ahead and break laws nobody follows anyway
[13:45:41] <specing> twnqx: static != inline
[13:45:49] <RikusW> [w_w]: I have 3a3 xplain, and last time I had to erase it first otherwise its locked
[13:45:49] <twnqx> specing: exactly that
[13:45:50] <specing> twnqx: those are two seperate functions
[13:45:57] <specing> err keywords
[13:46:05] <RikusW> [w_w]: I had to use the commandline app too
[13:46:17] <DrLuke> so, I should just #include the sourcefile?
[13:46:23] <twnqx> and ones you include the header in 10 files you will get the functions in 10 object files
[13:46:26] <twnqx> once
[13:46:54] <twnqx> DrLuke: in reality it depends very much on the complexity of your functions
[13:47:06] <RikusW> specing: at least having a spectrum analyzer isn't required then, the more noise the better :-P
[13:47:34] <twnqx> DrLuke: it will work if you add the .c to the project dir, but it might be less efficient then very small functions
[13:47:37] <[w_w]> RikusW, commandline app? I used avrstudio and an avrice3 tools->device program->memories-> select chip erase and erase now...
[13:47:43] <twnqx> that the compiler could possibly inline
[13:47:50] <DrLuke> twnqx: That's what I did
[13:47:59] <DrLuke> it finds the header, but won't include the source file on it's own
[13:48:00] <RikusW> [w_w]: AS6 ?
[13:48:13] <twnqx> DrLuke: you will have to add the .c to the project through the UI
[13:48:26] <twnqx> but don't ask me how, i hate GUI software :P
[13:48:31] <[w_w]> RikusW, 6.1.2440
[13:48:40] <DrLuke> twnqx: ok, but what when I decide to share my code?
[13:48:43] <RikusW> [w_w]: I used Atmel supplied FLIP
[13:48:53] <RikusW> would be nice is AS6 support it :)
[13:49:07] <[w_w]> I'll try that then...
[13:49:24] <RikusW> its commandline based, and somewhat cryptic...
[13:49:25] <twnqx> DrLuke: then you share the code...
[13:49:29] <[w_w]> \me wonders whats different from a jtag chip erase and flip...
[13:49:45] <RikusW> FLIP use the dfu bootloader
[13:49:58] <RikusW> for jtag you need a dragon or jtagice
[13:49:59] <specing> < twnqx> and ones you include the header in 10 files you will get the functions in 10 object files
[13:50:06] <Tom_itx> flip won't erase the bootloader section
[13:50:12] <specing> #pragma once and compile with a single compiler call.
[13:50:21] <DrLuke> twnqx: and then they have to add it themselves to their gui?
[13:50:35] <twnqx> yes, that's how it usually works
[13:50:43] <DrLuke> ok, thanks :)
[13:51:16] <twnqx> specing: as in, no separate object files?
[13:51:33] <specing> yes
[13:51:45] <twnqx> hm
[13:52:02] <twnqx> does the compiler keep separate namespaces per .c files in that scenario?
[13:52:23] * twnqx likes to reuse names for static globals in multiple .c files
[13:53:05] <twnqx> but yeah, might be the way to go for a math library
[13:53:57] <specing> sqlite does this and they squeeze 5% more performance out of it
[13:54:23] <specing> the entire sqlite distribution is one massive .c file
[13:56:24] <langoliers> h
[14:07:57] <[w_w]> RikusW, ah. yes. I'm trying to build the dfu firmware... I have a jtagice3 to flash with. Problem is the firmware i build does not work...
[14:09:45] <Tom_itx> ap note 109 iirc
[14:11:59] <Tom_itx> [w_w] you want a bootloader?
[14:12:00] <langoliers> i have ordered some atmega168pa-20au
[14:12:03] <Tom_itx> try that one
[14:12:26] <Tom_itx> ordered or requested?
[14:12:33] <Tom_itx> order implies money
[14:12:34] <langoliers> $4/ea
[14:12:38] <Tom_itx> hmm
[14:13:09] <langoliers> could not locate 48 now so i got these
[14:13:16] <langoliers> will do
[14:13:17] <Tom_itx> the 328 is only a couple bucks more
[14:13:26] <Tom_itx> yeah they're all the same
[14:13:31] <Tom_itx> except memory
[14:13:36] <langoliers> :)
[14:13:46] <langoliers> i'll code in some chiptunes then
[14:13:47] <Tom_itx> cluelessperson
[14:14:11] <Tom_itx> i got no email from you
[14:15:45] <langoliers> Tom_itx<< selling a programmer ? ;>
[14:16:03] <langoliers> you settled down to some beer ?
[14:16:04] <Tom_itx> well he said he wanted one
[14:19:19] <RikusW> Tom_itx: [w_w] actually wants DFU for AVR32...
[14:19:27] <Tom_itx> oh
[14:20:00] <RikusW> seems there is trouble building it in AS6
[14:20:15] <twnqx> btw, if other atmels but avr are ontopic... any ideas how to program sam3 if you don't want to run windows?
[14:20:58] <RikusW> [w_w]: ask abcminiuser he knows more about AVR32 and is actually an Atmel employee
[14:21:20] <Tom_itx> or join #avr32 and ask
[14:25:31] <[w_w]> Tom_itx, yes I want the dfu bootloader.
[14:31:12] <langoliers> Tom_itx<- the atmega328 would be like $5, why would i prefer that ? 16k is much already
[14:31:44] * twnqx stares at 19286b .txt
[14:31:46] <twnqx> it's not.
[14:31:59] <langoliers> well iwas thinking about 64 pin version too, but for now, 32 pin tqfp will do
[14:32:12] <[w_w]> Actually, building it is not a problem... It builds fine. just that the resulting firmware does not do what I'm expecting it to. I figured it would start up and provide a dfu capable usb device... but its all silent.
[14:32:52] <langoliers> should i get this for 64 pins ? ATMEGA128A-AU
[14:33:02] <GuShH> it is dfu, "dude fuck you!"
[14:33:27] <twnqx> langoliers: that or the USB version
[14:33:52] <twnqx> can never go wrong with having USB support ;)
[14:33:56] <RikusW> [w_w]: the DFU is installed by default afaik
[14:34:03] <RikusW> at least on my xplain board
[14:35:08] <langoliers> do you usually put at least a 100 ohm resistor in series with each port ?
[14:35:13] <[w_w]> yes. The one it came with works fine (I also used jtagice to make a backup). I want to modify it a bit for my project. Before i modify it, I want to reproduce the stock one.
[14:35:23] <twnqx> langoliers: for... what?
[14:35:31] <langoliers> port protection
[14:35:38] <twnqx> no i mean, if connecting to what
[14:35:48] <langoliers> potmeters, pushbuttons
[14:35:58] <twnqx> not for the bushbuttons
[14:36:13] <langoliers> 0-5V analog input
[14:36:39] <RikusW> [w_w]: I've never tried building the DFU bootloader....
[14:36:56] <RikusW> [w_w]: wait till abcminiuser is around or ask in #avr32
[14:37:12] <kdehl> The 1284p has an internal oscillator that runs at 8 MHz, but CKDIV8 is 0, and therefore the controller is only run at 1 MHz as default, is this correct?
[14:37:27] <twnqx> analog input has several kohm inside if enabled anyway
[14:37:38] <kdehl> I thought it was run at 10 MHz, but I might have made that up myself.
[14:37:57] <[w_w]> lol. avr32 is so quiet...
[14:38:16] <RikusW> it is
[14:38:33] <RikusW> kdehl: you can change it by using the CLKPR register
[14:38:33] <[w_w]> I feel like I'm disrupting someones meditation when i ask there.
[14:38:40] <RikusW> heh
[14:40:20] <kdehl> RikusW: Right, but those are the only frequencies you are able to use with the internal oscillator? 1 or 8.
[14:40:38] <RikusW> read the docs on CLKPR
[14:40:44] <kdehl> Will do.
[14:41:00] <RikusW> there is dividers for 2^0 ---> 2^8 iirc
[14:41:45] <kdehl> Seems about right.
[14:42:06] <kdehl> But this is set during runtime, if I understand this correctly.
[14:42:54] <kdehl> I just wonder how I should set up the USART, so I need to figure out what frequency the controller is using.
[14:43:05] <RikusW> yes
[14:44:29] <kdehl> I did #define F_CPU 10000000UL, and _delay_ms(1000), when blinking a LED, and it seems to be about a second. But I guess it's 1.25 s, if the frequency is actually 8 MHz.
[14:45:03] <RikusW> compile time and run time clock stuff won't mix so well.......
[14:46:30] <kdehl> Right. But there's no way I somehow run at 10 MHz now, right? If I only use the internal oscillator.
[14:47:02] <RikusW> no
[14:47:14] <RikusW> CLKPR is only a divider
[14:47:20] <RikusW> not a PLL like on AVR32
[14:47:24] <RikusW> or xmega
[14:47:49] <kdehl> Heh. Dunno anything about that, but anyway, this is good.
[14:48:09] <kdehl> And the internal oscillator is accurate enough to be able to run the usart?
[14:48:11] <langoliers> use a fractional divisor
[14:49:38] <RikusW> kdehl: there is OSCCAL to change the RC frequency somewhat
[14:50:17] <RikusW> but at say 9600 it will work ok
[14:50:23] <kdehl> Great.
[14:50:25] <RikusW> I even did 115200 with modified OSCCAL to make 8 into 7.3MHz
[14:50:34] <kdehl> That's the speed I was planning to use.
[14:50:36] <kdehl> 9600, that is.
[14:51:02] <kdehl> Heh, that's still 4 times faster than my first modem...
[14:51:16] <kdehl> Good times, good times.
[14:51:29] <RikusW> 9600 is fairly immune to imperfect frequency
[14:51:56] <RikusW> 2400bps modem ?! ugh
[14:52:08] <RikusW> even GPRS runs at 85k
[14:52:42] <RikusW> kdehl: in the datasheet you can find the UBRR value for 8M and 9600
[14:53:05] <RikusW> at the end of the uart chapter
[14:55:31] <kdehl> RikusW: Yup, found that already. :)
[15:17:39] <twnqx> RikusW: i once used a 300bps acoustic coupler over a mobile :P
[15:18:10] <twnqx> i was amazed that the data survived the treatment of GSM codecs
[15:18:52] * twnqx should try his 28.8kbps modems over VoIP
[15:19:31] <RikusW> Aheh
[15:20:03] <RikusW> then do VoIP over 28k :-P
[15:21:29] <twnqx> i guess this code is finally ready for a commit...
[15:22:41] <twnqx> 7 files changed, 308 insertions(+), 264 deletions(-)
[15:23:14] <twnqx> \o/
[17:38:55] <Horologium> twnqx, I get a nice stable, most of the time, more or less, well, not really but it mostly works, 9600bps fax connect over cheap voip.
[19:33:54] <Tom_itx> cluelessperson, i should have some done this evening
[19:38:38] <[w_w]> Horologium, if you have IP to do voip... why do you need modem technology?
[19:39:20] <Horologium> [w_w], actually, several of my customers do....for faxes.
[19:40:14] <Horologium> they use magicjack dongles to connect their fax machines up.
[19:40:37] <Horologium> then complain when they can't stream audio and get faxes at the same time....one has to wonder why,,,or not..
[20:53:47] <cluelessperson> Tom_itx, Sounds good to me. :D
[20:54:11] <[w_w]> hmm. but still... fax over the voip... somewhere that voip trunks out to the regular phone net right?
[20:55:05] <Casper> [w_w]: fax may not work over voip
[20:55:08] <Casper> due to the compression
[21:35:31] <GuShH> theBear: what's up?
[23:18:27] <cluelessperson> So I have this.
[23:18:28] <cluelessperson> http://paste.ubuntu.com/5681818/
[23:18:43] <cluelessperson> do you know how I can make this code run through arduino?