#avr | Logs for 2013-10-08

Back
[00:15:39] <Roklobsta> N1njaneer: cools. i have a rigol cro i am itching to do the 50->100M<Hz upgrade to as per eevblog
[00:15:51] <Roklobsta> using the latest method which is just a tweaked firmware.
[00:16:00] <Roklobsta> any comments on doing such a thing?
[07:18:12] <WormFood> I remember years ago (early 1990s), I had some 256 color images, that displayed more than 256 colors on the screen, but they used a very funky palette of colors, and mixed them (on the screen) to get more than 256 colors. Does anyone have any idea what I'm talking about?
[07:39:37] <timemage> WormFood, sure. what about them?
[07:40:51] <twnqx> i remember we did that with two palettes & images & flipping during vsync to get to something like highcolor...
[07:41:30] <chek0v> http://forum.classicamiga.com/forum/showthread.php/4510-Screen-resolution-and-colour-tricks-of-OCS-ECS-games
[07:41:35] <chek0v> idk
[07:50:59] <timemage> WormFood, unless i misunderstand what you're getting at, they weren't mixed on the screen. rather they were mixed in the palette. you could't have more than 256 colors on the screen at a time, but the palette could hold colors from the the larger 16bit or 24bit color space. the only way to effectively "mix" colors was to dither an image. windows used to have palette management code where it would try to represent everything on the screen specified i
[07:50:59] <timemage> n RGB in a single palette, making concessions where ever it had to, which lead to things like "web safe" color palettes.
[07:54:48] <WormFood> no timemage, the hardware was limited to 256 colors. It was definitely not using multiple palettes. Also, when it'd draw a new image, it'd draw it over the old image...and that is how I can see their funky colors in their palette
[07:56:58] <twnqx> ok, first of all: what computers are we talking about here
[07:57:15] <WormFood> I can't get my hands on the images anymore. If the media they're on is still good, it's probably on 1.44 meg floppies
[07:57:23] <twnqx> amigas for example had a "HAM" (Hold And Modify) mode
[07:57:33] <WormFood> twnqx, nothing I'm sure you've ever heard of, I'm sure ;)
[07:57:50] <WormFood> it was a 68000 cpu, but had an PC video card (ET4000)
[07:57:51] <twnqx> which got them up to 4096 colors but still use 8bit
[07:58:11] <twnqx> the et4000 was one of the first chips to have real 16bit highcolor modes
[07:58:12] <WormFood> it wasn't an amiga...imagine a PC built with a 68000 instead of an 8086
[07:58:24] <WormFood> but not at 1024x768 with 1 meg of ram
[07:58:40] <twnqx> mhh no
[07:58:45] <twnqx> very unlikely :P
[07:59:00] <twnqx> the et4000w32(i|p) had :P
[07:59:08] <twnqx> with more ram
[07:59:10] <twnqx> anyway
[07:59:24] <WormFood> http://wormfood.net/old_computers/ <-- the PT68K is what I had
[07:59:38] <twnqx> the only ways would be dithering or palette switching indeed, and dithering would be pretty much visible
[07:59:49] <WormFood> the "osk" screenshot, is the OS...which was OS-9/68000...a unix-like OS
[08:00:19] <WormFood> they were doing something with really bizarre colors, to get totally different colors on the screen.
[08:00:36] <twnqx> good ols tseng labs... my second and third video cards :)
[08:01:27] <WormFood> this is what happens...it loads the palette, and starts drawing the image....when it draws the next image, it does not erase the screen, so when it switches the palette, I can see the new palette on the old image....and it's drawing an image that looks nothing like the colors in the palette
[08:03:33] <twnqx> uh, palette cycling was used for the "plasma" effects in OC demos of that time :P
[08:03:57] <twnqx> you can't draw an image that uses different colors than those given by the palette
[08:06:04] <twnqx> PC demos*
[08:06:33] <twnqx> but of course the image will look wrong (or at least different) if you change the palette after drawing the image
[09:22:59] <bss36504> Hi folks. I have a two part question: Have any of you ever used FemtoOS, and how hard is it to integrate LUFA into an RTOS?
[09:24:00] <bss36504> Follow up: I'm using an Atmega32U2 and FreeRTOS is too big/too much to use with LUFA. I'd rather not have to make my own runtime for a project I'm working on, and I'd like some experience with a RTOS
[09:24:33] <bss36504> Oh, and when i say it's too big, I don't think I have enough flash or RAM to run them both.
[09:25:38] * twnqx sticks to his old point of "RTOS make no sense on something as slow as AVR8" and walks away
[09:37:38] <bss36504> I can respect that, but I am of the opinion that an RTOS on an AVR8 running at 20Mhz would in fact improve the performance and/or capabilities. Also, have you looked at FemtoOS, it consumes 258 bytes of flash and 10 bytes of ram. Each task takes a minimum of 4 bytes. You can run up to 16 tasks at 8 priority levels. I'd say the overhead is pretty low. http://www.femtoos.org/
[09:57:30] <twnqx> a task switch is still the order of magnitude of a frame transmission
[09:58:05] <twnqx> 258 bytes is impressive though.
[09:59:07] <bss36504> Alright, for curiosity's sake, what is the arbitrary speed that is "useful" for an RTOS. Also yes, I was pretty amazed by the size.
[10:05:37] <twnqx> task switching in <1µs is what i would set as benchmark
[10:05:53] <bss36504> Well I don't need that kind of speed.
[10:06:46] <bss36504> I want a layer of abstraction between some other tasks (reading buttons, serving info to an LCD, streaming raw data off an SD card) and LUFA
[10:07:12] <bss36504> But at this point I don't even know if LUFA is easy to add to a RTOS.
[10:42:28] <bss36504> hey abcminiuser, is it hard to use LUFA with a RTOS?
[10:43:33] <abcminiuser> Actually that's one place that it's good, since it doesn't call via interrupts
[10:43:40] <abcminiuser> Polled means easy to jam into an RTOS
[10:44:33] <bss36504> Wonderful, so I'm gonna take a guess and say that I would use whatever the start task is for the particular demo app as the RTOS task?
[10:45:42] <bss36504> Of course, if there is already a forum post on this, I'll check it out. I didn't really find anything conclusive when i checked yesterday
[12:08:41] <abcminiuser> Ok, need a brave soul with AS6.1 installed
[12:09:32] <N1njaneer> What's up?
[12:10:39] <abcminiuser> New extension thingy
[12:11:13] <abcminiuser> Shows a little icon in the margin of lines with an error or warning to make them easier to spot after compiling
[12:11:26] <N1njaneer> Does it implement LUFA designs now just by thinking about them? I'd totally install that.
[12:11:36] <abcminiuser> :P
[12:11:41] <N1njaneer> Oooh gimme! I'll try that. Sounds useful!
[12:11:50] <abcminiuser> Hokies I'll upload a build
[12:11:52] <abcminiuser> One sec
[12:12:54] <N1njaneer> Also, today's disambiguation -- you would THINK MiniPCI sockets would be listed as MiniPCI sockets, but no... They are "Fax Modem" slots as far as TE and other vendors are concerned, which is why it took a week to locate them. X.x
[12:13:47] <abcminiuser> http://fourwalledcubicle.com/files/temp/MarginOfError.vsix
[12:17:03] <N1njaneer> Please sir, where does I put the file?
[12:18:35] <abcminiuser> Run it
[12:18:38] <abcminiuser> And it will ask to install
[12:18:45] <N1njaneer> Oh look at that :)
[12:19:08] <specing> oh come on
[12:19:12] <specing> setup for plugins?
[12:19:21] <abcminiuser> It's a VSIX
[12:19:34] <specing> what is a VSIX?
[12:19:37] <abcminiuser> You run it, and the studio shell asks to install (really just a copy)
[12:19:38] <N1njaneer> I was being ironic :)
[12:19:48] <abcminiuser> Visual Studio somethingorother
[12:20:07] <abcminiuser> It means Visual Studio extension installer at any rate
[12:22:17] <N1njaneer> Looks nice to me! It's very useful for helping identify the warning and errors :)
[12:23:11] <abcminiuser> It's simple
[12:23:15] <abcminiuser> But it's a thingy
[12:23:32] <abcminiuser> I've also updated my overlay extension to show warnings too
[12:23:33] <N1njaneer> I like it!
[13:16:05] <abcminiuser> Hot diggity
[13:16:12] <abcminiuser> I'm totally getting this .NET thing now
[13:16:37] <Tom_itx> so sasd
[13:16:39] <Tom_itx> sad
[13:16:57] <Tom_itx> what is good about dot net?
[13:17:40] <abcminiuser> Makes Atmel Studio extendable
[13:17:43] <abcminiuser> Which is good
[13:17:53] <Tom_itx> more bloat?
[13:18:04] <abcminiuser> :(
[13:18:25] <Tom_itx> it still irks me that it takes 10 min to load a shell to spend 5 sec programming a part
[13:18:44] <abcminiuser> Remove the gallery extension
[13:18:50] <abcminiuser> It super-speeds the startup
[13:19:06] <Tom_itx> where do i do that?
[13:19:21] <Tom_itx> and does it reinstall it with future updates?
[13:19:35] <abcminiuser> C:\Program Files (x86)\Atmel\Atmel Studio 6.1\extensions
[13:19:50] <abcminiuser> Rip out "Clarius Consulting"
[13:19:57] <abcminiuser> And "Atmel\Atmel Gallery"
[13:20:07] <abcminiuser> Restart studio twice and it should be fast again
[13:20:08] <Tom_itx> don't i need to remove it from within the program?
[13:20:12] <abcminiuser> No
[13:20:17] <abcminiuser> Close AS6 first
[13:21:02] <Tom_itx> of course it will be fast the 2nd time, it will be cached :)
[13:21:22] <abcminiuser> It's because the first time studio notices a change and has to rebuilt internal stuff
[13:21:26] <abcminiuser> From then on it's fast
[13:21:36] <abcminiuser> From 1 min startup to 8 seconds for me at least
[13:23:17] <Tom_itx> i don't see gallery
[13:23:34] <abcminiuser> Atmel folder
[13:24:05] <Tom_itx> still don't see it
[13:24:34] <Tom_itx> program files/atmel/atmel studio 6.1/ not there
[13:24:49] <Tom_itx> or program files/atmel/
[13:25:24] <MannImMond> IIRC it's in users/$User
[13:26:25] <Tom_itx> not finding it
[13:26:46] <Tom_itx> if it didn't install by default i didn't install it
[13:26:56] <MannImMond> which version do you have?
[13:27:07] <abcminiuser> 64 bit or 32 bit windows?
[13:27:24] <Tom_itx> 32
[13:28:25] <Tom_itx> i did remove the other one though
[13:29:29] <guest423498> Can someone check my design with attiny48 to see if I'm not missing something obvious?
[13:29:39] <Tom_itx> got an error loading the clarius consulting
[13:30:19] <guest423498> http://imagebin.org/273113
[13:31:23] <Tom_itx> 10k pullup on reset
[13:31:33] <Tom_itx> and a clock circuit if you want one
[13:32:08] <guest423498> Ok thanks
[13:32:32] <guest423498> The clock circuit, is it optional? What's the advantage?
[13:32:41] <Tom_itx> higher clock rates
[13:32:44] <Tom_itx> 16Mhz
[13:32:49] <Tom_itx> maybe 20
[13:32:54] <abcminiuser> Yeah both need to be yanked
[13:33:05] <abcminiuser> Funny tho, it should exist
[13:33:07] <Tom_itx> abcminiuser, it never loaded
[13:33:22] <Tom_itx> after removing the clarius thing
[13:33:28] <Tom_itx> never found the gallery folder
[13:33:43] <Tom_itx> there it is finally
[13:34:41] <Tom_itx> still slow loading, better but still slow
[13:35:14] <Tom_itx> it may be ok if you have a glow in the dark processor or two on the MB
[13:36:49] <Tom_itx> guest423498, you need resistors on the I2C too
[13:37:05] <guest423498> Ok
[13:37:20] <guest423498> Wjhat values are recommended?
[13:37:26] <Tom_itx> i forget how big and where to put them
[13:37:33] <Tom_itx> just make a pad for them
[13:37:41] <Tom_itx> you can fill in the blanks with solder
[13:39:07] <guest423498> ok
[13:39:13] <guest423498> Thanks
[13:40:06] <Tom_itx> ask somebody which pins need them, i forget off hand
[13:40:41] <Tom_itx> probably both since they're active low
[13:40:50] <Tom_itx> at least the device i used was
[13:41:22] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/logger/Datalogger32_mmc_sch.png
[13:41:33] <Tom_itx> i've got a 1K on SDA but you may need a different value
[13:45:03] <guest423498> Ok, thanks
[14:07:22] <guest423498> Tom_itx: Which schematic capture software did you use to draw the schematic above?
[14:07:30] <Tom_itx> eagle
[14:07:37] <guest423498> Nice
[14:07:42] <abcminiuser> N1njaneer, might want to nuke that extension for now
[14:07:49] <abcminiuser> That version will throw exceptions
[14:07:51] <abcminiuser> Working on a fix...
[14:09:36] <guest423498> abcminiuser: the attiny48, which debugger interface I can use for it?
[14:09:44] <abcminiuser> Err
[14:09:45] <Tom_itx> jtag i think
[14:09:48] <abcminiuser> Probably debugWire
[14:09:51] <abcminiuser> Lemme check
[14:09:54] <guest423498> Ok
[14:10:05] <Tom_itx> err maybe debugwire
[14:10:19] <guest423498> I'm still not too familiar with AVR uCs
[14:10:34] <Tom_itx> seems the one of choice on newer chips
[14:11:02] <MannImMond> yeah it's DW
[14:11:08] <MannImMond> dW*
[14:11:53] <abcminiuser> Speaking of which when I'm gone it's up to Morten and MannImMond to be helpful to you guys
[14:11:57] <abcminiuser> I've trained them well
[14:12:24] <MannImMond> is morten idling here as well?
[14:12:25] <guest423498> Ok, thanks
[14:12:47] <abcminiuser> Not at the moment
[14:12:52] <abcminiuser> He's x-somethingorother
[14:12:57] <guest423498> DW just need the reset pin and ground, if I understand well, right?
[14:13:07] <MannImMond> and the SPI to enable it
[14:13:24] <MannImMond> ISP to be correct
[14:14:44] <Tom_itx> abcminiuser where you gonna sneak off to?
[14:14:53] <abcminiuser> Hjem
[14:15:12] <abcminiuser> http://fourwalledcubicle.com/blog/2013/10/lets-rotate-the-board/
[14:15:21] <MannImMond> Going to be a professional plugin developer? :D
[14:15:57] <Tom_itx> naw then it would be work
[14:16:03] <abcminiuser> I'm liking the whole managed kajigger
[14:16:10] <abcminiuser> Good to get away from the tiny MCUs for a while
[14:17:40] <abcminiuser> N1njaneer, okies extension updated with a version that shouldn't break
[14:17:45] <abcminiuser> And has tooltips now
[14:17:49] <abcminiuser> Sexy, sexy tooltips
[14:18:20] * Tom_itx pictures abcminiuser dancing around the office
[14:28:07] * abcminiuser does the needful
[14:30:04] <w|zzy> abcminiuser: Welcome home (bit early).
[14:30:21] <abcminiuser> Cheers
[14:30:26] <abcminiuser> Now hire me
[14:37:48] <w|zzy> I only know one place which /may/ be hiring. Broadcom in sydney.
[14:38:22] <w|zzy> and by /may/ I mean they are generally open to EOI
[15:31:18] <megal0maniac_afk> abcminiuser: Marginoferror. Cute :P
[15:31:54] <abcminiuser> Heh
[15:32:05] <abcminiuser> I like silly project names
[15:32:10] <megal0maniac_afk> How long /should/ AS take to load?
[15:32:24] <megal0maniac_afk> Those changes didn't seem to make any difference
[15:32:37] <abcminiuser> Without the gallery, 8 seconds for me on a i5 with mechanical disk
[15:32:44] <abcminiuser> With the gallery, about a min
[15:33:04] <megal0maniac_afk> 7.2s without gallery, i5, SSD
[15:33:05] <twnqx> 8s sound almost acceptable
[15:33:14] <abcminiuser> 8 seconds on my i7 and SDD to without gallery
[15:33:16] <inkjetunito> sounds bloated :O
[15:33:23] <abcminiuser> So, less than 10 seconds ideally
[15:33:29] <twnqx> almost c64 loading times :P
[15:33:38] <abcminiuser> megal0maniac_afk, did you remove both folders?
[15:33:38] <megal0maniac_afk> DEFINITELY never a minute, even with gallery
[15:33:43] <megal0maniac_afk> Yip
[15:33:55] <abcminiuser> There's a lot of crap going on when you start it
[15:33:56] <megal0maniac_afk> But it seems that 7.2s is comparitively fast
[15:34:03] <megal0maniac_afk> So I'm not fussed
[15:34:04] <abcminiuser> The pluggable nature of it means it's slow
[15:34:12] <abcminiuser> Since it needs to check all the XML and whatnot
[15:34:30] <abcminiuser> Example, we can add part packs to add new tool and device support
[15:34:41] <twnqx> how about starting the app FIRST
[15:34:48] <twnqx> and then loading extras in the background?
[15:35:08] <abcminiuser> It is
[15:35:20] <abcminiuser> But some of it delays the main thread still
[15:35:32] <abcminiuser> Mostly it's just the .NET assemblies loading
[15:35:36] <megal0maniac_afk> 11s with gallery back on
[15:35:46] <megal0maniac_afk> Okay so it is an improvement
[15:35:48] <twnqx> yeah, using everything that is slow :P
[15:36:26] <abcminiuser> It's not so bad given the benefitsa
[15:36:45] <abcminiuser> My biggest complains are a) debug features and b) stability
[15:36:55] <abcminiuser> And one of those two is being super duper improved at the moment
[15:36:57] <megal0maniac_afk> Debug features?
[15:37:00] <twnqx> my biggest complain is windows
[15:37:16] <megal0maniac_afk> I thought debug features were pretty good
[15:37:20] <abcminiuser> Advanced stuff, like being able to break of access of a memory location by the application
[15:37:32] <abcminiuser> So you can track down what's corrupting a memory location
[15:37:36] <abcminiuser> Tracing, that sort of thing
[15:37:48] <twnqx> isn't that more a problem of the chip?
[15:37:56] <abcminiuser> No, backend needs to support it
[15:37:59] <abcminiuser> All the chips already do
[15:38:02] <megal0maniac_afk> Isn't tracing exclusively an AVR ONE thing?
[15:38:03] <twnqx> ah
[15:38:13] <abcminiuser> Well, kinda
[15:38:32] <abcminiuser> ARMs have a tracing buffer built into some of them inside the chip, which is good enough for most uses
[15:55:30] <megal0maniac_afk> abcminiuser: So which one of those is being super duper improved?
[15:56:50] <abcminiuser> I'll give you a hint, it's not the stability :S
[15:56:55] <beaky> hello
[15:57:01] <beaky> how do I use ADC on avr
[15:57:12] <beaky> i need to read voltages for my solar battery charger
[15:58:26] <megal0maniac_afk> abcminiuser: That'll do :)
[15:59:01] <abcminiuser> Indeed
[15:59:04] <abcminiuser> Anyway, I'll off to bed
[16:00:13] <megal0maniac_afk> Me too. Soon. After I've learnt enough integration. Goodnight!
[16:00:37] <megal0maniac_afk> beaky: There are lots of examples and tutorials online, just use google.
[16:01:08] <beaky> ah
[16:01:36] <beaky> ok I will google for interrupt-driven ADC
[16:02:05] <megal0maniac_afk> And generally speaking, IRC is a place to ask questions like "my ADC is returning the same value constantly, this is my code, I've tried x y and z" rather than "how do I use the ADC"
[16:02:10] <Roklobsta> when will a LUFA plugin for EMACS be ready?
[16:02:28] <beaky> what is the best avr to implement a solar charger contorller
[16:02:38] <beaky> I am going to use the ATmega328p but I think that is overkill
[16:02:42] <megal0maniac_afk> Roklobsta: It's open source. As soon as you write one :P
[16:05:22] <ColdKeyboard> Is there some kind of open-source logic analyzer, that's nothing fancy, just MCU sampling inputs and oputing them to serial for graphing?
[16:05:56] <ColdKeyboard> It doesn't have to be super-fast, few KHz is enough for start:)
[16:06:26] <jadew> ColdKeyboard, can't you do that yourself?
[16:06:37] <codyps1> ColdKeyboard: take a look at the analyzers supported by sigrok, some of them are bound to be opensource
[16:06:47] <ColdKeyboard> Everything except graphing... :\
[16:06:56] <megal0maniac_afk> ColdKeyboard: http://www.pololu.com/catalog/product/1300
[16:07:07] <w|zzy> megal0maniac_afk: I thought irc was for 'check out this cool stuff I did'
[16:07:34] <ColdKeyboard> OpenBench Logic Sniffer is OpenSource but I would have to buy FPGA to make it myself... :)
[16:07:57] <megal0maniac_afk> ColdKeyboard: Not open source, but cheaper
[16:08:16] <jadew> ColdKeyboard, why don't you use the java client and just stream data over serial?
[16:08:17] <Roklobsta> this nutbag might have something for you: http://www.gabotronics.com/development-boards/avr-xmegalab.htm
[16:08:30] <jadew> ColdKeyboard, the java client of the OLS hardware
[16:08:48] <megal0maniac_afk> w|zzy: That too ;) But in terms of asking questions, generally you aren't going to get someone to hold your hand from start to finish of your program
[16:09:05] <w|zzy> that's what university is for
[16:09:12] <ColdKeyboard> jadew: It doesn't support real-time dumping. I have to buffer the data at my device and after the sampling is done, i dump it over serial
[16:09:19] <megal0maniac_afk> University and Google
[16:09:21] <Roklobsta> w|zzy: no one held my hand at uni
[16:09:36] <jadew> ColdKeyboard, that doesn't make sense
[16:09:41] <Roklobsta> in fact they kept cutting the budget so we had stuff all tutorial time.
[16:09:52] <jadew> why aren't you able to do UDR = PORTB for example?
[16:10:36] <w|zzy> you got tutorials?
[16:11:35] <ColdKeyboard> jadew: I tried that, and I get the data over serial port but even when I get serial port to 250000 baudrate (with 20MHz crystal) the sampling rate is way to slow, something like 250Hz which is way too slow...
[16:11:48] <w|zzy> I'm lucky if my assignments are released on time or I get up to date lectures.. yay correspondence
[16:11:57] <jadew> ColdKeyboard, that doesn't sound right
[16:12:13] <ColdKeyboard> jadew: I know, at that speed byte time should be about 40us
[16:12:20] <megal0maniac_afk> xmega? 4mbit serial :)
[16:12:25] <jadew> ColdKeyboard, you're doing something wrong
[16:12:47] <w|zzy> too slow? throw something bigger at it!
[16:12:56] <jadew> you've been at it for quite some time isn't it?
[16:13:17] * megal0maniac_afk hugs his Saleae
[16:13:28] <ColdKeyboard> jadew: Well I can't find out what... That's why I'm trying to find some open-source solution to see how it's done but all of them do sampling and store it in RAM and later dump it over serial one-by-one
[16:13:54] <ColdKeyboard> jadew: Yea, maybe a week or something like that, when I get some free time I try to make it work but no luck so far.
[16:14:18] <twnqx> you won't get far beyond a few 100khz sampling
[16:14:42] <twnqx> with direct to serial.
[16:15:06] <jadew> ColdKeyboard, while (1) { while (!(UCSRA & (1 << UDRE))); UDR = PORTB; }
[16:15:31] <jadew> that code will sample PORTB and send it over USART at the baudrate you set for UART
[16:16:43] <ColdKeyboard> jadew: I did that, except I frist tried with TX register ready interrupt and latter moved it to while but it seems my recieving end is having some problems and recieving only 250 bytes per second :\
[16:18:05] <w|zzy> did you set up the baud rate properly?
[16:18:36] * w|zzy hugs his old with jadew's software and the salea
[16:19:21] <jadew> twnqx, he could actually go as high as 300 ksamples (8 bits each), but he'd need a good serial cable
[16:19:21] <jadew> ColdKeyboard, you don't want interrupts for this thing
[16:19:21] <jadew> what chip is it?
[16:19:41] <ColdKeyboard> w|zzy: yes I did. Recieved data is readable and correct, except I get every x-th element that is sent...
[16:19:59] <ColdKeyboard> At the moment tiny2313
[16:20:19] <Roklobsta> man, UART discussions must take up 90% of time here.
[16:20:37] <jadew> Roklobsta hehe yeah
[16:20:49] <jadew> ColdKeyboard, ok, what cable?
[16:21:02] <ColdKeyboard> PIC16F1455 as USB-to-Serial converter
[16:21:11] <jadew> what crystal?
[16:21:15] <jadew> 12Mhz?
[16:21:17] <ColdKeyboard> 20MHz
[16:21:23] <jadew> so 20Mhz on both?
[16:21:35] <ColdKeyboard> No, Tiny has 20MHz, PIC has 48MHz
[16:21:54] <jadew> hmm
[16:22:23] <jadew> ok, first thing first: you need to figure out which baudrates intersect between the PIC and the TINY
[16:23:04] <jadew> to do that, you'll need to take a look at the PICs datasheet and see how the baudrate prescaller is calculated
[16:25:06] <jadew> for the AVR it's pretty much 20Mhz / (16 * x) where x is 1 to whatever and 8 * x when using double speed
[16:25:30] <jadew> so you'll need to find the highest baudrates that match and get the comunicating over them
[16:25:38] <jadew> I think 250k will do tho
[16:25:54] <jadew> because I have a feeling that 48Mhz is more like 12Mhz in AVR land
[16:26:17] <jadew> and 12Mhz and 20Mhz have 250khz as the highest common baudrate IRRC
[16:26:23] <jadew> so you probably got that one right
[16:29:51] <ColdKeyboard> Ok, I'll look into it
[16:30:15] <ColdKeyboard> The source for USB-to-Serial is not mine so I'll have to take a look at it to find out baudrate that it works on
[16:30:27] <ColdKeyboard> Thank you :)
[16:31:44] <jadew> ColdKeyboard, try this out: http://eenoob.com/files/analyzer.c
[16:32:02] <jadew> replace UDR = PORTB; with whatever port you want to sample
[16:34:57] <jadew> you can also implement the sump protocol and add some simple triggering
[16:34:59] <jadew> then you're game
[16:37:53] <ColdKeyboard> jadew: How can I dump data in SUMP protocol in real-time and is it even supported?
[16:38:02] <ColdKeyboard> Documentation is little bit shady on that part :\
[16:38:26] <jadew> you only have ot parse the request
[16:38:36] <jadew> then trigger and then you can do what I just showed you
[16:39:44] <jadew> I don't have a lot of time on my hands these days, otherwise I would have made a simple protocol that would work nicely with an AVR and included it in my analyzer
[16:39:55] <jadew> I might do that one of these days
[16:40:45] <Roklobsta> might not
[16:41:06] <Roklobsta> you know, Winter is Coming. You'll have plenty of indoor time soon.
[16:43:51] <jadew> Roklobsta, my wedding is comming too
[16:44:29] <jadew> and indoor I have a small kid who requires a lot of attention :)
[16:56:14] <Casper> WHAT?
[16:56:35] <Casper> an illegitime child? baaaaadd :)
[16:57:00] <Casper> didn't you knew you were supposed to mary before making that kid? :D
[16:59:19] <jadew> hahah
[16:59:20] <jadew> yeah
[16:59:29] <theBear> illegitimate child ? is that like when you put a dwarf in a bonnet with a cigar and roll it around town in a baby carriage freaking people out ?
[17:00:03] <theBear> or more like when a teenager sneaks into an r rated movie ?
[17:00:30] <theBear> they both sound pretty illegitimate to me
[17:06:16] <jadew> he's not illegitimate, we did officially got married before the kid got born :P
[17:06:23] <jadew> (it's a two steps process in here)
[17:07:13] <jadew> marrying in front of a priest has no legal meaning in here, so we did it officially before the kid got born and we'll do it with the priest and all that mumbo jumbo a bit later this year
[17:37:13] <ColdKeyboard> jadew: with this line -> while ( !( UCSRA & (1<<UDRE))); it's not transmitting any data :\
[17:37:32] <twnqx> well, did you set up the serial port before?
[17:37:48] <ColdKeyboard> I got them both to work with 115200 (tested with sending 1,2,3,4 etc to 255) and it works just fine
[17:38:26] <jadew> did you use my entire code?
[17:38:39] <ColdKeyboard> No, just this part with while()
[17:38:39] <jadew> or did you add that in your code?
[17:38:48] <jadew> it's possible you have it set up with interrupts
[17:38:50] <twnqx> the while part
[17:38:57] <twnqx> just waits until the transmitter is empty
[17:39:02] <twnqx> it's two lines
[17:39:10] <ColdKeyboard> I know that but it doesn't work :\
[17:39:15] <ColdKeyboard> I removed interrupt lines
[17:39:17] <jadew> try my code
[17:39:32] <jadew> I gave you a link, no?
[17:39:42] <jadew> I did
[17:39:49] <jadew> http://eenoob.com/files/analyzer.c
[17:39:55] <jadew> I didn't try to compile it, but it should be fine
[17:40:44] <ColdKeyboard> Just needs F_CPU on top, it seems to work :\
[17:41:00] <ColdKeyboard> I'll debug my code now...
[18:00:51] <jadew> woot, couldn't test this code on the tiny25 because I needed all the pins, disabled reset and it worked!
[18:01:07] <jadew> so... no bricked chip :P
[18:03:52] <ColdKeyboard> jadew: I just grounded all of my PortB pins and I keep getting 0x08 on serial port :\
[18:04:12] <jadew> maybe that one is an output ?
[18:04:18] <jadew> pb3
[18:04:24] <Tom_itx> don't short them to GND
[18:04:33] <jadew> wait.. pb4
[18:04:36] <jadew> no
[18:04:37] <jadew> pb3
[18:04:47] <ColdKeyboard> They are configured to be PORTB=0x00; DDRB=0x00;
[18:07:44] <Tom_itx> input
[18:08:00] <twnqx> biggest failure
[18:08:07] <twnqx> while (1) { while (!(UCSRA & (1 << UDRE))); UDR = PORTB; } <- you would want PINB.
[18:08:11] <twnqx> not PORTB.
[18:08:25] <jadew> lol
[18:08:27] <jadew> yeah
[18:08:30] <jadew> sorry about that
[18:08:37] <jadew> told you I didn't try it
[18:08:41] <vsync_> um
[18:08:48] <twnqx> no worries, i make that mistake all the time
[18:09:11] <vsync_> ground all portb pins. DDRB = 0xFF, PORTA=0xFF. Observe
[18:09:27] <Tom_itx> poof
[18:09:29] <vsync_> ffs
[18:09:29] <twnqx> smoke?
[18:09:33] <vsync_> porta=portb
[18:09:34] <vsync_> *****
[18:09:39] <twnqx> obviously
[18:09:55] <Tom_itx> i wouldn't ever short them to ground
[18:09:58] <Tom_itx> use a resistor
[18:10:06] <vsync_> that's lame
[18:10:17] <vsync_> no one wants loads
[18:10:19] <Tom_itx> how is that lame?
[18:10:31] <Tom_itx> it would prevent an inadvertent short
[18:10:44] <vsync_> maybe it was advertant
[18:11:03] <vsync_> sometimes you want to see the worl... avr burn
[18:11:47] <N1njaneer> That's how you make the AVR unsolder itself and run away.
[18:11:53] <N1njaneer> It's an undocumented feature.
[18:14:45] <vsync_> i've tinkered with these things for quite a while but never seen one smoke to be honest
[18:14:46] <ColdKeyboard> I changed it to PINB at the begginging
[18:18:24] <N1njaneer> I've gotten the chips to become extremely warm by setting grounded outputs to HIGH, but that's about it. The ports are internally current-limited to a pretty significant degree.
[18:22:11] <vsync_> http://www.youtube.com/watch?v=b0zQn0fjpuU well. now I've seen it. Moving on -
[18:26:51] <N1njaneer> That's a bit more extreme :)
[18:27:14] <jadew> woot! my home made brymen data cable is done :D
[18:28:56] <N1njaneer> LOL this one is funnier! http://www.youtube.com/watch?v=mZ7pUADoo58
[18:31:03] <N1njaneer> Hey Mark! Did you get your inputs under control from yesterday?
[18:31:12] <MarkX> N1njaneer: Casper , got that code from yesterday working. after pulling up all the values everything worked perfectly!
[18:31:35] <vsync_> N1njaneer: hahah
[18:31:42] <vsync_> nice magnification but needs hispeed
[18:32:09] <MarkX> i've done little to no electronics at this level before so that whole bias/unbias was totally new to me :P
[18:32:11] <MarkX> but i got
[18:32:18] <MarkX> ADC working yesterday, and tonights goal is PWM
[18:32:26] <MarkX> tomorrow, ADC + pwm then finally PID :D
[18:40:47] <vsync_> wonder if you're building your own flight controller... seems to be the hip thing to do nowadays
[18:40:53] <vsync_> i know two friends who're working on those
[18:41:23] <N1njaneer> Mark: Excellent, great to hear :)
[18:41:39] <MarkX> heh no
[18:41:43] <MarkX> i'm building a robot of sorts
[18:43:50] <MarkX> i wanted to make a rocket/robot to the moon
[18:44:07] <MarkX> but that seemed a little bit too ambitious even for me
[20:11:33] <vsync_> does anyone know a big supplier supplying VLSI mp3 decoder chips?
[20:11:45] <vsync_> would need a few VL1011's
[20:14:25] <vsync_> VS1011*
[21:27:18] <BLAHBLAh_> Hey guys, I was hoping to get some help in relation to I2C/TWI interfacing. Anyone experienced with it?
[21:27:55] <Roklobsta|2> I2C/UARTS/SPI are discussed here ad nauseum
[21:28:10] <Roklobsta|2> there are some tutorials floating around
[21:28:25] <BLAHBLAh_> ok cool, I guess we can continue the trend
[21:28:29] <Roklobsta|2> even the avr manuals give enough good basic information with examples
[21:28:32] <Tom_itx> master or slave?
[21:28:40] <BLAHBLAh_> master
[21:28:48] <BLAHBLAh_> I have some simple start up code
[21:29:15] <BLAHBLAh_> using an atmega32 chip the TWINT flag of my TWCR register is not being reset by ahrdware
[21:29:37] <Roklobsta|2> BLAHBLAh_: do you have a CRO?
[21:29:38] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/Dallas%20RTC%20Code/
[21:29:48] <Tom_itx> that code works on a dallas RTC
[21:29:54] <Tom_itx> i've played with it a bit
[21:29:56] <BLAHBLAh_> CRO?
[21:30:08] <BLAHBLAh_> Cheers Tom_itx
[21:30:09] <N1njaneer> If you are going to do I2C/TWI I'd reccomend a cheap logic analyzer that can read the bus. You'd be amazing how fast development goes when you can see what the thing is doing. :)
[21:30:17] <Roklobsta|2> BLAHBLAh_: I'll take that as a definite NO
[21:30:31] <BLAHBLAh_> definetly a NO
[21:30:59] <Roklobsta|2> If you can't see what's going on the wire it can be a shit fight.
[21:31:05] <N1njaneer> I think one of the reasons for the ad nauseum is for half the stuff that pops up, we could help solve the problems much easier if someone could just throw a scope on the pins :)
[21:31:29] <Roklobsta|2> in the past I have written bit bangers for SPI that Just Worked first time, but I was super careful.
[21:31:52] <BLAHBLAh_> ah k.. sounds like I might need a logic analyer then..
[21:31:56] <BLAHBLAh_> cheers
[21:31:59] <N1njaneer> Anything is debuggable without external hardware if you are patient and clever enough. It's generally just a time/money tradeoff :)
[21:32:02] <Roklobsta|2> just a crummy old CRO is fine
[21:32:11] <Roklobsta|2> well, OK, a digital CRO.
[21:32:15] <Tom_itx> I like m Saleae analzer
[21:32:19] <Roklobsta|2> so you can capture the wave form
[21:32:33] <N1njaneer> BLAH: I'd reccomend checking out the Logic-16 if you are looking for an excellent one that is super-inexpensive and will do full protocol decode :)
[21:32:41] <N1njaneer> Salaea Logic-16
[21:32:48] * N1njaneer high-fives Tom
[21:32:52] <Tom_itx> meh, you may not need all 16 channels
[21:32:56] <Roklobsta|2> BLAHBLAh_: just buy a Rigol
[21:33:12] <Roklobsta|2> just ask jadew how much a CRO helped him
[21:33:16] <Tom_itx> they didn't have the 16 when i got mine
[21:33:24] <Roklobsta|2> he was like you going WTF all the time until he got one
[21:34:44] <N1njaneer> Rok: The Saleae is probably going to be a lot cheaper than the Rigol and have a lot more channels plus logic decode for a ton of protocols. Unless Rigol has one of theirs I'm unfamiliar with :)
[21:34:45] <BLAHBLAh_> ok cool well cheers for the help, I'll bite the bullet and stop trying to take shortcuts I guess then.
[21:35:31] <N1njaneer> BLAH: If you are doing this stuff seriously on regular basis, I can guarantee you will reap the benefits over and over and work out all of your problems magnitudes of order faster :)
[21:35:32] <Tom_itx> you can look at their software before you buy too
[21:35:47] <Tom_itx> you do need some sort of test equipment
[21:35:49] <Roklobsta|2> never haerd of that make
[21:35:55] <Tom_itx> decide what suits you best
[21:36:01] <N1njaneer> http://www.saleae.com/ and the Logic is $149
[21:37:02] <N1njaneer> Logic-16 is nice since if you scale down the number of channels the speed increases proportionally. So, for instance, it will do 2 channels at 100Mhz and 4 channels at 50Mhz. Infinite-length capture buffer as long as your PC is fast enough, too.
[21:37:36] <Roklobsta|2> can you whack it it on a mictor connector and capture PCI?
[21:37:45] <N1njaneer> I haven't even powered up my old HP1662A since I got the Logic-16 :)
[21:37:59] <Roklobsta|2> mmmm green CRT....
[21:38:00] <N1njaneer> Rok: To a limited extent you could monitor it, yes.
[21:38:05] <Tom_itx> have you used all 16 channels?
[21:38:25] <N1njaneer> I haven't ever had the need to monitor more than maybe 5-6 at a time, ever.
[21:38:49] <Tom_itx> i don't see a need for 16 personally, not on an 8bit avr
[21:39:43] <N1njaneer> My 1662A will do 128 channels at like 125/250Mhz, and I doubt I ever used more than 8 ever. But it was nice for setting up compound state-trigger conditions for FPGA debugging. But now I just use the Logic-16, or with FPGA stuff you can just synthesize a logic analyzer in to the design and talk to it via JTAG
[21:40:10] <N1njaneer> Tom: The 16 is nice due to higher sampling speeds if you need >24Mhz
[21:40:39] <Tom_itx> i didn't read the specs but i thought using more channels made it slower
[21:40:43] <N1njaneer> I've needed it for nanosecond-resolution timing in the past, which is where the 2 channel/100Mhz was useful to get the granularity
[21:41:10] <N1njaneer> Tom: Correct. More channels goes slower.
[21:42:15] <Tom_itx> i'd think using 8 channels of it, the specs would be quite similar
[21:42:37] <N1njaneer> But number of channels active is adjustable. Nice to have more channels if you need them, though, and the price isn't much more.
[21:42:41] <Tom_itx> i haven't bothered looking since they didn't have it when i got mine
[21:42:45] <N1njaneer> Anyone want a gently used 1662A? XD
[21:43:41] <N1njaneer> Rigol has some excellent products as well, though I'd more reccomend them if you are looking for a good digital o-scope or spectrum analyzer.
[21:44:35] <Tom_itx> yeah
[21:44:37] <N1njaneer> The multitude of protocol decoders in Saleae's stuff are a god-send for debugging (especially I2C!) and I believe you can even write your own add-ons if you so desire.
[21:46:18] * Casper ♥ his rigol ds1104z
[21:46:40] <Tom_itx> you can but i don't know anybody that has
[21:47:34] <N1njaneer> Tom: I've dumped out I2C transaction sessions in to CSV files, before. Trivial to write a decoder for them. VERY handy to do things like sniff transaction sessions, dump EEPROMS, etc.
[21:50:08] <N1njaneer> In any case more tools for the toolbox. When you need them, you need them.
[21:50:36] <N1njaneer> With the tight timeframes we work around here for critical hardware deliveries, I'll take all the tools I can get if it helps me get the solution working faster :)
[21:53:37] <N1njaneer> I guess I should get some more work done. I have 5 PCBs to build up!
[21:54:12] <Tom_itx> just 5?
[21:55:18] <Roklobsta|2> N1njaneer: any opinion on the hack for 50MHz to 100MHz on the Rigol?
[21:55:29] <Roklobsta|2> what do the Rigol engineers up the road say about it?
[21:55:58] <Tom_itx> you could blow out the ADC
[21:56:07] <N1njaneer> Rok: Not familiar with it.
[21:56:14] <Tom_itx> but i've heard ppl that have done it
[21:56:24] <Tom_itx> abcminiuser didn't
[21:56:27] <Roklobsta|2> blow out the ADC? ORLY?
[21:56:30] <Tom_itx> he's got one
[21:56:40] <Tom_itx> shorten it's life anyway
[21:56:49] <N1njaneer> Rok: I could ask them next time I see them, but I suspect that it may be a case of grading and calibration more than anything.
[21:56:49] <Tom_itx> not rated for the frequency i guess
[21:56:52] <Roklobsta|2> the 50 and 100mhz model both sample at 1GHz.
[21:57:21] <N1njaneer> If the scope isn't qualified and calibrated for the higher frequency, then I would be very skeptical about the quality of the data you are getting out of it.
[21:57:21] <Roklobsta|2> it's just binning and marketing that decide on model differentiation.
[21:57:42] <Roklobsta|2> yeah I don't have any kind of siggen
[21:58:18] <Tom_itx> if i were after a 100Mhz scope, i wouldn't buy a new 50 and hack it
[21:58:26] <Roklobsta|2> so I couldn't even hope to measure the phase linearity or 3dB cutoff
[21:58:46] <Roklobsta|2> i havent'' hacked it yet and certainly don't need even 50MHz for AVR
[21:58:54] <N1njaneer> When you are talking about those frequency ranges, the way you make the measurements is also going to significantly affect the reliability of the data. Are you expected to hack 20 Mhz scope probes and make them in to 100Mhz scope-probes by overclocking them, too? :)
[21:59:17] <Roklobsta|2> heh who knows WTF the probes are like.
[21:59:39] <N1njaneer> Rok: Stripped 50-ohm coax terminated in to BNC's!
[21:59:40] <Roklobsta|2> heh i only paid $390 two years ago. I didn't buy a LeCroy.
[22:00:28] <Roklobsta|2> yeah I can do the BNC thing, that's obviously a normal thing to do
[22:00:41] <N1njaneer> Rok: I mean, because a wire is a wire, right? Impedence-matching and shielding are completely optional, and if you don't understand or believe in them, they don't affect the results! Technical stuff is so much easier to grasp when you have less to worry about :)
[22:00:59] <Roklobsta|2> wire? you mean a unity gain amplifier?
[22:01:15] <N1njaneer> That being said, sometimes it works Just Fine doing that. But you have to know when to care and when not to care :)
[22:01:54] * Roklobsta|2 recalls testing car batteries into a carbon pile and watching the wires twitch as 400A coarsed through them.
[22:02:11] <N1njaneer> I have to view X/Y signals on an analog scope regularly, so I have a chopped BNC cable that gets plugged on and adapts to a DB25 connector so I can quickly plug in and look at XY. Because over the frequency ranges I'm looking at, doing that doesn't make any amount of difference :)
[22:03:24] <N1njaneer> But if I need to, say, look at the quality of a clock-crystal leg wired to an AVR, I get out the more expensive 50Mhz probes, set them to 10x, and get nice data without hiccuping the AVR. Which is likes to do with cheaper 1x probes :)
[22:07:23] <N1njaneer> I'm just glad I'm not having to regularly do high-end spectrum analyzer stuff. Those measurements require you having intimate knowledge of the spectrum analyzer itself, RF theory, probes, and cable usage - of which I have only the basics. Because unless you approach some problems the right way, you can't tell if the hump you are seeing in the sweep is actually what you are seeing from the circuit,
[22:07:23] <N1njaneer> or if it's reflections in the cabling or probe creating false positives, and requires comb filters and all sorts of other stuff to be able to quantify what you are seeing. It's all borderline black-magic :)
[22:08:02] <Tom_itx> black magic or blue smoke
[22:10:02] <N1njaneer> I am going to design a blue smoke to black magic converter. I will make millions!
[22:10:15] <N1njaneer> Actually, that's usually called an 'engineer' I think.
[22:10:33] <N1njaneer> You are not allowed to gain the black magic powers until have let out enough of the blue smoke :)
[22:10:40] <N1njaneer> until +you
[22:10:53] <Roklobsta|2> engineer is someone who turns bosses rants into products with the assistance of coffee
[22:11:25] <N1njaneer> Indeed!
[22:11:26] <Roklobsta|2> my fave blue smoke was the time I exploded a tant when my cro tip shorted something out
[22:11:33] <Roklobsta|2> BANG <flame>
[22:11:40] <N1njaneer> Tants are particularly good at that.
[22:12:09] <Roklobsta|2> it was on a switch mode psu. i suspect it got way to many V when I shorted <something>
[22:12:51] <Roklobsta|2> dangly alligator clip falling off and dragging across the board is also awesome
[22:14:23] <Roklobsta|2> actually i have fried a selenium rectifier with mains before. ran away didin't want to inhale that smoke.
[22:15:29] <N1njaneer> Tants have some interesting physical properties to them if you look up some of the physics of how they work. Because of the super-thin oxide layers you can make really large capacitance values in small areas, and the oxide will sort of self-heal under certain agressive situations, but they can also do this weird break-over spot-heating effect that kind of forms a snowballing chain-reaction device
[22:15:30] <N1njaneer> which ultimately causes it to burn/explode quite readily. As expesive as they are, they are NOT reccomended for use in a lot of situations where large current surges are expected for this very reason. I've seen this happen first-hand, and is why I removed them from a particular part of a design we had a failure with out in the field.
[22:15:54] <N1njaneer> reaction +in the device
[22:33:24] <BLAHBLAh_> Anyone got any ideas why this TWI init code is broken?
[22:33:41] <BLAHBLAh_> I2CStart:
[22:33:50] <BLAHBLAh_> LDI TEMP,(1<<TWINT)|(1<<TWEN)|(1<<TWSTA)
[22:33:57] <BLAHBLAh_> OUT TWCR,TEMP
[22:34:12] <BLAHBLAh_> RCALL twiWait
[22:34:26] <BLAHBLAh_> wow this is cumbersome
[22:34:29] <BLAHBLAh_> nvm
[22:34:43] <Roklobsta|2> don't forget OUT PEBCAK,$d00f055
[22:34:53] <BLAHBLAh_> sounds good
[22:35:08] <BLAHBLAh_> any way of veral lines at once?
[22:35:13] <BLAHBLAh_> I suppose not eh
[22:35:27] <BLAHBLAh_> of posting several*
[22:35:38] <Roklobsta|2> you'll get kicked for spamming. use pastebin
[22:35:53] <BLAHBLAh_> rightio
[22:36:08] <Roklobsta|2> i think start with the basics and try to follow what's in the TWI manual from AVR
[22:36:16] <Roklobsta|2> what is the I2C device?
[22:37:56] <BLAHBLAh_> it's a Parallax Is1123 gesture sensor
[22:37:59] <BLAHBLAh_> but that's not so important
[22:38:16] <BLAHBLAh_> because the code that isnt working isnt reliant on it
[22:38:41] <BLAHBLAh_> if anyone would be kind enough to have a look an see if they can see anything wrong
[22:38:45] <BLAHBLAh_> would be much appreciated
[22:38:51] <BLAHBLAh_> http://pastebin.com/8GM7jsYB
[22:39:20] <BLAHBLAh_> TWINT is never reset so twiWait infintely loops
[22:39:52] <Roklobsta|2> l8r
[22:40:18] <BLAHBLAh_> k
[22:50:05] <Casper> http://www.youtube.com/watch?v=VGENVguQQmo ← hmm this will make some hate him even more!
[22:59:51] <Vutral> hm
[22:59:53] <Vutral> pAVR
[23:38:59] <N1njaneer> Blah: stopping back in here momentarily
[23:41:24] <N1njaneer> Blah: Are you still here?
[23:47:13] <N1njaneer> Blah: Assuming you see this, and assuming you are wanting your twiWait function to exit the loop when TWINT is cleared/zero, then you probably want SBRC instead of SBRS as written. SBRC will Skip (the next jump) if Bit is Clear.
[23:48:13] <N1njaneer> Blah: As written, SBRS will Skip (the rjump) if Bit Is Set. So since the bit is clear, it will keep hitting the rjmp.
[23:48:31] <N1njaneer> Perhaps that is what is causing your undesired operation :)