#avr | Logs for 2012-06-16

Back
[01:20:19] <theos> hi
[01:20:36] <theos> hello
[01:20:37] <tobbor> theos! like, totally tell us about the project!
[01:20:39] <theos> :D
[01:30:17] <w|zzy> hi
[01:33:59] <theos> sup
[01:34:09] <w|zzy> hi
[01:35:10] <theos> hi
[01:35:10] <tobbor> hi theos.
[01:35:28] <w|zzy> bust day?
[01:35:42] <theos> busy you mean?
[01:35:45] <w|zzy> busy rather
[01:35:48] <w|zzy> Yes
[01:35:50] <theos> :)
[01:36:10] <theos> trying to make a dev board
[01:36:33] <w|zzy> Nice. What is it based on?
[01:36:37] <theos> putting components together
[01:36:52] <theos> its the basic atmega board
[01:36:58] <w|zzy> Cool.
[01:37:15] <w|zzy> That could be fun
[01:37:38] <theos> its fun yes :) its easier than i thought :D
[01:37:54] <w|zzy> what software are you using?
[01:38:01] <w|zzy> Eagle?
[01:38:03] <theos> for?
[01:38:20] <theos> naa. general pcb :D
[01:38:22] <w|zzy> ohh.. You could be making it on breadboard
[01:38:37] <w|zzy> or similar.
[01:38:43] <w|zzy> Fair.
[01:39:06] <theos> the basic dev board isnt too complex. so no need of designing a special board unless you want to make it super compact
[01:39:32] <w|zzy> True... Im toying with a few prototypes for a project i am doing now..
[01:39:34] <theos> yes i use eagle to design my boards generally
[01:39:46] <theos> cool, what type of projects?
[01:39:46] <w|zzy> Ill probably have to make a custom board, well boards, for it.
[01:40:31] <w|zzy> Essentially the dashboard for a solar car. With telemetry and data logging.
[01:40:44] <theos> thats nice :)
[01:40:56] <w|zzy> Hard to find a decent screen that can convey an adequate amount of information in direct sunlight.
[01:41:33] <Kevin`> w|zzy: lcd with a reflective backing and front lighting (for night or whatever)
[01:41:37] <w|zzy> the colour screen on the evk1104 is the best i have trial so far.
[01:42:05] <w|zzy> Kevin`: Ive gotta grab one of those.. No night time driving will be happening.
[01:42:08] <Kevin`> far easier to find monochrome though. do you need color?
[01:42:20] <w|zzy> Im not sure how great a 2x20 character lcd will be..
[01:42:25] <w|zzy> Dont need colour.
[01:42:35] <w|zzy> its just whats on the board.
[01:42:59] <w|zzy> Ive heard transflective screens are the way to go
[01:43:18] <Kevin`> the transflective screens ARE nice, but if you only light then from the front they are monochrome
[01:43:39] <w|zzy> Id much rather use a graphic lcd than character lcd..
[01:43:39] <Kevin`> the color comes from filters or such in front of the light, and you can't do that from the front of the display afaik
[01:43:56] <Kevin`> (well, not filter, more efficient color splitter)
[01:44:04] <w|zzy> Ahh.
[01:44:07] <Kevin`> it doesn't need to be a character lcd
[01:44:21] <w|zzy> No. But thats the first decision i need to make..
[01:44:23] <Kevin`> there are array lcds with reflective or transflective backing
[01:44:43] <Kevin`> (graphical, whatever you want to call it)
[01:46:19] <w|zzy> Have to fiddle with a few things. Tempted to go for the avr32 as there may need to be some moderatly heavy processing done.
[01:46:21] <Kevin`> w|zzy: alternately you could use an lcd with no back and look through it at the light
[01:46:36] <w|zzy> That would be cool :P
[01:46:39] <Kevin`> (for example, stick it on the windscreen)
[01:47:49] <w|zzy> Would be very cool..
[01:48:19] <w|zzy> Oh.. the other reason agains the character lcd is that they need a rear vision camera.
[01:48:53] <w|zzy> Gonna have to start laying some code soon
[01:49:15] <Kevin`> odd, most cars use a mirror for that ;)
[01:49:21] <Kevin`> bbl
[01:51:53] <w|zzy> Mixture of limited car space, required aerodynamics and helmets!
[01:52:01] <w|zzy> I much prefer the mirror idea1
[02:22:52] <Fleck> help! had simple led blinking code in attiny13A, but _delay_mc(1000); did not delay 1 sec, so i messed around with fuses... now led turns on/of after more that 60secs and i cannot flash ttiny anymore! :(
[02:26:21] <Fleck> i did set cksel to 00 and sut to 00, fuse calc says - external clock, doesnt make sense, why led stills toggles then?
[02:28:25] <theos> try 0001 and 10
[02:28:52] <Fleck> i cant :D
[02:29:00] <theos> ?
[02:29:31] <theos> its to use internal rc osc at 1mhz
[02:29:35] <Fleck> when i try to read/write fuses/flash/serial i get: Chip Enable Program Error
[02:30:31] <theos> use avrdude?
[02:30:56] <Fleck> no, i use progisp
[02:31:09] <Fleck> avrdude doesnt know how to programm with my programmer
[02:31:28] <theos> what programmer do you have?
[02:32:11] <Fleck> http://www.ebay.com/itm/USB-ISP-Programmer-51-ATMega-ATTiny-New-/160818120151?pt=LH_DefaultDomain_0&hash=item257181c5d7
[02:32:37] <drgreenthumb> wow it's got go faster stripes
[02:33:03] <theos> do lsusb. it will show your programmer
[02:33:20] <theos> its probably "usbasp"
[02:33:49] <Fleck> http://www.fischl.de/usbasp/
[02:33:54] <Fleck> in url i gave you
[02:34:07] <theos> it is usbasp?
[02:35:01] <Fleck> virtualbox says: http://wstaw.org/m/2012/06/16/plasma-desktopfk3020.png
[02:35:42] <theos> avrdude -c usbasp -p t13
[02:35:46] <theos> try that ^
[02:37:11] <Fleck> http://paste.opensuse.org/48552450
[02:37:57] <theos> heh same mistake i was making i think. did you connect the board to the programmer?
[02:38:18] <Fleck> yeah, sure :D
[02:38:31] <Fleck> wait no
[02:38:33] <theos> lol
[02:38:40] <Fleck> i use cable
[02:38:44] <theos> ?
[02:38:58] <Fleck> #$@#@%@ what do you mean theos :D ?
[02:39:10] <drgreenthumb> in general connecting the device you want to program is required.
[02:39:15] <drgreenthumb> ;p
[02:39:24] <theos> you need to connect the chip you want to program, to the programmer
[02:39:28] <Fleck> sure
[02:39:39] <Fleck> thats normal :D
[02:39:41] <Fleck> lol
[02:39:42] <theos> :D
[02:39:50] <theos> its no able to read it
[02:40:07] <Fleck> yeah but led still blinks, with huge intervals :D
[02:40:09] <drgreenthumb> I'm still working on programming over telekenisis. I'll let you know.
[02:40:18] <Fleck> so clock is working, i guess, just set to 128KHz?
[02:40:25] <theos> avrdude -c usbasp -p t13 -Ft
[02:40:46] <theos> its attiny13?
[02:41:06] <Fleck> attiny13A
[02:41:29] <theos> 13 and 13a should have the same part number for avrdude
[02:42:01] <theos> use -F and see what happens
[02:43:21] <Fleck> dosnt work
[02:43:28] <theos> same error?
[02:43:41] <theos> something must have changed
[02:44:04] <Fleck> http://paste.opensuse.org/12506902
[02:44:58] <theos> that means you have NOT connected the attiny13 to the programmer
[02:45:11] <theos> reconnect
[02:45:14] <Fleck> ;)
[02:45:19] <Fleck> well, i have
[02:45:57] <theos> avrdude is detecting your programmer (which is not the attiny13 that you want to program)
[02:46:24] <drgreenthumb> I think the problem here is that the clock source is now set to be an external clock. but there is none.
[02:46:35] <Fleck> yeah i think so too
[02:46:40] <theos> maybe
[02:46:43] <Fleck> drgreenthumb but why led still blinks? :D
[02:46:57] <drgreenthumb> Fleck, watchdog?
[02:47:01] <Fleck> ?
[02:47:27] <drgreenthumb> if you don't reset watchdog or disable it, it resets the AVR after a period of time.
[02:47:46] <Fleck> so?
[02:47:52] <drgreenthumb> so it's just continuously resetting. and the LED blinks.
[02:47:57] <Fleck> nope
[02:48:20] <Fleck> http://paste.opensuse.org/8091026 << the code i had last time i flashed
[02:48:34] <Fleck> now my led blinks with ~65sec intervals :D
[02:49:01] <drgreenthumb> yes but your code is not being executed. because of the clock thing
[02:49:18] <Fleck> so how can led be turned on at all?
[02:49:26] <Fleck> if there is no clock source?
[02:49:29] <drgreenthumb> is it a very short on burst?
[02:49:33] <Fleck> noo ;)
[02:49:37] <drgreenthumb> ok
[02:49:54] <Fleck> turns on after ~65secs, then stays on for the same ~65secs, then goes off again etc...
[02:50:12] <Fleck> feels like 128KHz clock
[02:50:15] <drgreenthumb> huh
[02:52:13] <drgreenthumb> CKSEL1:0 == 00: External Clock
[02:52:20] <drgreenthumb> that's what it says.
[02:52:30] <drgreenthumb> so I'm not sure how anything can work
[02:52:52] <drgreenthumb> is the pin floating? heh maybe it's just picking up noise.
[02:53:05] <Fleck> yes it is
[02:53:10] <drgreenthumb> ground it
[02:53:22] <drgreenthumb> pin2
[02:53:28] <drgreenthumb> clki
[02:54:29] <drgreenthumb> if that stops execution then ... heh it's just a random air based clock :P
[02:54:56] <Fleck> pin2 is PB3 i use in code
[02:55:07] <drgreenthumb> yes but in clock mode 00
[02:55:10] <drgreenthumb> it's clock in
[02:55:21] <Fleck> there is led connected and it lights up, i cannot ground it
[02:55:30] <Fleck> :D
[02:55:39] <drgreenthumb> oh then it's not floating
[02:55:58] <Fleck> then its not ext. clock?
[02:56:14] <drgreenthumb> I'm not sure.
[02:57:14] <Fleck> theos what do i type in avrdude console?
[02:58:02] <Fleck> not a big deal anyway, but would like to fix this! :D
[02:58:17] <drgreenthumb> ground it through a resistor maybe.
[02:58:20] <drgreenthumb> hmm Fleck is this some board with an attiny13 on it or you have a breadboard or ... how flexible is this setup?
[02:58:39] <Fleck> just wires soldered to attiny
[02:58:53] <drgreenthumb> unsolder then :P
[02:59:08] <drgreenthumb> and always read the datasheet CAREFULLY before you change fuses.
[02:59:15] <Fleck> and?
[02:59:37] <drgreenthumb> well. I think you either need to use high voltage programming. or put an actual oscillator on that pin.
[02:59:47] <drgreenthumb> but having a LED on it is not helping.
[03:00:07] <drgreenthumb> external clock (see page 24)
[03:01:05] <Fleck> ok, well, whats external clock? sqare wave generator?
[03:01:07] <Fleck> freq?
[03:01:17] <Fleck> can i use arduino as clock source?
[03:01:28] <drgreenthumb> actually heh I don't know. but yeah an arduino sounds pretty ideal
[03:01:36] <drgreenthumb> try some different clock rates and see if avrdude works
[03:01:57] <drgreenthumb> tie the grounds together or just power the avr from the arduino board.
[03:04:49] <theos> Fleck you can set fuses using t :P
[03:05:01] <theos> type help. it will show options
[03:05:05] <Fleck> ok
[03:10:31] <Fleck> no clue what to write there theos :D
[03:10:41] <theos> type help
[03:10:55] <Fleck> i did - no clue anyway
[03:15:04] <drgreenthumb> Fleck, on that pic of your programmer, it does seem to have a resistor you can change to get high voltage programming. this should not require any clock, far as I know, and you can reset the fuses.
[03:15:53] <drgreenthumb> hard to make out. might just be a 0r
[03:19:22] <Fleck> i dont have HVP
[03:20:29] <drgreenthumb> so then.. you don't have that programmer that you linked us to?
[03:20:33] <drgreenthumb> because that one does.
[03:20:47] <theos> ...
[03:21:35] <Fleck> kidding?
[03:21:43] <drgreenthumb> http://www.ebay.com/itm/USB-ISP-Programmer-51-ATMega-ATTiny-New-/160818120151?pt=LH_DefaultDomain_0&hash=item257181c5d7
[03:21:45] <drgreenthumb> that one eh?
[03:21:58] <Fleck> yes sec
[03:22:13] <drgreenthumb> it says 5v/3v3 SEL on it.
[03:23:27] <drgreenthumb> sooooo try removing the 0r.
[03:23:45] <Fleck> http://fleck.rullz.lv/attiny13A/
[03:24:43] <drgreenthumb> is it on the back?
[03:25:02] <drgreenthumb> I'm looking at this pic http://i.ebayimg.com/t/USB-ISP-Programmer-51-ATMega-ATTiny-New-/00/s/MTIwMFgxMjAw/$%28KGrHqJ,!jgE5%29%28+en+EBOkl8GszWw~~60_58.JPG
[03:25:15] <theos> try this avrdude -p t13 -c usbasp -U lfuse:r:low:r:i -U hfuse:r:high:r:i
[03:26:14] <theos> err -U hfuse:r:high.hex:i -U lfuse:r:low.hex:i
[03:26:53] <Fleck> http://fleck.rullz.lv/attiny13A/IMG_20120616_111431.jpg
[03:27:30] <drgreenthumb> it says 5v/3v3 sel on it. pretty darned clearly. though heh I guess what you need to do is bridge that to get hvpp.
[03:28:19] <drgreenthumb> oh. missing vreg. heh what did you get the cheap model ;)
[03:29:12] <Fleck> ?
[03:29:17] <Fleck> i have vreg there
[03:29:37] <drgreenthumb> oh I just can't see from the blurry pic
[03:29:48] <drgreenthumb> maybe that 0r is on there too
[03:29:53] <drgreenthumb> R7
[03:30:05] <drgreenthumb> does that say "0" ?
[03:30:22] <Fleck> yes
[03:30:36] <drgreenthumb> I believe if you remove that with an iron, you'll have a high voltage programmer
[03:30:41] <drgreenthumb> the tricky part is putting it back.
[03:31:15] <drgreenthumb> or you could just have a permanent hvpp :P
[03:31:50] <drgreenthumb> but that can be replaced with wire if you lose it or something. 0r is just... a soldered on switch.
[03:31:59] <drgreenthumb> 0 ohm resistor
[03:32:09] <Fleck> no problem, have exp. soldering smds D
[03:32:11] <Fleck> :D
[03:32:27] <theos> just put a wire :P
[03:32:56] <Fleck> http://fleck.rullz.lv/attiny13A/IMG_20120616_112108.jpg
[03:33:01] <Fleck> here you can see vreg
[03:34:00] <Fleck> kind of not happy about hvp idea :D well, ok, lets pretend i shorted R7 pins
[03:34:03] <Fleck> now what?
[03:43:07] <drgreenthumb> huh maybe I'm wrong Fleck. I've never used HVPP myself. I'd really suggest trying to make a clock from the arduino: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325
[03:43:23] <drgreenthumb> "another AVR can be used if you load a program such as"...
[03:43:34] <drgreenthumb> so it's just toggling a port fast as possible
[03:43:44] <Fleck> i did that
[03:43:45] <Fleck> no go!
[03:43:56] <drgreenthumb> is that LED still on there?
[03:44:11] <drgreenthumb> on pin 2?
[03:44:23] <Fleck> i disconnected led, and added other avr that togles pin on and off
[03:44:39] <Fleck> joined GND and output to pin2 of attiny
[03:44:59] <Fleck> output from other avr
[03:47:06] <drgreenthumb> hmm. maybe it's something physical. check all connections with multimeter, maybe cable is broken internally. heh that's my best remaining suggestion, sorry.
[03:47:50] <drgreenthumb> or try slowing that clock you made a bit.
[03:47:52] <Fleck> can i change programming speed?
[03:48:16] <drgreenthumb> that last avrfreaks link I just gave you says it should be near 1Mhz clock.
[03:49:26] <drgreenthumb> huh #5 in the guy's list is interesting
[03:51:13] <Fleck> i think PB3 would not be usable as output if fuse set to external clock
[03:51:17] <Fleck> just a guess
[03:51:24] <Fleck> just doesnt make sense
[03:52:11] <drgreenthumb> so what you think is that your original instruction to set the fuse to 00 somehow didn't "take" ?
[03:52:46] <drgreenthumb> because if you did do that, the datasheet is clear about what the clock source is supposed to be after that.
[03:53:46] <theos> tried this? -U hfuse:r:high.hex:i -U lfuse:r:low.hex:i
[03:53:51] <Fleck> yes
[03:53:54] <Fleck> no luck
[03:54:19] <theos> error?
[03:54:27] <theos> use -F with it
[03:55:09] <Fleck> did that
[03:55:11] <Fleck> same thing
[03:55:17] <Fleck> same thing
[03:55:19] <theos> o.0
[03:55:21] <Fleck> ups sorry
[03:55:56] <drgreenthumb> if you had to say something twice "same thing" seems pretty darned appropriate.
[03:56:18] <theos> :)
[03:59:43] <Fleck> drgreenthumb my eng is not so good, so i didnt understand your last sentence, sorry
[04:00:48] <Fleck> and the led still blinks ;D
[04:01:01] <theos> keel eet
[04:04:14] <drgreenthumb> I'm not sure an LED turning on and off with a 130 second period is "blinking" exactly :P
[04:05:25] <Fleck> 75 sec on, 75sec off
[04:05:48] <Fleck> just measured...
[04:05:57] <Fleck> unlikely comes from noise...
[04:06:59] <drgreenthumb> must be gremlins then.
[04:07:37] <drgreenthumb> but just setting F_CPU or a clock divisor should not have killed your programmer. CKSEL on the other hand could brick it.
[04:07:54] <drgreenthumb> err. brick the AVR, not the programmer. heh it's getting late.
[04:07:59] <Fleck> its 128KHz
[04:08:00] <theos> wrong fuses kills everything
[04:08:19] <theos> reset the fuses
[04:08:27] <Fleck> how? :D
[04:08:34] <theos> good question
[04:08:50] <theos> the same way you borked it?
[04:10:18] <drgreenthumb> reverse the polarity of the neutron flow.
[04:10:36] <drgreenthumb> sorry stupid Doctor Who joke :P
[04:10:58] <theos> that show was stupid
[04:11:12] <drgreenthumb> noooooo
[04:11:16] <drgreenthumb> you're ruining my childhood
[04:11:27] <drgreenthumb> :)
[04:11:45] <theos> :D
[04:12:14] <Fleck> :(
[04:14:44] <theos> i used to watch dexter...
[04:18:55] * specing used to watch X-files
[04:19:22] * drgreenthumb used to watch TV. but then realized that all shows suck *
[04:19:28] <drgreenthumb> * except Doctor Who
[04:20:09] <drgreenthumb> heh seriously though. everything gets cancelled at weird times, nothing ever gets resolved. what's the point.
[04:20:47] <drgreenthumb> I like movies. at least they finish the damned story :)
[04:24:04] <Fleck> ok i set cksel to 11 and tried to set sut to 11 too
[04:24:10] <Fleck> then i got to this problem
[04:24:35] <Fleck> 11 for SUT is reserved :(
[04:28:17] * Fleck reads http://blog.makezine.com/2008/09/25/how-to-use-arduino-as-a-h/
[04:30:17] <theos> set 0001 and 10
[04:35:15] <Fleck> theos i cannot set anything using usbasp
[04:36:42] <theos> why not Fleck
[04:37:01] <Fleck> heh...
[04:37:05] <Fleck> making fun?
[04:37:09] <theos> nop
[04:37:45] <theos> you can still program it i guess
[04:37:57] <Fleck> yeah, using HVP
[04:39:33] <theos> Fleck http://www.logikdev.com/2011/02/15/reset-clock-fuse-bits-on-avr/
[04:41:28] <Fleck> avrdude: warning: cannot set sck period. please check for usbasp firmware update.
[04:41:45] <theos> use -F
[04:41:53] <Fleck> i did
[04:42:07] <theos> did you reach terminal mode?
[04:42:23] <Fleck> yes, and typed in sck 1000
[04:42:26] <Fleck> and got that error
[04:42:36] <theos> :/
[04:42:54] <theos> looks like your chip/board is broken
[04:43:02] <theos> avrdude cant reach it
[04:43:24] <Fleck> wrong fuses...
[04:43:30] <Fleck> thats why i need HVP ;D
[04:43:32] <Fleck> ill make on
[04:43:34] <Fleck> e
[04:43:40] <theos> try this avrdude -p attiny13 -P usb -c usbtiny -U lfuse:w:0x6A:m -U hfuse:w:0xFF:m -B250
[04:43:56] <Fleck> i did
[04:44:01] <theos> hmm
[04:44:08] <theos> you need 5v?
[04:44:08] <Fleck> changed usbtiny to usbasp
[04:44:15] <Fleck> and trued with -F too
[04:44:15] <theos> ya
[04:44:24] <Fleck> *tried
[04:45:16] <Fleck> vcc is 5V
[05:51:03] <OndraSter> abcminiuser, heya
[05:51:10] <abcminiuser> Greetings
[05:51:23] <OndraSter> there is one thing I do not understand in Xmegas - what is the "storing frame number" good for? :)
[05:52:52] <abcminiuser> Timing?
[05:52:58] <OndraSter> oh
[05:53:04] <OndraSter> didn't think about that :)
[05:53:07] <OndraSter> thanks
[05:53:11] <abcminiuser> You can use it for a number 1ms tick
[05:53:14] <abcminiuser> When USB is enabled
[07:42:40] <Fleck> theos, drgreenthumb success!
[07:42:48] <theos> yay!
[07:42:59] <theos> what did you do?
[07:44:19] <Fleck> http://mightyohm.com/blog/wp-content/uploads/2008/09/hvfuse_fixed.png << this for 12V/reset part, http://mightyohm.com/files/hvrescue21/HVRescue_Shield_r21_schematic.png << this for SCI/SDO/SII/SDI part,
[07:44:37] <Fleck> http://mightyohm.com/blog/products/hv-rescue-shield-2-x/source-code/ << this scetch for arduino mega 2560
[07:45:35] <Fleck> CKSEL=10, SUT=10
[07:45:47] <Fleck> usbasp works again! :)
[07:45:58] <theos> 12v to the reset and done?
[07:46:08] <theos> o.0
[07:46:13] <Fleck> ?
[07:46:56] <theos> in that schematic. it sends 12v to the reset pin
[07:47:03] <Fleck> yes
[07:47:21] <Fleck> when transistor base opens
[07:47:29] <theos> ?
[07:47:56] <theos> so how did you fix the fuses?
[07:48:01] <Fleck> yes
[07:48:10] <Fleck> lol
[07:48:25] <Fleck> theos i gave you 3 links
[07:48:38] <Fleck> 1st link - i took 12V part from there...
[07:48:44] <Fleck> with transistor etc...
[07:48:46] <theos> you build those circuits and solved?
[07:48:50] <Fleck> yes!
[07:48:55] <theos> liar
[07:49:00] <Fleck> :/
[07:49:05] <Fleck> sec
[07:49:08] <theos> tell the truth lol
[07:51:42] <Fleck> theos why am i liar?
[07:52:06] <theos> just kidding :P but you are not telling how it works
[07:52:07] <Fleck> i did not build them 100%, as i said, part from 12V from first schematic
[07:53:12] <Fleck> http://fleck.rullz.lv/attiny13A/IMG_20120616_153849.jpg
[07:53:19] <Fleck> http://fleck.rullz.lv/attiny13A/IMG_20120616_154047.jpg
[07:53:39] <Fleck> i have no clue how it works theos
[07:53:43] <theos> oh
[07:54:59] <Fleck> theos http://wstaw.org/m/2012/06/16/plasma-desktopbt3020.png
[07:55:22] <theos> eh you have an arduino :)
[07:55:40] <Fleck> yes, i have mega 2560
[07:55:53] <Fleck> and arduino nano
[07:55:57] <theos> :)
[07:56:13] <Fleck> actually nano 168 and nano 328 :D
[07:56:21] <Fleck> and attiny now...
[07:56:45] <Fleck> anyway - success!
[07:57:58] <Fleck> i bet i have transistor tester you have never seen in ur life ;D
[07:58:01] <Fleck> old russian
[07:58:16] <theos> :D
[07:58:26] <Fleck> used to check c945, soldered out of broken PC PSU
[07:58:27] <theos> russians had good stuff back then
[07:59:21] <Fleck> dad gave it to me! :)
[08:00:07] <Fleck> theos http://fleck.rullz.lv/attiny13A/IMG_20120616_154828.jpg
[08:00:36] <theos> ah analog ofcourse :)
[08:00:41] <Fleck> ;p
[08:01:07] <Fleck> inside generator... :) beeps if transistor is ok
[08:03:30] <Fleck> led now blinks in 1sec intervals :D
[08:03:57] <theos> :D
[08:04:06] <Fleck> but
[08:04:18] <Fleck> theos, can you help, it should blink faster
[08:04:26] <theos> but you need to find out how that worked
[08:04:27] <Fleck> 9.6MHz fuses are now
[08:04:45] <Fleck> why?
[08:04:57] <theos> you wont be able to see if it blinks or not at one point
[08:05:17] <theos> you can change the delay in code
[08:05:17] <Fleck> but i have delay 1sec
[08:05:38] <Fleck> #define F_CPU 1200000
[08:05:44] <Fleck> this is strange...
[08:06:18] <theos> :P
[08:06:42] <Fleck> ? :)
[08:06:48] <theos> you code in C? why not asm?
[08:06:51] <Fleck> n00b needs help
[08:06:59] <Fleck> why not C ?
[08:07:11] <theos> your choice
[08:07:15] <Fleck> i dont know asm...
[08:07:19] <Fleck> minimal
[08:07:24] <theos> arduino guy :P
[08:08:04] <Fleck> yeah, i like arduino, makes things simple :D
[08:08:15] <specing> Arduino is not C
[08:08:30] <Fleck> srsly? :D
[08:08:52] <theos> arduino uses processing or something
[08:09:04] <theos> wired?
[08:09:05] <Fleck> anyway - can you help me with the delay problem?
[08:09:34] <Fleck> it seems that attiny13 is running at 1MHz, but should at 9.6MHz
[08:09:50] <theos> its funny how we can make anything mean anything :P
[08:11:04] <specing> Fleck: Have you tried disabling the div8 fuse?
[08:11:13] <Fleck> nope
[08:11:23] <Fleck> its 0 at the moment
[08:11:54] <specing> well there you go, 1MHz clock
[08:11:59] <Fleck> ok :)
[08:11:59] <Fleck> sec
[08:12:06] <Fleck> yep
[08:12:10] <Fleck> now blinks fast
[08:12:11] <Fleck> :D
[08:12:12] <specing> n00bs
[08:12:15] <theos> :P
[08:14:10] <Fleck> i think i need to calibrate internal clock
[08:14:14] <Fleck> runs fast :D
[08:22:49] <Fleck> specing DIV8 and 128KHz clock - thats why i could not reprogramm fuses with usbasp ?
[08:26:58] <Fleck> avrdude now works too theos :P
[08:27:12] <theos> its good software Fleck
[08:27:41] <Fleck> yeah, just gui needed :D
[08:52:15] <specing> Fleck: You can always go to #arduino for a nicely packaged gui
[08:53:03] <Fleck> specing you did not answer my q.! :)
[08:53:41] <specing> Which is?
[08:53:53] <Fleck> specing DIV8 and 128KHz clock - thats why i could not reprogramm fuses with usbasp ?
[08:53:58] <specing> -B 100
[08:54:17] <Fleck> -B 10 tried
[08:54:20] <Fleck> no luck
[08:55:14] <specing> -B 100
[08:55:59] <Fleck> ok, next time ill try :D but i have there will not be next time ;D
[08:56:16] <Fleck> s/have/hope
[09:30:19] <OndraSter> abcminiuser__, have you seen yesterday my bug report of the xmega au datasheet?
[09:30:22] <OndraSter> I found another one btw
[09:30:23] <OndraSter> :D
[09:30:56] <Tom_itx> OndraSter the pest patrol!
[09:32:55] <OndraSter> yeah :(
[09:33:03] <OndraSter> can I report datasheet bugs on the same place as I did with the atmel studio, abcminiuser__ ?
[09:33:09] <OndraSter> or is there different bugzilla for that
[09:34:54] <abcminiuser__> OndraSter, use that one for now
[09:35:05] <OndraSter> mkay
[09:35:18] <abcminiuser__> There's a dedicated tracker, but that's under enough locks and keys that there's no way you can get to it
[09:35:32] <OndraSter> asf.atmel.com then be it
[09:36:01] <OndraSter> but.. it is neither ASF nor AS6 :)
[09:37:07] <Steffanx> They don't want you to report bugs/errors OndraSter
[09:37:11] <specing> abcminiuser__: Is it? Hmmm....
[09:37:16] <OndraSter> :(
[09:37:20] <OndraSter> the second one is...
[09:37:39] <OndraSter> in USB.CTRL register are bits "SIZE[2:0]" (or 1:0)
[09:37:50] <OndraSter> in the description they are BUFSIZE[2:0]
[09:37:53] <OndraSter> instead just SIZE
[09:37:56] <OndraSter> (or the opposite way)
[09:38:01] <OndraSter> :(
[09:39:00] <specing> abcminiuser__: Maybe you should open #atmel as an official whatever channel :P
[09:39:20] <OndraSter> launching bugtracker for datasheet bugs would be enough for me for now :)
[09:42:12] <abcminiuser__> That sounds like a good way to get into trouble :P
[09:42:26] <OndraSter> abcminiuser__, which one, #atmel or bugtracker? :D
[09:42:32] <Steffanx> obth
[09:42:34] <Steffanx> both
[09:42:56] <specing> Why would it get you in trouble?
[09:42:57] <abcminiuser__> Both
[09:43:08] <abcminiuser__> I don't have official release privellages
[09:43:19] <abcminiuser__> So I can't just put up things in the company name
[09:44:15] <Tom_itx> freenode is flushing the toilet... you should protect your nick if you wanna keep it
[09:44:21] <abcminiuser__> ?
[09:44:27] <Tom_itx> just a warning
[09:44:40] <specing> correction: freenode has already flushed the toilet
[09:44:57] <Tom_itx> [Global Notice] Hi all. We'll begin the services upgrade in half an hour so services will be down for a while. Staff will be present in #freenode and able to help in case of channel emergencies but please consider opping before services disappear. Thank you for using freenode.
[10:11:51] <Daulity> hi
[10:12:17] <Steffanx> Lo
[10:12:35] <rue_bed> lo
[10:12:37] <rue_bed> hi
[10:12:37] <tobbor> Hello rue_bed
[10:12:40] <rue_bed> its 9!
[10:14:37] <specing> 9?
[10:14:37] <Daulity> what does this meen: blink.c:6: warning: implicit declaration of function ‘delay_ms’ ?
[10:14:54] <specing> Daulity: #include <util/delay.h>
[10:14:54] <Daulity> i only included <avr/io.h>
[10:15:49] <Daulity> specing, is there a page that has all the header files on it :) i've programmed a avr before, but that was arduino style, want to learn to program it like a real avr now :)
[10:16:11] <Daulity> with arduino all that stuff is hidden
[10:16:40] <rue_bed> implicit decleration means your using a function that declared, but isn't defined anywhere
[10:16:59] <Tom_itx> you made a boo boo
[10:17:07] <rue_bed> probably
[10:17:09] <rue_bed> do tell
[10:17:19] <Tom_itx> not u
[10:17:20] <specing> Daulity: yes, ls -R /usr/avr/include or something like that
[10:17:31] <OndraSter> :D
[10:17:32] <specing> Daulity: also avr-libc's webpage
[10:17:47] <rue_bed> I got to get up so I can work on seeing straight, irc isn't better with doublevision
[10:17:58] <Daulity> specing, i feel like new to this :) (lol although i did arduino)
[10:20:52] <Daulity> "F_CPU not defined for <util/delay.h>" i have mmcu=atmega328
[10:21:23] <rue_mohr> no
[10:21:35] <rue_mohr> F_CPU is where you tell it the clock speed in hz
[10:21:42] <rue_mohr> F_CPU = 16000000
[10:21:48] <rue_mohr> er
[10:21:58] <rue_mohr> #define F_CPU 16000000
[10:23:45] <Daulity> spacing ls -R /usr/avr/include doesn't work, says that the folder doesn't excist :)?
[10:24:05] <Daulity> warning: "F_CPU" redefined
[10:24:17] <Tom_itx> it could be in the makefile allready
[10:24:19] <Daulity> should i ignore that then :)?
[10:24:20] <Tom_itx> or a header
[10:24:22] <Tom_itx> no
[10:24:28] <Tom_itx> you should see what it is set to
[10:24:57] <Daulity> Tom_itx, how do you meen, and where should i look? in my .c file?
[10:25:14] <Tom_itx> i don't know where it was defined but you should find it
[10:25:18] <Daulity> i feel like such a noob once again :P
[10:25:24] <Tom_itx> it could be in the .c .h or makefile
[10:25:26] <Daulity> Tom_itx, it's in my .c file
[10:25:38] <Tom_itx> ok, is it the correct speed?
[10:25:47] <Daulity> 16000000
[10:25:53] <Daulity> for a clock of 16Mhz
[10:26:17] <Tom_itx> also check the ckdiv8 fuse
[10:26:21] <Tom_itx> it may be set
[10:26:31] <Tom_itx> giving you a deceiving clock speed of 2mhz
[10:27:22] <Daulity> Tom_itx, i don't understand how do i check that :)? I am trying to compile this piece of code, so could upload it to my arduino board.
[10:27:43] <Tom_itx> it is a fuse setting for the prescaler to the timers
[10:27:51] <Daulity> but haven't tried uploading yet since i am still trying to compile :)
[10:30:02] <Tom_itx> what chip is it an atmega328?
[10:30:18] <Daulity> yes
[10:30:25] <Daulity> atmega328p
[10:30:41] <Daulity> i've gotta go afk -.-
[10:30:57] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[10:37:41] <Fleck> there is too many "to" words in first sentence ;D
[10:41:40] <Tom_itx> yes
[10:53:41] <theos> Tom_itx why dont you use ceramic caps for decoupling instead of electrolytic?
[10:54:15] <theos> (at the power supply etc)
[10:55:05] <specing> The power supply circuit should be: "How to destroy an old usb cable"
[10:55:33] <OndraSter> lol
[10:55:53] <specing> not sure why he is still using that 7805 in the USB age
[10:56:04] <Tom_itx> because
[10:56:16] <specing> Or why is he still using a linear converter in the SMPS age!
[10:56:18] <Tom_itx> it was written before you were born
[10:56:30] <Tom_itx> it is for simplicity
[10:56:52] <Tom_itx> you think a noob is gonna strip a usb cable and be able to figure out what wire is hot and what is not?
[10:56:59] <theos> a voltage regulator is always good. even with usb
[10:57:06] <Tom_itx> noobs aren't as bright as they used to be
[10:57:11] <OndraSter> 3v3 regulator > 5v->3v3 SMPS
[10:57:12] <CapnKernel1> LOL
[10:57:18] <OndraSter> the LDO costs like 25 cents
[10:57:20] <OndraSter> how much is SMPS?
[10:57:27] <OndraSter> and how big is the required footprint?
[10:57:32] <Tom_itx> smps are ~$5 min
[10:57:36] <Tom_itx> and up
[10:57:37] <OndraSter> one can get away with one SOT23 for LDO
[10:57:37] <specing> Nah
[10:57:37] <CapnKernel1> Also harder for noobs to solder
[10:57:39] <OndraSter> + caps around it
[10:58:03] <Tom_itx> 7805 are widely used and widely available
[10:58:08] <OndraSter> yep
[10:58:12] <specing> Tom_itx: $5 are those PMU chips for cortex-a8+ ARMs
[10:58:16] <Tom_itx> write a better how to then you can complain
[10:58:22] <Tom_itx> othewise stfu you!
[10:58:26] <Tom_itx> :)
[10:58:29] <theos> :P
[10:58:42] <specing> You know what?
[10:58:43] <Tom_itx> that's what rue would say
[10:58:47] <specing> I might as well do that!
[10:59:07] <CapnKernel1> Interesting: http://www.romanblack.com/smps/smps.htm
[10:59:10] <Tom_itx> i encourage help and improvement
[10:59:23] <CapnKernel1> 93% efficient with two transistors and some discretes
[10:59:27] <OndraSter> with SMPS I wouldn't fit 9€ :)
[10:59:32] <OndraSter> nor 0.7" :)
[10:59:36] <Tom_itx> specing you know i'm joking right?
[10:59:44] <OndraSter> whole LDO + all the caps etc are right below the USB port
[10:59:46] <OndraSter> from the other side
[10:59:48] <OndraSter> try doing that with SMPS :D
[11:00:12] <CapnKernel1> Did you guys see that circuit in the link?
[11:00:28] <OndraSter> hmm
[11:00:30] <OndraSter> interesting
[11:00:37] <OndraSter> but still, one single SOT23 is better :)
[11:00:49] <OndraSter> for my use
[11:04:50] <specing> Tom_itx: You know Im joking too, right?
[11:05:21] <specing> I know that you do not encourage help and improvement :)
[11:57:51] <chupas> his LCD does not have a \ charactor... is that normal?
[12:00:25] <specing> ?
[12:00:28] <OndraSter> this*
[12:00:29] <OndraSter> yes
[12:00:50] <chupas> oook then
[15:02:17] <abcminiuser_> Damn, the new Madeon Finale song is super shweeet
[15:03:16] <OndraSter> :)
[15:04:01] <abcminiuser_> https://www.youtube.com/watch?v=g5LYYk37z9M&feature=related
[15:04:28] <abcminiuser_> Your last chance. Your last summer. Your last dance, to beat to your own drummer.
[15:04:33] <OndraSter> :)
[15:05:29] <mv--> Hey guys! In our lecture we're recommended to use AVR Studio 4 for ATmega16 development ... I'm looking for a Solution for MacOS Lion without using Wine or Windows... maybe with GCC and Textmate in combination. Any ideas?
[15:08:00] <mv--> I've installed https://github.com/mherb/avr-assembly.tmbundle and CrossPack... but for now, I don't see any simulation functionality...
[15:09:39] <specing> mv--: simavr / simulavr
[15:11:46] <RikusW> mv--: /join #simavr
[15:14:07] <Steffanx> mv--: What RikusW said
[15:19:46] <mv--> Thanks for now. I joined =)
[15:23:55] <abcminiuser_> mv--, command line GCC and avrdude?
[15:24:20] <OndraSter> vmware with windows and atmel studio 6? :)
[15:24:33] <mv--> over command line would be nice =)
[15:25:21] <mv--> I'm currently reading the doc-files of simavr... ;o)
[15:25:29] <RikusW> and gdb + simavr / avarice for debugging
[15:27:20] <mv--> uff... sounds complex
[17:14:28] <cehteh> an avr which is connected to a approx 4V LiPo will not blow up when programmed with 5V in place even if its out of spec?
[17:14:47] <OndraSter> clamping diodes will react
[17:15:11] <cehteh> mhm
[17:15:30] <Tom_itx> program it at 4v?
[17:15:33] <OndraSter> or that :)
[17:16:03] <cehteh> thats not that simple
[17:16:16] <cehteh> programmer has 4V and i dont want to add any drivers
[17:16:16] <OndraSter> what programmer do you have?
[17:16:23] <Tom_itx> me?
[17:16:24] <cehteh> usbasp
[17:17:27] <cehteh> and the in-place is a model helicopter, there are current spikes which exceed the 500mA usb can delover
[17:17:39] <Tom_itx> some programmers will program targets clear down to 1.75v or so
[17:17:54] <cehteh> i could disconnect it for programming
[17:18:11] <cehteh> but i'd like to have it simple in place
[17:18:18] <Tom_itx> there better not be or you may end up blowing your electronics
[17:19:36] <cehteh> thats why i am asking
[17:19:51] <Tom_itx> put caps across your motor terminals
[17:19:53] <Tom_itx> to gnd
[17:20:05] <Tom_itx> and use isolation
[17:20:27] <Tom_itx> ie if you pwm them, use opto isolators to isolate the higher voltage circuit
[17:20:36] <cehteh> there is no higher voltage
[17:20:48] <cehteh> its a tiny 1S heli :) only one cell battery
[17:21:12] <Tom_itx> there are still spikes you need to deal with
[17:21:14] <cehteh> i am more worried that the tiny may be not programmable or even blow
[17:22:31] <cehteh> this is only about programming .. it is connected to the BEC/Rx and throttle channel it benefits from the internal voltage regulation
[17:22:56] <OndraSter> opto isolate the programmer then :)
[17:23:12] <cehteh> the heli will not running when programming
[17:23:14] <OndraSter> if it is SPI-based ISP, it is easy
[17:23:23] <cehteh> hey every gram counts here :)
[17:23:29] <cehteh> this is a 100g heli :)
[17:23:58] <cehteh> and the programmer is $5 its easily replaceable if it really blows
[17:24:11] <cehteh> optocopplers cost more than that :P
[17:25:02] <cehteh> i should just feed the heli with 5V when programming, issues solved
[17:25:06] <OndraSter> not really
[17:25:11] <OndraSter> optoisolator is like $.2?
[17:25:16] <OndraSter> you need four :)
[17:26:22] <cehteh> or twi and selfprogramming for the tiny13 in less than 200 bytes :)
[17:27:36] <OndraSter> hmm no hardware TWI
[17:27:39] <OndraSter> on that one
[17:27:41] <cehteh> nops
[17:27:51] <cehteh> 1k rom
[17:28:02] <OndraSter> good luck on that mate
[17:28:34] <cehteh> i only need to configure some eeprom vars, and that very rarely
[17:29:21] <cehteh> the simple way would be direct in place .. but i was thinking about a small configuration ui with one key where you can kindof morse the vars in :
[17:29:29] <cehteh> i guess i try that
[22:55:18] <annath> can someone point me in the right direction as to why http://paste2.org/p/2054618 << this function would always return true with BUTTON_BIT passed as the argument, but this function >> http://paste2.org/p/2054620 works just fine? I'm not new to programming but I'm semi-new to C, and definitely new to AVR programming. In both of these, BUTTON_PIN refers to `#define BUTTON_PIN PIND`and BUTTON_BIT is `#define BUTTON_BIT PD2`
[22:58:21] <Tom_itx> PIND is for reading
[22:58:51] <Casper> which is used correctly
[22:58:52] <Tom_itx> PD2 is for writing
[22:59:06] <Casper> pd2 would work for both
[22:59:15] <Casper> as it's only defined as 2
[23:00:25] <annath> That's what I thought, the PD2 and PORTD2 definitions are simply 2 right? I don't understand why it would not pass through correctly, or by read as clear every time. It's slightly confusing.
[23:02:14] <Tom_itx> BUTTON_BIT is a define and _bit is a macro?
[23:02:29] <Tom_itx> err no
[23:02:48] <Casper> I don't know why he used _ in his variable
[23:02:57] <Tom_itx> it threw me for a sec
[23:03:06] <Tom_itx> but how it's called may be the trick
[23:03:23] <Tom_itx> not sure
[23:03:54] <annath> sorry I just threw the underscore on to differentate it from the bit keyword
[23:04:23] <Tom_itx> what is the value of _bit when the function sees it?
[23:04:36] <Tom_itx> that is a clue to your problem
[23:04:51] <annath> the call is simply `if (button_is_pressed(BUTTON_PIN)) { /*code*/ }`
[23:05:33] <annath> the idea being if I have multiple buttons connected I can call that with different arguments instead of having a different function for each one
[23:07:17] <annath> so the value that eventually gets passed is PD2, which just evaluates to 2. Or so I think
[23:11:25] <Tom_itx> do a simple test
[23:12:02] <Tom_itx> if _bit == 'the value i think it is'{turn on an led}
[23:12:27] <Tom_itx> if it is not leave it off
[23:12:33] <Tom_itx> or turn on a different led
[23:13:00] <Tom_itx> then you will know what is getting passed to the function
[23:15:39] <annath> okay, I just stuck`return _bit == BUTTON_BIT;` at the top of the function. The if structure that uses the button toggles an LED, so if the output of the function is true I should be seeing the LED blink, and for that condition, I'm not. So the value of _bit is not the same as the value of BUTTON_BIT, even though I am passing BUTTON_BIT to the function. Wierd.
[23:16:42] <Tom_itx> maybe you are passing an address instead of the value at the address
[23:34:02] <annath> I'm not sure. I tried changing _bit to a pointer and comparing *_bit == BUTTON_BIT and it was false. although I just had a genious Idea how to figure out what _bit is... I have an old project that was a spoke-POV board that I actually got this chip from(attiny2313). It's got 8 LEDs. I'll just set PORTD = _bit and check the binary! then I can actually see what number it is, assuming it's less than 255
[23:36:28] <Tom_itx> assuming a 'high' to the led will light it yes
[23:37:42] <Tom_itx> the pin could sync or source it
[23:39:22] <annath> you're right I'll have to invert _bit to get the 1's to light an LED
[23:49:07] <annath> and I think something might be wrong with that board, so nevermind. still not sure what it is. but if it were getting passed as an address, how would that even happen? I mean it's essentially a constant being passed by value into the function