#avr | Logs for 2013-05-27

Back
[05:01:25] <Qantourisc> Is it worth coding in assembly ?
[05:03:37] <Qantourisc> my mean fear is I don't know when or how it will be reading and writing to sdram when using c
[05:36:45] <twnqx> Qantourisc: sdram? :S
[05:36:46] <megal0maniac> twnqx: I was thinking about this last night. How does the clock source for the SRAM switch between the SPI clock and the master 20mhz clock?
[05:36:51] <Qantourisc> twnqx: RAM ?
[05:37:13] <megal0maniac> sram :)
[05:37:23] <twnqx> all reads or writes go to ram
[05:37:33] <twnqx> avr is a harvard architecture
[05:37:41] <Qantourisc> "LDS Rd, k Load Direct from SRAM
[05:37:42] <twnqx> the only exception is explicit access to rom using lpm
[05:37:58] <Qantourisc> twnqx: the only exception are registers you mean
[05:38:10] <megal0maniac> Registers live in RAM
[05:38:19] <twnqx> even accessible via ram :P
[05:38:31] <twnqx> megal0maniac: you said there's a gate to shut down external clock
[05:38:43] <twnqx> so i propose this: connect sclk after the gate
[05:38:52] <twnqx> make it an input when running on external clock
[05:38:55] <megal0maniac> Well I just said what the called it, I don't know what it does :)
[05:38:59] <megal0maniac> *they
[05:39:24] <RikusW> http://prog21.dadgum.com/173.html
[05:39:28] <twnqx> it... makes it possible to switch the output off the clock to high impedance >_>
[05:39:33] <RikusW> games on 2MHz cpu anyone ?
[05:39:49] <twnqx> thannks, i'll power up my sub-1mhz PAL C64 :P
[05:40:23] <Qantourisc> twnqx: are you sure ?
[05:40:33] <twnqx> well
[05:40:39] <twnqx> i guess registers are memory mapped IO
[05:40:55] <RikusW> megal0maniac: actually registers are memory mapped into the address space...
[05:40:56] <twnqx> so if you are talking about sram vs register latency, yes, you can't predict what the c compiler will do
[05:40:56] <megal0maniac> Hmmm... So if it's the gate output is connected to an output pin, then the clock just becomes noise on the SPI clock?
[05:41:01] <RikusW> its not actual ram
[05:41:18] <RikusW> same goes for IO registers
[05:41:27] <Qantourisc> ok :)
[05:41:42] <megal0maniac> I thought R24 and friends lived in RAM. IO registers obviously not
[05:41:52] <twnqx> nah
[05:41:58] <twnqx> they are guaranteed shadowed
[05:42:38] <RikusW> iirc real ram starts at 0x60 or 0x100
[05:42:43] <twnqx> megal0maniac: there's no noise
[05:42:55] <twnqx> there's a 20mhz signal when the gate is active
[05:43:07] <twnqx> and there is whatever you output from sclk when it's inactive
[05:43:20] <Qantourisc> So how big a mess will C make from uint8_t *array; array[1] ? And I suppose I shoudn't use malloc right, but intstead staticly allocate them ? uint8_t array[256] ?
[05:43:23] <twnqx> you just need to make sure by software that you never enable both
[05:43:59] <twnqx> Qantourisc: gcc -E is your friend
[05:44:12] <RikusW> megal0maniac: IO registers are mapped from 0x20 to 0x5F , in/out can access them as 0-3F lds/sts as 0x20-5F
[05:44:32] <twnqx> it will most likely be two loads for the base address to a register pair
[05:44:34] <RikusW> ofc in/out is is way faster to use
[05:44:38] <twnqx> then one addition for the index
[05:44:40] <RikusW> 1 vs 2 clocks
[05:44:53] <twnqx> if you use [1] and not [var] the compiler will addd the 1 before
[05:45:07] <twnqx> so only the 16bit load, then an indirect access
[05:45:34] <Qantourisc> twnqx: that shows me code, not assembly ? or what am i suppost to be looking at ?
[05:45:53] <twnqx> gcc -E will show you the assembly that results (with a lot of noise)
[05:45:57] <twnqx> or wait
[05:46:00] <twnqx> -S ?
[05:46:07] <twnqx> riught -E is preprocessor only
[05:46:17] <twnqx> -S is assembly
[05:46:35] <twnqx> it should create a .s file then
[05:46:43] <twnqx> that has the assembly
[05:46:47] <Qantourisc> twnqx: yes -S
[05:47:00] <twnqx> don't forget to add the right -O option - O2, Os, whateber
[05:47:01] <Qantourisc> verry nice :)
[05:47:30] <megal0maniac> twnqx: So in simple terms, the SPI clock "overrides" the master clock if the master clock is high Z?
[05:47:44] <twnqx> i would not phrase it like that
[05:48:00] <twnqx> but if that helps you understand it...
[05:48:28] <Qantourisc> So that should tell me what method is best to readout an array as fast as possible :) (from ram, from sdram, or calc it, etc...:)
[05:48:43] <megal0maniac> twnqx: How would you phrase it? That sort of makes sense to me, then you can magically switch clocks by changing DDR on the clock pin
[05:48:58] <twnqx> "you choose between two clocks"
[05:49:09] <megal0maniac> By toggling the DDR?
[05:49:28] <twnqx> by toggling the gate AND the DDR
[05:49:37] <twnqx> iirc you have to set up ddr for the SPI engine
[05:49:49] <twnqx> manually, no automatic override
[05:49:57] <megal0maniac> Ooh... Okay, didn't know you could manipulate the gate
[05:50:42] <twnqx> maybe you should read the data sheet
[05:50:51] <twnqx> there will be a pin for tristate/passthrough toggling
[05:51:51] <twnqx> aka enable or similar
[05:51:55] <megal0maniac> I shall. Right after I learn exactly what tristate means.
[05:52:04] <twnqx> a third state
[05:52:10] <megal0maniac> Well that's English
[05:52:15] <twnqx> 0 or 1 are the two normal ones
[05:52:17] <megal0maniac> I mean the electronics part of it :)
[05:52:22] <twnqx> disconnected, high impedance, Z
[05:52:22] <megal0maniac> High Z?
[05:52:34] <twnqx> would be the third state.
[05:52:59] <RikusW> megal0maniac: if the /SS pin is input and SPI is configured as master it will change to slave mode if /SS is pulled down
[05:53:20] <RikusW> probably to prevent multiple masters on the same bus
[05:53:45] <megal0maniac> Makes sense
[05:53:47] <RikusW> I had a little problem with my dW disabling code and that...
[05:53:58] <megal0maniac> But only the SCK pin would change in this instance
[05:54:06] <RikusW> turned SPI into slave mode and ISP no longer worked ;)
[05:54:21] <RikusW> so after disabling dW I have to set SPI as master again
[05:54:47] <RikusW> its a little unfortunate I chose to use B0/SS as reset out....
[05:55:12] <RikusW> originally did that to allow the U2S to work in slave mode...
[05:56:23] <Fleck> help, http://www.atmel.com/Images/Atmel-8127-AVR-8-bit-Microcontroller-ATtiny4-ATtiny5-ATtiny9-ATtiny10_Datasheet.pdf << page 65 there is a equation - does fclk_i/o is in Hz or MHz ? And output freq. is in Hz?
[05:56:37] <megal0maniac> twnqx: So, uC sends "write data" and "address" to SRAM. Then it sets the SPI clock to input and toggles the gate with another IO. uC counts for however many samples the RAM can take, switches the gate back and re-enables the SPI clock, reads data and parses over USB
[05:56:39] <RikusW> megal0maniac: setting DDR = 0; would be tristated
[05:56:57] <RikusW> preferably PORT = 0 too
[05:57:30] <twnqx> megal0maniac: whatever triggers the readback
[05:57:48] <RikusW> megal0maniac: have a look at the 74ls244 datasheet
[05:58:20] <megal0maniac> But I'm on the right track?
[05:58:32] <twnqx> yes
[05:58:34] <megal0maniac> Whoo!
[05:59:37] <megal0maniac> Thank you
[06:00:23] <megal0maniac> RikusW: I don't understand how that would be tristated. DDR=0 and PORT=0 is input without pull-up.
[06:00:31] <twnqx> exactly
[06:00:38] <twnqx> what what does it look like from the outside?
[06:00:39] <RikusW> as good as disconneected
[06:00:41] <twnqx> and current flowing?
[06:00:49] <twnqx> and potential short circuits?
[06:00:56] <twnqx> any effect on external signals?
[06:01:03] <RikusW> tristated == disconnected
[06:01:11] <megal0maniac> Oh!
[06:01:13] <megal0maniac> I see
[06:01:34] <megal0maniac> So tristated as in third state (high Z) and not three states
[06:01:41] <twnqx> yes
[06:01:47] <megal0maniac> Terminology fail. 'Tis all :)
[06:02:01] <RikusW> so when you have multiple 74LS245's connected to a bus only one may be active, the others tristated
[06:02:02] <twnqx> well, as an output, it has three potential states
[06:02:11] <twnqx> driving one, driving zero, not driving anything at all
[06:03:13] <RikusW> btw 74LS244 are used to limit the fanout on say an old 8088 PC
[06:03:18] <twnqx> on the avr (and many other devices) you reach the third state by declaring it an input
[06:03:28] <RikusW> megal0maniac: do you know what logic fanout is ?
[06:03:49] <twnqx> it's a robot you build to fan frsh air to you!
[06:04:13] <RikusW> heh no
[06:04:24] <twnqx> yes!
[06:04:43] <twnqx> actually, isn't fanout mostly irrelevant since the ttl das are over?
[06:04:47] <twnqx> days*
[06:05:25] <RikusW> I think its applicable to CMOS too
[06:05:49] <RikusW> and for PCIe the fanout is 1 :-D
[06:05:54] <RikusW> only point to point
[06:06:37] <RikusW> megal0maniac: fanout is how many logic gate inputs can be connected to a output and still work
[06:06:52] <megal0maniac> Related to "the loading effect"?
[06:07:48] <RikusW> yes
[06:08:03] <megal0maniac> Ah
[06:08:21] <megal0maniac> Yeah, it's CMOS applicable. Was in one of our practicals :/
[06:08:41] <twnqx> it was worse with ttl
[06:08:50] <twnqx> with drive currents in the tens of mAs
[06:12:17] <RikusW> well AVR io pins can drive 20mA easily and CMOS take very little for input
[06:12:44] <RikusW> though all that wiring can degrade high frequency signals...
[06:14:15] <megal0maniac> We were using 74LS/ALS chips
[06:55:28] <twnqx> Limb: ipv6 is no excuse for unstable internet!
[08:25:23] * twnqx notices that someone put megal0maniac_afk into high-Z
[08:26:18] <tzanger> yeah it's been kind of quiet here. :-)
[08:28:35] <specing> good thing beaky is in high-Z, too
[08:29:02] <OndraSter> haha
[08:29:07] <twnqx> so, you still think he's real?
[08:30:02] <OndraSter> he can't be a bot
[08:30:09] <twnqx> but could be a troll
[08:30:17] <tzanger> who, beaky?
[08:30:20] <specing> whatever he is, I have him on ignore
[08:30:22] <OndraSter> I know some similar people IRL
[08:30:40] <twnqx> wow
[08:30:56] <specing> since he has been sailing freenode from one channel to another and demanding attention/asking stupid/obvious questions
[08:30:59] <twnqx> ... poor oyu?
[08:31:08] <twnqx> you*
[08:31:10] <tzanger> who?
[08:31:13] <twnqx> OndraSter
[08:31:27] <OndraSter> luckily my head has got hardware firewall
[08:33:21] <twnqx> i attempt to ignore him, too...
[08:34:09] <tzanger> I'm still trying to figure out who you're talking about, beaky or megal0maniac
[08:34:20] <specing> tzanger: beaky
[08:34:36] <specing> I know one such "human" IRL too
[08:35:06] <tzanger> I haven't found him annoying
[08:35:17] <twnqx> megal0maniac understands what we talk about, no problem there
[08:35:18] <tzanger> he's young and eager, kind of like a puppy
[08:35:38] <specing> I don't like pets
[08:35:52] <twnqx> his cats doen't like electronics
[08:36:03] <tzanger> heh
[08:41:08] <tzanger> I'm seriously considering building a fx2-fpga logic analyzer board like the open one but done right :-)
[08:41:30] <twnqx> cool
[08:42:08] <tzanger> trigger on glitch, complex trigger "toolbox" to build trigger on serial word/etc and sent to the fpga
[08:42:30] <jadew> tzanger, what's trigger on glitch?
[08:42:31] <tzanger> I am curious if I could stream to the PC and have the PC do the windowing ratehr than store it in ram on the board, that would make the baord cheaper
[08:42:38] <jadew> cuz the other stuff is already supported by sump by default
[08:42:56] <tzanger> jadew: you stream continuously and when you get a pulse less than 'x' ns (high or low) that is your trigger
[08:42:58] <twnqx> sump.. isn't that the lolthing for rs232 interface?
[08:43:04] <jadew> tzanger, I really think you can't get very high sampling speed if you do that
[08:43:09] <twnqx> why not
[08:43:12] <tzanger> jadew: why not?
[08:43:18] <jadew> twnqx, it's the same protocol used by the open bench one
[08:43:20] <twnqx> 100-200MB should not be a problem
[08:43:25] <twnqx> MB/s
[08:43:35] <jadew> well, I guess if you can do that, the sky's the limit
[08:43:38] <twnqx> as long as you can shove up the data to the pc
[08:43:55] <tzanger> that's the point...
[08:43:56] <twnqx> 40MB/s is not a problem with ft2232
[08:44:03] <jadew> but keep in mind, sampling on one channel means 8 bits in one go
[08:44:08] <twnqx> yeah
[08:44:12] <twnqx> 40MHz :P
[08:44:15] <jadew> so if you'd sample at 200Mhz let's say, you'd have to transfer 200Mb
[08:44:19] <twnqx> +- usb latency
[08:44:28] <twnqx> yeah, needs usb 3.0 :P
[08:44:32] <jadew> yep
[08:44:42] <tzanger> isochronous transfers.. if you lose a frame you lose a frame
[08:44:55] <OndraSter> OTOH you do not need to transfer 200Mbit
[08:44:55] <tzanger> latency is constant then and you can work around it but again you're not detecting anything on hte PC, only storing
[08:45:08] <tzanger> in fact the FPGA could be pretty smart about it
[08:45:10] <OndraSter> you can not humanly perceive 200MHz signal
[08:45:11] <jadew> well, that's not acceptable for test equipment, losing frames
[08:45:15] <twnqx> OndraSter: of course, if there's an fpga already, you can compress in hardware
[08:45:27] <OndraSter> so you can either transfer the 200Mbit of data in a few seconds
[08:45:33] <twnqx> no, not acceptable
[08:45:38] <twnqx> you want to log the data
[08:45:41] <OndraSter> what are you trying to do?
[08:45:50] <twnqx> dropping is not an option.
[08:45:55] <jadew> yeah
[08:46:04] <jadew> we are discussing the posibility of a fast sampling logic sniffer
[08:46:08] <jadew> that stores data on the pc
[08:46:14] <jadew> rather than in onboard ram
[08:46:27] <OndraSter> Gbit ethernet
[08:46:33] <twnqx> too slow
[08:46:35] <twnqx> :P
[08:46:42] <tzanger> jadew: it's perfectly acceptable for hobbyiest grade
[08:46:43] <jadew> yeah, it's too slow
[08:46:50] <tzanger> dropping is a perfectly fine option
[08:46:51] <twnqx> pcie x4 or usb 3.0
[08:46:55] <twnqx> nah
[08:46:56] <tzanger> wtf guys seriously
[08:47:00] <jadew> tzanger, nah, one frame lost means bad timings
[08:47:10] <twnqx> no, you can have a blank interval
[08:47:12] <tzanger> fx2lp + fpga, isochronous transfers, you show dropped frames on the PC
[08:47:21] <twnqx> and the data you were looking for
[08:47:26] <twnqx> is exactly in the dropped frame
[08:47:33] <twnqx> the one single event you waited for for days
[08:47:41] <jadew> twnqx, in order to know about the drop interval you'd have to mark each sample with an id
[08:47:54] <jadew> we're already having trouble sending 8 bits
[08:47:54] <twnqx> i don't see the problem there?
[08:47:57] <tzanger> twnqx: if that's the case you run the test again
[08:48:00] <tzanger> this is a solved problem
[08:48:11] <tzanger> jadew: that is part of the isochronous USB spec
[08:48:18] <twnqx> trouble sending 8 bits? you did something VERY wrong then
[08:48:23] <tzanger> jadew: that's because you're using a damned PIC
[08:48:27] <jadew> ah, so it knows when a frame was dropped?
[08:48:28] <jadew> oh btw
[08:48:32] <jadew> when a frame is dropped
[08:48:36] <jadew> you won't lose one sample
[08:48:40] <jadew> you'll lose a chunk
[08:48:47] <jadew> cuz you're not sending 1 byte at a time
[08:48:47] <tzanger> you lose one chunk (time since last sample) yes
[08:48:50] <twnqx> of course, single sample frames would kill the system
[08:48:51] <tzanger> again, not unusual :-)
[08:49:01] <tzanger> as I mentioned the FPGA could be smart about this
[08:49:07] <twnqx> simple enough
[08:49:12] <tzanger> don't send data (just a count of clocks) since last transmission
[08:49:17] <tzanger> that would REALLY drive your bandwidth down
[08:49:29] <twnqx> like i said, compression
[08:49:31] <jadew> tzanger, that's called RLE encoding :P
[08:49:34] <specing> you could have a FPGA PCI-express card that would just fill system RAM with the data
[08:49:40] <twnqx> probably simple per-channel RLE could hep
[08:49:41] <tzanger> sample at a gajillion samples per second if you want async and just transmit changes
[08:49:42] <jadew> the OLS is also implementing that
[08:49:45] <tzanger> jadew: yes, basically
[08:49:57] <tzanger> twnqx: nah just say "here's the last 16 bits + timestamp"
[08:50:08] <jadew> tbh, the only problem with the OLS seems to be the limited memory
[08:50:08] <tzanger> if one of the 16 changes, send the state of all 16 at that point
[08:50:20] <tzanger> jadew: the OLS is a store and forward system
[08:50:25] <jadew> if you could put say... 8MB of ram in there, it would be a perfect LA
[08:50:34] <tzanger> jadew: and it's got limited bandwidth which is an issue since it can't stream
[08:50:57] <jadew> tzanger, you mean data transfer bandwidh?
[08:51:01] <twnqx> tzanger: just put an SODIMM socket next to the fpga :P
[08:51:09] <tzanger> twnqx: :-)
[08:51:26] <tzanger> I am thinking the first proto will ahve a SDRAM on it, at least on the board but not populated
[08:51:37] <tzanger> fuck like I don't have enough projects that I have no time for!
[08:51:45] <jadew> heh
[08:51:49] <twnqx> i'd not go with onboard, unless i need dual ported sram or something else
[08:51:50] <OndraSter> 8GB DDR3 sticks
[08:51:52] <OndraSter> no problem mate
[08:51:56] <tzanger> why dual port?
[08:51:56] <jadew> well, it would deffinitely be interresting to see where it goes
[08:52:07] <twnqx> tzanger: sample & read for transfer up at the same time!
[08:52:12] <jadew> or what ondraster said
[08:52:15] <twnqx> you could use it as a circular buffer
[08:52:17] <tzanger> why?
[08:52:25] <twnqx> and retransmit lost frames!
[08:52:39] <tzanger> SDRAM is fast enough that you wouldn't have to worry about dual porting. the transfer to the PC does not have to be realtime
[08:52:47] <tzanger> you just prioritize the writes
[08:52:53] <twnqx> hm true
[08:53:06] <tzanger> but as I said I don't think there's any need for onboard RAM unless you need a circular prebuffer, which I thinkI can avoid by having hte PC do it
[08:53:07] <twnqx> probably use onchip fpga bram for burst size
[08:53:12] <tzanger> nah
[08:53:16] <tzanger> no buffering in the FPGA
[08:53:19] <twnqx> the latency kills!
[08:53:24] <tzanger> twnqx: why?
[08:53:34] <tzanger> latency is more or less constant with isochronous transfers
[08:53:35] <twnqx> 21clocks latency for ddr3 sdram :/
[08:53:54] <twnqx> so you want small onchip buffers to reduce ram random access
[08:54:12] <tzanger> 21 clocks at DDR3 clock speed of what, 500MHz? this is a problem for a system that is sampling no more than 30MHz?
[08:54:20] <twnqx> well
[08:54:22] <tzanger> why owuld you randomly access RAM?
[08:54:27] <twnqx> why go that low once you have the hardware in place :3
[08:54:33] <tzanger> if you've got RAM you're streaming to it
[08:54:45] <twnqx> 64bit ram modules
[08:54:50] <twnqx> => 64 channels!
[08:55:05] <tzanger> twnqx: FX2 can do maximum of 480Mbps. 480Mbps / 16 bit width is 30MHz max sample rate
[08:55:11] <jadew> you could do with less, like 16
[08:55:41] <twnqx> real data rate is like 40MB/s, doubt you get realistically above that on usb 2.0
[08:56:06] <tzanger> twnqx: I have not benchmarked FX2 but yes, there is overhead. FX3 I've personally benchmarked at 2.6Gbps real actual data transfer
[08:56:08] <OndraSter> I had issues pushing above 25 - 30MB/s
[08:56:09] <OndraSter> even on empty hub
[08:56:30] <twnqx> i saw the 40 on ft2232 in parallel mode connected to an fpga
[08:56:30] <tzanger> OndraSter: sure, but if you want high speed you don't use shit hardware between the device and hte PC. You also can't use a shit PC
[08:56:41] <OndraSter> how dare you call my PC shit :P
[08:56:45] <tzanger> the core2 I had before could only do 1.6Gbps. replace the motherboard with an i5 and I'm up at 2.63
[08:56:55] <twnqx> heh
[08:57:00] <OndraSter> from what?
[08:57:02] <theBear> yeah, older machines seem to top out around 20mb/second for mass storage/data kinda transfers, less obsolete ones i find sit just either side of 30mb/s for bulk stuff
[08:57:02] <twnqx> i still have a first gen nec usb 3.0
[08:57:10] <OndraSter> usb 3.0
[08:57:11] <OndraSter> ok
[08:57:15] <tzanger> I did not consider the core2 a slouch either, but its PCIe subsystem was clearly not able to push higher data rates
[08:57:35] <theBear> any day now i'll have my new core2duo replacing this here everyday machine, mon dieu it's fast !
[08:57:54] * twnqx eagerly waits for haswell
[08:58:05] <tzanger> my old workstation was a 6yo p4d, it was fine for all my needs until I was trying to do abig FPGA design
[08:58:22] <tzanger> I finally upgraded to a 24GB i7 system and that shaved a whopping 5min off the synth time... don't tell the wife. :-)
[08:58:29] <twnqx> lol
[08:58:37] <twnqx> 5 minutes... from what? :P
[08:58:43] <tzanger> 35min to 30min
[08:58:45] <tzanger> not worth the upgrade
[08:58:47] <tzanger> but again, shh
[08:58:49] <twnqx> yeah
[08:58:54] <OndraSter> I have got i5-2500k (if I need power I can OCit to 4.5GHz), 24GB RAM as well
[08:59:02] <OndraSter> plus GTX660Ti if I need GPU
[08:59:06] <twnqx> i have an old i7 950, 12GB:X
[08:59:15] <tzanger> I can put a hex core in this motherboard, but I am not paying the insane prices they have on those
[08:59:24] <Kev> tzanger c2d architecture is also 7yo
[08:59:26] * twnqx stares at i7-4770
[08:59:37] <tzanger> this is an i7-950. I like it. I'm running esxi on it right now and not sure if I'll keep it that way
[08:59:37] <twnqx> tzanger: yeah, i was thinking
[08:59:59] <twnqx> i7-4770 haswell, or just replace the 950 with 980/990
[09:00:05] <jadew> tzanger, what's a hex core? like a mcu emulator?
[09:00:12] <tzanger> Kev: yep. but PCIe gen1 is 250MB/sec
[09:00:15] <OndraSter> haha jadew
[09:00:15] <twnqx> 6 cores instead of 4
[09:00:34] <jadew> oh
[09:00:37] <jadew> we're talking PC's
[09:00:51] <jadew> I was thinking FPGA, wasn't paying attention for a bit :P
[09:00:53] <OndraSter> I thought you were talking like beaky :(
[09:00:55] <tzanger> jadew: yeah, wake up. it's like 5pm there
[09:01:07] <twnqx> 15:46 here
[09:01:12] <twnqx> perfect time to grab a coffee
[09:01:14] <jadew> 16:47
[09:01:15] <tzanger> actually it's time for Ursus.
[09:01:21] <jadew> haha
[09:01:41] <tzanger> we couldn't get that here for a long time, now it's available
[09:01:48] <tzanger> although I'm hooked on Krombacher now
[09:01:51] <tzanger> damn file beer
[09:02:06] <twnqx> ... krombacher?
[09:02:07] <tzanger> er fine
[09:02:08] <twnqx> in canada?
[09:02:10] <tzanger> yep
[09:02:15] <twnqx> wow
[09:02:19] <jadew> I used to enjoy Zipher, if you guys are importing it
[09:02:21] <twnqx> didn't know they sell internationally
[09:03:03] <tzanger> Ontario actually has a decent beer selection, I drink all kinds of worldwide beers... Pilsner Urquell, Tusker, Krom, Tuborg...
[09:03:15] <twnqx> heh
[09:03:20] <twnqx> kingfisher? :P
[09:03:20] <OndraSter> pilsner urquel... is it the American one?
[09:03:21] <tzanger> I like Tsing Tao too
[09:03:32] <OndraSter> try getting Svijany there, it is a czech beer
[09:03:33] <twnqx> OndraSter: very unlikely
[09:03:35] <OndraSter> no idea if they export
[09:03:36] <tzanger> don't thnk so, we have american beer but nobody drinks that stuff
[09:03:44] <tzanger> I wish I could get Yuengling here, that's a decent american beer
[09:04:10] <tzanger> http://www.lcbobeergarden.com/?inboundBeerGarden
[09:04:18] * twnqx wonders if that name is from german or from chinese
[09:04:46] <tzanger> twnqx: Yeungling? it's german. pittsburgh microbrew, or was microbrew
[09:05:02] <twnqx> then they misspelled it on purpose
[09:05:06] <twnqx> :(
[09:05:19] <tzanger> not sure. gotta remember the pennsylvania dutch *are* dutch after all. :-)
[09:05:40] <twnqx> though i guess pronounciationwise it is closer with a Y if you're speaking english
[09:06:27] <jadew> tzanger, if you do any work on the LA, keep us posted, I'd like to see where that goes
[09:06:46] <OndraSter> I have got a logic analyzer... with CRT screen
[09:06:50] <OndraSter> 128 samples @ 32 channels :)
[09:06:56] <jadew> personally, I'd prefer buffering onboard and transferind the data after, reliably
[09:07:09] <jadew> OndraSter, heh
[09:07:28] <jadew> that sounds like you could sniff a few bytes over UART
[09:07:32] <OndraSter> yeah
[09:07:45] <jadew> IF you're using the right sampling speed
[09:07:48] <OndraSter> schlumberger 7600E, but I can't find anything about it on the internet
[09:08:02] <OndraSter> plus whatevernumber for the 32 channel expander
[09:08:15] <tzanger> OndraSter: I have an old 192-channel Tek 1284
[09:08:16] <OndraSter> it is 19" rackmount capable even :D
[09:08:25] <OndraSter> GPIB..
[09:08:38] <tzanger> yep GPIB, instruction decode, etc. :-)
[09:08:47] <OndraSter> that's too complex for this :D
[09:08:52] <OndraSter> even no serial decode
[09:09:15] <OndraSter> I was wondering if I could hack it, but there are 17 (!!!) EEPROMs in there :D
[09:09:27] <OndraSter> and without schematics it is impossible
[09:09:49] <jadew> what's the max sampling speed?
[09:09:53] <OndraSter> no idea
[09:09:58] <OndraSter> the simple sheet in it does not say that
[09:10:02] <OndraSter> and internet does not say anything
[09:10:13] <OndraSter> I think it was 50 or 100MHz by internal sampling I think
[09:10:16] <jadew> I guess you could find out using a signal gen
[09:10:16] <OndraSter> internal clock
[09:10:27] <jadew> ah ah
[09:11:22] <jadew> 100Mhz would be decent, but 128 samples is not enough to get decent resolution on more than a packet or two
[09:11:37] <OndraSter> yep
[09:12:15] <jadew> 512 RAM, could be implemented with a attiny :P
[09:12:41] <OndraSter> attiny cannot sample inputs at 100MHz :P
[09:12:50] <jadew> true :P
[09:13:01] <jadew> but we don't know for sure that that one does either :P
[09:13:08] <OndraSter> let me power it up
[09:13:20] <robotustra> good morning
[09:13:25] * robotustra http://www.youtube.com/watch?v=Yw-6LMWftaA
[09:13:34] <jadew> you should take some photos and post them somewhere, the internet is lacking content about it
[09:14:46] <jadew> morning robotustra
[09:14:50] <jadew> I'm off to work
[09:14:54] <theBear> yeah, the internet doesn't have photos, go take some and post them somewhere, think of the internet man !
[09:15:06] <OndraSter> 10ns sampling
[09:15:21] <jadew> so 100Mhz
[09:15:25] <jadew> that's nice
[09:15:46] <jadew> theBear, I was thinking more about myself, I'd like to see how a proper LA looks like
[09:16:05] <jadew> I'm sure it was bad ass back in the day
[09:16:56] <OndraSter> yep
[09:17:52] <jadew> OndraSter, does it work like a scope? so it keeps decoding the data and displaying it on the screen?
[09:18:17] <OndraSter> no, it can not do continuous stuff
[09:18:54] <OndraSter> ugh, somebody's selling Sun Cobal Qube 2... auction ends in 4h 12mins, it is now over $30
[09:19:18] <OndraSter> 250MHz... SPARC? 64MB RAM, 10GB HDD (SCSI I presume)
[09:20:24] <jadew> I just read the wiki entry and still don't know what it is
[09:20:27] <jadew> http://en.wikipedia.org/wiki/Cobalt_Qube
[09:20:38] <jadew> The Cobalt Qube was a computer server appliance product line developed by Cobalt Networks, Inc. (later purchased by Sun Microsystems) featuring a modified Red Hat Linux operating system and a proprietary GUI for server management. The original Qube systems were equipped with RM5230 or RM5231 microprocessors but later models used AMD K6-2 chips. NetBSD operating system has been ported to both the Cobalt Qube and RaQ (see External links).
[09:20:45] <jadew> WHAT DOES IT DO?
[09:20:53] <theBear> oh, wasn't paying attention, but only 'cos your comment was so blatantly generic and without definite meaning :)
[09:21:15] <theBear> cobalt ? that's a modern one, pretty sure it's hypersparc not supersparc too
[09:21:32] <twnqx> cobalt... modern...
[09:21:35] <theBear> it used to be a desktop graphics workstation
[09:21:37] * twnqx drops off chair
[09:22:02] <theBear> a state of the art one with mystery and intrigue due to niche market hold
[09:22:05] <jadew> so nothing interresting
[09:22:14] * robotustra music http://www.youtube.com/watch?v=2rlYPb2plaY&list=RD02Yw-6LMWftaA
[09:22:38] <theBear> hey, until about 5 years back i was still compiling my own glibc/gcc on 50mhz supersparcs, 32bit, slow scsi hds, one of them only had a single 50mhz proc !
[09:22:53] <OndraSter> awesome
[09:22:53] <jadew> robotustra, that's a really good playlist
[09:22:59] <OndraSter> a lot of time you had
[09:23:24] <theBear> to the kitchen, hiyooooo AWAY!
[09:23:26] <jadew> lol
[09:24:17] <robotustra> sure, morning, monday, good playlist
[09:24:18] <jadew> here's an idea, hardware compiler
[09:24:24] <OndraSter> heh
[09:24:30] <OndraSter> hardware compiler..
[09:24:31] <jadew> code in => insta binary out
[09:24:34] <OndraSter> the question is.. why?
[09:24:38] <OndraSter> you could execute the code directly
[09:24:57] <jadew> well, to compile stuff for the PC
[09:24:59] <robotustra> jadew - you are talking about hardware compiler
[09:25:36] <jadew> well, yeah a compiler that compiles c++ let's say, in hardware
[09:25:41] <Horologium> port gcc to an fpga?
[09:25:44] <jadew> and outputs objects, or binary directly
[09:25:46] <jadew> yeah
[09:25:58] <jadew> I guess it would take more fpga's, but pretty much
[09:26:23] <jadew> then I could hit build and have the build done in 1 second instead of 5 minutes
[09:26:40] <OndraSter> sounds like a challenge
[09:26:54] <jadew> I'm sure it's doable
[09:27:05] <tzanger> heh
[09:27:06] <Horologium> jadew, this computer can build the entire linux kernel and modules in under 3 minutes.
[09:27:08] <jadew> and I'm sure it would be something each programmer would want
[09:27:10] <Horologium> and it's 10 years old.
[09:27:23] <jadew> well, the linux kernel is not that big
[09:27:32] <Horologium> imagine what a properly configured modern system could do.
[09:27:41] <jadew> I know what they can do :P
[09:27:47] <jadew> I'm doing that every day, it sucks
[09:28:07] <Horologium> what takes so long in compiling is disk i/o
[09:28:33] <jadew> when the projects get really large and there are lots of references between files, the compilation time will start increasing
[09:28:47] <Fleck> help, http://www.atmel.com/Images/Atmel-8127-AVR-8-bit-Microcontroller-ATtiny4-ATtiny5-ATtiny9-ATtiny10_Datasheet.pdf << page 65 there is a equation - does fclk_i/o is in Hz or MHz ? And output freq. is in Hz?
[09:29:39] <jadew> Hz
[09:30:03] <jadew> MHz is in Hz too, it's just 1000 of them
[09:30:20] <jadew> 1000 0000
[09:30:21] <jadew> sorry
[09:30:26] <jadew> fuck
[09:30:29] <jadew> 1 000 000
[09:30:33] <OndraSter> dem zeroes
[09:30:52] <robotustra> jadew - before start doing this hardware compiler al errors in it should be fixed
[09:31:24] <jadew> robotustra, well I would think you could upload firmware all the time, so you could update it
[09:31:46] <jadew> anyway, I have to pay more attention to work cuz I'm making mistakes, ttyl
[09:41:29] <robotustra> jadew, I'm tired of fast changing standards and libraries
[09:41:48] <robotustra> I want 1 compuler for 50 years
[09:42:19] <jadew> well, the compiler might work 50 years later too, but the language will surely evolve
[09:42:40] <jadew> even C++ has a new version every now and again
[09:46:22] <robotustra> jadew: I'm talking about this
[09:48:52] <theBear> brainfuck never evolved, and it's as useful now as it ever was !
[09:49:01] <jadew> heh
[09:49:39] <robotustra> theBear: it's better to write code in machine codes than in brainfuck
[09:49:52] <theBear> "i better get back to work, there's this big project due and i've gotta type another 2000 lines of punctuation by 4pm !"
[09:50:14] <robotustra> theBear: GO GO GO!
[09:51:11] <theBear> robotustra, oh i know, i can do asm easy enough, it makes sense, brainfuck is just kinda, a huge brainfuck mix of what it might be like if you radically reduced the usefulness and scope of asm then insisted that even this skeleton must only be defined through STUPID punctuation, strictly and ONLY stupid punctuation :)
[09:52:15] <robotustra> yes, but I'm seriously think about using Forth in embedded prortamming
[09:53:04] <robotustra> I always liked reverce Poland notation
[09:53:32] <tzanger> perverse polish notation :-)
[09:53:43] <robotustra> yep
[09:53:52] <robotustra> 2 3 + x =
[09:55:39] <robotustra> yesterday night read how to make metallization of holes in PCB at home
[09:56:17] <robotustra> I'm not sure I'll find all chemicals
[09:59:36] <tzanger> robotustra: oh? plating?
[10:04:42] <robotustra> yes
[10:05:40] <beaky> hello
[10:05:47] <beaky> how do pin change intrrupts work
[10:10:36] <timemage> beaky, look for AVR1200 and AVR1201.
[10:11:26] <beaky> ah
[10:13:22] <beaky> so PCINTs, regardless of the actual pin, will jump to the same address?
[10:13:28] <beaky> I mean to the same isr*
[10:13:44] <beaky> and there can be multiple PCINTs
[10:14:06] <beaky> How do you figure out which pin was the one that triggered the pcint?
[10:14:21] <timemage> beaky, by saving old copies and inspecting.
[10:15:02] <beaky> ah
[10:16:23] <timemage> beaky, actually, that was mentioned in at least AVR1200. "It is up to application code to solve the handling by keeping track of previous pin values and then in the interrupt routine scan the present pin values to check which pin has changed. ".
[10:16:42] <beaky> ah
[10:16:48] <beaky> so I just poll my pins at that moment
[10:17:12] <beaky> and and them with the previous ones?
[10:17:31] <timemage> beaky, right. this just sort of assists in that effort. if you want something more controllable you can the limited number of INTn sources you have.
[10:18:26] <beaky> so in the ISR I have to be very fast enough to catch which pins were at the level I want :D
[10:19:02] <OndraSter> isn't there actually a PCINT status reg?
[10:19:27] <beaky> ah
[10:19:52] <OndraSter> dunno, I work either with INTs or xmega which has got a ... bit different pin interrupt stuff
[10:20:03] <OndraSter> check datasheet
[10:20:04] <OndraSter> #1 rule
[10:25:20] <beaky> I love the datasheet
[10:27:05] * robotustra Elvise never die http://www.youtube.com/watch?v=MraHwvDaVlI&list=RD02Yw-6LMWftaA
[11:05:09] * robotustra http://www.youtube.com/watch?v=I6i9EPz-K6U and go do some work
[11:05:56] <Tom_itx> http://www.electronicproducts.com/Passive_Components/Circuit_Protection/Littelfuse_will_host_10_winners_for_Speed2Design_TechTalks_at_NASA.aspx
[11:11:54] <robotustra> hm "Winning design engineers will get an opportunity to go behind the scenes to spend time with NASA engineers at two premiere NASA facilities."
[11:12:19] <robotustra> Tom_itx: BTW on your site there are some broken links
[11:12:47] <robotustra> to external robotics sites
[11:12:50] <Tom_itx> possibly
[11:12:54] <Tom_itx> things change
[11:13:14] <Tom_itx> i haven't looked at external links in a long time
[11:13:37] <Tom_itx> except the baudrate calc, fuse calc and a couple others
[11:16:04] * robotustra what a pleasure to work at home
[11:16:26] * robotustra nobody fuck your brain
[11:17:48] <specing> s/at home/in the refrigerator/
[11:28:29] <robotustra> specing: cold? I have 26 degree
[11:29:16] <robotustra> or you mean that I poke my nose in the fridge to eat something during the work? ;-)
[11:30:40] <robotustra> Tom_itx: are you serious about speed design?
[11:31:31] <beaky> how do I make my programmer faster
[11:31:55] <robotustra> beaky: are you in a hurry?
[11:32:11] <beaky> nope
[11:32:16] <robotustra> so?
[11:32:26] <beaky> my programmer takes 2 seconds to burn firmware to my avr
[11:32:39] <beaky> but it's probably too slow
[11:32:40] <robotustra> mine is 30 secs
[11:32:51] <beaky> wow you have a big program :D
[11:32:58] <robotustra> sure
[11:33:10] <robotustra> and big memory
[11:33:12] <specing> wow, 30s is huge
[11:33:13] <beaky> ah
[11:33:16] <specing> 128KB ?
[11:33:20] <robotustra> yes
[11:33:25] <specing> hollycrap
[11:33:39] <robotustra> but you can switch off verify program
[11:33:48] <robotustra> it will spid up a little
[11:33:55] <robotustra> speed*
[11:35:00] <robotustra> yeah, fkn huge pile of code, should rework it soon
[11:44:32] <Badaboom> yawn =1;
[11:44:35] <Tom_itx> <robotustra> Tom_itx: are you serious about speed design?
[11:44:36] <Tom_itx> ??
[11:45:24] <Badaboom> So i need a new programmer,, mine is acting to erratic
[11:45:31] <robotustra> do you think that good design can be done FAST?
[11:46:29] <Tom_itx> who said that?
[11:46:35] <robotustra> GOOD and FAST it's two uncompatible states, I usually use 1 bit to encode them
[11:46:53] <Tom_itx> Badaboom i can fix you right up :)
[11:47:17] <Badaboom> lmao, I am on your site as we speak
[11:47:22] <Tom_itx> heh
[11:48:13] <megal0maniac_afk> DON'T GET THE BOXED ONE!
[11:48:24] <Badaboom> ?
[11:48:32] <Horologium> I like my boxed one.
[11:48:40] <megal0maniac_afk> Boxes are for pansies who don't want to know what's going on inside :)
[11:48:50] <Badaboom> lmfao
[11:49:00] <Badaboom> yes precious
[11:49:12] <megal0maniac_afk> :P
[11:49:26] <megal0maniac_afk> Tom_itx's programmers are good. Boxed or not. Get one
[11:49:28] <tzanger> robotustra: actually I think it's works, fast, cheap: pick any two. :-)
[11:49:47] <Badaboom> Oh look,, it comes with a free toaster
[11:49:49] <megal0maniac_afk> tzanger: Unless China
[11:49:50] <Badaboom> jk
[11:50:06] <tzanger> megal0maniac_afk: then it's pick any one.
[11:51:17] <Badaboom> Im gonna have to wait till tomorrow anyways,, Tom,, how long for shipping,, Im near Tampa, FL
[11:51:49] <Tom_itx> i send out usually the same day unless it's close to closing time
[11:51:54] <Tom_itx> probably 2-3 days
[11:52:15] <Badaboom> rgr,, itll be in the morning,, probably the mkii ,,the "naked one"
[11:52:39] <Tom_itx> i kinda like it better anyway :)
[11:52:47] <Tom_itx> i like the 'openness' of it
[11:52:47] <robotustra> IMHO all prototypes should look like http://www.youtube.com/watch?v=Eiq2CNpEbtc&t=995
[11:52:51] <Horologium> can't mail it today anyhow.
[11:52:55] <Badaboom> Yeah,, ive never been one for cases myself
[11:53:00] <Badaboom> yup:)
[11:53:06] <Tom_itx> some ppl asked for a box so i made one
[11:53:14] <Badaboom> ahh i see
[11:53:19] <Tom_itx> i think it turned out rather well as boxes go
[11:53:32] <Badaboom> looks good
[11:53:47] <Horologium> and works fine.
[11:53:52] <Badaboom> comes with a cable or i need 1?
[11:53:52] <Horologium> I gots one.
[11:54:08] <Badaboom> miniusb
[11:54:12] <Tom_itx> comes with what you see
[11:54:19] <Badaboom> rgr
[11:54:20] <Tom_itx> no usb but a 6pin isp
[11:54:29] <Badaboom> kk
[11:54:44] <Badaboom> Ive got severat usb minis and mircos here anyways
[11:54:56] <Tom_itx> most ppl do
[11:55:03] <Badaboom> and a to b's for that matter
[11:57:00] <megal0maniac_afk> Limb: You need new internet
[11:58:28] <Badaboom> Tom: studio will pick up on this from what im reading correct?
[11:58:30] <Horologium> kill it! kill it with fire and high voltage! no microchip in here!!!
[11:58:31] <Badaboom> 6.1
[11:58:34] <Tom_itx> yes
[11:58:37] <Badaboom> kk
[11:58:47] <Tom_itx> 4 5 6 6.1 avrdude windows linux osx
[11:58:53] <Badaboom> nice
[11:59:38] <megal0maniac_afk> Tom_itx: Is the libusb filter thingy sorted? iirc, customers used to pick avrdude or studio
[11:59:59] <Tom_itx> not that i'm aware of
[12:00:11] <Tom_itx> you still should pick one or the other
[12:00:19] <megal0maniac_afk> Oh
[12:00:35] <Tom_itx> i had a guy in Hawaii that got 2, one for studio and one for libusb :)
[12:00:47] <Horologium> put different firmware on them?
[12:00:48] <Tom_itx> just changed the serial no
[12:01:10] <Horologium> aahh.
[12:01:19] <Tom_itx> you can do that yourself if you feel like messin with LUFA
[12:02:06] <Tom_itx> or i would by request
[12:02:31] <megal0maniac> Tom_itx: What does the pgm button do?
[12:02:56] <Tom_itx> puts it into program mode so you can upload the new firmware to the programmer
[12:03:04] <Tom_itx> just like any other avr usb chip
[12:03:07] <Tom_itx> i tied HWB low
[12:03:13] <Tom_itx> to make it a 1 button thing
[12:03:23] <megal0maniac> Ah, cool :)
[12:03:39] <Tom_itx> my original design had 2 buttons
[12:08:12] <megal0maniac> RikusW went overboard with his two buttons. You can reset, change between like 6 modes and still access it from your own code
[12:08:34] <megal0maniac> But it's more of a dev board than a programmer :)
[12:09:33] <Tom_itx> i don't have his but what i can tell it's a good board
[12:10:39] <robotustra> I prefer 1 button and correct loader
[12:10:53] * robotustra GIVE IT TI ME!
[12:11:22] <megal0maniac> It's just a pity it's a u2 and not a u4. And a pity that the two aren't pin compatible :P But it's pretty capable either way
[12:13:40] <megal0maniac> It doesn't have an ADC, so Vtg is tied to Vcc. So it can power the target which can either be useful or dangerous.
[12:14:08] <megal0maniac> Like most things, safe if you're mindful of it
[12:15:33] <Tom_itx> i use the level shifter for that
[12:16:47] <megal0maniac> For measuring Vtg?..
[12:23:57] <microchip_sac> hello all
[12:24:07] <microchip_sac> i have a [basic] question --
[12:24:30] <microchip_sac> in any one of the sleep modes of an avr
[12:24:38] <microchip_sac> except idle
[12:25:06] <microchip_sac> are all peripherals (timers, serial interfaces, etc.) turned off?
[12:25:50] <microchip_sac> im trying to use the usart on a mega8535 right after waking up from power-down mode
[12:26:02] <microchip_sac> but its not working (works fine in idle mode)
[12:28:23] <robotustra> microchip_sac: may be you have to make a delay to wake up?
[12:28:29] <RikusW> megal0maniac: had I know what I know now U2S would have been U4S ;)
[12:29:06] <RikusW> though the u4 pinout is messedup
[12:29:23] <RikusW> would be more difficult to route on a pcb
[12:53:58] <megal0maniac> RikusW: You sure it wouldn't be an xmega32a4u or similar? :P
[12:54:38] <megal0maniac> The new E series comes in 32 pin tqfp but doesn't have USB :( Next smallest is 44pin
[12:57:19] <twnqx> lol @ page title "Datasheet Links for Google Index and those who find them."
[13:14:49] <RikusW> megal0maniac_afk: using xmega is problematic as an HVPP programmer
[13:16:59] <RikusW> HVPP wants 5V signals...
[13:16:59] <RikusW> and the GTL level translator translates either down or up not BOTH.... :(
[13:16:59] <RikusW> so I'll have to find another translator chip...
[13:16:59] <RikusW> so the target chip will either be 1.8 - 3.3 or 3.3 - 5V
[13:17:00] <RikusW> unless running the xmega at 1.8v
[13:18:23] <twnqx> want a reference for one that doesn't care?
[13:19:01] <twnqx> 74lvhc2t45dc @ RikusW
[13:19:10] <twnqx> 74lvch2t45dc @ RikusW
[13:20:09] <twnqx> i am using them in my jtag adapter, 3.3V on side, tested with 2.5 and 5 on the other
[13:20:55] <RikusW> great :)
[13:21:01] <RikusW> I'm using GTL2000DL
[13:22:20] <RikusW> that seems like the ideal ic to use for Altera byteblaster II :)
[13:22:30] <RikusW> if you have a parallel port that is
[13:23:10] <twnqx> no idea, i put them on a ft2232 :P
[13:25:26] <RikusW> btw GTL2003 etc are also made by NXP
[13:25:49] <robotustra> does anybody here do PCBs at home?
[13:26:21] <twnqx> far too messy
[13:26:28] <twnqx> and too much effort
[13:26:43] <RikusW> robotustra: I've managed to do a few
[13:27:14] <robotustra> I'm interesting in doing multilayer PCBs with holes plating
[13:27:35] <RikusW> ask hackvana
[13:27:46] <RikusW> he'll make them for cheap
[13:28:06] <RikusW> I'm not even going to attempt plating, (not anytime soon)
[13:28:44] <robotustra> twnqx: milling PCB is not so messy
[13:28:48] <RikusW> robotustra: do you mean design or actual fabrication ?
[13:28:58] <twnqx> fabbing
[13:29:11] <RikusW> PTH is not for beginners...
[13:29:12] <twnqx> robotustra: but 0.5mm structures are LARGE :P
[13:29:37] <robotustra> twnqx: no, it's GOOD!
[13:29:42] <twnqx> i need 0.2mm for most of my ICs
[13:29:52] <twnqx> 0.5mm pitch = 0.25 track/space
[13:29:54] <robotustra> I can try
[13:30:17] <robotustra> right away
[13:30:45] <robotustra> I'll mill and test what spacing do you need?
[13:31:03] <twnqx> 0.25mm minimum, though i usually use 0.15
[13:31:27] <twnqx> anyway, solder resist will need photo masking anyway
[13:31:36] <twnqx> and ENIG plating...
[13:32:13] <twnqx> guess i'll just stick to fabbed PCBs :P
[13:32:32] <robotustra> 0.15mm I can
[13:32:37] <robotustra> easy
[13:33:06] <twnqx> make a grid, 0.15 milled away, 0.15 left, 0.15 milled, 0.15 left, a few traces parallel
[13:33:24] <robotustra> ok
[13:39:14] <hackvana> twnqx: Good luck making boards like that at home
[13:39:26] <twnqx> why me
[13:39:29] <twnqx> i don't bother
[13:39:57] <twnqx> too much chemistry, and not interested in electroplating
[13:39:59] <hackvana> twnqx: "guess I'll just stick to fabbed PCBs"
[13:40:08] <twnqx> exactly
[13:40:11] <hackvana> robotustra: Good luck making boards like that at home.
[13:40:15] <twnqx> fabbed by seed, itead, or you :P
[13:40:18] <hackvana> When I make boards at home I can reliably do 6 to 7 mil.
[13:40:35] <hackvana> My standard boards are 6/6mil, I can do 4mil by arrangement.
[13:40:48] <RikusW> and extra fees ?
[13:40:49] <twnqx> btw, can you aldo do 2oz copper?
[13:40:52] <twnqx> also*
[13:40:59] <hackvana> 4mil will be EXPENSIVE
[13:41:41] <hackvana> 2oz copper is not terribly expensive. For example, in the #hackvana channel I just quoted someone USD58 for 5 boards of 10x10cm.
[13:42:09] <twnqx> right, i'll drop by when i decided on the design :)
[13:42:17] <hackvana> You're very welcome
[13:42:39] <hackvana> Even if you're not after PCBs, it's still a cool place to hang. RikusW does! :-)
[13:45:10] <twnqx> uh, is China RoHS stricter than EU RoHS? i just found part tat complies with EU but not with china :S
[13:45:19] <beaky> hello
[13:45:22] <hackvana> Other #avr who hang out in #hackvana: DrLuke, eatyourguitar, Lt_Lemming, OndraSter, solexious, and TechIsCool.
[13:45:24] <beaky> what does RoHS mean?
[13:45:36] <hackvana> Restriction on Hazardous Substances
[13:45:39] <twnqx> recuction of hazardous substances
[13:45:47] <twnqx> reduction (at least i though)
[13:45:49] <DrLuke> hi
[13:45:49] <hackvana> en.wikipedia.org/wiki/RoHS
[13:46:11] <twnqx> right. hackvana knows better :)
[13:46:16] <hackvana> Neither of us got it 100% right :-)
[13:47:38] <hackvana> I suggest you google for RoHS China, you will get many good quality links that will tell you everything you want to know.
[13:48:08] <beaky> ah nice
[13:48:20] <beaky> so it's like forbidding toxic metals
[13:48:36] <twnqx> that's the idea, yes
[13:48:48] <twnqx> not only metals, bus substances
[13:49:00] <beaky> and making electronics nice and recyclable and environmentally friendly and clean, green, and sustainable, OSHA compliant, and other environmental buzzwords?
[13:49:03] <beaky> ah
[13:51:08] <hackvana> beaky: Short answer: yes
[13:52:02] <specing> fuck RoHS
[13:52:11] <specing> unsolderable shit
[13:52:17] <twnqx> huh
[13:52:22] <twnqx> never had problem with that
[13:52:34] <beaky> so some things that are verboten under RoHS are very useful in electronics?
[13:52:39] <twnqx> lead.
[13:52:55] <twnqx> reduces the melting point of solder by 30-40°C
[13:53:04] <twnqx> (compared to modern lead free solder)
[13:54:05] <specing> I had to reflow the NVidia GPU on the card in my laptop due to RoHS solder not sticking, so... NOPE.gif
[13:54:25] <twnqx> that's the problem from the transition period
[13:54:27] <twnqx> unlucky you
[13:54:31] <specing> Actually it fractured
[13:54:38] <specing> It works now
[13:54:51] <twnqx> it's a non-issue these days
[13:54:55] <specing> A 20s session with a heatgun fixed it
[14:04:54] <theBear> i was just musing shakespeare style at a netbook that a little warm air will almost certainly fix 5 mins ago
[14:05:29] <thetruthisoutthe> h
[14:05:35] <Tom_itx> w
[14:05:50] <theBear> :) GENTLEMEN BEHOLD !
[14:10:35] <Fleck> jadew: still here?
[14:10:50] <jadew> yeah, why?
[14:11:10] <Tom_itx> just taking roll call
[14:11:19] <jadew> heh
[14:11:20] <Fleck> if Hz, then, i'ts not possible to set up audiable freq with prescaler disabled and 8MHz clock, right?
[14:11:40] <jadew> was that for PWM?
[14:11:45] <Fleck> yeah
[14:12:20] <jadew> the pwm can go up to 1024 tops, right?
[14:12:25] <jadew> ah, wait
[14:12:29] <jadew> the duty cycle doesn't matter
[14:12:31] <jadew> yeah
[14:12:42] <jadew> 8 Mhz, with no prescaller == 8Mhz frequency
[14:12:47] <jadew> unless you're doing CTC
[14:12:48] <Fleck> 8-bit timer
[14:13:18] <Fleck> I mean not tick, but TOP/MAX
[14:13:20] <jadew> then you get to set the frequency by changing the configuration of the OCRxsomething
[14:14:11] <jadew> Fleck, it depends on the configuration of your timer
[14:15:58] <jadew> but really... no matter how high the frequency, if the output is not hardware controlled, you can use your own counters and only output things each X ticks
[14:16:42] <jadew> like, if you have no prescaller and you have an ISR on overflow
[14:17:05] <jadew> since it's an 8-bit timer, it would overflow every 256 ticks, then in the ISR you could do
[14:17:28] <jadew> ++count; if (count == 100) { count = 0; trigger something; }
[14:18:46] <Fleck> sure
[14:30:43] <thetruthisoutthe> what is the minimum eeprom write voltage for the 1.8V atmega pa types?
[14:30:59] <thetruthisoutthe> 1.75V ?
[14:31:53] <beaky> I will run my avr on a 9V battery. How do I minimize its power consumption?
[14:32:16] <thetruthisoutthe> good question.... some ultralow idle current regulator would be needed
[14:32:57] <beaky> I am using an atmega16L, I guess the L means low voltage?
[14:33:09] <thetruthisoutthe> yep that would work from 1.8V too
[14:33:25] <beaky> ah 9V is plenty then :D
[14:33:40] <thetruthisoutthe> get a CR2032 then
[14:33:42] <thetruthisoutthe> :)
[14:33:53] <thetruthisoutthe> go to power save mode, and it will last some time
[14:34:01] <beaky> lol
[14:34:09] <twnqx> what is P(max) for an IGBT - maximum power dissipation?
[14:34:20] <thetruthisoutthe> twnqx <= what package? type?
[14:34:22] <twnqx> or maximum pass-through power?
[14:34:31] <Fleck> jadew: just making sure - w/o prescaler I will not be able to get audiable freq. on overflow interrupts
[14:34:31] <twnqx> no, the meaning of p(max)
[14:34:40] <twnqx> not some particular value
[14:34:47] <twnqx> http://ixapps.ixys.com/DataSheet/DS100484A(IXYH-P20N120C3).pdf
[14:35:15] <thetruthisoutthe> twnqx <= oh, that is some theoretical value you may never reach
[14:35:19] <twnqx> i suppose that a 96A device won't be limited to 278W passthrough, though... so i guess it's dissipation
[14:35:51] <thetruthisoutthe> that refers to the device power dissipation
[14:35:57] <twnqx> 'k
[14:36:10] <thetruthisoutthe> maximum that will not cause fusing/destruction of the device instantly
[14:36:19] <twnqx> hm, only 50khz
[14:36:39] <thetruthisoutthe> note the SOA curve instead, you need that
[14:37:54] <twnqx> is the gate resistance what compares to RDS(on) from mosfets?
[14:38:01] * twnqx tries direct comparison...
[14:38:19] <thetruthisoutthe> no
[14:38:27] <twnqx> guess i'll pull a beaky on it, just plug it in and see what happens
[14:38:28] <thetruthisoutthe> it is internal gate resistance
[14:38:57] <twnqx> should not be more than 400V, 5-10A
[14:39:07] <thetruthisoutthe> an igbt is a different device
[14:39:25] <thetruthisoutthe> acts like a mosfet/bipolar hybrid
[14:39:35] <twnqx> yes, i read that much
[14:39:49] <OndraSter> gate resistance?
[14:39:50] <twnqx> but i still can't find the number that lets me predict static and switching losses :X
[14:39:54] <OndraSter> is it gate isolation?
[14:40:10] <thetruthisoutthe> no
[14:40:26] <thetruthisoutthe> gate leakage is usually <+-1uA
[14:40:50] <twnqx> 1700V, 200A... those are some powerful devices :S
[14:40:58] <thetruthisoutthe> you just need to charge/discharge the gate in a few ns to be efficient
[14:41:19] <thetruthisoutthe> that requires some current ;)
[14:41:55] <twnqx> the mosfet drives i intend to uses deliver +-2A
[14:41:58] <twnqx> drivers*
[14:42:11] <thetruthisoutthe> sounds fine
[14:45:09] <jadew> Fleck, yeah, you won't
[14:45:22] <Fleck> thx jadew! :)
[14:45:34] <thetruthisoutthe> who knows? :) will the mega pa's write/read eeprom correctly below 2.7V ?
[14:45:50] <jadew> Fleck, wait
[14:45:50] <tzanger> you guys really hate on beaky
[14:45:53] <jadew> I might be wrong
[14:46:09] <jadew> !php echo 8000000 / 256;
[14:46:09] <jadew> 31250
[14:46:12] <twnqx> thetruthisoutthe: so is there a clear indication when igbts are superior to mosfets?
[14:46:19] <tzanger> your mosfet drivers need to be able to charge/discharge a capacitor quickly, that's about it
[14:46:27] <thetruthisoutthe> twnqx <= no. sometimes mosfets are better
[14:46:29] <twnqx> of course
[14:46:38] <thetruthisoutthe> depends on what you want to use it foe
[14:46:53] <twnqx> i am still at primary side switched power supplies
[14:47:25] <twnqx> where the best mosfets in the right voltage/current range have an rds(on) of 250mOhm
[14:47:29] <thetruthisoutthe> then you decide
[14:47:39] <twnqx> decide
[14:47:43] <twnqx> like... experiment? :P
[14:47:44] <thetruthisoutthe> you may go for the latest magic fets
[14:47:55] <twnqx> superjunction fets, from what i read?
[14:48:01] <thetruthisoutthe> SiC
[14:48:05] <twnqx> uhhh
[14:48:08] <twnqx> silicon carbide...
[14:48:18] <twnqx> nice idea, haven't read into that:P
[14:48:26] <thetruthisoutthe> cree.com has some
[14:48:35] <thetruthisoutthe> 1kV mosfets with low RDS
[14:49:03] <twnqx> well, for low voltage synchronous rectification we have single digit rds(on)
[14:49:13] <thetruthisoutthe> but for high power and high voltage you want igbt or a huge mosfet module
[14:49:34] <twnqx> huge mosfets = high capacitance = high switching losses
[14:50:49] <twnqx> ugh, field stop IGBTs... what are those no
[14:50:50] <twnqx> w
[14:50:58] <thetruthisoutthe> not necessarily ...
[14:52:02] <thetruthisoutthe> twnqx <= one may find the best device for the application
[14:52:12] <twnqx> by testing \o/
[14:52:13] <thetruthisoutthe> you have your own ruleset
[14:52:30] <thetruthisoutthe> price/efficiency/size...
[14:52:44] <Fleck> so jadew?
[14:52:50] <Fleck> 31KHz? :)
[14:53:21] <jadew> well, 31 / 2
[14:53:39] <Fleck> why /2 ?
[14:53:54] <jadew> two edges
[14:54:21] <jadew> once every 1/31K you switch the edge
[14:54:34] <thetruthisoutthe> twnqx <= also note you may prefer a copack hexfred igbt
[14:54:52] <thetruthisoutthe> since bare igbts do not contain body diodes like mosfets
[14:55:06] <Fleck> ok, thx jadew
[14:55:11] <jadew> |_|-|
[14:56:21] <jadew> http://eenoob.com/pictures/waves/square.png
[14:56:34] <Fleck> yeah
[14:56:36] <jadew> starting from the left, a full cycle, is at the second edge
[14:57:01] <thetruthisoutthe> beaky <= if you get an mega with PA end they have about 1uA power consumption in low power 32768Hz mode :)
[14:57:26] <beaky> wow
[15:00:39] <thetruthisoutthe> beaky <= http://en.wikipedia.org/wiki/CR2032_battery
[15:00:55] <thetruthisoutthe> computers use this for backup too, and bike odometers...
[15:02:04] <thetruthisoutthe> 190mAh would last >190000 hours at 1uA discharge rate
[15:02:20] <jacekowski> + internal discharge rate
[15:02:43] <thetruthisoutthe> they will work for 10 years usually
[15:37:10] <twnqx> 80kHz hm
[15:39:33] <beaky> wow
[15:39:35] <thetruthisoutthe> go for 300kHz+, just for fun:)
[15:39:43] <beaky> so it can keep my traffic lights alive for a decade? :D
[15:39:50] <twnqx> no
[15:39:54] <beaky> and my robot car running for years? :D
[15:39:55] <beaky> ah :(
[15:39:55] <twnqx> i'm afraid only the controller
[15:40:05] <twnqx> the LEDs will eat more
[15:40:25] <thetruthisoutthe> twnqx <= well put on a solar cell, and a lifepo4 battery, then you may
[15:40:33] <thetruthisoutthe> i mean beaky
[15:41:26] <thetruthisoutthe> 1 cell lifepo4 is fine for your micro, and color leds
[15:41:45] <thetruthisoutthe> 3.65 fully charged, 2.5V zeroed
[15:42:55] <beaky> ah
[15:44:43] <beaky> xlent
[15:44:57] <beaky> no need for this 9V battery and voltage regulator then :D
[15:47:24] <thetruthisoutthe> a 7805 will eat about 1-10mA idle
[15:47:37] <beaky> ow
[15:47:46] <beaky> it gets quite warm too
[15:48:27] <thetruthisoutthe> that is because efficiency
[15:48:37] <thetruthisoutthe> it must heat the unused volts
[15:48:53] <Fleck> RJMP << always jumps?
[15:48:55] <thetruthisoutthe> *it must convert the unused volts to heat
[15:51:35] <robotustra> milling something
[15:51:43] <Fleck> where can I test different avr instructions in linux?
[16:03:32] <Xark> Fleck: RJMP = relative jmp. What do you mean "test"? Like an AVR simulator?
[16:04:03] <thetruthisoutthe> i usually burn the hex into a microcontroller and fire it up
[16:04:06] <Fleck> test like - write asm insctructions and see output, sreg status etc...
[16:04:42] <Fleck> I am not good at ASM, and would like to learn, but those... weak descriptions are not helping :/
[16:04:52] <Fleck> no clue what relative jump means
[16:05:04] <Xark> Fleck: "see output" is still ambiguous. You can run avr-as etc. to assemble AVR code and examine the listings, but if you want to "test execute" the code, then you need some kind of AVR simulator
[16:05:10] <Casper> mean "jump by x instructions"
[16:05:23] <Casper> rjmp +4 or rjmp -6 for example
[16:05:48] <Fleck> there is a label defined in asm code
[16:05:52] <Xark> Fleck: Relative address is + or - byte offset from current PC as opposed to an absolute address.
[16:05:53] <Fleck> then rjmp label
[16:06:03] <Fleck> PC?
[16:06:14] <Xark> Fleck: PC = program counter (currently executing instruction)
[16:06:19] <Fleck> ok
[16:06:41] <Xark> Fleck: The assembler will "do the math" to calculate offset to label for you.
[16:06:56] <Fleck> ohh, cool, good to know!
[16:07:53] <Xark> Fleck: I haven't used it, but if you want a simulator for AVR, you could check out http://gitorious.org/simavr
[16:07:57] <thetruthisoutthe> Fleck <= try the avr instruction set document from atmel
[16:08:28] <Fleck> thetruthisoutthe: ok, pdf downloaded!
[16:08:35] <Xark> Fleck: Yeah, if you don't already have it, download http://www.atmel.com/images/doc0856.pdf
[16:08:47] <beaky> why do I get a tingly feeling when I touch my electronics?
[16:09:07] <Fleck> also - what's __vectors: does?
[16:09:12] <Fleck> will PC skip it?
[16:09:21] <Fleck> or execute it?
[16:10:05] <Fleck> .section :/
[16:10:11] <Fleck> .bss :D
[16:10:13] <Xark> Fleck: Those are special address that the chip will jump to on reset or various interrupts.
[16:10:33] <Xark> Fleck: You might want to read http://jaxcoder.com/Projects.aspx?id=912541054
[16:12:17] <beaky_> hello
[16:12:17] <Fleck> ok, looks interesting! :D
[16:12:23] <Xark> Fleck: section is a "block" of assembled output. Typical sections are "code" (also called "text") for program instructions, "data" for initialized program data and storage and "bss" for uninitialized data and storage (usually zero'd at load),.
[16:12:32] <beaky_> .msg nickserv ghost beaky aekohbii
[16:12:38] <beaky_> oops
[16:12:55] <Fleck> change password beaky ;)
[16:12:58] <beaky> ;D
[16:13:19] <Fleck> Xark: hmm, assembled output? :/
[16:13:46] <Xark> Fleck: Yes, bytes the assembler turns your program into.
[16:14:07] <Xark> aka "executable program"
[16:14:35] * Xark notes you may have to run it through a linker before it is fully executable though...
[16:16:53] <Fleck> so - what would be the naked .asm file? just mainloop and do nothing?
[16:17:05] <robotustra> fuck
[16:17:07] <Fleck> do I need those .section, .bss etc?
[16:17:42] <Xark> Fleck: Not always. If you have none, it puts everything in a default "text" (code) segment.
[16:18:12] <robotustra> cnc can mill 0.15, but I have only 90 degree end mill
[16:18:46] <thetruthisoutthe> what?
[16:21:29] <beaky> what is cnc?
[16:21:52] <thetruthisoutthe> computer numerical control
[16:21:57] <theBear> computer numerical cont...dammit !
[16:22:14] <beaky> so it's like a 3d printer?
[16:22:36] <Horologium> or a 3d remover
[16:22:51] <Horologium> a cnc mill is a 3d remover.
[16:23:38] <Xark> Similar to a computer controlled "dremel" (or other cutting/drilling bit). You can make mechanical things and also printed circuits (milling away the copper).
[16:23:39] <beaky> ah so it's like an automatic carver
[16:24:40] <robotustra> I managed to set Z coortinate only from 6-th attempt
[16:24:47] <beaky> http://www.youtube.com/watch?v=RNPojGFg9-8 wow
[16:25:36] <robotustra> beaky: it's cnc lathe
[16:25:49] <robotustra> it's 2D
[16:26:09] <Horologium> 2.5D
[16:26:57] <robotustra> ok
[16:27:40] <thetruthisoutthe> 4D is the coolness
[16:27:42] <robotustra> http://www.youtube.com/watch?v=dx-ndeBo8Ng this is a 3D milling
[16:28:00] <thetruthisoutthe> milling hypercube
[16:28:47] <robotustra> thetruthisoutthe: not needed
[16:29:25] <thetruthisoutthe> but you can't mill hypercubes with a 3D mill :(
[16:30:40] <robotustra> thetruthisoutthe: let me mill 0.15 mm PCB first ;-)
[16:30:49] <robotustra> it's in process
[16:30:54] <robotustra> in progress
[16:30:54] <thetruthisoutthe> that is small, what you put on it?
[16:31:05] <thetruthisoutthe> a resistor is larger
[16:31:38] <robotustra> twnqx whander if my mill can resolve it
[16:31:48] <robotustra> I also wander it
[16:31:59] <robotustra> before I did only 0.5mm
[16:41:32] <Xark> thetruthisoutthe: Small dimensions like that are handy for fine PCB traces (e.g.).
[17:11:48] <Fleck> Xark: what's $ in asm?
[17:12:11] <Fleck> ldi r17,$10 ; Load constant in r17
[17:12:16] <Xark> Fleck: It depends on the assembler, there are few common conventions.
[17:12:26] <Xark> Fleck: In that case, I believe it indicates a literal value.
[17:12:40] <Fleck> as 0x10?
[17:12:51] <Xark> I..e., put number 10 into r17 (as opposed to contents of memory location 10).
[17:12:59] <Xark> No, I don't believe $ is hex in avr-as
[17:13:29] <Xark> Think of it as ldi r17,#10 (but they use # for comments...)
[17:13:55] * robotustra I did it 0.15mm, http://tinypic.com/view.php?pic=2uh704z&s=5
[17:14:07] <Fleck> so ldi r17, 10 << what's the difference Xark?
[17:14:21] <Xark> Fleck: I believe that will load from memory location 10
[17:14:27] <Fleck> ohh
[17:14:33] <robotustra> actually I can better if I had 20 degree mill
[17:14:47] <Xark> Or actually it may give an error (since the I in LDI implies immediate value)
[17:15:38] <Fleck> Xark: well http://www.atmel.com/images/doc0856.pdf is full of ldi ... $XX stuff
[17:15:41] <Xark> Fleck: But still, I believe the convention in GNU AVR assembler, is to use $ to indicate a "literal" value (not an address). I think it uses 0x for hex.
[17:16:02] <Xark> Fleck: Yeah, in that document I believe it does mean hex. :)
[17:16:15] <Xark> So many standards to choose from. :)
[17:16:16] <Fleck> ouch :D
[17:17:36] <Fleck> I would like to stick with avr-gcc
[17:20:23] <Xark> Just get used to "double checking" number bases (based on the context). :)
[17:22:30] <Fleck> Xark: .bss is like const in C ?
[17:22:38] <Fleck> .bss section I mean
[17:23:38] <Xark> Fleck: No, it is uninitialized data section. Same as C uses when you have a global without an initializer (and C guarantees it will be zero'd before main - asm doesn't unless you do it yourself).
[17:25:52] <Fleck> ok so ".comm i, 3" in .bss section reserves 3 bytes?
[17:26:52] <Xark> Fleck: Yes. Also .comm objects "overlap" (i.e., if you have another asm file with that, when you link they will be combined to the same object).
[17:27:31] <Xark> Fleck: If you did that with a label in data section (e.g.), you would probably get a "duplicate definition" link error.
[17:27:52] <Xark> comm = common (or "shared" between object modules)
[17:29:53] <Xark> Fleck: Here is the documentation for the GNU assembler. However, keep in mind it supports dozens of other architectures besides AVR (but these assembler directives are generally common between them all, with a few exceptions). http://sourceware.org/binutils/docs-2.23.1/as/index.html
[17:30:24] <Fleck> http://web.eecs.umich.edu/~prabal/teaching/eecs373-f10/readings/Assembler.pdf << I am reading this, is this ok?
[17:31:57] <Fleck> looks similar
[17:36:43] <Xark> Fleck: Mine is the official latest link (AFAIK). Yours is probably fine, but perhaps older.
[17:36:52] <Fleck> ok :)
[17:37:00] <Fleck> ill bookmark yours
[17:38:36] <Xark> Fleck: It is useful to look in there, but IMHO it is not the best documentation (nobody bothers to document all the asm oddities of dozens of architectures). :)
[17:39:11] <Fleck> right? :D
[17:41:33] <Fleck> ok so, where is __vectors defined?
[17:42:08] <Xark> Fleck: Where are you seeing this?
[17:42:25] <Fleck> in asm code for attiny9
[17:43:04] <twnqx> robotustra: impressive
[17:43:45] <Fleck> and there are no includes, but avr-gcc takes -mmcu= arg, so avr-gcc knows what's __vectors
[17:43:48] <robotustra> twnqx: thanks, I didn't know it myself
[17:44:04] <robotustra> I don't know yet all my limits :)
[17:44:49] <Fleck> Xark: I can share the code...
[17:44:50] <Xark> Fleck: I would have to see a snippet. Here is typical avr asm example -> http://www.nongnu.org/avr-libc/user-manual/assembler.html#ass_isr
[17:45:00] <robotustra> I had somewhere a mill with 15 degree, but I couldn't find it
[17:45:28] <Xark> Fleck: One thing, in gnu asm, any undefined symbol defaults to external (where it is later resolved by linker or link error).
[17:45:47] <Xark> Fleck: So, that may just be an "extern" symbol.
[17:45:48] <robotustra> and PCB is bent, I have to glue it good
[17:46:15] <robotustra> and adjust the table of mill to do such job
[17:47:06] <Fleck> Xark: the idea behing my asking about this is - if I didn't have that code, and wanted to write code with vector interrupts... how would I know?
[17:47:13] <Fleck> *behind
[17:47:58] <Xark> Fleck: Ultimately you just have to put the right vector (pointer) and code in the right places for the AVR to see it (typically vectors are at start of flash, but the details vary by chip).
[17:48:38] <Fleck> yeah but where did that guy got __vectors ? :D
[17:48:48] <Xark> Hmm, actually on AVR I think the vectors are code (not pointer), so typically a jmp instruction to the right place.
[17:48:50] <Fleck> and there is more - __vector_4
[17:49:11] <Fleck> .size __vector_3, .-__vector_3
[17:49:14] <Xark> Fleck: It may be defined by the linker.
[17:50:01] <Xark> (looks like a symbol, but two leading underscores typically means it is "special" in some way - i.e., linker may predefine it based on chip type specified).
[17:50:42] <robotustra> interrupt vector names for linker?
[17:50:47] <Fleck> ok, so, where do I look for more of those? They are documented somewhere? At least - defined, where I can view them?
[17:52:12] <Xark> Fleck: You best bet is here http://www.nongnu.org/avr-libc/
[17:52:40] <Xark> Fleck: However for a lot of the low-level internal stuff like that I think the code is the only comprehensive documentation. :)
[17:53:33] <Xark> robotustra: Either assembler or linker. Linker can define syms in linker script (e.g.).
[17:54:14] <Horologium> Binary file lib/avr5/crtm164a.o matches
[17:54:29] <Horologium> doing a search for __vector in the avr-libc directories.
[17:54:37] <Horologium> get a lot of hits on binary .o files.
[17:54:58] <Xark> OK, bingo. So those are in the "startup" linker files (which may be being used even though the code you are looking at is asm).
[17:55:10] <Xark> Fleck: ^
[17:55:33] <Horologium> they are precompiled object files that are linked in depending on the chip.
[17:55:37] * Xark notes crt = C run-time
[17:55:49] <Fleck> ok, and source is where? :D
[17:55:58] <Fleck> avr-libc source package?
[17:56:05] <Xark> Fleck: Most likely.
[17:56:09] <Fleck> ok
[17:56:15] <Xark> Fleck: It is possible they are with binutils for avr...
[17:57:57] <Xark> Fleck: I remember digging into them before (because I wanted to make a custom modification to startup). LIke Horologium mentioned, it "magically" links with the proper one based on the chip type specified.
[17:58:43] <Fleck> thats great - I just wonder - how a n00b like me can know all this... :/
[17:58:51] <Xark> Fleck: It has been a while, but ISTR that the source was "difficult" to find, because it was semi-automatically generated based on some chip definition file...
[17:58:54] <Horologium> you learn.
[17:58:55] <Horologium> read
[17:58:56] <Horologium> study
[17:59:00] <Horologium> rip things apart.
[17:59:02] <Horologium> and learn.
[17:59:07] <Fleck> when I see ASM tuts, there is everything allready going on - looks easy :D
[17:59:17] <Fleck> when you start to do somthing... meh
[17:59:46] <Xark> Fleck: I suggest just compiling a tiny "blink" program and disassembling it to see what the startup does. :)
[17:59:57] <Fleck> yeah :)
[18:00:21] <twnqx> startup shouldn't do more than copying the constants from flash to ram (unless declared for progmem section)
[18:00:24] <twnqx> then jump to main()
[18:00:27] <Fleck> but the problem is - I have no clue how to do just that, you need Makefiles and what not...
[18:00:55] <Fleck> I am used to use gui tools, that do everything for you :D
[18:01:08] <Horologium> so, learn another way.
[18:01:09] <Horologium> read
[18:01:14] <Horologium> lots and lots out there to read.
[18:01:22] <Fleck> yeah - too much to read
[18:01:48] <Xark> Fleck: If you have avr-gcc installed, you should be able to do : gcc -o mytest mytest.c and get an executable suitable for disassembly (you can just make main return a 7 or something).
[18:01:49] <Horologium> I guarantee you even the most advanced programmers are constantly learning new stuff or new ways to use the old stuff.
[18:02:16] <twnqx> Fleck: ok, itinitializes thestack pointer, too
[18:02:47] <Fleck> ;)
[18:02:52] <Xark> twnqx: Also zeros bss
[18:03:09] <twnqx> ah, that's what lives at 0x3f
[18:03:19] <twnqx> just wantes to open the data sheet
[18:06:25] <Xark> twnqx: Depends which chip. On 328p, 0x3F is the SREG (status register with flags).
[18:07:57] <Xark> twnqx: I think you have to store to it as memory (avr regs are memory mapped), as no instruction writes to them all (just various ones to test and set bits).
[18:13:00] <Xark> Fleck: Ultimately, all the info you would need to write your own assembler (etc.) is in the AVR data sheet and assembly reference manual (i.e., how chip boots, and where vectors are located). This is what the GNU people did when they created their startup files (and then tried to merge that into the "GNU way" used by other architectures).
[18:13:51] <Fleck> yeah, I fugered! :D
[18:14:47] <Xark> Fleck: Armed with that along with an AVR chip, a battery, a toggle switch, some wire and a lot of time you should be able to create any AVR project imaginable. :)
[18:15:19] <Fleck> ;p
[18:15:24] <Horologium> I should see if I can find a bunch of switches cheap.
[18:15:26] <Fleck> how do I compile?
[18:15:45] <Horologium> and make an avr programmer where you toggle everything in one byte at a time.
[18:15:47] <Xark> Fleck: Perhaps: avr-gcc -o mytest mytest.c
[18:16:11] <Xark> Horologium: Hehe, there was a HackADay post from a "desert island" programmer doing that. :)
[18:16:14] <Fleck> and I get .hex?
[18:16:20] <Horologium> yeah Xark
[18:16:39] <Xark> Fleck: Typically you get an "elf" (which can be converted to hex, or disassembled etc.)
[18:16:57] <Fleck> see... :D
[18:17:14] <Fleck> "GNU way" again! :D
[18:17:18] <Xark> Fleck: ELF is http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
[18:17:43] <Fleck> and the reading begins :D
[18:18:09] <Xark> Fleck: Yep. Basically the program along with any debugging symbols, dynamic link info etc. You would use "avr-objcopy" to make a hex (or other formats) is needed.
[18:18:13] <Horologium> Xark, that line won't really work without telling it what mcu you are using.
[18:18:15] <Xark> if needed*
[18:18:33] <Xark> Horologium: Good point.
[18:20:22] <Fleck> Xark: and even reading that wiki - many q. raises :D
[18:21:01] <Xark> Fleck: Hehe, not surprised. This rabbit hole runs deep. :)
[18:21:09] <Fleck> yeah
[18:22:45] <Horologium> http://www.nongnu.org/avr-libc/user-manual/group__demo__project.html
[18:22:56] <Horologium> this goes through the steps to make your .hex file.
[18:23:13] <Fleck> yeah
[18:23:26] <Fleck> I have a working Makefile too, but that's not the point :D
[18:23:37] <Horologium> including a makefile.
[18:23:44] <Horologium> but it explains each step and what it's for and all that.
[18:23:48] <Fleck> the point was - alone in island :D noone to ask, just docs
[18:23:58] <Horologium> that IS the docs.
[18:24:08] <Xark> Horologium: Nice link, thanks. Just what Fleck was looking for (or needs at least). :)
[18:24:11] <Horologium> avr-libc user manual.
[18:24:32] <Horologium> http://www.nongnu.org/avr-libc/user-manual/
[18:24:40] <Fleck> I got that, yeah! :D
[18:24:49] <Horologium> will answer most of the questions asked about avr-libc and avr-gcc
[18:25:13] <Fleck> I downloaded that manual when Xark told me about avr-libc :D
[18:25:22] <Xark> (You have to somewhat read between the lines there for AVR asm). :)
[18:26:13] <Horologium> http://www.avr-asm-tutorial.net/avr_en/ best avr assembly tutorial I've found....is for an older chip but still valid.
[18:28:20] <Fleck> you gave me that link once ;D but windows gui used...
[18:28:34] <Horologium> if I had the gumption I would redo it to a modern chip.
[18:28:54] <Horologium> I can't help the fact that you can't type a few commands in a command prompt...
[18:29:01] <Fleck> :D
[18:29:55] <Horologium> learning assembly language and learning to use atmel studio are two entirely different things.
[18:32:00] <Xark> Fleck: I had to learn assembly with pencil and paper. Then hand assemble my code. Then and enter the hex a byte at a time (and I was one of the lucky ones). :)
[18:33:35] * Xark nowadays has no problem using an IDE (or not as needed). :)
[18:33:41] <Horologium> I did that with the 6502 and vic-20 computer way back when.
[18:34:13] <Horologium> then used poke and call commands to write program to ram and run it.
[18:34:35] <Xark> Horologium: Yep, 6502 here. Except OSI-C1P (very similar to Vic-20, except black & white and few years earlier).
[18:35:01] <Horologium> vic-20 was my first computer..back in the mid 80s.
[18:35:06] * Xark still has a VIC-20 in the garage. :)
[18:35:15] <Horologium> mine is in the basement.
[18:35:17] <Horologium> I still use it.
[18:35:19] <Horologium> love the old games.
[18:35:20] <Xark> Horologium: Right on.
[18:35:39] <Horologium> works great with the old projector too.
[18:35:39] <Fleck> uhh ohh
[18:35:51] <Fleck> [02:19:35] <Xark> Fleck: I had to learn assembly with pencil and paper. Then hand assemble my code. Then and enter the hex a byte at a time (and I was one of the lucky ones). :) << was last I saw
[18:36:30] <Horologium> repost in PM there for you Fleck
[18:36:37] <Fleck> thx!
[18:37:09] * Xark links to his old OSI http://www.old-computers.com/museum/computer.asp?st=1&c=813 (and better screen pic) http://www.pcmuseum.ca/gallery/0310-01-750.JPG
[18:40:34] <Xark> Horologium: Recently I have been toying around with FPGA and 6502 core. It has been fun, and it blows my mind it is running at 25Mhz with this soft core. :)
[18:40:56] <Horologium> hehe
[18:41:11] * Xark once worked from a company selling 3.5Mhz speedup cards for Apple II (and 3.5 speedup was pretty nice at the time). :)
[18:41:11] <Horologium> avr assembly kinda reminds me of 6502 assembly actually.
[18:41:28] <Horologium> how about the commodore-128?
[18:41:33] <Xark> Horologium: Indeed. Anytime I have low and high+1 I think of 6502. :)
[18:41:35] <Horologium> 1MHz or 2MHz mode!
[18:42:07] <Xark> Horologium: Turbo! :)
[18:42:33] <Horologium> although, the VIC chip couldn't run at 2MHz so screen went blank...unless you were running in 80column mode which used a different video chip.\
[18:42:38] <Fleck> oook, 2:30AM... bed time! :)
[18:42:43] <Xark> Horologium: I worked on C64 games, but weren't able to use any C128 features (but I developed using Apple ][ hooked to C128 - in C64 mode).
[18:42:46] <Fleck> bye all, and, thanks again!
[18:42:59] <Xark> Fleck: Night
[18:43:22] <Xark> Horologium: Yes, so disappointing. :)
[18:44:08] <Horologium> I had hacked a monitor to mine so I could run in 80column mode though.
[18:44:40] <Xark> Horologium: 80 columns was pretty nice (after living with 40...or 24). :)
[18:44:54] <Horologium> yup.
[18:45:06] <Horologium> was great for word processing and spreadsheets.
[18:45:07] <Xark> I had a PET 2001 for a while too (got too keep it working on software for school district)
[18:45:36] <Horologium> aaww..
[18:45:38] * Xark thinks some of his wrist pain started with that god-awful "calculator" keyboard. :)
[18:45:39] <Horologium> those were awesome.
[18:46:10] <Xark> Horologium: It was pretty neat. I wore the key-caps off of mine. I love how you could "prop up" the case with a little stand (like a car hood).
[18:46:23] <Horologium> yup.
[18:46:28] <Horologium> would love to get one to play with.
[18:46:51] <Xark> Horologium: Yeah, I was upset when I learned my dad binned mine without talking to me first...
[18:47:02] <Xark> (was in his garage for years)
[18:47:16] <Horologium> one of my projects, when I get the gumption to actually finish it, is porting vic-20 basic to avr and building a mostly solderless breadboarded pseudo-clone using modern microcontrollers.
[18:48:34] <Xark> Horologium: Sounds fun. Have you seen this project -> http://quinndunki.com/blondihacks/?p=1291 Something like that looks kinda fun.
[18:48:54] <Horologium> similar but different
[18:49:11] <Xark> Horologium: This is interesting too -> http://propeddle.com/
[18:49:36] <Horologium> I'm using high speed serial srams for holding and generating the video....working on getting either 640x480 or 800x600 16 color vga working.
[18:50:22] <Xark> Horologium: I suspect you could emulate 6502 at close to 1Mhz speeds on AVR. I managed to get a software version of my OSI-C1P display generated by AVR (but not much CPU left for emulation) -> http://imgur.com/a/JO4Cq
[18:50:23] <Horologium> I'm using a combination of avr, pic, and 8052 chips.
[18:50:44] <Horologium> I don't want to emulate the 6502..I want to port the 6502 assembly to either avr or 8052.
[18:50:57] <Xark> Horologium: I see. More like static translation.
[18:51:08] <Horologium> and using multiple chips for different functions.
[18:51:21] <Horologium> the 8052 chip for the main central cpu
[18:51:39] <Xark> Horologium: Which one? Like 40Mhz 1T version?
[18:51:41] <Horologium> mainly because I can execute program from external sram.
[18:52:20] <Horologium> the chip I am working with has 64K of flash and can be bank swapped out for external memory(sram, flash, eeprom, etc)
[18:54:05] <Horologium> then am using an avr for controlling the write to the sram chips used to generate the video signal,,,and said avr generates bank switching for double buffering as well as sync pulses.
[18:55:14] <Xark> Nice. I was messing around with an STC chip @~35Mhz recently. Only had 1.5K of RAM, but I was able to make a tiled renderer to display some VGA. My first real 8051 asm coding experience. http://imgur.com/nDceh
[18:55:42] <Horologium> I want full 800x600 but will settle for 640x480.
[18:56:04] <Horologium> getting the speeds for 800x600 out of a solderless breadboard is proving,,,,touchy.
[18:56:31] <Xark> Yeah. 40Mhz pixel clock sounds tough. I was getting some "interference" patterns on my 640x480.
[18:56:51] <Horologium> yeah
[18:57:00] <Horologium> and the sram chips I have only clock out at 20MHz
[18:57:03] <Horologium> so interleaving them.
[18:58:03] * Xark links to a picture of his "devkit" http://imgur.com/3IXky (but more wires were hooked up before Jimi was displayed...)
[18:58:26] <Xark> Horologium: Neat. Sounds very "old school". :)
[18:58:35] <Horologium> which makes either 2 or 8 chips per buffer depending on how I configure the chips.
[18:58:53] <Horologium> the chips I'm using are from microchip..serial sram chips
[18:59:03] <Xark> Oh, serial? Interesting.
[18:59:07] <Horologium> with 1, 2, or 4 data pins.
[18:59:11] <Horologium> basically spi.
[18:59:26] <Horologium> but they have extra data pins and can be configured to 1,2,or 4 bit mode.
[18:59:26] <Xark> I have an IRC friend who made an 8051 system using SQI ream for the framebuffer. :)
[18:59:32] <Xark> ram*
[19:00:21] <Horologium> that's what I'm using.
[19:00:29] <Xark> I don't think he was full res though (so probably more like 256 horizontal).
[19:00:59] <Xark> Probably why he didn't have to interleave.
[19:01:00] <Horologium> http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2542&param=en539030
[19:01:08] <Horologium> yeah
[19:01:25] <Horologium> I could use the 1Mbit chips and just clock them at 20MHz and get 400x600 resolution.
[19:01:43] <Xark> Horologium: Yeah, I ordered one of those, but goofed and got like VSSOP package (microscopic and unusable for me). :)
[19:01:48] <Horologium> oops.
[19:01:59] <Xark> I wanted SOIC...
[19:02:40] <Horologium> I have some of the ones with the battery backup option and non...battery backed up ones are only SDI....others are SQI capable.
[19:02:42] <Xark> He did get "free" horizontal and vertical scrolling with his design (just a 8051 and the RAM, pretty much).
[19:02:57] <Horologium> yeah...that's part of what I'm looking for too.
[19:03:20] <Horologium> just change your start offset location and shift everything over, up, or down.
[19:03:34] <Xark> Horologium: Yeah, not pixel smooth horizontal IIRC.
[19:03:54] <Horologium> should be able to do that
[19:04:10] <Horologium> leave some space between display lines.
[19:04:23] <Xark> Perhaps because he was 4-bit per pixel.
[19:04:30] <Horologium> same here.
[19:04:48] <Xark> ISTR his design had a 4 byte start address limit (for some reason).
[19:04:57] <Horologium> so you only get 2x pixel shift that way.
[19:05:37] <Horologium> which isn't that big a deal really.
[19:06:05] <Xark> Aha, here is a link with a video (he wrote a little lunar lander) -> http://dangerousprototypes.com/2013/04/14/project-fleatiny-8051-based-board/
[19:09:05] <Horologium> nice...
[19:09:13] <Horologium> I might have to steal some of his ideas..
[19:09:42] <Horologium> ultimately, I want mine to be able to be built without soldering for the most part..
[19:09:48] <Horologium> done all on solderless breadboards.
[19:09:55] <Horologium> NRCS...neuvo retro computer system
[19:10:12] <Xark> Horologium: I think it would be doable. If I hadn't gotten the VSSOP part, I would have put it on my breadboard. :)
[19:10:43] <Horologium> so far the hardest part is reverse engineering the vic-20 basic interpreter and full screen editor.
[19:11:29] <Horologium> recently made a major breakthrough in understanding how it works....
[19:11:32] <Xark> Horologium: Interesting. I remember looking a bit into C= screen stuff (long ago). I ended up just re-writing it (easier than understanding it). :)
[19:11:52] <Horologium> and how you can insert a line in basic without it taking forever to move stuff around in memory.
[19:12:03] <Xark> Horologium: Are you staring with something like this -> http://www.pagetable.com/?p=46
[19:12:31] <Horologium> I've looked at that...have it bookmarked in fact.
[19:13:08] <Horologium> halfway thinking I might write a 6502 assembly to 8052 assembly converter.
[19:13:29] <Horologium> then I go back to just understanding and writing from scratch.
[19:14:07] <Horologium> was looking at a commodore page a while back that talked about how some companies did "copy protection" by obscuring the basic code.
[19:14:08] <Xark> BASIC did some 6502 "tricks" but most would probably port over.
[19:14:48] <Horologium> line numbers were only really useful for gosub and goto lines and for displayed order when you did a list.
[19:15:03] <Horologium> execution order did not have to follow line number order...
[19:15:05] <Xark> Horologium: Yeah. I helped write protection code for Datasoft, Sega etc. in 8-bit days.
[19:15:29] <Horologium> basic program was just a linked list of entries...and the line numbers didn't have to be in the same order as the list.
[19:15:34] <Horologium> err..as the links.
[19:16:01] <Xark> Horologium: Right. Common to LIST a commercial program and see 65535 :: END
[19:16:08] <Horologium> yup.
[19:16:09] <Xark> (or similar)
[19:16:39] <Horologium> I didn't have the savvy to understand how that worked way back when.
[19:16:41] <Horologium> now I do.
[19:17:36] <Xark> I learned quite a bit "liberating" software when I was a kid. Technically it wasn't even illegal back then (as I didn't sell anything). :)
[19:17:55] <Horologium> ever see the ones where they would punch holes in the floppy disks?
[19:18:15] <Horologium> if you copied it and tried to run it, then it wouldn't work because it would look for an error on the disk at a certain place.
[19:18:33] <Xark> Horologium: Of course. I had a large collection of punched disks. :)
[19:18:58] <Horologium> many people wouldn't believe me that they did that.
[19:19:01] <Xark> Oh, that punch (I though you meant hole punch to use both sides of floppy)
[19:19:07] <Horologium> hehe..
[19:19:09] <Horologium> did that too.
[19:19:39] <Horologium> used to buy disks at rat-shack, use an x-acto knife to cut the other notch out, then sell them as double sided disks.
[19:19:47] <Xark> I have seen that used, but usually there were better methods (that method is a pain to mfgr for obvious reasons). At Datasoft they actually had a patent on "weak bits" (that would read 1 or 0).
[19:20:00] <Horologium> could sell them to the other kids cheaper than they could buy them from the store.
[19:21:06] <Horologium> then there was the use of floppy drives as external "coprocessors" for number crunching.
[19:21:32] <Xark> Horologium: Yeah, on C-64 at least (since disk drive had faster CPU than main system - but not much RAM). :)
[19:21:51] <Horologium> didn't realize they clocked it faster.
[19:22:14] <Xark> Horologium: That is my recollection. Also the video DMA slowed main CPU.
[19:24:20] <Horologium> now I'm gonna have to open one up and see!
[19:24:20] <Horologium> hehe
[19:26:19] <Horologium> am still looking for a couple of 1581 drives.
[19:30:05] <Xark> Horologium: From wikipedia http://en.wikipedia.org/wiki/Commodore_1581 "Onboard CPU: MOS Technology 6502 @ 2 MHz"
[19:30:53] <Horologium> yeah..that's the 1581..
[19:31:01] <Horologium> but what about the 1541? the 5.25 inch version.
[19:31:11] <Horologium> 1581 is the 3.5 inch version.
[19:31:28] <Horologium> which was awesome because it could read and write cbm, amiga, and msdos disks.
[19:31:31] <Xark> Horologium: The 1541 is listed as 1Mhz (but I think I recall it faster, because it had no video or refresh cycles stolen).
[19:32:02] <Horologium> possibly.
[19:33:44] <Xark> Horologium: Basically the reason fast loaders needed to blank the screen (because DMA goofed with bit-banged serial).
[19:34:14] <Horologium> yup.
[19:35:22] <Horologium> was supposed to be all hardware serial but a screwup in the 8522 chips killed that at the last minute and as the hardware was already bought and built, they just changed the software to bitbang the serial comms.
[19:35:59] <Horologium> c128 and 1581 implemented the hardware serial comms that should have been in the c64.
[19:37:02] <Horologium> one of the other bits I'm playing with for the NRCS is a different interpreter.
[19:37:07] <Xark> Yeah. Sad how the FCC ruined Atari and Commodore, but then Apple whined and got a pass (with just silver spray paint). :)
[19:37:07] <Horologium> instead of basic,,,
[19:37:11] <Horologium> a C interpreter
[19:37:29] <Horologium> found one for the PC and have been working on stripping it down to run on either an 8052 or atmega1284p.
[19:37:32] <Xark> Horologium: There are a few OK ones in C that would port.
[19:37:48] <Horologium> picoc is what I'm playing with.
[19:38:21] <Horologium> ok..gotta go do some stuff in the real world for a bit.
[19:38:32] <Xark> OK, take it easy.
[19:39:27] <thetruthisoutthe> Fleck <= #define $ 0x
[19:40:21] <Xark> thetruthisoutthe: I think he is in bed dreaming of hex, registers and interrupt vectors currently. :)
[19:42:40] <thetruthisoutthe> do you think i should fold back my cpu clock if i want to run my atmega168pa downto 1.75V ?
[19:43:08] <thetruthisoutthe> SOA curve states 4MHz, but it was running ok even at 1.7V @ 8MHz
[19:43:55] <thetruthisoutthe> (connected a red led in parallel with the power supply)
[19:44:59] <Xark> thetruthisoutthe: AVRs tend to overclock and run under-voltage without issues when in friendly circumstances.
[19:45:14] <thetruthisoutthe> ofc, i use nice ceramic decoupling
[19:48:08] <Xark> thetruthisoutthe: I have run an ATtiny on its internal RC osc quite nicely at just under 32Mhz (abusing calibration register). :)
[19:48:49] <thetruthisoutthe> :)
[19:48:55] <thetruthisoutthe> that goes that high?
[19:48:56] <thetruthisoutthe> haha
[19:49:17] <Xark> thetruthisoutthe: Yeah, some of the attinies have a PLL. :)
[19:49:19] <strugz> avr runs under 20 MHz (8 bit version)
[19:49:21] <thetruthisoutthe> if stable timing does not matter then it is cool
[19:50:02] <thetruthisoutthe> can someone explain this atxmega oscillator thing?
[19:50:28] <thetruthisoutthe> i'd like to connect a 32768Hz xtal for stable time keeping, while having an internal high frequency clock
[19:50:41] <thetruthisoutthe> i can have it parallel i believe
[19:51:36] <Xark> strugz: Right, for rated speed. However, then tend to overclock (or under-voltage) fairly well in most cases.
[19:51:42] <Xark> they*
[19:53:47] <strugz> Xark ok but i believe that ADC, PWN problems happen....but i never tried
[19:53:59] <Horologium> strugz, yes, they do...nastily.
[19:54:14] <Horologium> but the core can run faster than rated without too much problem.
[19:54:27] <thetruthisoutthe> who uses 32768 Hz xtal for stable timing ?
[19:54:37] <Horologium> I've run 16MHz rated atmega32 at 20MHz and 20MHz rated atmega1284p at 32MHz.
[19:54:51] <Horologium> thetruthisoutthe, I do, but not on the xmega...don't have any of those.
[19:55:02] <thetruthisoutthe> ;< i'll get some in a few weeks
[19:55:41] <thetruthisoutthe> i have read that it has a builtin rtc and i can connect an external 2^15 Hz xtal to it
[19:55:58] <thetruthisoutthe> i assume it will keep time, while core runs at 32MHz calibrated rc osc
[19:55:59] <Xark> strugz: In my experience EEPROM problems are the main issue. I was "testing" SRAM (it would start to flake if pushed too far).
[19:56:36] <Horologium> on the atmega chips I use it with, the 32KHzish crystal is used to drive one of the timers.
[19:57:06] <Xark> strugz: Obviously, it would be different for a product, however there is the Uzebox which uses AVR 644 overclocked to 28Mhz -> http://belogic.com/uzebox/index.asp (I think they "boot test" each chip).
[19:58:41] <strugz> X
[19:58:58] <strugz> Xark very interesting...
[19:59:51] <thetruthisoutthe> Horologium <= software emulated xtal clock on osc pins while on internal oscillator? :)
[20:00:05] <thetruthisoutthe> i only dislike the idea because it requires interrupting
[20:00:27] <Horologium> thetruthisoutthe, some AVR chips have pins for a 32khz crystal that tie it to a timer.
[20:00:36] <thetruthisoutthe> ohh
[20:00:40] <Tom_itx> usually timer2
[20:00:49] <Horologium> to give precision timing for a single timer...like for making an rtc.
[20:00:52] <thetruthisoutthe> did i miss this feature in the mega168 ?
[20:00:56] <thetruthisoutthe> i don't remember reading this
[20:00:59] <Horologium> and, yes, you have to set it up to interrupt and count,,,but,,
[20:01:42] <Horologium> look for TOSC1 and TOSC2
[20:01:47] <Horologium> those are the inputs for it.
[20:01:48] <thetruthisoutthe> kk thank you
[20:01:55] <Horologium> as part of timer2.
[20:02:06] <Horologium> it is on the atmega169...first datasheet I opened.
[20:02:24] <Tom_itx> not all of them have that feature
[20:02:38] <Xark> One of these MCUs can even keep count while sleeping (in certain modes). I believe AVR8...
[20:03:17] <Horologium> Xark, for that I just use a maxim rtc chip.
[20:03:26] <Horologium> have one that has 2 alarms.
[20:03:36] <Horologium> use it for opening and closing the door on the chicken coop.
[20:03:42] <Xark> Horologium: That works too. :)
[20:04:06] <Horologium> the alarm lines are tied to external interrupts on an atmega16...wakes it up and initiates the open or close routine.
[20:05:55] <thetruthisoutthe> wow found it
[20:05:58] <Horologium> using a tray lift motor out of a sharp copier...lots of torque, low speed, worm drive.
[20:06:09] <Valen> man avr PWM is crap lol
[20:06:11] <thetruthisoutthe> timer2 can be clocked from tosc1,2 asynchronously as rtc
[20:06:20] <Horologium> yup.
[20:06:20] <Valen> glitching with 0 output
[20:06:30] <Valen> going stupid when you put it into sleep mode
[20:06:38] <thetruthisoutthe> and i don't even have to interrupt every tick :)
[20:06:46] <thetruthisoutthe> only 256 ticks
[20:06:51] <Horologium> play with the prescaler.
[20:07:19] <thetruthisoutthe> if i divide by 128, then i can have timer2 overflow interrupt in every second
[20:07:20] <thetruthisoutthe> cool
[20:08:54] <Horologium> how do you figure?
[20:09:42] <thetruthisoutthe> Valen <= what is crap in avr pwm?
[20:10:15] <Horologium> oh, yeah, duh.
[20:10:47] <Horologium> overflow at 256...giving 128 counts per second...then prescale by 128 and 1 overflow per second.
[20:11:09] <thetruthisoutthe> Horologium <= yes :)
[20:11:49] <thetruthisoutthe> that is awesome, stable 1s timebase
[20:12:22] <Horologium> yup
[20:12:31] <Horologium> it just steals 2 i/o pins.
[20:12:48] <thetruthisoutthe> it does not, i have reserved that 2 pins for xtal anyway
[20:13:51] <Horologium> if you have a 32khz can oscillator you can set it to run on just 1 pin.
[20:14:16] <thetruthisoutthe> space, hard to find, or cost
[20:14:34] <thetruthisoutthe> and the watch crystal is all i need
[20:15:16] <Horologium> http://www.digikey.com/product-detail/en/TC32N5I32K7680/CTX1184TR-ND/3511732
[20:15:39] <thetruthisoutthe> ok.. everything can be ordered
[20:16:14] <Horologium> yup.
[20:16:20] <Horologium> and they aren't expensive.
[20:16:29] <Horologium> just over $1.00 USD
[20:16:38] <thetruthisoutthe> hm not so large
[20:16:39] <Horologium> tiny surface mount package
[20:16:45] <thetruthisoutthe> and only $3k for a tape
[20:16:52] <Horologium> and even enable/disable capable.
[20:17:07] * Xark has harvested 32K xtals from a bunch of cheap electronic gizmos (common in anything that keeps time).
[20:17:21] <thetruthisoutthe> i got some free from motherboards btw.
[20:17:30] <thetruthisoutthe> 32768Hz watch crystals
[20:18:18] <Xark> thetruthisoutthe: Yah. I got one from a VCR and one from an old "phone number database" calculator thingie.
[20:18:26] <thetruthisoutthe> :)
[20:18:39] <thetruthisoutthe> every clock has one too ;)
[20:18:42] <Horologium> rip apart old watches.
[20:18:46] <thetruthisoutthe> unless integrated
[20:20:03] <thetruthisoutthe> Horologium <= hmm anyway, 14.31828MHz xtals ?:)
[20:20:27] <Horologium> crystal or oscillator?
[20:20:27] <Tom_itx> 32.768khz
[20:20:33] <thetruthisoutthe> crystal
[20:20:38] <thetruthisoutthe> motherboards use that too
[20:20:53] <Horologium> http://www.digikey.com/product-search/en/crystals-and-oscillators/oscillators/852334
[20:20:58] <thetruthisoutthe> they divide it to 1.193MHz and play with that
[20:20:58] <Horologium> pick your poison.
[20:21:45] <Horologium> but those are all oscillators, not just crystals.
[20:22:13] <thetruthisoutthe> i like crystals mostly
[20:22:36] <thetruthisoutthe> the thing has osc1 and osc2 pins
[20:23:13] <Xark> thetruthisoutthe: Over around 32Mhz, oscillators are easier (xtals start needing a third harmonic or somesuch). :)
[20:23:34] <thetruthisoutthe> SAW oscillators
[20:23:40] <thetruthisoutthe> or just pll your clock
[20:28:00] <thetruthisoutthe> but only the RTC can give stable timebase in a pc
[20:28:11] <thetruthisoutthe> system clock is usually off
[20:28:42] <Xark> thetruthisoutthe: ntpd FTW. :)
[20:28:55] <thetruthisoutthe> i use that too, no other choice
[20:29:51] <Xark> If you are concerned about being reliant on other servers, then perhaps https://www.tindie.com/products/gxti/laureline-gps-ntp-server/ :)
[20:30:05] <thetruthisoutthe> Horologium <= autopsy ?:) that pick your poison scene hahaha
[21:11:02] <Valen> so why is my avr using .6ma in power down mode
[21:11:16] <Valen> also why are there no definitions for power saving for the tiny84a
[21:13:11] <thetruthisoutthe> because you are runnning at 1-4MHz ?
[21:13:42] <thetruthisoutthe> if you want less, clock with a watch crystal
[21:20:17] <Valen> power down mode means there is no clock
[21:20:27] <thetruthisoutthe> ;/
[21:21:07] <thetruthisoutthe> then turn off ain reference, wdt
[21:21:15] <thetruthisoutthe> timers