#avr | Logs for 2013-02-26

Back
[02:15:52] <r00t^home> <creep> r00t^home<< do you think they only say 200C because of the increased leakage current ? <--- yes
[07:55:33] <tk`> hello
[07:55:39] <tk`> a question about avr asm
[07:56:02] <tk`> do i have to stop the timer1, while reading it's lower and higher bytes?
[07:56:22] <tk`> in tmp_4, TCNT1L
[07:56:22] <tk`> in tmp_5, TCNT1H
[07:56:40] <tk`> in tmp_4, TCNT1L
[07:56:41] <tk`> in tmp_5, TCNT1H
[07:56:47] <tk`> or i should do
[07:57:03] <theBear> not from memory, probably makes sense to read the lsb at the time you want the read and the msb before or after that moment tho, as it won't change for 'a while'
[07:57:41] <Malinuss> tk`, I'm pretty sure you do not have to tstop the timer, no
[07:57:53] <Malinuss> actually 99% sure
[07:58:02] <tk`> so, the timer value cannot be incremented bewteen these two lines?
[07:58:17] <tk`> how will it know?
[07:58:21] <dunz0r> Could someone take a look at my code? I'm trying to enable PCINT1, but nothing happens :|. I must be doing something wrong. Here's the code; http://git.hax0r.se/?p=AVR/.git;a=blob_plain;f=Minisumo2013/startpin.c
[07:58:32] <dunz0r> Global interrupts are enabled in another file btw.
[08:00:26] <dunz0r> That should trigger as soon as PB1 is low, right?
[08:00:36] <dunz0r> (if it was originally high)
[08:02:11] <tk`> fine, gcc doesn't seem to stop the timer too
[08:02:22] <tk`> just compiled some c code and checked asm version
[08:03:47] <Malinuss> tk`, normally you would stop all interrupts, and therby stop the timer, and read the timer values
[08:14:42] <tzanger> tk`: don't the avrs have a latch when you read half the other is latched so you can read it?
[08:15:01] <tk`> i don't know
[08:15:07] <tzanger> which part?
[08:15:26] <tk`> if avrs have such thing
[08:15:35] <theBear> i didn't say it couldn't be incremented, just that you can be sneaky so it'd take more than a lsbyte overflow for you to go wrong
[08:15:36] <tzanger> which part are you using?
[08:15:39] <tk`> but well, it seems they do
[08:16:01] <tk`> what part?
[08:16:06] <tk`> what uC?
[08:16:07] <tzanger> which AVR are you using?
[08:16:10] <tk`> mega
[08:16:12] <tk`> mega8
[08:16:21] <tk`> atmega8*
[08:17:31] <Tom_itx> inflex, do you happen to have the avrdude line for setting the reset fuse on a attiny10?
[08:17:45] <Tom_itx> setting / resetting
[08:18:38] <tzanger> The TCNT1, OCR1A/B, and ICR1 are 16-bit registers that can be accessed by the AVR CPU via
[08:18:41] <tzanger> the 8-bit data bus. The 16-bit register must be byte accessed using two read or write operations.
[08:18:44] <tzanger> The 16-bit timer has a single 8-bit register for temporary storing of the High byte of the 16-bit
[08:18:47] <tzanger> access. The same temporary register is shared between all 16-bit registers within the 16-bit
[08:18:51] <tzanger> timer. Accessing the Low byte triggers the 16-bit read or write operation. When the Low byte of a
[08:18:54] <tzanger> 16-bit register is written by the C
[08:18:56] <tzanger> When the Low byte
[08:18:59] <tzanger> Table 35. Definitions
[08:19:01] <tzanger> BOTTOM The counter reaches the BOTTOM when it becomes 0x0000.
[08:19:04] <tzanger> MAX The counter reaches its MAXimum when it becomes 0xFFFF (decimal
[08:19:06] <tzanger> 65535).
[08:19:09] <tzanger> TOP The counter reaches the TOP when it becomes equal to the highest
[08:19:11] <tzanger> value in
[08:19:14] <tzanger> er
[08:19:16] <tzanger> sorry about that
[08:19:19] <tzanger> what I was trying to say was that it does have that feature
[08:19:21] <tzanger> read low, read high, it's "atomic"
[08:20:35] <tk`> ok, thanks
[11:13:16] <creep> nah i grabbed a few motherboards and printer boards and stuff and unsoldered some connectors, ics
[11:48:38] <creep> can vusb do 14.318Mhz quartz?
[11:48:43] <creep> ;/
[11:48:51] <creep> i have a whole lot of them
[11:49:33] <creep> motherboards usually have this frequency quartz
[11:52:11] <Tom_itx> 12mhz iirc
[12:43:17] <OndraSter_> there are many supported frequencies
[13:31:55] <creep> why is 12MHz preferred? ;/
[13:32:14] <creep> i saw them in cheap pendrives and usb hubs too
[13:32:52] <creep> but motherboards have 32768Hz and 14.318Mhz quartz oscillators
[13:35:55] <theBear> motherboard has a VERY fancy clock synthesis chip that takes 14.something and turns it into all the 33 and 8.something and 66 and 133 and 266 and 2.4ghz etc etc freqs that a computer needs, and the 32.7k is for the realtime clock
[13:36:15] <theBear> i'm no usb expert, but i'm gonna educated guess that 12mhz divides nicely to usb speeds
[13:42:15] <tzanger> 14.318MHz is 4x the standard NTSC colourburst frequency. You can use a smaller crystal and /4 to get a precise colourburst.
[13:43:11] <theBear> heh, that doesn't really explain why motherboards have them :) specially considering only one country really uses ntsc, and they never made a motherboard
[13:43:13] <tzanger> nobody uses NTSC anymore of course, but there are factories and a LOT of expertise behind building reliable crystals of this frequency, so they're cheap as hell
[13:45:46] <tzanger> 14.318 is pretty lowish in frequency too, and you use a PLL to ramp it up anyway. I wonder if part of it is that they've made super-stable 14.318MHz crystals for so long as well
[13:49:31] <OndraSter_> athlon64 had input reference to the PLL of 200MHz
[13:49:43] <OndraSter_> (I checked some PDF yesterday)
[13:49:53] <creep> :)
[13:51:01] <creep> well it is possible to create SAW oscillators above 50MHz
[13:51:30] <creep> but that is beginning to be more like putting some atoms to the right place
[13:52:04] <OndraSter_> hehe
[13:52:04] <creep> vga cards have 27MHz quartz btw ;)
[13:52:11] <OndraSter_> I saw some 40MHz xtal on sale
[13:52:15] <OndraSter_> locally
[13:52:28] <creep> i have some too
[13:52:29] <OndraSter_> never checked the max on mouser or digikey
[13:52:39] <creep> they like it in hdds and printers and like that
[13:52:50] <OndraSter_> :)
[13:53:40] <creep> for a microcontroller oven control would you just use a 32768Hz quartz ?
[13:53:55] <OndraSter_> internal 8MHz xtal is enough for me :)
[13:54:02] <OndraSter_> err
[13:54:03] <OndraSter_> RC*
[13:54:03] <creep> +-1% ?
[13:54:09] <OndraSter_> 2% on tinies I think?
[13:54:15] <OndraSter_> as long as it can do UART - fine with me :)
[13:54:26] <creep> hm well, 1Hour +-2%
[13:54:34] <OndraSter_> it will be driven by PC
[13:54:50] <creep> ah, if usb then it will be 12MHz anyway
[13:55:04] <OndraSter_> no, by UART
[13:55:11] <OndraSter_> with cheapo PL2303 off ebay
[13:55:31] <OndraSter_> + attiny85 or something, I do not want V-USB though
[13:55:45] <creep> it is definitely a resource hogger
[13:56:02] <creep> uninterruptable, and monitors anything on the bus
[13:56:02] <OndraSter_> well I will be reading the temperature and sending the info to the PC
[13:56:11] <OndraSter_> and possibly send command on/off to the micro back
[13:56:27] <creep> i'd just send temperature
[13:56:35] <OndraSter_> well what else?
[13:56:45] <OndraSter_> the PC tells the oven to power on or off the heating
[13:57:06] <OndraSter_> I am too lazy to write it in C for the micro directly
[13:57:13] <creep> hm well power off can be equal to setting it to 0C
[13:57:15] <creep> :)
[13:57:16] <OndraSter_> this is much simpler
[13:57:27] <OndraSter_> oh
[13:57:32] <OndraSter_> you want to send the target temperature back
[13:57:35] <OndraSter_> naaa
[13:57:37] <creep> yeah
[13:57:42] <OndraSter_> I am using... MAX...something
[13:57:53] <OndraSter_> thermocouple reader
[13:57:59] <OndraSter_> 14 or 16bit or something
[13:58:04] <creep> hm, currently i'm just hacking an adc to it
[13:58:37] <creep> but i do a hardware onlyturnonheatingelementif t<tmax
[13:59:09] <creep> and i think a 5s dataready timeout from the adc would do as a watchdog
[13:59:20] <creep> using a missing pulse detector
[14:00:15] <creep> or rather SCLK
[14:00:33] <OndraSter_> I need pretty much just .. PL2303 => loooong RJ11 crimped wire => attiny => SSR + MAX6whatever
[14:00:37] <creep> so if pc turns on with parallel port enabling it it will timeout
[14:00:59] <OndraSter_> I will just enable watchdog and reset it every time I receive signal from the PC
[14:01:04] <creep> what are those fancy things?
[14:01:07] <OndraSter_> if I stop receiving it => watchdog resets
[14:01:09] <OndraSter_> which ones?
[14:01:18] <creep> the pl and max6
[14:01:40] <OndraSter_> PL2303 = cheap ($1.69 from ebay) USB => UART (whole board with xtal and headers and everything)
[14:01:46] <OndraSter_> MAX6something = the thermocouple reader
[14:02:00] <creep> never heard of it, is it some attiny with vusb? :)
[14:02:53] <OndraSter_> MAX31855
[14:02:57] <OndraSter_> no
[14:03:00] <OndraSter_> it is whole full blown chip
[14:03:02] <OndraSter_> from china :D
[14:03:08] <creep> ahaa
[14:03:35] <creep> they made a factory producing 10^9 every week
[14:03:37] <OndraSter_> http://www.ebay.com/itm/USB-To-RS232-TTL-PL2303HX-Auto-Converter-Module-Converter-Adapter-5V-3-3V-Output-/350568364250?pt=LH_DefaultDomain_0&hash=item519f80b8da
[14:03:39] <OndraSter_> yes
[14:03:57] <creep> i use platinum RTD btw
[14:04:14] <OndraSter_> I bought thermocouple
[14:04:40] <OndraSter_> I got the MAX31855 as a sample :D
[14:04:44] <OndraSter_> two or three pieces I think
[14:04:44] <creep> it has about 0.25% precision and very simple to use since it has absolute response
[14:04:52] <OndraSter_> :)
[14:05:17] <creep> like 100.0 ohm at 0 C, so 1mA gives 100mV
[14:05:35] <creep> 270C 200mV for example
[14:06:20] <creep> almost linear, there is a method calculating precise results
[14:12:45] <creep> http://en.wikipedia.org/wiki/Resistance_thermometer
[16:49:00] <Valen> USB Power Delivery specification
[16:49:00] <Valen> In July 2012 the USB Promoters Group announced the finalization of the USB Power Delivery ("PD") specification, an extension that specifies using certified "PD aware" USB cables with standard USB type A/B connectors to deliver up to 100 W of power at 20V. For PD-aware cables with USB-micro B/AB connectors the maximum power supported is up to 60W at 20V, 36W at 12V and 10W at 5V. In all cases, either host-to-device or device-to-host conf
[16:49:15] <Valen> 20v on a usb port
[16:49:25] <Valen> be caaaaareful ;->
[16:51:40] <Malinuss> Valen, lol
[16:52:38] <OndraSter_> lol
[16:55:41] <Malinuss> OndraSter_, you better get back to your board design!
[16:55:50] <OndraSter_> NO
[16:55:51] <OndraSter_> .
[16:56:16] <Malinuss> haha but what will happen when people connect it to 20v usb?
[16:56:17] <Malinuss> :O
[16:56:30] <OndraSter_> there won't be 20V USB
[16:56:33] <OndraSter_> there will be still regular USB
[16:56:43] <OndraSter_> and it will negotiate and inform you that you can supply 20V
[16:56:51] <OndraSter_> actually, my board is upto 24V capable :)
[16:57:12] <OndraSter_> then the SMPS controller will supposedly die
[16:57:16] <OndraSter_> the input cap is 35V rated
[16:57:19] <OndraSter_> it is big mofo :o
[16:57:24] <OndraSter_> 10uF/35V ceramic
[16:57:28] <OndraSter_> 1210 package I think
[17:06:38] <creep> usb3 has moore pins
[17:11:23] * Valen is using a 1210 10v ceramic cap
[17:11:33] <Valen> meant to handle DC better in lower packages
[17:31:24] <creep> i think i'd use 2 wires for transferring power to my 2000W oven, not usb
[17:31:57] <creep> like a 230V grounded cable
[17:34:03] <theBear> lol, me too
[18:01:56] <jacekowski> USB is Universal
[18:02:29] <jacekowski> you should be able to use your oven with it
[18:02:55] <krphop> but only if you're cooking serial on the bus with it
[18:20:46] <basiclaser> :P
[18:23:17] <Valen> reading about some ECU stuff somebody DIYed for a bike talking about low down power “It pulls like a 15-year-old with his first copy of Penthouse!”
[18:23:20] <Valen> ROFL!
[18:24:17] <theBear> lol
[18:56:35] <creep> http://img.weiku.com/a/002/633/Newwest_Optical_Fiber_Hair_Led_Flashing_Braids_5935_3.jpg :)
[19:12:27] <vsync_> god damn. might have a busted bearing on a brand new brushless motor
[19:12:33] <vsync_> bought 4, 3 of them work just fine but one has slight problems
[19:12:44] <vsync_> chinese products... quality control isn't really their strong point
[19:12:59] <creep> hahaha
[19:13:24] <creep> and there are places where you can get one bearing for the price of your whole motor
[19:13:57] <creep> i have a bldc too with damaged bearings
[19:14:50] <creep> 2 bearings cost $20, (5mm shaft)
[19:15:16] <Valen> vxb.com
[19:15:45] <Valen> is there a difference in footprint between tsop-5 and sot23-5?
[19:17:16] <Tom_itx> probably
[19:17:23] <Valen> :-<
[19:17:38] <Tom_itx> one may be wider than the other, i'm not sure
[19:18:05] <Tom_itx> tiny10 is sot23-6
[19:18:12] <Tom_itx> same basic size
[19:18:27] <Tom_itx> look in the eagle footprints
[19:18:29] <Tom_itx> it may show you
[19:18:40] <Valen> using kicad
[19:18:59] <Valen> doesn't have a specific footprint for the tsop5
[19:19:08] <Tom_itx> lemme see if it has them...
[19:19:41] <Valen> all its tsop parts are for flash chips
[19:20:22] <Tom_itx> i don't see a tsop5 in the libs
[19:21:06] <Valen> yeah, kicad has a set of footprints imported from eagle and its not there either
[19:21:07] <Tom_itx> i think tsop may be wider
[19:21:40] <Valen> 2.5mm tsop vs 2.2mm sot
[19:21:40] <Tom_itx> like those really wide skinny chips you see
[19:21:50] <Valen> .85 vs .95 mm pin spacing
[19:21:52] <Valen> bastard
[19:22:50] <Tom_sbc> http://www.google.com/imgres?imgurl=http://pinout-circuits-images.dz863.com/30/1007562-circuit-1.png&imgrefurl=http://www.dz863.com/circuits-1-899100756263-SCHEMATIC_Tsop-5-Case-483-02-Issue-H/&h=1100&w=850&sz=23&tbnid=tpJAFpJJI99GEM:&tbnh=93&tbnw=72&zoom=1&usg=__Vt2ku4Ova-TUZOxV5vIDQwV9EHc=&docid=OlGqYChQ6ZZQ9M&sa=X&ei=tlwtUZDwB4rKqQGb3ICADQ&ved=0CE8Q9QEwAw&dur=3662
[19:23:42] <Valen> yeah, looks like I'll have to make a new footprint
[19:23:49] <Valen> oh well
[19:23:51] <Tom_sbc> close
[19:23:57] <Valen> .1 of a mm
[19:24:05] <Tom_sbc> start with the sot23-6 and move the pads
[19:24:13] <Valen> that was my plan
[19:24:38] <Tom_sbc> i bet either would interchange
[19:24:46] <Valen> its close
[19:24:51] <Valen> but at this scale...
[19:24:53] <Tom_sbc> but i'd want physical proof before i did it
[19:24:59] <Tom_sbc> i know
[19:25:29] <Tom_sbc> http://tom-itx.dyndns.org:81/~webpage/temp/tiny/tinyTPI2.jpg
[19:25:44] <Tom_sbc> there's the sot23-6
[19:26:37] <Valen> dammit Tom_itx get a new modem already lol
[19:26:45] <Tom_itx> i'll go reset it
[19:26:54] <Valen> its getting there
[19:26:58] <Valen> just super slowly
[19:27:03] <Tom_itx> cancel it and i'll restart it
[19:27:10] <vsync_> creep: yep. well these motors are only 100 W max. priced around $ 15 a pop :)
[19:27:11] <Tom_itx> brb
[19:27:33] <vsync_> so it's not the cost that's bugging. It's the fact that I already mounted them :(
[19:30:48] -wright.freenode.net:#avr- [freenode-info] if you're at a conference and other people are having trouble connecting, please mention it to staff: http://freenode.net/faq.shtml#gettinghelp
[19:30:49] <vsync_> http://www.youtube.com/watch?v=sK0sdkU5Q8U better millin'!
[19:31:38] <vsync_> or, like a lot
[19:32:24] <vsync_> Valen: what's the drill bit made out of?
[19:32:34] <Valen> carbide i presume
[19:32:42] <Valen> (its a milling bit btw)
[19:33:14] <vsync_> yeah I know, but generally :)
[19:33:15] <Valen> if your feeling fancy this is the stuff http://www.youtube.com/watch?v=c1K5QjR3hyU
[19:33:25] <vsync_> Wonder what's the lifespan of such a bit
[19:33:32] <Valen> generally good
[19:33:39] <Valen> several hours I'd imagine
[19:35:17] <Valen> there this is the good one
[19:35:17] <Valen> http://www.youtube.com/watch?v=kmReHL3n0FM
[19:35:25] <Valen> thats inconel they are machining there
[19:35:34] <Valen> hard as all heck stuff
[19:36:37] <vsync_> milling is always so nice to watch
[19:36:44] <vsync_> it's like hot knives into butter
[19:36:48] <vsync_> mmmm yes
[19:41:23] <Valen> Tom_itx: what is your internet adsl or cable or something?
[19:41:57] <Tom_itx> cable
[19:42:25] <Tom_itx> i just have a sucky router
[19:44:31] <Valen> so modem and router are seperate?
[19:44:38] <Tom_itx> yeah
[19:45:29] <creep> vsync_<< dead hdds have some bearings too
[19:45:45] <creep> ( the old types )
[19:46:02] <creep> they are like 4mm id
[19:46:16] <creep> and superprecision
[19:46:35] <creep> new ones use FDB
[19:47:59] <creep> hah, i have a very old mfm hdd with the right bearing i want, and i still have to disassemble it, it is very solid in construction
[19:48:42] <creep> it is like it was thermal press-fit
[19:49:48] <inflex> lo there Tom_itx
[19:50:30] <creep> how would you transfer data through a fiber optic cable? FM ?
[19:50:40] <Tom_itx> hey inflex
[19:51:19] <Casper> creep: probably plain binary with some redundancy or something
[19:56:14] <creep> i bet he can communicate with aliens through a wormhole with this magic modulator http://www.seekic.com/circuit_diagram/Communication_Circuit/FIBER_OPTIC_TRANSMTTER.html
[19:58:10] <creep> a thyristor connected pair of transistors
[20:23:09] <creep> http://www.next.gr/converters/frequency-to-voltage/frequency-to-voltage-converter-l13326.html
[20:23:28] <creep> ever been thinking about of this? :)
[22:40:30] <creep> http://www.symmetricom.com/products/frequency-references/chip-scale-atomic-clock-csac/SA.45s-CSAC/ :(
[22:40:56] <creep> now i can have an atomic clocks in my watch
[22:48:04] <creep> only about US$1,500
[23:46:01] <Grievar> okay what the hell
[23:46:37] <Grievar> replacing: ldi r16, 0x00b9
[23:46:49] <Grievar> with: ldi r24, 0x00B9; mov r16, r24
[23:46:50] <Grievar> fixes my code
[23:51:06] <Grievar> ... okay, putting a nop there fixes it too. The hell?
[23:51:17] <Grievar> could it actually be the case that my interrupt handler is just too fast?