#avr | Logs for 2014-02-01

Back
[04:01:40] <rue_house> hah
[05:07:01] <Timmy> does codeblocks arduino work for any AVR chipset? I mean i don't have any arduino boards and I design my own devices. can I use this application to develop applications just for AVR micros (and not for arduino boards) ?
[05:08:57] <antto> codeblocks is just an IDE..
[05:10:34] <Timmy> antto: I know, my question was something else. I asked if it can work as an IDE for any AVR board, not just Arduino
[05:14:48] <antto> i'm not sure what you expect from it
[05:16:46] <amee2k> i'm not exactly an expert on that, but lots of people use other boards with arduino bootloaders and the arduino software
[05:17:34] <amee2k> just needs a chip that is featured on some arduino, and clock it at the same rate so the baudrates and other timing work out
[05:17:53] <antto> i don't know sh*t about arduino, but i deal with a firmware for the atmega2561 and i use codeblocks (with a makefile)
[05:18:32] <amee2k> all that i've seen looked like pretty generic eval boards with proprietary bootloaders
[05:18:50] <amee2k> so you can program them via UART/USB instead of an ISP adapter
[05:20:10] <amee2k> i had to deal with some arduino nano boards a while ago... you can pull the bootloader HEX file out of the IDE installer and flash it with any ISP adapter
[05:47:17] <Timmy> I was looking for an IDE, something like WinAVR, but available under Linux. and now I found eclipse
[06:01:57] <Roter> guys, i have a question, i was looking for some 330 ohm resistors, but in a shop i was looking, i cant find anywhere, where it says how many ohms does the resistor have. The site is here: http://www.lemona.lt/index.php?page=item&i_id=42895 .
[06:02:07] <Roter> Rezistorius 0.25W 330R 5% 10pcs. pack.
[06:02:25] <Roter> what does 330r mean? and 0.25W?
[06:02:31] <Roter> does 330r mean the resistance?
[06:07:27] <kobsu> yes ohms
[06:07:50] <kobsu> 0.25W indicates power handling
[06:08:02] <kobsu> P=RI^2
[06:09:02] <Roter> so is there a difrence if i get a 1wor a 2w for some leds?
[06:09:10] <Roter> soory for the silly questions
[06:09:32] <kobsu> it depends how much current you are getting through the resistor
[06:10:30] <Roter> also in the product picture: http://www.lemona.lt/LIUSE/Images/1_4W.JPG doesnt it show a brown and black and red stripes? so if i say R=10 * 100 , it isint 330 ohm?
[06:13:00] <Roter> Where do i get the current level? from the mcu or maybe the programmer?
[06:15:42] <kobsu> from electronics textbook
[06:17:20] <kobsu> ohm's law
[07:40:03] <Amadiro>
[07:40:36] <Amadiro> woops.
[09:19:49] <cyber37> Hi ! I have a problem, i changed the fuse of my ATTINY45 for get one pin, i disabled the RESET,
[09:20:01] <cyber37> So now i cant program the chip with my AVR ISP
[09:20:11] <specing> hahahaha
[09:20:18] <cyber37> is there a technic (with another AVR for exemple) to repair it ?
[09:20:31] <cyber37> it's not funny xD
[09:20:50] <specing> theres HVSP
[09:20:54] <specing> you need 12V
[09:23:31] <cyber37> i am watching http://www.instructables.com/id/AVR-Attiny-fusebit-doctor-HVSP/ i have attiny2313 at home so it will be good, but omg i loose 3 hours with that xD
[09:25:21] <cyber37> but maybe i will make it later, because it can be usefull in the future
[09:25:34] <cyber37> it's seems to be very nice
[09:39:38] <cyber37> Hi again, did exist AVR chip like the ATTINY45 with internal oscillator calibrated ?
[10:06:33] <specing> cyber37: they all have it calibrated... to a certain level of accuracy
[10:06:54] <cyber37> yeah, but i schearch with pll
[10:07:04] <cyber37> for using V-USB without cristal
[10:07:13] <specing> then you have to manually calibrate
[10:08:30] <cyber37> how to choose a cristal ? can you put any cristal freq ?
[10:08:55] <specing> if it works, yes
[10:35:08] <Casper> cyber37: afaik, vusb require a crystal
[10:35:18] <Casper> the internal RC isn't stable
[11:04:54] <Lambda_Aurigae> Casper, v-usb requires a crystal unless it is running on one of the attiny chips with a PLL in the internal oscillator..then it can sync to the USB without a crystal.
[11:05:38] <Lambda_Aurigae> attiny45 and attiny85 can do that.
[11:06:37] <Lambda_Aurigae> http://www.funnyjunk.com/funny_pictures/4608501/1+lik+1+pryer/
[11:06:42] <Lambda_Aurigae> hmm.
[11:06:44] <Lambda_Aurigae> wrong link.
[11:06:51] <Lambda_Aurigae> http://www.obdev.at/products/vusb/prjdetail.php?pid=30
[11:06:52] <Lambda_Aurigae> there
[11:06:57] <Lambda_Aurigae> a project that does just that.
[11:13:20] <Lambda_Aurigae> cyber37, if you disabled the reset pin then the only solution is high voltage programming..on the attiny it will be high voltage serial programming.
[11:13:38] <Lambda_Aurigae> the fuse doctor is a good thing to have, or an avr dragon.
[11:41:55] <rue_shop2> did you see the python thing a guy made?
[11:42:08] <rue_shop2> avrmate
[11:42:26] <rue_shop2> works out the fuses and writes the avrdude command line for you
[11:42:41] <rue_shop2> its a good idea, its just missing the ability to compile for ya
[11:43:12] <rue_shop2> I got it running, you need to be using python ~2.7
[12:13:46] <Lambda_Aurigae> haven't seen that one.
[12:17:01] <Lambda_Aurigae> would be nice if we could switch clock source on the fly at runtime.
[12:22:07] <Lambda_Aurigae> cereal port not found...brkfst.dll not loaded.
[14:44:37] <rue_house> not running with rasberries?
[14:45:07] <rue_house> out of rasberry pie
[14:45:31] <rue_house> hmm I guess I shoudl fix the tiller before its spring
[14:50:26] * amee2k idly turns rue_house into a beagle :3
[14:55:08] * rue_house blinks, which isn't an easy task for a beagle
[16:43:04] <Duality> i write code to my atmega644, and it says the variefinging passes, but when i read the flash and open it in a hex editor it's clearly the old code. what could be the cause of this ?
[16:48:22] <Tom_itx> erase before write?
[16:48:32] <Duality> done that
[16:48:50] <Duality> it says erase cyle started
[16:48:55] <Duality> then writes flash
[16:49:00] <Duality> but clearly doesn't?
[16:49:06] <Duality> but it's like only with this chip
[16:49:39] <Tom_itx> the next step is rather self explanatory
[16:50:10] <Duality> no
[16:50:14] <Tom_itx> get another chip
[16:50:20] <Duality> well
[16:50:27] <Duality> I have another one
[16:50:39] <Duality> but this doesn't happen with that one.
[16:50:59] <Duality> I just really curious as to why it happens to this one
[16:51:25] <Duality> because the verify passes. but when I read it, it's clearly not the new flash contents
[19:33:13] <scoy> when a USI interrupt is triggerd and takes control, what happens to the main program if it's in the middle of writing a value to a variable?
[19:33:53] <scoy> is the uC smart enough the allow that assignment, or maybe put it off until the interrupt completes?
[19:34:51] <Thrashbarg> an interrupt starts when an instruction finishes. It'll either write the variable before the interrupt or it'll be put off until after the interrupt routine
[19:39:48] <Lambda_Aurigae> unless the variable is multiple-byte...then it could get split between before and after.
[19:40:04] <Thrashbarg> yup
[19:41:05] <Lambda_Aurigae> which is why I avoid multiple byte variables whenever possible, specially those that might ever be needed or used by any interrupt routine.
[19:42:17] <The_Coolest> is there any way to setup a critical section to avoid such occurances?
[19:42:34] <johnwalkr> wow
[19:42:42] <Lambda_Aurigae> if you need something in the main program to run without getting interrupted then turn off interrupts during that section.
[19:42:44] <johnwalkr> what perfect timing to read the channel
[19:42:50] <johnwalkr> i bet that is exactly the problem i’m having
[19:43:14] <Lambda_Aurigae> problem with that is, you could miss interrupts happening,,,specially communications interrupts like twi, spi, usart, and usi
[19:43:15] <The_Coolest> :D
[19:43:34] <The_Coolest> Lambda_Aurigae yup
[19:43:52] <The_Coolest> that's why I'm asking. disabling interrupts is too easy :P
[19:44:12] <Lambda_Aurigae> beyond that, no way to designate a section of code to not be interruptable.
[19:44:15] <johnwalkr> i’ve got a quadrature routine running that depends on interrupts and am reading the values over i2c
[19:44:30] <johnwalkr> and occasionally the read values are weird
[19:44:36] <johnwalkr> but there’s never an error
[19:44:54] <johnwalkr> make perfect sense now
[19:45:02] <Lambda_Aurigae> anyhoo, off to sleepyland here.
[19:45:16] <johnwalkr> (and the values are 2 byte)
[19:46:34] <The_Coolest> johnwalkr :(
[19:47:06] <johnwalkr> i just work around it by discarding values that don’t make sense, but it was a huge mystery to me
[19:48:29] <johnwalkr> it was originally 1byte values but sometimes they overflowed more than once in between reads which is also not usefu
[19:49:58] <The_Coolest> yup things like this are usually the biggest pain in the rear to get working as well and reliably as possible
[19:52:16] <johnwalkr> well i learned a lot about interrupts
[19:52:24] <johnwalkr> even before this relevation
[19:52:56] <The_Coolest> I'm using them too in a couple of projects
[19:52:59] <johnwalkr> originally i wasn’t even using interrupts
[19:53:07] <johnwalkr> and it worked only at extremely slow speeds
[19:53:10] <The_Coolest> they are great
[19:53:33] <johnwalkr> then i ran out of interrupts and had to use a second microcontroller
[19:54:17] <johnwalkr> the moral of the story is be patient and wait for your motor controllers that already have all these features built in to arrive
[19:54:44] <The_Coolest> I'm waiting for some Atmega88s to continue working on a couple of projects. one was an HD44780 LCD backpack and another is a uC controlled electronic load.
[19:55:18] <johnwalkr> was a good learning thing anyway. soon i have to start using SH-2 instead
[19:55:27] <johnwalkr> and the support is non existent compared to avr
[19:55:29] <The_Coolest> for whatever reason the 328p i had on my backpack pcb randomly died and I fried the other 328p on the electronic load board due to an incorrect wiring + 12v to the uC
[19:56:01] <The_Coolest> SH-2?
[19:57:33] <johnwalkr> it’s from renesas, formerly from hitachi
[19:57:43] <johnwalkr> was used in the sega saturn but nowadays mostly used in motor control
[19:59:24] <The_Coolest> oh
[20:03:07] <The_Coolest> work/school?
[20:06:20] <johnwalkr> school
[20:08:13] <The_Coolest> ah
[22:20:02] <scoy> The_Coolest, johnwalkr, Thrashbarg: sorry i bailed so quick right after my question. i'm using interrupts for both USI and USART and I'm having issues using values outside of the interrupts.
[22:21:04] <scoy> thanks for the input, just not sure if it helped me or confused me, haha
[22:21:16] <johnwalkr> sorry, dont’ have any ideas aside from avoiding them
[22:23:46] <scoy> i like the idea of interrupts, but it certainly adds another dimension to deal with
[22:24:52] <johnwalkr> they are needed for lots of things, i mean avoiding conflicting use of them. I’m sure there are lots of management techniques but they are beyond what i know about