#avr | Logs for 2013-03-07

Back
[03:34:48] <sabesto> isnt the new ATMega256RFR2 supported in libc?
[07:41:43] <solexious> I'm a bit stuck on the tiny2313 datasheet trying to work out what timer is the 16bit one, and so what pin it is on, can anyone tell me where it says it? http://www.atmel.com/Images/doc2543.pdf
[07:42:07] <RikusW> timer 1 usually
[07:42:31] <RikusW> there should be a number in the pin name to indicate
[07:53:22] <Tom_itx> solexious, page 82
[07:55:48] <Tom_itx> refer to page 2 for the associated pins
[07:58:05] <Tom_itx> OC1A OC1B pins 16 (PB4) and 15 (PB3)
[08:36:31] <Rickta59> just noticed the attiny1634 .. seems to be 12MHz chip but datasheet gives examples of 20MHz baud rate settings .. is it 12 or 20?
[08:37:06] <theBear> probably depends which version you buy
[08:37:42] <OndraSter> or what xtal you feed it
[08:37:52] <vectory> obviously
[08:38:13] <Rickta59> i see some with an r on the part name but i don't see any reference to that in the datasheet
[08:38:19] <theBear> i haven't bought any avrs that new, but you used to buy different ones for different speeds
[08:38:30] <Rickta59> in octopart the ones with an r seem to be labeled 20MHz there
[08:38:33] <theBear> max speeds that is
[08:39:29] <Rickta59> in the datasheet even the ones with R Attiny1634R-MUR still say 12
[08:39:42] <Rickta59> so octopart mislabel?
[08:40:36] <OndraSter> Speed Grade:
[08:40:37] <OndraSter> – 0 – 2MHz @ 1.8 – 5.5V
[08:40:37] <OndraSter> – 0 – 8MHz @ 2.7 – 5.5V
[08:40:37] <OndraSter> – 0 – 12MHz @ 4.5 – 5.5V
[08:40:38] <OndraSter> no 20MHz
[08:40:50] <Rickta59> http://octopart.com/attiny1634r-mur-atmel-22282196
[08:40:59] <Rickta59> that is where i got the idea it might be 20MHz
[08:41:18] <OndraSter> Code indicators:
[08:41:18] <OndraSter> – U: matte tin
[08:41:18] <OndraSter> – R: tape & reel
[08:41:19] <OndraSter> ;)
[08:41:21] <OndraSter> datasheet yo
[08:41:23] <Rickta59> http://www.digikey.com/product-detail/en/ATTINY1634R-MUR/ATTINY1634R-MURTR-ND/3441402?WT.z_cid=ref_octopart_dkc_buynow
[08:41:34] <Rickta59> DescriptionIC MCU 16K FLASH 20MHZ 20MLF
[08:41:51] <Rickta59> ah .. down below says 12
[08:41:53] <Rickta59> nm
[08:42:45] <Rickta59> just a mislabel on digikeys part
[11:00:43] <iSaleK> I've looked at the new AVR Fuse Doctor design and it has pull-down on the RX pin, is there any literature where I can find out why and when it's necessery/recommended?
[11:39:16] <Malinuss> Rickta59, it's obvious you are not used to order components from ebay ;P
[12:00:06] <iSaleK> I've looked at the new AVR Fuse Doctor design and it has pull-down on the RX pin, is there any literature where I can find out why and when it's necessery/recommended?
[12:17:55] <solexious> can anyone recommend a tutorial on controlling a servo with gcc and a tiny?
[12:19:42] <Malinuss> solexious, should be pretty streigh forward. Just use fast pwm at 20hz, and set it to "turn on, on top, and turn off on compare", then just change compare - that will set the angle
[12:19:53] <Malinuss> tutorial right there ^ ;D
[12:21:38] <solexious> Malinuss: sadly being able to code that is one step up from my current skills with gcc :)
[12:23:04] <Malinuss> solexious, your learning steps should be as follow: 1) learn how to set up the timer 2) learn how to set up different pwm modes 3) make your avr work with a servo
[12:25:14] <solexious> righto
[12:26:31] <Malinuss> finding tutorials on those will be trival
[12:26:43] <Malinuss> and then controlling your servo will be trival too
[12:27:44] <solexious> Guess I was trying to skip ahead :)
[12:34:41] <OndraSter__> abcminiuser, dude, I had a question for you
[12:34:42] <OndraSter__> yesterday
[12:34:46] <OndraSter__> and I remembered it the second you left
[12:34:50] <OndraSter__> but I can't remember it now!
[12:34:51] <abcminiuser> Mmm?
[12:34:55] <abcminiuser> Oh :P
[12:35:04] <OndraSter__> it is my bloody memory
[13:15:13] <jeffszusz> hello folks; i'm looking for a bit of information about what makes certain avr chips different than others with very similar names - for example what a capital A or M in the name means (I know P is picoPower and U seems to mean usb interface...perhaps)
[13:15:35] <jeffszusz> also what makes an avr chip designated as an "automotive" chip special
[13:17:40] <jeffszusz> is the only difference for the 'automotive' chips their max operating temperature?
[13:24:30] <LoRez> they probably have CAN bus support as well
[13:28:28] <dunz0r> If I have two defines. Like #define X 4 and #define Y (2*x) , will avr-gcc evaluate the results compile time and insert 8 where I put Y or will it put 4*2 ?
[13:28:49] <creep> yes
[13:29:07] <asteve> #define X 4 would making me want to punch babies
[13:30:09] <creep> i define matrix multiplication and define 2 matrices and gcc uses the result ^^
[13:30:28] <dunz0r> creep: Awesome, thanks for the answer :)
[13:30:37] <dunz0r> asteve: Any particular reason?
[13:31:04] <asteve> dunz0r: if you actually used X
[13:31:07] <creep> dunz0r<< but it is case sensitive :P
[13:31:16] <dunz0r> Well, duh :P
[13:31:20] <asteve> it makes reading your code incredibly hard
[13:31:23] <dunz0r> asteve: Haha, no of course not :)
[13:31:24] <asteve> thus the baby punching
[13:31:34] <creep> haPPyfunction() HaPPyfunction() ...
[13:31:51] <dunz0r> he define is called BASE_SPEED or something
[13:32:06] <dunz0r> s/or something//
[13:34:59] <dunz0r> Depends though... if it's an actual X-value, as in on a cardesian plane, X might not be a bad name
[13:35:10] <dunz0r> I'd probably name it X_VALUE if it was though.
[13:42:06] <creep> :) gcc floatingpoint macro magic (PC) http://pastebin.com/6xn80BEt
[13:43:24] <beaky> hello
[13:43:32] <beaky> how do I test my programs?
[13:44:03] <creep> start them
[13:48:18] <beaky> http://ideone.com/SGSgYI I tried to run it, but it comes iwth an erro :(
[13:48:20] <beaky> error*
[13:48:59] <dunz0r> beaky: I suggest compiling it, then uploading it on to your µCU
[13:50:11] <beaky> ah *facepalm* right
[13:50:31] * beaky gets his JTAG and breadboard
[13:51:03] <OndraSter__> debugging is a nice feature to have. Screw dumb programmers! :P
[13:51:14] <OndraSter__> but if you can't - serial console ftw
[13:51:32] <OndraSter__> (eg doing time precise stuff, you have got just few microseconds to dump some data to UART)
[13:53:03] <dunz0r> I usually log my serial output to a file
[13:54:55] <beaky> hmm it doesn't work :(
[13:57:38] <dunz0r> beaky: Could you elaborate on the "doesn't work" part? It can mean pretty much anything :|
[13:58:13] <beaky> my led doesn't go on even after I plugged in the atmega16
[13:58:21] <beaky> maybe I wired everything wrong
[13:58:30] <beaky> or I have a bug in my program
[13:59:13] <dunz0r> beaky: I just took a quick look at your program, can't see anything that looks like a bug. What pin do you have your LED and resistor connected to?
[14:00:17] <beaky> PIN 40
[14:02:00] <beaky> the one on the top right :D
[14:02:10] <beaky> ah I reversed my led
[14:02:32] <beaky> works! wow this is beautiful
[14:02:39] <dunz0r> beaky: Great job! :)
[14:02:45] <OndraSter__> easily entertained, beaky ? :D
[14:02:51] <dunz0r> beaky: Now, make the LED blink without using delays.
[14:03:00] <dunz0r> beaky: Use timer interrupts
[14:03:11] <beaky> what are those
[14:03:21] <OndraSter__> next step in the learning process
[14:03:28] <OndraSter__> (interrupts and timers)
[14:03:46] <dunz0r> I should probably be a bit ashamed for not using timers often enough :|
[14:04:09] <OndraSter__> timers are the 2nd most important peripheral :)
[14:04:13] <OndraSter__> right after Interrupts
[14:04:16] <OndraSter__> (not counting GPIO)
[14:04:16] <beaky> why are timer interrputs better than using routines like _delay_ms?
[14:04:19] <asteve> if you don't use timers you're gonna have a bad tyme
[14:04:25] <OndraSter__> beaky, you can do something else
[14:04:27] <OndraSter__> while the timer is running
[14:04:30] <asteve> must make meme
[14:04:31] <beaky> oh
[14:04:44] <beaky> so it's like multithreading in ordinary programming?
[14:04:52] <OndraSter__> asteve, but with "time", not "tyme" :)
[14:04:55] <OndraSter__> beaky, no
[14:05:01] <dunz0r> beaky: Not really. It's more like a doorbell, sort of.
[14:05:02] <asteve> don't tell me how to live my lyfe
[14:05:20] <asteve> http://www.quickmeme.com/meme/3ta2w3/
[14:05:22] <asteve> BAM
[14:05:32] <dunz0r> beaky: Lets say you're waiting for a package to arrive, if you don't have a doorbell for the delivery man to ring, you have to go and check the door all the time.
[14:05:50] <dunz0r> beaky: If you have a doorbell, you'll know if there's someone there and can go check when it rings
[14:05:53] <dunz0r> Sort of :)
[14:06:23] <beaky> ah
[14:06:44] <dunz0r> The doorbell in this case being "has this much time elapsed?"
[14:06:44] <beaky> neat how do I rewrite that thing I jsut wrote to use interrupts?
[14:07:20] <dunz0r> beaky: Initiate the timer, when it overflows, you flip the state of the port.
[14:08:12] <beaky> ah
[14:09:03] <beaky> hmm maybe I need a book to learn this the right way
[14:09:18] <dunz0r> beaky: Here's an example for an Atmega328 I did a while back: http://git.hax0r.se/?p=AVR/.git;a=blob_plain;f=MiniSumo_2012/main.c;h=fbd5e612344d7ac48f9609526dd32fb26560a638;hb=a929427d8c054e79d79521102ee7270bc66b5e75
[14:09:39] <dunz0r> As you can see, the main-loop does nothing apart from setting up the registers and then loops forever doing nothing
[14:10:06] <dunz0r> beaky: Don't copy that code though, I don't think it'll work on an Atmega16, different names for registers etc.
[14:10:14] <dunz0r> beaky: But you get the general idea :)
[14:10:21] <beaky> neat no need to define any of my own logic in the application loop if I go with interrupts
[14:10:38] <beaky> alright htanks
[14:10:42] <beaky> thakns*
[14:10:45] <beaky> thanks*
[14:10:55] <dunz0r> You could have another LED getting blinked by the "regular" method in the main-loop :)
[14:14:44] <beaky> so blinking an LED is like the hello world of systems programming
[14:14:51] <dunz0r> Yep :)
[14:15:11] <asteve> always have a heartbeat led on your projects
[14:15:27] <asteve> it's one of the best tools for debugging hardware
[14:15:36] <dunz0r> Or a 3-bit LED display, if you have the pins left.
[14:15:42] <asteve> it lets you know if the device is on, powered, or in a complete FUBAR state when it stays completely lit
[14:15:51] <dunz0r> You can display 8 different states, not counting blinking :)
[14:16:03] <asteve> 3 bit led display?
[14:16:14] <asteve> http://www.youtube.com/watch?v=JZNSaCJiixw
[14:16:25] <asteve> "I have a 3-bit led display"
[14:17:28] <OndraSter__> the best pick up line, asteve ?
[14:17:32] <OndraSter__> I shall try it in the club tomorrow
[14:17:38] <RikusW> or get a dragon and do OCD
[14:18:01] <OndraSter__> I like how OCD stands for not just on chip debugging, but also for obsessive compulsive disorder
[14:18:14] <RikusW> heh, I noticed that too
[14:18:27] <RikusW> I guess you need to have OCD to doe OCD :-P
[14:18:30] <OndraSter__> :D
[14:18:35] <OndraSter__> I know I have OCD
[14:18:48] <OndraSter__> I was in one company the other day while they were moving
[14:18:52] <OndraSter__> and they had storage boxes there:
[14:18:56] <OndraSter__> 3 4 4 4
[14:19:01] <OndraSter__> (on top of each other)
[14:19:05] <OndraSter__> then one person came with another one
[14:19:08] <OndraSter__> and he did 3 4 4 5
[14:19:17] <OndraSter__> ...
[14:19:31] <OndraSter__> I had to leave the room so my brain would not explode
[14:19:40] <asteve> you demanded 4 4 4 4?
[14:19:44] <OndraSter__> yes
[14:19:48] <asteve> OCDSter
[14:20:32] <RikusW> perfectionist ?
[14:20:39] <OndraSter__> not really
[14:20:57] <RikusW> beaky: http://sites.google.com/site/megau2s/home/jtag then you can have a JTAG ICE to se with your m16
[14:21:12] <RikusW> You'll have to get AVR Studio 4 though
[14:21:23] <OndraSter__> we are using avr studio 4 at school
[14:21:25] <OndraSter__> well, will be
[14:21:28] <OndraSter__> because AVR Butterfly
[14:21:38] <OndraSter__> that is what I ment to talk about with abcminiuser !
[14:21:45] <OndraSter__> abcminiuser, so our university uses AVR Butterfly
[14:21:49] <abcminiuser> Mm
[14:21:50] <OndraSter__> do you happen to know which year it was born? :P
[14:21:55] <abcminiuser> Err
[14:22:02] <OndraSter__> I am guessing 2001
[14:22:05] <abcminiuser> Well it was new when I first started with AVRs
[14:22:12] <abcminiuser> So 2003 or 2004
[14:22:16] <OndraSter__> close enough
[14:22:30] <OndraSter__> because of the fact that AS5/6 does not support Butterfly we have to use 4 :(
[14:22:42] <OndraSter__> I think I will make it on 5/6 and then just transfer the source
[14:22:59] <abcminiuser> I have code from 2003 for it, so I guess then :P
[14:23:03] <OndraSter__> :D
[14:23:09] <OndraSter__> I just can't take AS4 anymore
[14:23:11] <abcminiuser> Hrm, it doesn't support the MEGA169?
[14:23:13] <OndraSter__> we are doing it in asm though
[14:23:21] <OndraSter__> well it does not support the serial bootloader :P
[14:23:30] <abcminiuser> Make an external tool, call AVRDUDE to program it
[14:23:34] <OndraSter__> :D :D
[14:23:37] <OndraSter__> right
[14:23:39] <abcminiuser> Assign it a shortcut in AS6, voila
[14:23:41] <OndraSter__> with small usb-serial adapter
[14:23:43] <OndraSter__> not a bad idea
[14:23:52] <RikusW> or use AVRProg that comes with AS4
[14:24:21] <RikusW> afaik it should support the butterfly
[14:24:26] <OndraSter__> yay
[14:24:27] <OndraSter__> will see
[14:24:37] <RikusW> its in the AS4 folders
[14:24:58] <RikusW> C:\Program Files\Atmel\AVR Tools\AvrProg
[14:25:33] <OndraSter__> I might actually have got somewhere installed AS4
[14:25:37] <OndraSter__> in some ooooold system backup
[14:26:27] <OndraSter__> or I could just bring Dragon
[14:26:30] <OndraSter__> backup the bootloader
[14:26:32] <OndraSter__> do my work
[14:26:36] <OndraSter__> and then burn the BL back before I leave it
[14:27:04] * RikusW is not too impressed with the Phocos solar panel "regulator"....
[14:27:22] <RikusW> there isn't even a DC/DC converter in there... :(
[14:27:42] <RikusW> only IRF2804's to connect the panel directly to the battery
[14:27:53] <RikusW> and a PIC16F676
[14:28:03] * RikusW ducks :-P
[14:28:22] <abcminiuser> My virtual FAT isn't working :(
[14:28:23] <OndraSter__> do not hide
[14:28:27] <abcminiuser> Stupid ye-olde spec
[14:28:35] <OndraSter__> I am programming on some PIC24F at school
[14:28:38] <OndraSter__> in MPLAB 8
[14:28:43] <OndraSter__> which is even far worse than AS4 :)
[14:29:17] * RikusW considers building a MPPT regulator sometime
[14:29:44] <OndraSter__> MPPT?
[14:29:54] <RikusW> check it on wikipedia
[14:30:00] <OndraSter__> ;D
[14:30:13] <OndraSter__> oh
[14:30:14] <RikusW> there is a nice article on MPPT there
[14:30:14] <OndraSter__> I see
[14:30:44] <RikusW> The Phocos is rated at 20A 12V or 24V and costs like 59E ! :|
[14:31:05] <RikusW> I guess the parts aren't even 10E
[14:31:12] <OndraSter__> common stuff
[14:31:18] <RikusW> well then there is the custom plastic case...
[14:31:36] <RikusW> its not even SMD
[14:31:39] <RikusW> all TH
[14:42:51] <beaky> in what cases are there better solutions that inheritance?
[14:42:56] <beaky> oops wrong channel
[14:43:51] <OndraSter__> oh also abcminiuser remember me reporting issue with combining asm and header and c files in one project not being rebuilt until you cleanup the code? Well, few days ago it was closed with "does not happen in 6.1 beta" lol
[14:44:15] <abcminiuser> Did you try it in the 6.1 beta? :P
[14:44:27] <OndraSter__> nope
[14:44:39] <OndraSter__> I am sure they took care of it
[14:44:47] <OndraSter__> after all it was nearly a year since I reported it :)
[14:45:48] <abcminiuser> Yeah Morten felt guilty and went through the tracker :P
[14:46:00] <abcminiuser> GODDAM WHAT IS WRONG WITH THIS FREAKING FAT
[14:46:01] <OndraSter__> :D
[14:48:15] <creep> line in another way http://pastebin.com/aSAhbU6G
[15:00:53] <abcminiuser> Aha!
[15:01:03] <abcminiuser> Well, it's starting to try to read the file at least
[15:02:06] * RikusW considers converting the PIC asm mnemonics to something more AVR like :-D (Well if I have to code PIC again anyways)
[15:02:39] <RikusW> eg: MOVLW should become LDI
[15:02:53] <RikusW> and GOTO JMP
[15:27:01] * RikusW wonders if opto isolators exist with a photo voltaic cell instead of a photo transistor ..
[15:27:29] <creep> no
[15:27:44] <RikusW> you're sure ?
[15:27:57] <creep> photodiodes, maybe photoresistors, photofets, and optotriacs
[15:27:59] <RikusW> it would be quite handy to have something like that
[15:28:25] <creep> then grab a blue led, and heat shrink a small photovoltaic cell to it
[15:28:34] <RikusW> no need to have special high side power supplies
[15:29:07] <creep> use a battery then
[15:30:36] <RikusW> or a transformer
[15:32:32] <RikusW> the common 817 use a phototransistor
[17:58:39] <OndraSter__> http://www.pleated-jeans.com/wp-content/uploads/2013/03/uhlHWpD.gif
[18:13:36] <DanFrederiksen> hehe funny dog
[19:56:43] <creep> what temperature range would use allow for your drying chamber? 0-120C sounds fine?
[19:58:50] <Roklobsta> for pcbs?
[20:01:00] <creep> various stuff
[20:01:23] <creep> boards and components should take 70-80C or maybe 100C
[20:01:35] <creep> what is the upper limit would you set? if i use a simple transistor for heat sensing, and some plastic case, then i think my upper limit should be 120C or lower
[20:04:13] <Casper> creep: a dry room is possibly better than an hot room
[20:04:33] <Casper> 1000 hours rating@85C for the cap... that would worry me :D
[20:04:49] <creep> i don't use those
[20:18:58] <Roklobsta> my old employer, after putting the PCB's through the pizza oven would then put them in a dishwasher with a saponifier and then in a converted coke fridge with a heater/blower set to about 40C for a day.
[20:19:33] <Roklobsta> I think a fan forced electric oven set to 40-50C should be fine
[20:19:54] <Roklobsta> because they ventilate and will draw the wet air our
[20:19:56] <Roklobsta> out
[20:20:28] <Roklobsta> put in an oven themometer that works down to 40C to test
[20:20:54] <Roklobsta> a saponifier is an agent that removes flux and resin
[20:21:20] <Roklobsta> the water fed into the dishwasher was tap water microfiltered so it didn't have any junk in it.
[20:24:53] <creep> i just use no-clean flux
[20:25:21] <creep> but sometimes i wash the boards with IPA
[20:35:05] <Roklobsta> avrstudio6 = time for an SSD
[20:35:49] <Roklobsta> when I was a wee lad out cpu's used 1-bt tickertape
[20:35:52] <Roklobsta> our
[20:38:04] <creep> more ddr3 ?
[20:40:56] <Roklobsta> 10GB so far
[20:41:57] <creep> sounds fun ? http://practicon.com/Acu-Tip-Portable-Electro-Surgical-Cauterizing-Instrument-Kit/p/70-51711/
[20:42:20] <creep> like a quicksoldering iron?
[21:56:14] <cxz_> is it possible to change rising time and falling time of an output signal on atmega168a?
[21:57:46] <Tom_itx> probably not
[21:57:57] <Tom_itx> operate it at it's max voltage
[22:12:43] <cxz_> Tom_itx, I have one more question, what cases do you prefer to load your program on eeprom or flash?
[22:13:13] <Tom_itx> ?
[22:13:16] <Tom_itx> flash
[22:13:36] <cxz_> do you use eeprom?
[22:13:37] <Tom_itx> eeprom is for data or setup parameters etc
[22:13:48] <Tom_itx> not really
[22:14:06] <cxz_> ok thanks
[22:14:12] <Tom_itx> if you had startup parameters etc or calibration data you could store it in eeprom
[22:15:16] <cxz_> once I loaded the program on eeprom, I did not feel any difference than loading on flash
[22:15:52] <Tom_itx> 0x0000 starts in flash though
[22:15:58] <Tom_itx> how did you jump to eeprom?
[22:16:58] <cxz_> on the avr dragon, I selected to program eeprom and the program worked after loading the code
[22:17:06] <cxz_> maybe it was from the data on flash
[22:17:09] <cxz_> ?
[23:37:25] <Roklobsta> any contiki users here?