#avr | Logs for 2012-03-29

Back
[00:07:49] <Valen> rofl inflex i hope you didn't need to pay the shipping
[00:07:58] <inflex> rue_house: they did actually :)
[00:08:02] <inflex> Valen: thankfully not
[02:37:10] <ferdna> again canadian!!!
[02:37:11] <ferdna> http://hardware.slashdot.org/story/12/03/28/2321210/canadian-man-releases-open-source-star-trek-tricorder
[03:14:26] <EbiDK> Nifty
[04:06:09] <Metalsutton> Hello all. I have a non-avr related question however maybe someone here might be able to help?
[04:06:57] <Metalsutton> I currently have a product casing that I would like a female USB-B cable to be able to plug into.
[04:07:47] <Metalsutton> The only problem is, (for the time being) I have purchased and wanted a USB hub to be implemented inside of the case, only as a concept and I can implement it into the board later on.
[04:08:44] <Metalsutton> So I have broken the purchased usb hub apart, only to realize that the connector ports are joined on their quite nicely, and I dont think I can rip them off all that well.
[04:09:09] <mrfrenzy> photos?
[04:09:22] <frugalfirbolg> dremel?
[04:10:40] <Metalsutton> Question. Can usb travel: USB-B cable Male -> USB-B female to USB-A female adaptor (to be glued into the back of the case) -> USB-A male cable to the usb hub -> Usb-A to USB-B cable -> Usb-B female port on working prototype board.
[04:11:28] <Metalsutton> Buahahahha, its a bit much I know. I see the small Usb-b female to USB-A female adaptors are not that common, and before I purchase them, I have a feeling all this adaptor changing might effect the signal?
[04:12:33] <Metalsutton> Sorry, I ment to say Male USB-B cable on my 2nd post. And no photos as of yet sorry.
[04:15:20] <cyanide> what are you talking about
[04:15:29] <cyanide> i have no understanding of what you just said
[04:15:55] <Metalsutton> hahah
[04:18:23] <Metalsutton> I wanted to implement a usb hub (store purchased one) inside my project's encasement. The orginal plan was to desolder the Female usb-A ports on it and the upstream male usb-a plug from it, however I don't think that is a wise idea anymore and could possibaly just get around it with a "USB-B female to USB-A female adaptor"
[04:20:53] <Metalsutton> That would then mean I need to find a rareish adaptor for it, and I am not sure if I should bother with all this USB-B -> USB-A -> USB B switching. I was just wondering if anyone had any experience with something like that not working. Like a loss in signal?
[04:20:54] <frugalfirbolg> USB is pretty resilient to soldering shenanigans -> common mods on netbooks being to solder in wifi and cellular dongles directly to the bus so you can still use the external port
[04:22:03] <frugalfirbolg> by the way, is that hub powered or unpowered?
[04:23:38] <Metalsutton> I have diffrent needs for it. In some of my cases will require unpowered (usb thumb-stick attached, low power requirement), others will require a usb 2.0 Notebook harddrive attached, which will suck power, so at least a couple of my boxes will need hub-powered.
[04:24:40] <frugalfirbolg> how many ports on that hub?
[04:26:17] <Metalsutton> Basicaly, at the back of my box I want a USB-B female port, and the circuit board that I have designed has a female USB-B port on it too (can be changed), the problem is that I want a usb-a hub inbetween the two, so it will require various adaptors if I want to get it to a solderless solution (prototype remember)
[04:26:40] <Metalsutton> 4 on the unpowered, 7 on the hub-powered. I will only ever be requiring 2 or 3 ports however.
[04:27:06] <frugalfirbolg> a few adapters aren't going to murder performance then
[04:27:47] <frugalfirbolg> assuming you're staying well under 3 meters for each path
[04:27:49] <Metalsutton> 1 port for harddrive, either thumb or harddrive (diffrent power requirements), and either 1 or 2 for the circuit board (atmega8's, low power requirement)
[04:30:04] <Metalsutton> I definaly think staying under 3 mtrs is possible.
[04:30:46] <Metalsutton> I have purchased a few hubs. So I think I may try to butcher the first and see if I run into any problems, and if I do, then I suppose I will try to go the solderless way.
[04:31:25] <Metalsutton> Cheers for the help. I don't wanna go out and by stuff I didn't need :) It's happened plently of time before. :)
[04:31:55] <frugalfirbolg> should be fine, but good luck anyway
[05:03:56] <skorket> A friend and mine were talking about making a 'home brew' braille device and we were trying to figure out how to cost effectively make something that would move pins up and down. We eventually stumbled on the potential to make an inductor etched into a PCB i.e. in a spiral pattern. Does anyone have a sense of whether this would actually work or not?
[05:04:25] <skorket> oh, whoop,s meant to post this in #electroncis...
[05:06:27] <CapnKernel> Relevant here too, keep talking
[05:06:36] <CapnKernel> I'm also very interested
[05:07:22] <skorket> Yeah, I just don't know....How thick? How many turns? Given the restriction on both, could you generate enough force to propel a light pin upwards?
[05:07:30] <CapnKernel> Short answer is I just don't think you're going to get the flux you'll need.
[05:07:48] <CapnKernel> I have thought a long time about this problem
[05:08:26] <CapnKernel> For example, have a resistive element which generates heat, and a substance which undergoes liquid-gas phase change, thus expanding, and swelling a mebrane.
[05:08:28] <CapnKernel> membrane
[05:08:51] <CapnKernel> I have thought of any number of mechanical devices
[05:08:53] <skorket> hmm, seems like it might be slow
[05:09:04] <skorket> there's always nitinol
[05:09:08] <frugalfirbolg> pneumatic maybe?
[05:09:17] <CapnKernel> Would you call an inkjet printer slow? They do resistive heating and phase change
[05:09:25] <skorket> the constraint is of course cost and size.
[05:09:40] <CapnKernel> The cheapest mechanical devices I can think of involve a moving shuttle
[05:09:49] <skorket> well...they make an ink bubble which bursts, right?
[05:10:16] <CapnKernel> They vapourise ink, which ejects a liquid bubble out the nozzle. The vapour then condenses
[05:10:24] <CapnKernel> so there's no bursting
[05:10:35] <CapnKernel> they are of course, talking picolitres
[05:10:54] <frugalfirbolg> how many 'frames' per second do you need? less than 24 I imagine, so resistive heating / phase change is plenty fast
[05:10:56] <skorket> but they furthermore aren't taking the vapourized ink then recondensing it
[05:11:04] <CapnKernel> yes they are
[05:11:29] <Valen> skorket: you will not get enough flux at all
[05:11:32] <CapnKernel> the vapourisation is internal, it's not an external thing
[05:11:37] <Valen> i make motors and such like
[05:11:42] <skorket> internal to the nozzle?
[05:11:46] <Valen> take a look at doing it with high voltage and rubber
[05:12:00] <CapnKernel> relatively speaking, the vaporisation is aways back from the nozzle
[05:12:03] <Valen> your braille thing
[05:12:09] <CapnKernel> Valen: keep talking
[05:12:23] <frugalfirbolg> Valen: guess on how much / little current that would take?
[05:12:53] <Valen> I'd say 10-100 turns with a magnet at ~500ma or so
[05:13:04] <Valen> stroke of .5mm or so
[05:13:13] <Valen> more like 100 turns than 10
[05:13:49] <frugalfirbolg> yea - you're still talking about doing a linear actuator then? For second I thought you meant electrostatic forces on a rubber membrane
[05:14:00] <Valen> you can make a capacitor with some rubber, and a conductor on either side
[05:14:19] <Valen> put *lots* of voltage across it and it'll make a noticable force to compress the rubber
[05:14:40] <Valen> keeping fingers out of *lots* of voltage is left as an excersise for the student
[05:14:46] <frugalfirbolg> That will probably work better with original intent to keep it a printed design / flat
[05:14:53] <Valen> i havent run the numbers but my feeling is a few thousand volts
[05:14:58] <CapnKernel> Starts to sound like an electrostatic speaker
[05:15:05] <Valen> same principle
[05:15:41] <skorket> http://www.circuits.dk/calculator_planar_coil_inductor.htm <-- useful?
[05:15:41] <frugalfirbolg> CapnKernel yea, just trying to figure out if you can get away with milliamps
[05:16:13] <Valen> you can do it with milliamps
[05:16:22] <Valen> you will just need a few hundred/thousand turns
[05:16:26] <Valen> look at a $2 clock
[05:16:40] <Valen> you also start to need some actual voltage then
[05:16:42] <CapnKernel> I had thought of a pin with little detents so it wanted to stay in either the up or down position
[05:17:07] <CapnKernel> Then a shuttle runs along underneath it (and its neighbours) with an electromagnet.
[05:17:17] <CapnKernel> The electromagnet resets the pin to the new state.
[05:17:23] <frugalfirbolg> skorket: those pancake coils remind me of the speaker coil in a hard drive - they're about .5mm tall by 2mm by 3mm
[05:17:29] <Valen> just use latching relays CapnKernel ;->
[05:17:38] <CapnKernel> Hard to make them small enough.
[05:17:58] <CapnKernel> Also, you want them simple enough that you can afford to throw them away. Being mechanical, they will fail.
[05:20:29] <Valen> hah
[05:20:30] <Valen> cheat
[05:20:41] <Valen> user puts finger on your shuttle
[05:20:54] <Valen> measure position and pop 6 pins or whatever it is
[05:21:06] <Valen> as user slides finger along pins go up and down
[05:21:25] <Valen> dunno if it'll work without the tactile sliding feedback but you might be able to get around it ;->
[05:21:26] <frugalfirbolg> so using the user as generator?
[05:21:33] <Valen> user = scanner
[05:21:36] <frugalfirbolg> ah
[05:21:41] <Valen> user is sliding along an inkjet cart
[05:21:53] <Valen> computer "squirts" as the user gets the cart into position
[05:22:45] <frugalfirbolg> well, at that point you could get away with a handful of stepper motors to move the dots in and out as they 'scan' holding the device
[05:23:08] <skorket> what if you stacked pcb's on top of each other?
[05:23:34] <frugalfirbolg> that can work, but it'd be cheaper to use traditional fabrication techniques at that point
[05:23:59] <skorket> such as?
[05:24:28] <frugalfirbolg> wind the coild on a mandrel, pot it in epoxy with the leads sticking out
[05:25:30] <frugalfirbolg> versus paying for a bunch of wasted silicon and dealing with capacitances and potential corrosion points where the boards traces meet
[05:25:34] <skorket> frugalfirbolg, you wouldn't rather pay some nominal fee to have 5 PCBs printed with an array of 10x10 inductors?
[05:25:57] <frugalfirbolg> it depends on how many turns I need
[05:27:36] <frugalfirbolg> I've seen printed armatures used on the electric drives for tanks, but those are using a different orientation (radial vs axial) and they're actually brushed commutation
[05:28:15] <frugalfirbolg> so closest reference I'd have is the speaker coil in a hard drive, and I couldn't get even half the number of turns it has out of 10 PCBs stacked on each other
[05:30:14] <CapnKernel> I had also thought of using very fine pitch etching on a PCB to make the commutator for a linear actuator, but decided it would be too unreliable
[05:32:00] <skorket> guess that idea was a bust. Thanks for thinking about it guys
[05:33:21] <frugalfirbolg> I bet you could do something in the same form factor but use electrostatic and rubber - there a couple companies with prototypes capacitive screens that give texture feedback through electrostatics
[05:36:38] <nrdb> I need to measure a current of a couple of amps ... I am thinking of using the deferential ADC inputs ... is it better to use a higher resistance with a 10x multiplier or a lower resistance with a 200x multiplier?
[05:39:47] <CapnKernel> skorket: Please do keep thinking about novel braille cells, it's an interesting problem and you could change the world if you think of a good way.
[05:39:59] <CapnKernel> nrdb: Explain "200x multiplier"
[05:50:21] <Kevin`> nrdb: higher resistance will mean lower current measuring capability or higher power usage
[05:50:35] <Kevin`> nrdb: lower resistance may have more noise in the measurement circuit
[06:06:01] <nrdb> CapnKernel, the micro I am using can apply a 200x amplification of the voltage on the inputs. With a 5V reference a 25mV difference will give full scale output.
[06:06:34] <nrdb> Kevin`, thanks for the input.
[06:12:45] <CapnKernel> I'd go with the 200x
[07:08:59] <EbiDK> My code reading abilities fail me.... Anyone good with PROGMEM and such? Problem description and relevant code here: http://pastebin.com/tLWVJweW
[07:10:36] <Tom_itx> http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html
[07:25:19] <Tom_itx> try changing
[07:25:20] <Tom_itx> private:
[07:25:20] <Tom_itx> const prog_char **_arr;
[07:25:24] <Tom_itx> to public
[07:28:48] <EbiDK> I'd prefer not to change the library if possible
[07:29:58] <Tom_itx> what did they tell you in #arduino?
[07:31:48] <EbiDK> Nothing. No reply yet
[07:32:07] <EbiDK> So far I got #arduino on ##electronics and someone on #hackerspaces is trying to help and you
[07:32:35] <Tom_itx> good luck with electronics
[07:33:21] <EbiDK> Yeah, thought I might as well ask in there, seeing as they talk about so much else than electronics too so maybe also Arduino/AVR
[07:36:08] <EbiDK> Also asked on the page about the library 6 days ago but so far no reply, but the developer replied to other comments before and after mine.
[07:36:25] <EbiDK> Thus trying to read the code and failing.
[07:40:12] <OndraSter> I like when you get something that wasn't made in china
[07:40:15] <OndraSter> but made in japan!
[07:40:20] <OndraSter> actually japan electronics is often not bad
[07:40:40] <CapnKernel> Most of the switches I sell are either made in Japan or Korea.
[07:50:16] <cyanide> Tom_itx, you there?
[07:50:38] <Rokrobsta> hey ho, does anyone know of a good USB to IR projrct for the AVR? I am fed up with the IR on my serial port.
[07:50:51] <Rokrobsta> something like FLIRC would be good
[07:55:54] <Rokrobsta> oh wait the lirc page has a few...
[08:37:08] <Kevin`> ir to usb is trivial code, the real issue is using a logical interface the software is compatible with so you don't have to write both parts
[08:40:04] <theBear> Roklobsta_, from memory either the avrlibc example codes that i haven't seen for a few years, and/or the atmel avr appnotes have at least a couple rc5 examples
[08:40:23] <theBear> i think we assume safely yer using rc5 or similar, lirc, yeah of course
[10:18:44] <Hfuy> I assume "bool" is a valid datatype in AVR C?
[10:19:43] <theBear> not sure, a 8bit int probly makes just as much sense in avr land
[10:19:53] <theBear> unless modern gcc does some REALLY fancy optimising
[10:20:15] <Hfuy> bool lighton = false; provokes the error ../test.c:6:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lighton'
[10:21:47] <theBear> ummm, wow, i'm WAY outta practice.... is that valid syntax to create a variable ?
[10:22:05] <Hfuy> I have no idea. I think this may be the first time I've ever written C.
[10:22:08] <theBear> ie. the bool blah part
[10:22:10] <theBear> hehe
[10:22:11] <Hfuy> int revs = 0; seems to work
[10:22:14] <Steffanx> include stdbool.h
[10:22:26] <theBear> ok, how oooh good, someone who knows things came before i sounded sillier
[10:22:38] <theBear> i was gonna say try 0/1 instead of true/false err, not in that order :)
[10:22:38] <Hfuy> How would you do it?
[10:22:53] <Hfuy> ../test.c:3:25: fatal error: avr/stdbool.h: No such file or directory
[10:23:12] <Steffanx> <stdbool.h> ?
[10:23:27] <Hfuy> Okay.
[10:23:34] <Hfuy> Everything else was avr/whatever
[10:23:36] <theBear> i'd program much more regularly and double check my syntax against something like int revs = 0; in a working program <grin>
[10:23:45] <asteve> avr/loveyoulongtime
[10:24:11] <theBear> the std-stuff tends to be gcc-general and only the avr-specific stuff /avr
[10:24:15] <Hfuy> Frankly I'm finding it all rather tiresome.
[10:24:36] <Hfuy> There's no intellisense, and all the API variables are called thiungs like TIMSK1 and TOIE1.
[10:24:46] * Hfuy scratches his head
[10:25:11] <Hfuy> Still, I suppose it's more friendly than this sort of thing was even ten years ago.
[10:25:21] <Steffanx> They use the same names in the datasheets, so it's pretty obvious
[10:25:46] <Hfuy> I'd refer to the datasheet, but I left it by the printer as I didn't want to put my back out carrying it over to the table.
[10:26:23] <Hfuy> Also I had no idea how nice intellisense was to have until I started doing this, and had to go without. Oh, the pain.
[10:26:41] <theBear> Hfuy, all the things like TIMSK1 and TOIE1 should relate to definate things you can find in your avr datasheet
[10:27:01] <theBear> what is a intellisense ?
[10:27:05] <Hfuy> Quite so, but I can't help thinking that an extra layer of abstraction in the API would have been nice.
[10:27:20] <Steffanx> Fancy auto-completion stuff from visual studio
[10:27:49] <Hfuy> Intellisense is something you get in Microsoft Visual Studio, so you can type (for instance) Timer, and it'll pop up a dropdown with TimerInterruptMask, TimerOverflowVector, TimerCounter, etc
[10:28:05] <Hfuy> It's a massive, massive timesaver. It's very nearly documentation.
[10:28:17] <Hfuy> I suspect intellisense may be half the reason people think C# is fast to write.
[10:28:34] <Kevin`> Hfuy: atmel has second layer of api stuff for most chips, although i've never bothered to use it
[10:29:03] <Hfuy> I can see why they would.
[10:29:07] <Hfuy> This feels almost like writing assembly.
[10:29:18] <Kevin`> Hfuy: of course it does, you'd use the same registers in assembly
[10:29:18] <Hfuy> I mean, you know. PORTB ^= 0xFF;
[10:29:36] <Kevin`> so why wouldn't they be available when using c
[10:29:37] <Hfuy> I'm starting to wonder if it wouldn't be easier to work in assembly.
[10:29:59] <Kevin`> why? you wouldn't be able to have the compiler do crazy annoying algorithms for you
[10:29:59] <Hfuy> writing conditionals as JMPs is tiresome, I suppose.
[10:30:28] <Hfuy> I did try to delay things by while(n<1000) n++; and I suspect it got optimised out.
[10:30:28] <Kevin`> I really don't understand your logic. you want camelcase objects, yet think assembly would be faster
[10:30:31] <Kevin`> :/
[10:30:49] <Kevin`> _delay_{us,ms}(const)
[10:30:57] <Kevin`> how'd you miss that one
[10:31:48] <Hfuy> My logic is thus: I'd prefer intellisense and more meaningful variable names, but if I can't have that, I may as well do it in assembly, no?
[10:31:59] <Hfuy> I mean TCNT1? That's just wilfully abstruse.
[10:32:02] <Kevin`> also, what do you mean no intellisense, intellisense works in avr studio since it's based on visual studio
[10:32:17] <Hfuy> Well, it isn't doing it. Do I need to turn it on?
[10:32:20] <Kevin`> I just use nano though, since typing TCNT1 isn't nearly as hard as typing TimerFooExactlyWeirdName
[10:32:41] <Hfuy> Or more to the point Time[tab], in intellisense.
[10:32:42] <Kevin`> iono, it worked for me out of the box when I tried it, but I don't use it much
[10:32:53] <Hfuy> That's why it works. Otherwise, yes, it would be a pain.
[10:33:35] <Hfuy> Also there's no tooltip for cryptic constants like "TIMER1_OVF_Vect", etc
[10:34:04] <Kevin`> they use the same names as the datasheet but with _vect added
[10:34:32] <Hfuy> Sure, but... feh, unless you've used VS, you won't know the wonderfulness.
[10:34:37] <Kevin`> seeing as you have no tooltip for ANYTHING, i'm inclined to think you are missing something else
[10:34:56] <Hfuy> Well, it's just an example.
[10:35:24] <Kevin`> sure, i've used it, but it only really develops for microsoft platforms. it's not like you can easily use it for other types of projects most of the time ;p
[10:35:37] <Hfuy> I'm told you can, but I haven't investigated that.
[10:35:54] <Hfuy> Back in a mo
[10:35:56] <Kevin`> and making it work with an external compiler and makefiles (unless someone else has done it for you, like atmel) is a pain that's not worth it
[10:36:38] <Kevin`> plus cross-compiling libraries is annoying (non-uc stuff) and installing even local libraries on windows is annoying :/
[10:37:21] <Hfuy> I don't know, it's not something 99 plus per cent of windows users are ever required to do.
[10:37:45] <OndraSter_> I wish there was one thing about auto completion and suggestion
[10:37:54] <OndraSter_> when you would do:
[10:37:58] <OndraSter_> TIMSK =
[10:38:05] <OndraSter_> and it would offer you JUST the bits that are in TIMSK register
[10:38:06] <Hfuy> If it had suggestion and the tooltip text to explain what you wanted, it would be most of the way there.
[10:38:17] <Hfuy> Code blocks and so on are really just window dressing (though nice, and trivial to do)
[10:38:35] <Hfuy> Yes, that sort of thing.
[10:38:49] <OndraSter_> because I have to look up datasheet which bit is in which register
[10:39:37] <Kevin`> OndraSter_: there's a window with all the registers and their bits/fields that's part of the debugger
[10:39:46] <OndraSter_> debugger maybe
[10:39:57] <OndraSter_> but not while you type
[10:39:59] <Kevin`> well, you can view it even without using the debugger
[10:40:10] <OndraSter_> yes, but you need to open up every single register
[10:40:27] <Hfuy> I don't think it's too much to ask for us to agree that the auto-suggestion is nice.
[10:40:47] <OndraSter_> but again, I am born on Visual Studio 2008 and C#
[10:40:56] <Hfuy> It's very good in the sort of situation where you think "Hmm, this must reasonably exist... let's start off some reasonable names for it and see what is available"
[10:41:06] <Kevin`> yeah, but it's not worth bringing in an api layer if there's some disadvantage like code overhead or a loss of flexibility
[10:41:11] <Hfuy> Ti.... timer.... timer1overflowvector... okay
[10:41:23] <Hfuy> it saves a LOT of time.
[10:41:32] <Kevin`> although for some projects that stuff is ok, or ubuntu and c# wouldn't be able to exist
[10:41:43] <Hfuy> well this doesn't really cost you anything.
[10:41:44] <Kevin`> erm
[10:41:49] <Kevin`> not ubuntu.. arduino
[10:41:58] <OndraSter_> arduino's "IDE" is just awful
[10:42:00] <Hfuy> It makes it faster to write and easier to read.
[10:42:11] <Hfuy> it's an IDE tool not a language feature
[10:42:17] <OndraSter_> developing stuff in C# is faster than rapid and instant
[10:42:29] <Hfuy> C# is so fast, so very very fast to write.
[10:42:51] <Hfuy> and the Hfuy looked upon C# and microsoft visual studio 2008, and he saw that it was good....
[10:42:51] <OndraSter_> I use C# whenever I can... and when I can not, I have to settle with C (that would be on PCs/phones)
[10:43:11] <OndraSter_> I see people complaining about quality of other IDEs like CodeLite and such
[10:43:12] <Hfuy> C# is also surprisingly fast when compiled. But that's another issue.
[10:43:19] <Kevin`> Hfuy: have you ever tried to use c# for a linux? ;p
[10:43:21] <OndraSter_> I offer them free version of C++ Express or C# express
[10:43:22] <OndraSter_> and done.
[10:43:27] <OndraSter_> Kevin`, Mono :P
[10:43:32] <Hfuy> I've not used mono.
[10:43:46] <Hfuy> But I've done quite a lot of code which doesn't bash Windows APIs heavily, and I'm interested.
[10:43:51] <OndraSter_> Hfuy, you can actually even precompile the bytecode to native... but it loses its main advantages
[10:43:57] <Hfuy> Well sure.
[10:44:27] <Hfuy> I wrote a DPX file writer in C#. DPX is an uncompressed file format used for HD video, so you're writing 170MB/second plus.
[10:44:34] <Hfuy> We worried the CLR wouldn't keep up, but it was fine.
[10:44:40] <Hfuy> C# is shockingly good.
[10:44:49] <OndraSter_> yeah, MS knew what they had/have to do
[10:44:50] <Hfuy> (try that in Java!)
[10:44:51] <OndraSter_> and they did
[10:44:53] <OndraSter_> haha Java
[10:44:57] <OndraSter_> such a POC
[10:45:22] <OndraSter_> I want to rewrite someday Arduino IDE to C#
[10:45:33] <OndraSter_> and proper (not just visual) style
[10:45:35] <Kevin`> i've written code in VB (old vb, not .net) that was faster than equivalent code in c++. it's all about having a clue how the language features and libraries you are using work
[10:45:55] <OndraSter_> yay VB!
[10:46:12] <OndraSter_> you can always do assembly and if you can do good optimalizations, you are far ahead of anything :P
[10:46:43] <Kevin`> assembly is arch dependent (although, so is vb). I use neither now ;p
[10:47:54] <Hfuy> I did do quite a lot of unsave memory hacking in that DPX writer
[10:47:56] <Hfuy> but it's fine.
[10:48:00] <Hfuy> There's even a route to doing asm.
[10:49:15] <chupas> Do char LCDs normaly let you do underlines of chars?
[10:49:33] <OndraSter_> if you rewrite it in the CGRAM, yes, chupas :P
[10:49:43] <chupas> it would have to be a custom char?
[10:50:03] <OndraSter_> I presume that when you overwrite soem characted in the memory, it gets lost after you cycle power...
[10:50:09] <OndraSter_> not sure if it is CGRAM or CGROM right now
[10:50:22] <chupas> CGRAM
[10:50:28] <chupas> on mine at least
[10:50:56] <chupas> but it would be a custom char.... I dont have enough space to do such a thing
[10:50:57] <chupas> pooo
[10:51:22] <Kevin`> read out the old char and add a line to it, if you have to
[10:51:33] <OndraSter_> yeah
[10:52:02] <chupas> So the idea is just to create a custom char on the fly with an underline?
[10:52:29] <OndraSter_> yes
[10:52:35] <chupas> For that to work i guess that you dont have to keep the custom char in memory to have it displayed?
[10:52:56] <chupas> So i assume that is ture
[11:07:57] <Hfuy> how do I go about checking if an input pin is high
[11:08:04] <Hfuy> or is that too obvious to get away with asking
[11:09:28] <mog> check to see if the bit is a 1
[11:09:33] <mog> for the pin
[11:13:13] <Hfuy> that easy, huh
[11:15:02] <mog> you have to set the pin up as an input pin
[11:15:04] <mog> but yes
[11:22:53] <Hfuy> DDRx = 0xFF seems to be "output"
[11:22:59] <Hfuy> I assume zeroing the register would be "input"
[11:23:15] <Hfuy> this is quite nicely organised, eh
[11:24:09] <theBear> it's THAT easy ! modern all in one c-programmable micros are awesome, ESPECIALLY avr's <grin>
[11:24:41] <Hfuy> PIC seems to be same shit, different day
[11:42:15] <theBear> what ? tiny modern all-in-one micros ? they're great for loads of stuff, so long as you don't need the power of a mid-late 90's pc, it's AMAZING what an avr or 2 can do
[11:42:32] <Hfuy> Mine is making an LED blink rapidly!
[11:42:36] <Hfuy> I'm sure it's worked hard here.
[11:42:44] * Hfuy makes the LED blink a little more rapidly
[11:42:47] <Hfuy> WITNESS THE POWER
[11:46:24] <Kevin`> microcontrollers can do realtime tasks faster than a pc quite easily
[11:46:58] <Kevin`> witness that one driver that does the entire usb modulation and protocol in software
[11:48:54] <OndraSter_> How to find "entrypoint" of BIOS?
[11:48:55] <OndraSter_> simple!
[11:49:06] <OndraSter_> just desolder the chip, power it up and watch each address line :P
[11:49:09] <Hfuy> I was thinking of writing an SMPTE linear timecode reader on an AVR.
[11:49:15] <OndraSter_> (at least on this board it works)
[11:49:19] <Hfuy> But I suspect that might be a bit of an ask, as it's basically a DSP application.
[11:49:33] <Kevin`> OndraSter_: um, the entry point of the bios is actually a constant address. I forget what though, since I avoid that stuff
[11:49:40] <OndraSter_> yes
[11:49:44] <OndraSter_> 16 bytes below the end of RAM
[11:49:49] <OndraSter_> but that is on regular boards with regular CPUs
[11:49:55] <OndraSter_> this is some Cyrix stuff
[11:50:02] <OndraSter_> with board that hasn't got regular "BIOS"
[11:50:13] <OndraSter_> but some mashup of BIOS + bootloader + NFS/TFTP boot and what not
[11:50:55] <Kevin`> Hfuy: I remember you or someone mentioning that before. at the time I thought it would be pretty simple to do with a small amount of analog frontend circuitry
[11:51:08] <Hfuy> It would have either been me or Jan
[11:51:29] <Hfuy> It may just about be possible in software, but not necessarily that easy and a bit on the edge of the performance envelope, if you see what I mean.
[11:52:10] <Kevin`> it was quite a while ago
[11:52:19] <Hfuy> it's been under consideration years.
[11:52:28] <Kevin`> I looked at a spec for it and proposed a design, but I forget all the details now
[11:52:35] <Hfuy> it's a spare-time project for us and therefore constantly gets backburnered.
[11:53:00] <Hfuy> Yeah, well. It's biphase-mark encoded, so you could build some sort of notch filter in the analogue domain.
[11:53:08] <Hfuy> But I'd prefer to obviate that if possible.
[11:55:04] <Hfuy> In any case I must adjourn. I have a dinner date with a beautiful young woman.
[11:55:08] * Hfuy smooths back his hair and makes for the exit
[12:03:59] <OndraSter_> bb Hfuy
[12:04:00] <OndraSter_> gl :D
[12:06:18] <zii> Do programmers have some configuration?
[12:06:24] <zii> sort of*
[12:07:31] <asteve> ?
[12:07:45] <asteve> plug in the correct pins, give power to the avr and you're off to program
[12:08:06] <Tom_itx> specify the programmer you have and you should be good to go
[12:08:09] <zii> Okay, well the pins are right, because I could program before I screwed something up with the soft.
[12:08:35] <zii> All I can get now is http://sprunge.us/SEOf
[12:09:14] <zii> Someone told me something about putting pulse-dc on xtal2.
[12:09:53] <zii> 0343.40 Casper ' zii: if you have a spare chip, burn an "insane led flasher" code
[12:09:54] <zii> 0343.49 Casper ' ad feed that to the xtal2 pin of your broken avr
[12:10:31] <zii> I don't have a spare chip, but is there something else I could do programatically?
[12:10:32] <Tom_itx> if you screwed the fuses up you may need an external clock source
[12:11:13] <zii> Can I reset them?
[12:11:42] <Tom_itx> sure but if you told it you want to use an external crystal or external clock you darn well better have one hooked up
[12:12:00] <Tom_itx> or it won't clock the chip and you just got yourself a brick
[12:12:15] <mog> yup always expose the xtal pins
[12:12:24] <mog> or you are likely to accidently brick yourself
[12:15:48] <ama2er> guys! i was just messing with UART using MAX232 but encountered a strange problem. When i connect GND to PIN 5 of DB9 conn the loopback test using MAX232 fails but if i remove the GND it works. Is it normal
[12:16:13] <ama2er> could it cause problems in a bigger circuit
[12:27:34] <zii> Which one is the fuse byte that determines whether the chip should use external clock or not?
[12:28:02] <mog> zii, google avr fuse calculator
[12:28:05] <mog> tell it your cpu
[12:28:11] <mog> er mcu
[12:28:14] <mog> it has lots of nice info
[12:28:44] <zii> I'm consulting the datasheet, but I dont see anything regarding external clock.
[12:31:26] <ama2er> zii: search for "Clock sources" in the datasheet it'll tell you which bits to set
[12:32:53] <zii> Oh. :]
[12:32:59] <zii> Nice.
[12:34:55] <zii> For all fuses "1" means unprogrammed while "0" means programmed. <-- This confuses me. So if I want, say external clock(0000), then I should set all the CKSEL bits to 1?
[12:36:29] <ama2er> another question could anyone point me to a commonly available good 2:1 Mux/Demux Analog Switches which could be used to increase the effective number of ADC channels in ATMEGA 32
[12:59:42] <DanFrederiksen> http://www.youtube.com/watch?v=W--qOWaXh1s Roomba hack
[13:09:26] <cyanide> abcminiuser, i got the new xplain board
[13:09:30] <cyanide> with the at32 usb chip
[13:09:44] <cyanide> how can i program it via usb?
[13:09:53] <cyanide> atmel flip does not have the at32 entry in there
[13:10:02] <cyanide> and the board layout is also different
[13:10:15] <abcminiuser> cyanide, neat, which one exactly?
[13:10:21] <abcminiuser> There are several
[13:10:26] <cyanide> atavrxplain
[13:10:33] <cyanide> is there a list of them, i can show you which one
[13:10:56] <cyanide> this is what mine looks like http://media.digikey.com/photos/Atmel%20Photos/ATAVRXPLAIN.jpg
[13:12:15] <cyanide> and this is what i get when i try to connect it via pdi using the avrispmk2 official pdi flasher from avr studio
[13:12:17] <cyanide> 23:29:13: [ERROR] Failed to enter programming mode. Error status received from tool: Result received is 0x03., ModuleName: TCF (TCF command: Device:startSession failed.)
[13:14:23] <cyanide> it has the at32uc3b chip for usb
[13:15:54] <abcminiuser> Ah, XMEGA-A1 Xplained
[13:15:57] <abcminiuser> The name is important ;)
[13:16:11] <abcminiuser> Ok, for that you need to use FLIP from the command line
[13:16:18] <abcminiuser> batchisp.exe
[13:16:24] <abcminiuser> Using serial transport
[13:16:45] <cyanide> ok. i thought there was a single board with multiple revisions
[13:17:09] <cyanide> thank you. i will look into it and get back to you if i have any issues (which i will :P)
[13:19:27] <abcminiuser> MEGA-A1 Xplained, UC3-A3 Xplained, Xplain, UC3-L0 Xplained, XMEGA-A3BU Xplained, XMEGA-B1 Xplained
[13:19:41] <abcminiuser> http://atmel.com/xplain
[13:19:57] <abcminiuser> Ah, and MEGA-1284P Xplained
[13:20:04] <cyanide> so i use batchisp.exe to flash the hex?
[13:23:29] <abcminiuser> Yup assuming they put the bootloader on the XMEGA
[13:27:36] <cyanide> which hex should i flash?
[13:28:01] <cyanide> off this page, http://www.fourwalledcubicle.com/XPLAIN.php do i use the precompiled bin for avr studio?
[13:28:06] <cyanide> assuming im going to use avr studio?
[13:30:10] <asteve> flash the hex fla fla flash the hex
[13:32:04] <cyanide> :(
[13:34:07] <cyanide> abcminiuser, got my message?
[13:34:25] <cyanide> [23:47] <cyanide> which hex should i flash?
[13:34:25] <cyanide> [23:48] <cyanide> off this page, http://www.fourwalledcubicle.com/XPLAIN.php do i use the precompiled bin for avr studio?
[13:34:25] <cyanide> [23:48] <cyanide> assuming im going to use avr studio?
[13:34:55] <abcminiuser> <abcminiuser> No no, different board
[13:34:55] <abcminiuser> <abcminiuser> The XMEGA-A1 comes with a serial bootloader in the AVR supposedly, with the UC3B on the board acting as a USB to serial converter
[13:35:48] <cyanide> so what are my options?
[13:53:04] <ama2er> could anyone point me to a commonly available good 2:1 Mux/Demux Analog Switches which could be used to increase the effective number of ADC channels in ATMEGA 32
[13:55:16] <Hfuy> I would use the XMEGA range for my timecode project.
[13:55:31] <Hfuy> But it's only available in packages which would require an expensive PCB manufacturing process.
[13:58:48] <ama2er> anyone?
[14:25:24] <Hfuy> Do AVR timers intrinsically run at all times, and just optionally fire interrupts or not?
[14:25:36] <Hfuy> Or is there some way I can stop them counting up?
[14:25:46] <mrfrenzy> they run if you start them
[14:25:49] <mrfrenzy> look at the datasheet
[14:26:00] <Hfuy> I'm looking at some example code.
[14:26:18] <Hfuy> I'm enabling interrupts in general, enabling the overflow interript, and setting a prescaler.
[14:26:26] <Hfuy> I'm not actually specifically setting the timer to run.
[14:26:34] <Hfuy> It just seems to run intrinsically.
[14:27:03] <mog> Hfuy, they run all the time
[14:27:05] <mog> however
[14:27:08] <Hfuy> I see.
[14:27:09] <mog> you can put them to sleep
[14:27:11] <specing> setting a prescaller = making it run
[14:27:14] <mog> they have several different sleep modes
[14:27:17] <Hfuy> Right
[14:27:19] <mog> for power saving
[14:27:33] <mog> interrups interrupt whatever step is acctive
[14:27:49] <Hfuy> I can put the core to sleep and a timer interrupt will wake it up, right?
[14:30:07] <mog> correct
[14:30:13] <mog> read the sleep mode section of the data sheet
[14:30:43] <Hfuy> I would, but I don't want to put my back out carrying it over from the printer.
[14:31:01] <specing> what?
[14:31:18] <Hfuy> The datasheet. It's huge.
[14:31:39] <mog> the 328p for example has 6 different sleep modes
[14:31:39] <mog> and can be woken up in a a variety of ways
[14:31:43] <specing> Why did you print it, then?
[14:31:55] <Hfuy> I didn't. I was committing a minor witticism.
[14:32:15] <specing> That is called being lazy
[14:32:32] <Hfuy> It's OK, I think I've got most of what I need here.
[14:32:40] <Hfuy> I just wish there were two 16-bit timers.
[14:32:44] <Hfuy> I shall have to hack my way around it.
[14:56:00] <OndraSter_> http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash3/s720x720/524245_451971914985_177211774985_1500798_782398282_n.jpg
[14:56:05] <OndraSter_> "Can I eat ya, when I grow old?"
[14:56:08] <OndraSter_> <3
[15:09:50] <OndraSter_> CapnKernel, hey man
[15:11:25] <OndraSter_> CapnKernel, http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash3/522910_2982942618170_1400123387_48773797_331390519_n.jpg :)
[15:11:28] <OndraSter_> finally in the box
[15:14:28] <RikusW> http://www.newelectronics.co.uk/electronics-news/atmel-adds-14-mcus-to-avr-family/40891/
[15:14:28] <Landon> OndraSter_: someone's been more productive than me :P
[15:14:32] <OndraSter_> :)
[15:15:09] <OndraSter_> just cutting the hole in the plastic box took me over an hour :( lol
[15:15:13] <OndraSter_> without proper tools...
[15:15:30] <OndraSter_> drilled few holes, stuck saw in it and approximately cleared it
[15:15:41] <OndraSter_> then grabbed some more tools and finished it
[15:17:08] <mrfrenzy> are those readymade led modules?
[15:22:55] <Hfuy> I just spent ten minutes trying to figure out why "int x = 20000000" caused a compiler warning.
[15:22:58] <Hfuy> I am an idiot.
[15:23:15] <grummund> what did the warning say?
[15:23:31] <Hfuy> Implicit conversion causing overflow.
[15:23:46] <Hfuy> On the basis that int is a 16-bit int, and 20,000,000 is more than 2^16.
[15:24:53] <grummund> yep on avr it is
[15:25:15] <Hfuy> I think you'll find that 20M is more than 2^16 on most platforms.
[15:25:20] <Hfuy> :)
[15:25:55] <grummund> I think you'll find that int is not necessarilly 16-bit on most platforms
[15:26:05] <grummund> :)
[15:27:41] * specing prefers to be exact and defines all variables with (u)int(8,16,32,64)_t
[15:34:52] * RikusW don't like the _t part...
[15:35:24] <Hfuy> What's it mean, anyway?
[15:35:43] <specing> I have a header file that shortens them to u8, s8, ...
[15:35:52] <RikusW> nice
[15:35:57] <RikusW> me too
[15:35:58] <Hfuy> What #define u8 uint8_t?
[15:36:30] <RikusW> or typedef
[15:36:40] <grummund> Hfuy: it means don't use type int on embedded code... #include <stdint.h> and use uint8_t, uint16_t, etc instead.
[15:36:58] <Hfuy> I'm counting fractions of a video frame in terms of clocks at 20MHz, so I need a reasonably big counter even to get up to 1 frame.
[15:37:17] <grummund> Hfuy: in that case uint32_t
[15:37:23] <Hfuy> Quite.
[15:37:54] <Hfuy> By the way, my approach to stretching the timer duration (while maintaining resolution) is simply to have a cycle counter and decrement it on every overflow, then run the action when it reaches 0. Reasonable?
[15:37:58] <specing> This historic C naming convention is retarded
[15:38:15] <specing> And the worst thing is that it passed on to newer languages
[15:38:30] <Hfuy> I seem to recall that it's just uint16 in C#.
[15:38:49] <grummund> Hfuy: bear in mind that read/write of a multi-byte variable is not atomic
[15:38:59] <specing> The only languages that don't have problems with this are those who are dynamicaly typed (Python..)
[15:38:59] <Hfuy> I'm aware.
[15:39:33] <Hfuy> I'm writing code to produce a timed event which must be 100% consistent 100% of the time, so the only interrupt I dare use is the one on thet imer.
[15:39:47] <Hfuy> (if I'm interpreting all this correctly, that is)
[15:40:20] <grummund> is the var only ever read/write inside the ISR and nowhere else?
[15:40:56] <Hfuy> Probably, but no promises, and to be honest the timing aspect of it is critical enough that I dare not miss even a single interrupt - so the situation is the same regardless.
[15:41:24] <Hfuy> I was tempted to write the entire thing inside a while loop, to be honest. The result would be the same.
[15:41:36] <Hfuy> Broadly the same, anyway
[15:41:43] <grummund> yes but is the var only ever read/write inside the ISR and nowhere else?
[15:41:56] <Hfuy> Probably.
[15:42:07] <grummund> in other words is it local or blobal var?
[15:42:12] <grummund> *global
[15:42:19] <Hfuy> Oh, it's global, but it'll probably only be touched inside the ISR.
[15:42:25] <Hfuy> Probably.
[15:42:29] <Hfuy> The thing is far from final.
[15:42:31] <grummund> why not make it local to the ISR?
[15:42:40] <Hfuy> Because it needs to persist between interrupts.
[15:42:46] <grummund> use static
[15:42:57] <Hfuy> But it's not. It may be changed inside the SIR.
[15:43:00] <Hfuy> er, ISR
[15:43:28] <grummund> hmm, it's not what?
[15:43:33] <Hfuy> static
[15:43:39] <grummund> make it so
[15:43:53] <Hfuy> Static implies it won't ever change to me.
[15:43:55] <Hfuy> It will change.
[15:44:05] <grummund> sigh.
[15:44:22] <Hfuy> If I start using floating point maths, I assume it'll automatically link in some sort of floating point library, yes?
[15:45:44] <specing> Hfuy: No, it will call deity() and oracle() to obtain the results
[15:46:29] <Hfuy> Understood. Are they Atmel patented innovations?
[15:46:47] <OndraSter_> woot
[15:46:48] <OndraSter_> I made it
[15:46:57] <OndraSter_> I can now load whole image within half a second! :P
[15:47:02] <OndraSter_> I could probably optimalize it though
[15:47:10] <specing> Hfuy: Yes, you can contact them for licensing options
[15:47:12] <Hfuy> On a more serious note, I assume if I do fairly static things like "clocksperframe_24 = clkrate/24" that'll actually get done at compile time?
[15:47:25] <murosai> hi guys, what do you think of arduino?
[15:47:48] <OndraSter_> heya
[15:47:50] <OndraSter_> they don't like it here
[15:47:56] <OndraSter_> I use it sometimes when I need something done quickly
[15:47:58] <specing> murosai: we've got it contained in ##arduino
[15:47:59] <OndraSter_> just grab arduino and done
[15:48:05] <Hfuy> I suspect it's a horse for a specific course.
[15:48:12] <Hfuy> A course not involving very tight timing.
[15:48:28] <OndraSter_> I needed to quickly dump half megabyte EEPROM... so I grabbed arduino, few shift registers (sorry, no 26 ports on my arduino lol)
[15:48:30] <OndraSter_> and dumped it
[15:48:46] <grummund> yeah, we know :p
[15:48:50] <grummund> already
[15:48:58] <OndraSter_> :P
[15:49:12] <murosai> i want to make an automatic blinds controller but im not sure what micro-controller to use
[15:49:26] <OndraSter_> http://clip2net.com/s/1KBJJ
[15:49:27] <OndraSter_> my app
[15:49:28] <OndraSter_> simple as that
[15:50:09] <Hfuy> Aaargh. I revile and despise C and its horribly static, non-object-oriented primitvity!
[15:50:27] <specing> You can always use C++
[15:50:42] <OndraSter_> you can always use ASM
[15:50:43] <Hfuy> I want bloody enums!
[15:50:45] <Hfuy> Where are my enums!
[15:51:04] <specing> In the C standard
[15:51:16] <Hfuy> Oh... oh yes... ahem... talk amongst yourselves...
[15:51:38] <grummund> who needs a standard when you can just assume things as fact
[15:52:16] <Hfuy> if I wanted a list of the number of AVR clocks per frame at various frame rates, would I do that as an enum then cast it back to the underlying uint32 or whatever?
[15:52:25] <Hfuy> or would I just do that as a bunch of variables with a naming convention?
[15:53:05] <specing> Whatever you prefer
[15:58:12] <Hfuy> Oh. "Initializer element is not constant".
[15:59:15] <Hfuy> I don't like C, I've decided.
[16:00:21] <specing> < OndraSter_> you can always use ASM
[16:00:39] <Hfuy> Gruh.
[16:00:49] <OndraSter_> :D
[16:00:52] <asteve> mrs. doubtfire
[16:00:57] <OndraSter_> Hfuy, I wrote my whole firmware in assembler
[16:00:58] <OndraSter_> and I am alive!
[16:01:07] <OndraSter_> THIS WAS A TRIUMPH
[16:01:13] <Hfuy> What I'm trying to do is define my clock rate somewhere, and use it elsewhere.
[16:01:16] <grummund> yeah but all it does is blink a few leds :p
[16:01:17] <Hfuy> Pretty obvious.
[16:01:25] <OndraSter_> grummund, "blink" "few" "LEDs"
[16:01:31] <OndraSter_> over 1k of lines in asm :P
[16:01:41] <OndraSter_> and over 3k of LEDS
[16:01:42] <OndraSter_> LEDs
[16:01:50] <OndraSter_> SPI SCK line is sinusoidal
[16:01:54] <OndraSter_> pushing over 256kB/s
[16:02:02] <Hfuy> My first approach was simply to declare uint32_t clockspeed = 20000000
[16:02:17] <Hfuy> but then I can't declare uint32_t clksPerFrame_24 = clockspeed / 24
[16:02:18] <OndraSter_> my counter said something over 2MHz on the line... ofc it is not constant, but in bursts
[16:02:22] <grummund> OndraSter_: what spi clock rate?
[16:02:24] <OndraSter_> but it counted 2M :)
[16:02:26] <OndraSter_> grummund, maximum
[16:02:30] <OndraSter_> 8MHz it should be
[16:02:31] <OndraSter_> I think
[16:02:43] <OndraSter_> 24 devices hooked on the bus :P
[16:02:49] <OndraSter_> connected with 4 wires...
[16:02:50] <grummund> OndraSter_: and what is the scope bandwidth?
[16:02:58] <OndraSter_> 40MHz
[16:03:22] <grummund> hmm, i'd be slightly worried it was not square
[16:03:48] <OndraSter_> it works
[16:03:50] <OndraSter_> so...
[16:03:57] <Hfuy> Is there some way I can initialize these things without literally typing in "20000000" every time?
[16:04:37] <specing> Hfuy: yes, learn C
[16:05:29] <Hfuy> Thanks for that.
[16:05:33] <RikusW> Hfuy: use #define ?
[16:05:50] <grummund> OndraSter_: you don't share high standards then? ;)
[16:05:51] <Hfuy> Well, I did that, but now I'm getting "../test.c:11:36: error: expected identifier or '(' before '/' token"
[16:06:02] <OndraSter_> grummund, right now it is "as long as it works"
[16:06:13] <RikusW> Hfuy: #define CLOCK 20000000
[16:06:24] <Hfuy> that's exactly what I did.
[16:06:31] <RikusW> hmm thats odd
[16:06:38] <grummund> RikusW: ..............UL
[16:06:45] <Hfuy> Now I have the following creating an error: uint32_t clksPerFrame_23 = clkrate / (24000/1001);
[16:07:27] <Hfuy> (I realise that isn't an integer calculation)
[16:07:42] <grummund> another "assumption" ?
[16:08:20] <specing> because he did not read a book on C
[16:09:55] <Hfuy> I'm not seeing an error about the calculation, it's complaining about "expected identifier or '(' before '/' token"
[16:10:17] <Hfuy> That I don't quite get.
[16:12:22] <specing> Your code base is probably the biggest spaghetti the world has ever seen, that is why
[16:12:53] <Hfuy> It can't be that big, it's only 19 lines long.
[16:14:47] <Hfuy> I always understood that #defines were simply a search-and-replace operation before compiling.
[16:14:55] <specing> 17:12 < Hfuy> I assume "bool" is a valid datatype in AVR C?
[16:15:00] <specing> 23:07 < Hfuy> It can't be that big, it's only 19 lines long.
[16:15:09] <specing> I though it was a bit longer than that...
[16:16:09] <Hfuy> It isn't.
[16:22:17] <nevyn> http://dmitry.co/index.php?p=./04.Thoughts/07.%20Linux%20on%208bit so I assume this crowd saw this
[16:22:44] <nevyn> linux on an atmega644 (by emulating an arm)
[16:23:08] <grummund> fantastic!
[16:23:18] <nevyn> insane but neat
[16:23:41] <nevyn> it takes 2hrs to boot the kernel (to init) and another 4 to get to a login prompt
[16:24:18] <grummund> lmao
[16:27:56] <nevyn> it's very cool tho
[16:28:29] <grummund> yeah i'm just wondering if i have all the bits ready to build one
[16:28:55] <theBear> hehe, reminds me of the 40mhz sparc with crappy old old old scsi 1 drive i used to have.... 2 hrs to init, another 4 for a login <grin>
[16:28:55] <nevyn> finding a 30pin simm is the tricky bit these days
[16:29:27] <grummund> i have a box of old SIMMs
[16:30:15] <theBear> nah it isn't, all i had to do was glance over my right shoulder <grin>
[16:30:24] <grummund> does it say what size SIMM?
[16:30:41] <nevyn> I'd assume 2 or 4 meg
[16:30:43] <theBear> heh, and now grummund mentions, leaning back in this rocky-office-chair i can see a bag that must have 50 or 100 in it :)
[16:31:05] <Hfuy> hey
[16:31:12] <Hfuy> wtf am I doing in this channel
[16:31:15] <grummund> nevyn: "assume" ?
[16:31:21] <grummund> :P
[16:31:26] <Jan-> um
[16:31:26] <Jan-> er
[16:31:29] <Jan-> hihi theBear!
[16:31:43] <theBear> hurro jan :)
[16:31:59] * Jan- offers theBear a donut
[16:32:08] <theBear> mmm nom nom nom
[16:32:19] * theBear likes cinnamon sugars
[16:32:23] <nevyn> the sticker on the ram in the photos.. says... "warranty void if removed"
[16:32:53] <Jan-> It's not normal when you're at someone's house for dinner, and someone says "dinner is served" and the conversation is so horrible you get as far as saying "oh thank f.." then shut up
[16:32:55] <Jan-> that's not right is it
[16:33:01] <grummund> "The ram can be any 30-pin 16MB SIMM ..."
[16:33:02] <theBear> nevyn, i wonder what happens if you take that sticker, and stick it on something else that is still under warranty ?
[16:33:20] <theBear> hehehe, not great jan
[16:33:51] <grummund> Jan-: who said that to you?
[16:33:57] <Jan-> I bought special goddamn shoes for that
[16:33:58] * grummund would hit them :p
[16:34:30] <Jan-> who said what to me
[16:34:40] <grummund> "oh thank f.."
[16:34:42] * theBear gets confused
[16:34:46] <theBear> jan said that
[16:34:52] <Jan-> er yes, I said that :)
[16:34:54] <theBear> under her breath :)
[16:35:09] <grummund> oh, you didn't say that you said that :)
[16:35:13] <Jan-> it came out more "oh thank fffrrrrrrrgggod I'm starving"
[16:35:20] <theBear> grummund, it was implied <grin>
[16:35:22] <nevyn> is it wrong I want to troll the comments with "imagine a beowolf cluster of these!!!"
[16:36:22] <theBear> aside from the facts involved, this whole little 8bit issue has gotten WAY too much talk overnight, leading me to believe it is stupid and a fashionable fad, and should be ignored as much as possible, like most 'rock stars' :)
[16:37:58] <grummund> now all we need is an avr simulator for linux
[16:39:12] <grummund> ideally it would simulate mega644 running at 2GHz
[16:40:42] <grummund> and then run linux on the simulated avr
[16:41:13] <grummund> Endless Fun ... quite literally :)
[16:42:31] <nevyn> grummund: there is one.
[16:42:41] <nevyn> it just tops out at a 168
[16:47:54] <grummund> "The effective emulated CPU speed is about 6.5KHz" lol
[16:52:18] <nevyn> yeah
[17:05:59] <theBear> lol, that's one slow cpu, even by late 70's standards
[17:11:44] <OndraSter_> Jan-, heya
[17:11:48] <OndraSter_> haven't seen you here for some time :)
[17:12:36] * Jan- is avoiding Tom_itx
[17:13:00] * Jan- pulls up collar
[17:13:04] * Jan- wears wide-brimmed hat
[17:13:06] * Jan- could be anyone...
[17:13:42] <grummund> pretend to be someone else
[17:13:53] <Jan-> shh
[17:13:55] <Jan-> I'm incognito
[17:14:18] <grummund> ok i'm sayin nothin
[17:37:48] <Casper> zii: a bit late, but don'T care about the programmed and unprogrammed state... just set the bit as the datasheet say... the programmed and unprogrammed refer to the natural state of the flash chip: a blank chip is filled with 1. Also, in the old time you were blowing fuses inside the chip literally, hence the programmed is 0 :D
[18:07:06] <grummund> i would like to know how he has that project running on mega644
[18:07:49] <grummund> it's using TIMER3 (only mega1284p has that)
[19:43:46] <Jan-> hihi
[19:43:49] <Jan-> [01:33] <GuShH> Jan-: you have to cast properly is all I can say without drinking a beer.
[19:43:49] <Jan-> [01:33] <Jan-> um, er
[19:43:51] <Jan-> oh dammit
[19:44:18] <Jan-> If I do something like "int a = b / c" where b and c are ints, what happens if the result is not an int
[19:44:57] <Landon> fortunately, the result will be an int
[19:45:13] <Jan-> Sure, but does it get rounded down or up
[19:45:18] <Jan-> maybe I'm not quite getting binary math
[19:45:43] <Landon> I seem to remember it being truncated, but I'm not 100% sure
[19:55:19] * CapnKernel1 is confused: "***Hfuy smooths back his hair and makes for the exit", note masculine pronoun, then "Hfuy is now known as Jan-". And later "***Jan- could be anyone..."
[19:55:40] <Jan-> I'm Jan, Hfuy is Phil.
[19:56:21] <Jan-> life would be easier if people just used their NAMES, feh
[19:56:46] <CapnKernel1> Jan- is either a beautiful young woman, or Hfuy has some explaining to do.
[19:57:35] <Jan-> wha?
[19:57:47] <Jan-> I'm too short to be beautiful
[19:58:07] <CapnKernel1> "Hfuy: In any case I must adjourn. I have a dinner date with a beautiful young woman."
[19:58:26] <Jan-> Awwwww
[19:58:32] <Jan-> I'm sure he'll thank you for passing that on :)
[19:59:16] <CapnKernel1> "beautiful" can be adequately explained by it being subjective. Young?
[19:59:28] <Tom_itx> your daughter?
[19:59:33] <Jan-> are you asking how old I am? that's naughty.
[19:59:50] <Tom_itx> but we already know
[19:59:52] <Jan-> but yeah, I think I'm a bit out of "young" now.
[20:00:51] <Jan-> OK we definitely need to get this thing hooked up to rs232 or debugging is hard :/
[20:01:45] <Tom_itx> you still haven't hooked it up?
[20:02:02] <Jan-> nope, but we have it connected to the programmer and it is responding to the helm :)
[20:02:12] <Jan-> actual application coding is happening now.
[20:02:13] <timemage> Jan-, in c89 it was allowed to be rounded down. in c99 it's rounded toward zero.
[20:02:14] <Jan-> it's just hard to debug
[20:02:27] <Kevin`> this is for the phazor, right?
[20:02:31] <Jan-> No.
[20:02:37] <Jan-> This is the strobe light.
[20:03:27] <Jan-> hey, they always say you should do a flashing light for your first project :D
[20:04:08] <timemage> Jan-, i should clarify. positive quotients are always rounded toward zero. negatives *may* round down. most of the systems i've used they don't though. the just round toward zero.
[20:04:09] <Valen> then make it flash in a pattern
[20:04:18] <Valen> then make a "heartbeat" flasher
[20:04:22] <Valen> then do that with a timer
[20:04:28] <Valen> and your pretty much done
[20:04:43] <Jan-> there is a rather specific purpose to this one
[20:04:45] <Valen> oh yeah, make it respond to a button press somehow
[20:05:06] <Valen> everything else other than text processing is a derivitave of a flashing light with a button ;->
[20:05:25] <Jan-> there's just a basic logic error somewhere
[20:05:31] <Jan-> but it's tough to glitchfix without printf :/
[20:05:47] <Valen> flash a led
[20:05:56] <Valen> its the avr equivilent ;->
[20:05:59] <Jan-> already are doing
[20:06:08] <Jan-> but many things here would happen too fast to see anyway
[20:06:46] <Valen> scope ftw
[20:06:51] <Jan-> got one of those too
[20:07:04] <Jan-> for some reason our LED isn't blinking
[20:07:22] <Valen> if your using an actual strobe, be aware that the power of the thing can cause resets due to EMI
[20:07:33] <Jan-> it'll be a bank of LEDs
[20:07:35] <Jan-> not a xenon flash tube
[20:07:46] <Valen> thats easier lol
[20:07:59] <Jan-> actually driving big LED arrays is a bit of a pain
[20:08:02] <Jan-> at least if you want efficiency
[20:08:04] <Kevin`> the avr equivalent of printf is printf.
[20:08:20] <Jan-> yes, but I'm guessing it sends things down serial to a terminal
[20:08:26] <Jan-> which we don't have hooked up
[20:08:47] <Kevin`> actually you need to define what it sends to, fun fun
[20:09:22] <Jan-> oh awesome
[20:09:41] <Valen> getting a serial port is handy
[20:09:50] <Kevin`> the simplest thing would be a uart, but it could also be software serial, usb, infared, laser-engraved ponies, whatever
[20:10:13] <Valen> my first AVR project was lufa with serial port ;->
[20:10:19] <Jan-> the problem is that our joint knowledge of C is pretty feeble
[20:10:22] <Valen> usb serial port that is
[20:10:30] <Valen> the serial port libs arent too bad
[20:10:31] <Jan-> we're basically winging it on the basis of knowledge of javascript and C#
[20:10:39] <Jan-> which sort of works, but also not
[20:21:37] <Jan-> how can if(n>1000) be true if n is an int
[20:21:51] <Jan-> oh, int is 16 bits on an 8 bit CPU?
[20:50:47] <Jan-> OK, it all seems to be working quite well
[20:51:00] <Jan-> :D
[20:51:58] <theBear> hooray
[20:52:20] <Jan-> hey
[20:52:26] <Jan-> this was quite easy :/
[20:52:29] <Jan-> why didn't anyone say!
[20:52:30] * Jan- hides
[20:52:38] <theBear> i remember that whole big ints on avr used to bug me, so i looked at this and that and worked out how they did it YEARS ago, now i've forgotten again :)
[20:52:54] <Jan-> the thing is you gotta be a bit careful
[20:53:04] <Jan-> because updating a 16 bit int is presumably not a one-clock operation
[21:00:24] * Jan- pokes CapnKernel1
[21:03:50] * wollw just always includes stdint.h
[21:04:27] <wollw> and I use the (u)intN_t variables
[21:04:35] <wollw> types
[21:05:02] <Jan-> that's what I've started doing
[21:05:10] <Jan-> seems to avoid possible confusion.
[21:05:26] <wollw> seeing "char" all over for my numeric values started to bug me
[21:05:38] <wollw> and "unsigned char" is so long
[21:05:46] <Jan-> mmhmm
[21:11:04] <Tom_itx> uint8
[21:11:33] <wollw> don't forget the "_t"
[21:23:58] <timemage> there is another subtle difference. int is required to hold -32767 at +32767. which makes them at least 16bit the allowed for sign-magnitude representation (and probably others). so the range is from -32767 and not -32768. iirc, int16_t, assuming it exists, is required to hold the normal 16bit twos-complement range -32768 to 32767.
[21:41:01] <j4cbo> so, i have a board i've designed that uses an atmega32u4rc - variant of the atmega32u4 that comes with the fuses pre-set to use the internal rc oscillator, not an external clock
[21:41:27] <j4cbo> i'm trying to talk to the built-in usb bootloader, but it's not showing up on the bus at all.
[21:42:23] <j4cbo> does the 32u4rc not come with a usb bootloader, or is there likely something else wrong?
[21:42:57] <j4cbo> (i'm powering it with 3.3v, wired up per the 3.3v-external-supply section in the datasheet, 15k pullup on reset, have tried various permutations of the hwb pin)
[21:42:59] <Kevin`> j4cbo: it's likely that it doesn't, since the rc oscillator wouldn't be accurate enough for usb without special handling
[21:44:52] <j4cbo> the datasheet seems to indicate that it's accurate enough for low-speed usb at 3v in a reduced temperature range
[21:57:39] <CapnKernel1> j4cbo: Does it have an ISP port? Can you ID the chip with a programmer?
[21:58:16] <CapnKernel1> If so, can you run a blinkenled program on it to flash the LED? (I'd suggest sucking the existing contents off it first before trying this)
[21:58:58] <j4cbo> i don't have a "real" programmer on hand
[21:59:17] <CapnKernel1> Do you have an unreal one?
[21:59:28] <CapnKernel1> You can use another AVR chip to do this, or an Arduino.
[21:59:48] <CapnKernel1> http://arduino.cc/en/Tutorial/ArduinoISP
[21:59:51] <j4cbo> i've got some teensies around
[22:00:41] <j4cbo> mega32u4 needs jtag, though, not isp
[22:03:49] <CapnKernel1> Several docs I've found on the web strongly imply the ATmega32U4 also supports ISP. Here's one: http://www.ladyada.net/products/atmega32u4breakout/
[22:04:50] <CapnKernel1> Pins 9, 10, 11 and 13.
[22:06:58] <CapnKernel1> Are you doing the right thing with HWB? http://dorkbotpdx.org/blog/feurig/reprogramming_your_avr_usb_device_using_atmels_built_in_bootloader
[22:13:38] <j4cbo> yep, hwb pulled low, so it should always go into the bootloader
[22:23:37] <CapnKernel1> See how you go with ISP.
[22:24:12] <CapnKernel1> Being able to get ISP working, and then getting a blinkenlight program working, will cut down your problem space a great deal.
[22:24:52] <CapnKernel1> Ahh, I'm just reading what you wrote. You mention you can't get the bootloader working, but you didn't say whether an existing program on the 32U4 works ok.
[22:32:59] <j4cbo> there's no existing program on it