#avr | Logs for 2013-10-02

Back
[04:24:19] <WormFood> no comments on my new updated baudcalc page?
[06:56:58] <megal0maniac_afk> WormFood: Yes!
[06:58:17] <megal0maniac_afk> I see that the tooltips only go up to 10.24mhz, but I like them. They're interesting
[06:59:09] <Fornaxian> url?
[06:59:13] <megal0maniac_afk> Makes much better use of screen real estate. Even on 1366 wide display. Also useful in general for scaling the window and not having to scroll up/down left/right
[06:59:20] <megal0maniac_afk> Fornaxian: http://www.wormfood.net/avrbaudcalc-1.3.0.php
[06:59:38] <megal0maniac_afk> (i.e. only up/down)
[07:00:39] <Fornaxian> nice
[07:01:31] <megal0maniac_afk> Um... the abundance of options is a bit overwhelming, but that's probably because I don't understand half of them. Capitalisation is inconsistent, but that's trivial to fix
[07:17:51] <megal0maniac_afk> Otherwise, great
[07:18:05] <megal0maniac_afk> Haven't managed to break it ;)
[07:20:40] <WormFood> my fuckin' server crashed on me, in the middle of editing the file...and fuckin' firefox won't refetch the page...so I deleted 88 lines of changes I made to see if I screwed up something, and then the server crashed, so now I can't undelete those lines from the buffer....really pissed off about that
[07:20:56] <WormFood> but the biggest thing I did with 1.3, is to give a tooltip when you mouseover the baud rate table
[07:21:06] <WormFood> it only goes up to 10.4 Mhz
[07:22:19] <WormFood> what do yo guys think about that?
[07:22:40] <WormFood> and I was thinking about making a selectable baud rate list, and bit rate list
[07:23:07] <WormFood> like maybe someone wants 110 baud...I contemplated adding that to the list, but decided not to....I could make that baud rate list customizable
[07:23:19] <tzanger> my first impression of the page is it's overwhelming
[07:23:54] <tzanger> instead of such bright colours perhaps try scaling back on the chroma and maybe using grey on white or grey on faded red to denote baudrates that do not work
[07:25:09] <tzanger> the mouseover text is different for each table but the mouseover text looks like it'd be better as a table description rather than a mouseover
[07:25:26] <tzanger> very good notes though; 6.144 commonly used for digital audio, 8 for CAN, etc.
[07:29:11] <tzanger> I don't understand why it's a calculator if you show all the input crystals anyway... shouldn't you either make it a calculator or a baudrate generator configuration table but not both?
[08:07:23] <vsync_> morning
[11:02:21] <ColdKeyboard> SUMP protocol doesn't support dumping data directly to the application, instead you have to sample it and then dump?
[11:44:58] <jadew> ColdKeyboard, it supports that
[11:45:29] <jadew> the protocol, the devices, not so much
[11:45:50] <jadew> so if you're implementing the protocol yourself, you can make it output stuff for however long you want
[11:51:10] <ColdKeyboard> jadew: Cool, I didn't know that... Documentation on the protocol is very skiny :\
[11:52:27] <ColdKeyboard> Anyway, how many cycles does it take on Tiny2313 to do following: Enter USART_UDRE interrupt and transmitt PINB to UART at 38400baud
[11:53:11] <jadew> well, that depends on your clock speed
[11:53:31] <jadew> 38400baud means different number of cycles based on the clock
[11:54:24] <jadew> but IIRC it takes about 16 clocks to push a bit out
[11:54:59] <ColdKeyboard> Oh, and clock speed is 8MHz
[11:55:03] <ColdKeyboard> I forgot to tell that :)
[11:55:17] <LoRez> the latter part is just a couple of clocks. you do a read into a register and a write into another one.
[11:55:36] <LoRez> how long the actual transmission takes in clocks, depends on the clock speed.
[11:56:00] <LoRez> but as long as you're letting the interrupt handler deal with it, it doesn't take much in the way of clock cycles.
[11:58:45] <ColdKeyboard> Ok, but where can I find how many cycles does it take so I can calculate the sampling speed, or how much time passes between every UDR = PINB :)
[11:59:16] <jadew> you can either take a look at the asm code
[11:59:36] <jadew> or output something and look at it on a scope
[12:02:30] <bss36504>
[12:02:31] <bss36504>
[12:02:31] <bss36504>
[12:02:31] <bss36504>
[12:02:32] <bss36504>
[12:02:32] <bss36504>
[12:02:32] <bss36504>
[12:02:33] <bss36504>
[12:02:33] <bss36504>
[12:02:33] <bss36504>
[12:02:34] <bss36504> If I'm not mistaken, 38400baud is 38400 bps, which would give
[12:02:34] <bss36504> which is 13us per clock,,times 8 is 104us/byte
[12:02:49] <bss36504> register loading should be single clock cycles.
[12:02:59] <twnqx> wow
[12:03:05] <twnqx> a wall of emptry
[12:03:08] <twnqx> empty*
[12:03:10] <vsync_> =O
[12:03:23] <daowee> a page of ws
[12:03:34] <bss36504> what?
[12:03:53] <twnqx> you dropped a few hundred spaces into the channel.
[12:03:59] <twnqx> maybe a few thousand.
[12:04:13] <bss36504> what do you mean?
[12:04:38] <bss36504> did I break something?
[12:05:52] <twnqx> http://img819.imageshack.us/img819/1548/ijev.png
[12:06:11] <twnqx> had to resize the window to take that screenshot :P
[12:06:27] <braincracker> h
[12:06:33] <bss36504> oh damn. sorry guys. It didn't/doesn't show in my client
[12:06:34] <jadew> you could have simply copy pasted
[12:06:55] <twnqx> lol
[12:07:06] <WormFood> thanks for clearing my screen for me
[12:07:43] <jadew> whenever you feel like /clear, just call bss36504
[12:08:07] <bss36504> come on guys! I said I was sorry! :P
[12:08:08] * WormFood wonders if 36504 is a DSS key
[12:08:27] <bss36504> ^nope
[12:08:34] <WormFood> er, I mean BSS key
[12:08:48] <WormFood> d'oh
[12:09:04] <WormFood> you know what BSS is?
[12:09:04] <bss36504> I got what you meant lol
[12:09:36] <bss36504> cant say that I do
[12:10:00] <bss36504> oh wait. I do.
[12:10:03] <WormFood> er, I'm wrong, I'm thinking of biss
[12:10:14] <WormFood> http://en.wikipedia.org/wiki/Basic_Interoperable_Scrambling_System
[12:10:36] <bss36504> ah ok. I though you were alluding to .bss files.
[12:10:44] <WormFood> been so long since I've played with that stuff
[12:10:56] <WormFood> I had my mom bring my satellite receiver, but I never got a dish to play with
[12:10:59] <WormFood> I should get one
[12:11:04] <bss36504> but either way, no, its been my go to screen name for pretty much ever
[12:11:09] <WormFood> they're like $15-20 USD I think
[12:11:23] <WormFood> I've used this nick since the late 80s
[12:11:36] * WormFood got his first modem in 1985
[12:11:50] <bss36504> bss36504 wasnt even born in '85
[12:12:04] <WormFood> you young whippersnappers got it so easy now days
[12:12:08] <twnqx> bss36504 doesn't know how to irc :P
[12:12:10] <bss36504> for sure
[12:12:22] <bss36504> also true twnqx
[12:12:33] <bss36504> lern2IRC, bro
[12:12:37] <twnqx> what you wanted to do is /me <action>
[12:12:47] <Tom_itx> WormFood, us robotics 300 baud?
[12:12:55] <bss36504> I remembered that after >.<
[12:12:55] <WormFood> why back in my day, I was lucky to have a modem that plugged into the wall...but it wouldn't auto dial...I'd have to pick up the phone, dial the BBS, wait for the carrier, push the on-line button on the modem, and hang up the phone....and if the line was busy...aw man!
[12:12:55] <twnqx> 300 baud modem... pfff
[12:13:05] <WormFood> no, I had a radio shaft 300 baud
[12:13:09] * twnqx had a 300 baud acustic coupler
[12:13:11] * bss36504 is terrible at IRC
[12:13:14] <Tom_itx> i still have it somewhere
[12:13:24] <WormFood> I traded my modem years ago
[12:13:37] <twnqx> i still have the 28.800baud gear from my BBS :X
[12:13:46] <bss36504> I think I still have a multi-adjustable tremmie pipe somewhere, it reduces sinusoidal side fumbling
[12:14:06] <WormFood> I still have an ISDN "modem" back in USA...it's a USR, and it also will act as an X2 or K56 server (can download at 53k from normal modem)
[12:14:25] <twnqx> heh, asymmetric analog stuff
[12:14:30] <twnqx> V.90/V.92
[12:14:58] <WormFood> I don't think a lot of people really understood, that a "56k modem", was limited to 53k due to power limits....and for upload, in 56k mode was actually slower, than 33.6k mode
[12:15:28] <twnqx> wasn't that more due to US ISDN being 56k only?
[12:15:49] <WormFood> because in 56k mode, the fastest you can upload is 28k...but in 33.6k mode, you can upload and download at 33.6k
[12:15:51] <WormFood> no
[12:16:28] <WormFood> the modem should technically be capable of 56k, but the FCC limits the power they can drive, or something like that...it REQUIRES a digital connection on the X2/K56 server side
[12:16:29] <twnqx> i never bothered with faster analog because i switched straight to 64kbit isdn
[12:17:29] <twnqx> only got to deal with the other end in my early ISP days, terminating 30 analog linex on E1
[12:19:17] <WormFood> http://en.wikipedia.org/wiki/56_kbit/s_modem
[12:19:31] <WormFood> I remember the upload being limited to 28.8k, but that page says 33.6k
[12:19:43] <braincracker> do you like bldc motors ?
[12:20:46] <twnqx> WormFood: probably depends on country, too.. and i think what you refer to was v.90 vs. v.92
[12:20:59] <twnqx> hm no
[12:21:02] <WormFood> no, I was talking about K56/X2
[12:21:20] <twnqx> isn't the third paragraph plain... wrong?
[12:21:21] <WormFood> I didn't learn about V.92, because I never had it
[12:21:31] <braincracker> SSM helps.
[12:21:36] <twnqx> the actual throughput is a maximum of 5.6 kilobits per second <-
[12:22:23] <twnqx> a 10/8 coding doesn't eat 90% of the bandwidth
[12:22:29] <braincracker> Spread Spectrum Modulation reduces EMI effects
[12:23:58] <ColdKeyboard> If I want to select whole PORT B to be INPUT and disable pull-ups I have to DDRB=0x00; then PORTB = 0x00; or first PORTB and then DDRB?
[12:23:58] <N1njaneer> Or at least the measurement of them so you don't fail testing due to one particular frequency peak :)
[12:24:35] <twnqx> ColdKeyboard: doesn't matter
[12:25:14] <WormFood> http://www.wormfood.net/avrbaudcalc-1.3.0.php <-- I think I'm ready to put this into place as the default. If anyone has any suggestions or comments, please let me know. I'm going to be away from the computer for a while, so if I don't respond, I'll still read whatever you say, if you slap my nick on the message ;)
[12:25:42] <twnqx> WormFood ends to early
[12:25:46] <N1njaneer> worm: Looking nice!
[12:25:55] <twnqx> 0.5/1/2mbit is a must
[12:26:22] <WormFood> what do you mean, it ends too early?
[12:26:30] <WormFood> you mean I should list more frequencies?
[12:26:38] <twnqx> yes
[12:26:55] <twnqx> i usually run at 2mbaud :P
[12:27:07] <WormFood> you can put that in the field for the clock frequency :P
[12:27:18] <twnqx> what's the point of the tables then :P
[12:27:43] <twnqx> but the color coding of deviation is nice
[12:28:04] <twnqx> i had indeed problems with 230400 @ 16mhz
[12:28:39] <twnqx> but hm
[12:28:46] <twnqx> could you list the effective baud rate as well?
[12:28:56] <WormFood> what do you mean?
[12:29:19] <twnqx> reverse clock freq & UBRR to calculate the real baud rate
[12:29:20] * jadew rarely runs at the standard baudrates
[12:29:43] <WormFood> here is a trick to do that....check the first box, and enter your baud in the box
[12:29:45] <abcminiuser> Anyone want to try another beta extension in AS6?
[12:29:52] <twnqx> heh
[12:30:08] <twnqx> WormFood: ...
[12:30:14] <twnqx> i can't enter 7 digit numbers.
[12:30:30] <WormFood> it's 6 digits
[12:30:34] <twnqx> 2000000 isn't
[12:30:45] <WormFood> oh...yeah....I suppose, it should be able to handle higher speeds.
[12:30:48] <WormFood> hold on....
[12:31:27] <WormFood> ok, try it now
[12:32:00] <sjokkis> to enable PCINT4 on an avr, should i have to do anything except write the PCINT4 bit to PCMSK0 and the PCIE0 bit to PCICR and then enable global interrupts?
[12:32:23] <twnqx> WormFood: 2000000 / 16mhz is wrong
[12:32:25] <sjokkis> i've checked and double checked, and i'm pretty sure that's all there's to it, but it doesn't trigger
[12:32:29] <twnqx> it claims an error of 100%
[12:32:33] <twnqx> while the error is 0
[12:32:38] <jadew> sjokkis, no, that's about it
[12:33:54] <jadew> twnqx, you can do 2 000 000 @ 16Mhz only in 2x mode
[12:34:20] <twnqx> whoopsie.
[12:34:31] <twnqx> yeah, i use double speed from 1200 on :P
[12:34:45] <twnqx> uint8_t u2x = (rate >= 1200);
[12:34:45] <twnqx> uint32_t ubrr = F_CPU / ((u2x?8:16) * rate) - 1;
[12:34:46] <twnqx> :P
[12:36:10] <WormFood> ok twnqx give me some examples of what it should be, and I'll check it out later (include your math too, if possible)
[12:36:19] <WormFood> thanks ;)
[12:36:23] <twnqx> my mistake, it was correct
[12:36:28] <WormFood> cool!
[12:36:35] <twnqx> didn't assume the u2x=0 case
[12:36:39] <WormFood> It should be...the math should be the same ;)
[12:36:56] <twnqx> i let the poor AVR do heavy 32bit lifting :(
[12:37:04] <jadew> yeah, the error would be the same, but UBRR would be -1 or something
[12:37:18] <WormFood> I just didn't allow for extremely large values (but you could enter it on the URL ;)
[12:37:54] <sjokkis> jadew: Fixed it. Thanks
[12:38:01] <WormFood> good night all (I'ts 1:22 am, and I got a nice girl in my bed, waiting for me) 晚安
[12:38:05] <jadew> sjokkis, what was the issue?
[12:38:15] <sjokkis> jadew: I'd defined INT0_vect and not PCINT0_vect
[12:38:20] <jadew> heh
[12:38:30] <jadew> night
[12:56:09] <ColdKeyboard> So, once again. If I transmitt PINB over usart every time transmitt register is empty. At 8MHZ and 38400baudrate, It should send PINB status about every 110-120us?
[13:03:26] <ColdKeyboard> I'm switching to 20MHz external crystal to get even more speed out of tiny :)
[13:06:12] <bss36504> Alright I'm pulling my hair out here trying to connect via ISP to an Atmega32U2 with an ISP mkII. it just wont connect. I've scoped all the data lines out, and the chip sees clock, MOSI, and reset. There just isnt any life on the MISO pin. Any Ideas?
[13:06:33] <sjokkis> ColdKeyboard: you sure it's designed to handle that speed?
[13:06:51] <ColdKeyboard> sjokkis: I just tested it with 20MHz and 115200 and it works fine
[13:07:02] <sjokkis> bss36504: maybe your ISP is fucked. several of the ones we have at the lab are
[13:07:07] <N1njaneer> bss: Factory-blank chip?
[13:07:17] <ColdKeyboard> now I have to calculate the time between every PINB transmission
[13:07:31] <bss36504> sjokkis: My ever-reliable JTAGICE3 cant see it either
[13:07:42] <sjokkis> bss36504: Ok so not that
[13:07:57] <N1njaneer> bss: Your board design or a known-good dev-board, etc?
[13:07:59] <ColdKeyboard> Can someone point me to documentation or any source where I can find how much cycles it takes to handle USART Transmitter Interrupt and send PINB to UART at 115200 baud and 20MHz clock?
[13:08:37] <bss36504> N1njaneer: full custom board, but the only components on it right now are the MCU, the power regulator and a 4.7K pull-up for reset
[13:08:39] <sjokkis> bss36504: are you using atmel studio? when you connect the jtagice you can read the voltage and the chip id. can you read either?
[13:09:02] <N1njaneer> Cold: Handling the interrupt time is really going to be based on how the ISR is written/implemented.
[13:09:08] <bss36504> sjokkis: I can read voltage fine, and it is in spec, but It wont enter programming mode so I cant even get chip id
[13:09:16] <N1njaneer> bss: Guaranteed blank chip?
[13:09:27] <bss36504> N1njaneer: Just soldered it on
[13:09:51] <sjokkis> bss36504: are you confident in your soldering skillz?
[13:10:08] <bss36504> Very. I can do basically anything by hand, plus I have a hot air station.
[13:11:36] <N1njaneer> bss: I'd double-check to make sure power is going to the correct pins. Also if it's a 32U2 I believe it may require an external clock to be applied, as I can't recall if they will start-up on internal. Since it's a USB part they will come pre-loaded with the DFU bootloader. I always have an 8Mhz clock crystal or resonator attached to my designs with the U2/U4 parts
[13:11:59] <N1njaneer> bss: If it doesn't support internal clock, the ISP won't run.
[13:12:24] <N1njaneer> bss: Also, have you checked the speed ISP is trying to run at?
[13:12:28] <bss36504> Now, for more info, I started this design with an AT90USB162, but some dumbass at atmel decided they would make the default clock external, so I figured my problem was a lack of clock (even though I tried supplying a clock via the clockin pin). I switched to the 32U2 because it specifically says in the datasheet that it defaults to the 8MHz internal RC clock, unlike the 90USB162 that specifically says it requires external clocking
[13:12:43] <bss36504> ISP is set to the lowest setting (~2KHz)
[13:13:49] <bss36504> Can I set it to DebugWire without using ISP?
[13:13:57] <N1njaneer> bss: Do you have an external clock on it or not?
[13:14:03] * bss36504 wishes this chip had jtag
[13:14:19] <bss36504> N1njaneer: no, I could supply one I suppose, but the design has no crystal
[13:15:07] <ColdKeyboard> How can I in atmel studio force program to enter interrupt? :\
[13:15:41] <ColdKeyboard> It doesn't enter interrupt altough it should almost loop inside it since it's the only code that I have beside setup :\
[13:15:51] <bss36504> ColdKeyboard: I dont rember if you can, but if you can force register values, that would be the way
[13:16:04] <bss36504> ie, set the interrupt flags manually
[13:19:44] <ColdKeyboard> I just put the code from Interrupt into the while and I get about 10us execution time
[13:19:53] <ColdKeyboard> from sending one UDR to another
[13:20:19] <ColdKeyboard> I don't know how much does it take to re-enter interrupt since it will trigger itself as soon as it sends previous byte
[13:23:14] <N1njaneer> bss: Have you tried to see if you can connect to any other working boards via ISP?
[13:23:45] <bss36504> I can connect to a 328 via ISP
[13:23:55] <N1njaneer> bss: I actually just tried to connect here, and the drivers or such wonked out again as they sometimes do, and NONE of my ISP programmers are connecting to working targets. Time to restart AVR Studio or the computer.
[13:24:17] <bss36504> alright I havent done that yet...
[13:24:35] <N1njaneer> bss: Have you confirmed the ISP talks to your 328 right now?
[13:24:54] <bss36504> hang on a second, I'll try it
[13:24:54] <N1njaneer> Restarting AVR Studio fixed it.
[13:25:29] <N1njaneer> For some reason the USB driver seems to get confused at times - the ISPs will show up just fine and Studio will connect to them, but they won't then talk to the target.
[13:26:22] <bss36504> works fine with the mkII and the 328
[13:27:00] <N1njaneer> bss: Okay, pulled up an ATMEGA32U2 here - looks like (as I suspected) they are programmed at the factory to expect to see an external clock signal applied. This one starts up as EXTOSC_3MHZ_8MHZ_16KCK_65MS
[13:27:32] <N1njaneer> I would try applying clock signal to your clock pins (even a TTL clock from a function generator) and see if you can get it to respond.
[13:28:07] <bss36504> Datasheet Rev 7799D-Section 8.3.1 Default Clock Source
[13:28:17] <bss36504> The device is shipped with internal RC oscillator at 8.0 MHz and with the fuse CKDIV8 pro- grammed, resulting in 1.0 MHz system clock. The startup time is set to maximum and time-out period enabled. (CKSEL = "0010", SUT = "10", CKDIV8 = "0"). The default setting ensures that all users can make their desired clock source setting using any available programming interface.
[13:28:28] <bss36504> I'll try the external clcok though :/
[13:29:12] <N1njaneer> Hmm, I'm trying to remember if we wind up potentially blowing the fuses in our production here, so I recind the previous statement.
[13:30:04] <N1njaneer> Yeah, I think we set the fuses during production here for specifically using the external resonator.
[13:30:12] <N1njaneer> So ignore me :)
[13:30:31] <N1njaneer> Didn't have any virgin boards sitting here to try :)
[13:30:38] <bss36504> Well its worth a shot anyway. I dont think it will get anymore broken lol
[13:32:35] <N1njaneer> bss: Are you using it for USB-purposes?
[13:32:52] <bss36504> eventually when it programs
[13:33:00] <bss36504> but yes, it is connected via usb
[13:33:12] <N1njaneer> And it didn't show up to the PC?
[13:33:32] <N1njaneer> It will come up as an ATMEGA32U2 by default from factory, since Atmel pre-loads it with DFU
[13:33:42] <bss36504> well it wont unless I add the reset and HWB stuff i thought
[13:34:03] <bss36504> my at90USB1287 never did, but I got that one working.
[13:34:22] <bss36504> (of course, that also had jtag, which is the best IMO)
[13:34:25] <N1njaneer> All of the Atmega32U2's we do here come up straight off the board, no reset and no HWB
[13:34:34] <bss36504> huh....
[13:34:46] <N1njaneer> Are you powering from USB?
[13:34:47] <bss36504> where do I see it? inside flip?
[13:34:50] <bss36504> yes
[13:35:00] <N1njaneer> Are you on Windows?
[13:35:36] <bss36504> well, a windows VM, but my VM program doesnt see it so It's safe to say it's not enumerating at all. It would give me the option of which machine to connect it to
[13:35:41] <N1njaneer> If so, it will show up (in win7) under Devices And Printers, and/or in Device Manager on 7/XP
[13:36:43] <sjokkis> so this is interesting. GCC expects PCINT0_vect to return an int
[13:36:58] <N1njaneer> Do you have the 1uf on the UCAP?
[13:37:24] <sjokkis> "type of '__vector_9' defaults to 'int'"
[13:37:29] <sjokkis> not sure how that even makes sense
[13:38:09] <N1njaneer> Assuming you are running at 5V, chip's VCC, UVCC and AVCC should be tied to VBUS on the USB port. GND and UGND (and PAD ground if QFN) should be tied to USB GND
[13:38:17] <N1njaneer> 22 ohm's on D- and D+
[13:38:31] <bss36504> ok, strangeness. I connected the function generator, turned off, and suddenly I can READ from the chip. The fuses say that it wants an external osc. The reading is consistent. When I try and change fuse settings, it fails on the register verify.
[13:38:32] <N1njaneer> 1uf on UCAP to Ground
[13:38:34] <bss36504> wut?
[13:38:57] <bss36504> the generator is off. This makes no sense. lemme disconnect...
[13:39:19] <N1njaneer> bss: Yeah, that's what I *thought* was the case, was the external oscillator setting on the clock fuses. That MIGHT be an error in the Atmel datasheet.
[13:39:45] <bss36504> I'm going to write an incensed email if this is the case. I am irate :P
[13:40:11] <bss36504> ok, with generator disconnected, it fails the chip ID read etc.
[13:40:24] <N1njaneer> Seeing if we can pry dean in here for a moment
[13:41:06] <ColdKeyboard> :( How come I get about 250KHz from the 20MHz clock when I try to constantly send PINB over USART with 115200baud :\ :\
[13:42:58] <bss36504> Gaahhh! this is so frustrating. I can read, but I cant write. My super ghetto function generator also doesnt go above 2Mhz, so I cant get it to the 8+ that the chip expects.
[13:44:08] <N1njaneer> bss: If you can at least apply signal you can manipulate the fuses. You will need to erase the entire device first, however, as it is locked.
[13:44:55] <learath> bss36504: so make a better one? :)
[13:45:43] <bss36504> N1njaneer: I owe you a beer. The erase just saved my ass.
[13:46:21] <N1njaneer> abc says the parts do default to internal RC Oscillator for start-up, but that the bootloader then switches it in to external oscillator mode when it starts up, which is kind of... weird. So the datasheet is technically correct, but that's a really major gotcha.
[13:47:01] <bss36504> Well that's bullshit
[13:47:20] <bss36504> How would you know that? Oh right, work for atmel.
[13:48:03] <N1njaneer> Because I SWEAR I've seen the fuses set to EXT_OSC, but he also says that there are apparently a few different suffixes they will add on the order codes to have the fuses either default, or with the bootloader present.
[13:48:25] <abcminiuser> BECAUSE SCIENCE
[13:48:36] <N1njaneer> Okay, clarification, Atmel programs the BOOTLOADER AND FUSES
[13:48:43] <abcminiuser> Jupp
[13:49:45] <ColdKeyboard> It seems that I can't get more than 260 bytes per second over usart with 20MHz crystal at 115200... Does that seem right to you? :\
[13:49:59] <N1njaneer> abc: I'm going to make millions selling a little 8Mhz probe called the Clock Injector 8000, to help out ISP start-up problems :)
[13:50:06] <learath> that seems *really* slow...
[13:50:29] <bss36504> As if the 32U2's weren't hard enough to find stocked before, now I need to search for one with the right suffix.
[13:51:30] <bss36504> ColdKeyboard: Keep in mind that crystal frequency doesnt make the baud rates faster or slower. It just means they calculate differently for the UBRR.
[13:51:52] <N1njaneer> bss: I *think* those devices require an 8Mhz clock to be able to do USB, though.
[13:51:57] <ColdKeyboard> bss36504: I know but it should take less time to take PINB states and put them to UDR register
[13:52:30] <ColdKeyboard> But I don't know how is it possible to get about 240bytes per second, even when I'm sending a constant (not PINB)
[13:52:32] <ColdKeyboard> :\
[13:52:51] <bss36504> N1njaneer: It will be fine, unless the spec lies :P No, i've done it with the 90USB1287
[13:52:51] <N1njaneer> bss: So might want to hack one into your board, or jump up to a 32U4
[13:53:22] <bss36504> are they faster?
[13:53:29] <N1njaneer> Assuming you are doing low-speed devices?
[13:53:57] <bss36504> Whatever the chip supports, which I belive is high speed or full speed (the slower one)
[13:54:10] <N1njaneer> abc could speak to this better. I always put (at minimum) a ceramic resonator on all of my designs except for the most bare-bones of Tinys :)
[13:54:13] <learath> "Full Speed" = 12mbits
[13:54:32] <bss36504> the USB PLL multiplies by 6, with a prescale of 1, 1.5, or 2 from the system clock.
[13:54:50] <bss36504> thats the one. I was too lazy to scroll to the top of the datasheet
[13:55:36] <ColdKeyboard> I should be able to send 11.520 bytes per second with 115200 baudrate, right?
[13:55:48] <ColdKeyboard> If I have one start and one stop bit with no parity
[13:56:12] <learath> roughly
[13:56:19] <N1njaneer> I'm just leary of the timing accuracy of an internal RC that's expected to PLL up to 48Mhz for USB vs adding a 0.15 USD resonator :)
[13:56:32] <N1njaneer> That and, well, the start-up problem :)
[13:56:46] <learath> just use a crystal :P
[13:57:05] <ColdKeyboard> Then I don't get why I'm getting 240 bytes per second or 48 times less than I should :\
[13:57:19] <RikusW> abcminiuser: why do Atmel set the lockbits on the FLIP bootloader ?
[13:57:41] <RikusW> The LPM boot bit isn't set, so its easy to downloader using fw
[13:58:06] <N1njaneer> Rikus: I assume to secure it against overwriting if you are loading your application via it :)
[13:58:07] <RikusW> The Flash RW lockbits are just a minor annoyance...
[13:58:27] <RikusW> then they can only set the W lockbit
[13:59:07] <RikusW> and only the boot SPM bit needs be set
[13:59:18] <RikusW> (cleared actually :-P )
[14:00:14] <N1njaneer> I've asked that myself. Thankfully you can always just reload your bootloader flavor of choice after you erase the device.
[14:00:33] <RikusW> I've dumped the originals
[14:00:44] <RikusW> for both 32u2 and 32u4
[14:04:58] * RikusW got a iBad defective by design sticker at a RMS talk :)
[14:05:11] <RikusW> he was in ZA last month
[14:21:06] <Knaldgas> I want to use an ATtiny to sample some values once per second, and use very little power. The sample interval does not have to exact one second, but should be equidistant. What is the de-facto way to keep a reasonable timing and very low power? (Power-down mode is necessary).
[14:22:28] <Knaldgas> A good 32KHz external clock, and then let the WDT wake it up once per second?
[14:27:55] <RikusW> WDT got its own clock
[14:28:05] <RikusW> or use 32k crystal and a timer
[14:28:21] <RikusW> *timer + compare interrupt
[14:29:54] <Knaldgas> Ah yes, right a 128KHz... I'm looking at ATtiny's but it doesn't seem that their timers are working during power-down mode...
[14:40:01] <ColdKeyboard> I'm using python script to log data from serial port but it seems that it's too slow. :\
[14:40:06] <ColdKeyboard> Anyone had similair problems?
[14:51:18] <[w_w]> theres low power RTC chips with alarm outputs.
[14:57:37] <Knaldgas> [w_w]: Yes, however I have the feeling that I must have missed something. Some older(?) ATmegas has TOSC1 and TOSC2 pins for asynchronously driving a timer, eben in power down mode.
[14:58:02] <Knaldgas> My thought is that Atmel must have implemented this in a different way that eludes me right now.
[14:58:27] <Knaldgas> Internal 32KHz RC, can't really be called "RTC"?
[15:05:01] <braincracker> zombies are coming! http://www.youtube.com/watch?v=EfXs0ycpNZg
[15:17:29] <braincracker> Mother Decapitates, Stabbed, Eats 3 1/2 week old Baby http://www.youtube.com/watch?v=kgO42hAgELU
[16:13:14] <braincracker> ohoo yea, bath salt directly from england via mail http://www.youtube.com/watch?v=teHW7SICd1c
[20:11:44] <spec_> ColdKeyboard: Post yer code.