#avr | Logs for 2013-05-10

Back
[02:59:15] <Tom_itx> not sure about the rtc osc code...
[05:05:38] <Elco_> Hi Guys, is anyone else using C++ on Atmel Studio 6.1?
[05:05:52] <Elco_> (avr-g++)
[05:06:03] <jacekowski> c++ on avr is wasting a lot of resources
[05:06:44] <Elco_> its not too bad from my experience, and it is much nicer to program
[05:07:17] <Elco_> but there is an annoying bug that causes AS to run the .h files through the C compiler, then complain it doesnt know ´class´
[05:07:25] <Elco_> and when I hit build again
[05:07:29] <Elco_> it magically works
[05:08:06] <Elco_> I hoped someone else encoutered that
[05:08:12] <Elco_> and knew how to fix it
[05:51:14] <twnqx> weee attiny13a
[05:51:24] <twnqx> cute thingies
[05:51:36] * twnqx still wonders how to program them
[05:52:15] <twnqx> my pc doesn't have a parellel port any more :(
[05:53:09] <theBear> how you program your other chips ?
[05:53:28] <twnqx> jtag
[05:53:38] <theBear> heh, weirdo
[05:53:55] <theBear> spose you can always make a stk500 or so with another chip
[05:54:08] <theBear> that'll work over usb-serial
[05:54:31] <theBear> heck, make a tinyisp, everyone talks about them, they must be good
[05:54:53] <twnqx> :/
[05:56:28] <twnqx> hm
[05:56:41] <twnqx> i could boot the crap that is winblows and use my stk600
[05:57:04] <twnqx> since a certain company broke virtual machines with the last firmware updates for it
[05:57:22] <theBear> there's a 600 now ?!?! technology eh
[05:57:36] <theBear> surely avrdude or pony supports it ?
[05:58:34] <twnqx> hmmm
[05:59:41] <twnqx> that would be worth a shot
[06:00:09] <theBear> at least worth peeking at their webpages
[06:00:43] <twnqx> seems like it
[06:00:45] <twnqx> thanks for the idea!
[06:00:57] <theBear> hooray !
[06:01:55] <twnqx> 8pin soic to dip adapter, check
[06:02:02] <twnqx> dip socket card, check
[06:02:14] <twnqx> STK600-RC008T-2 rotuing card, check
[06:05:59] <masteraccurate> moin oin oin oin in in in n n.............. ............. ............ ........... ......... ........ ....... ...... ..... .... ... .. . . . . . . . . . .
[06:07:00] <twnqx> slight echo
[06:09:18] <masteraccurate> ohh sorry, that was the wrong message for this channel... here is english language... Hello!!!!!!!!!11111111111111ELF
[06:09:38] <twnqx> ELF ist auch nicht sehr englisch.
[06:09:47] <masteraccurate> in c schon =)
[06:11:50] <masteraccurate> I have some question: I have some USB-ISP-Programmer from "Franzis - Lernpaket - Experiments with USB" there is written how to programm an AT89 controller... why I can't program an AVR with it? is it other protocoll?
[06:12:11] <masteraccurate> it's both ISP....
[06:13:30] <theBear> yeah, ELF is a propernoun, it's an object/executable format :)
[06:13:34] <twnqx> AT89 is the 8051 cpu type
[06:14:12] <masteraccurate> yes I know twnqx... but my question was.. is it another protocoll betwen programming an AT98 or an AVR controller?
[06:14:13] <twnqx> if it's purely the same physical protocol you would still need software that a) supports the programmer, and b) knows how to handle AVRs
[06:14:16] <theBear> basically a totally different arch, just implemented in a chip by atmel
[06:14:35] <twnqx> never looked into the physical side, but there's always two sides
[06:14:41] <masteraccurate> yes I know, it is another architecture
[06:15:06] <twnqx> theBear: i just noticed that i could probably use my buspirate for ISP programming, too :P
[06:15:31] <masteraccurate> thats enought information for me... thx dudes :)
[06:15:41] <theBear> if they both isp, chances are you just gotta point avrdude at it, if avrdude or pony can't program it, well, it aint easy to program :)
[06:15:42] <masteraccurate> nice channel here! :) I like it
[06:15:53] <theBear> twnqx, yeah, i heard they can do that kinda thing
[06:16:18] <masteraccurate> I was trying AVR-FTDI-ISP-Prog
[06:16:33] <masteraccurate> the ISP was find and connected... but I can't connect a AVR...
[06:16:35] <theBear> is your programmer ftdi based ?
[06:16:39] <masteraccurate> yes
[06:16:50] <theBear> and what programmer util you using ?
[06:17:27] <masteraccurate> I wanne learn to programm microcontrollers... but it's not so easy
[06:17:45] <masteraccurate> I wanne buy some stk500 and mkII
[06:17:59] <theBear> err, it's pretty easy
[06:18:04] <masteraccurate> I know
[06:18:13] <masteraccurate> but for me is nothing easy in my life... :/
[06:18:49] <masteraccurate> what way is easier? programming avr under windows or under linux?
[06:19:11] <theBear> pfft ! does it take you 40mins to limp a couple blocks so you can spend the last of your money on liquor just so you get a little relief from the pain and misery of being crippled thru no fault of your own ?
[06:19:14] <masteraccurate> I was just trying under windows.... avr studio is a nice programm
[06:19:22] <theBear> do you eat more than 4 times/week ?
[06:19:28] <theBear> count your blessings mr accurate
[06:19:31] <theBear> before i cry
[06:19:40] <masteraccurate> tztzt....
[06:19:53] <theBear> you mean the act of programming the chip or actually typing and compiling stuff ?
[06:20:17] <masteraccurate> all together... how much time it wanne take... under windows or linux
[06:20:28] <masteraccurate> more time under linux? or under windows?
[06:20:34] <masteraccurate> not the typing
[06:20:36] <masteraccurate> of sources
[06:20:49] <theBear> compiling or sending code to the ic
[06:20:55] <masteraccurate> only programming... installing the tools and utils and compiling and assembling
[06:21:03] <masteraccurate> and sending the codes to the ic
[06:21:07] <masteraccurate> in sum
[06:21:18] <masteraccurate> but without typing sourcew
[06:21:22] <masteraccurate> w=s
[06:21:35] <masteraccurate> and on the same hardware
[06:21:54] <masteraccurate> what is more powerfull for big projects?
[06:22:11] <theBear> technically compiling and installing isn't 'programming', but either os should be able to program the ic in the same amount of time, probably linux is a TINY bit faster for compiling/assembling 'cos the tools are all natively written/built in linux, most people use the same software and hw to do the actual ic-programming in either os
[06:22:12] <vectory_> since winavr is the linux/gcc toolchain for windows you have the exact same prerequisits in both. on top of that avr studio is a nice IDE you wont have in linux, but it uses winavr, too :)
[06:22:13] <masteraccurate> how way is the better to save time
[06:22:31] <theBear> avr's aren't big enough for any kind of appreciable difference
[06:22:48] <masteraccurate> ohh thebear,.. this was a very good answer.., thank you
[06:23:03] <theBear> at most you might save a few seconds out of a few minutes (total time for everything) ... not like building projects with 100's of megs of source
[06:23:07] <masteraccurate> avr studio is compiled for linux too?
[06:23:12] <masteraccurate> as binaries?
[06:23:16] <theBear> don't think so
[06:23:22] <masteraccurate> with wine?
[06:23:24] <theBear> i haven't even seen it in windows for many years
[06:23:38] <theBear> dunno, lookup the wine app compatibility list at the wine webpage
[06:24:00] <masteraccurate> is there some SDK for linux to programm AVR?
[06:24:15] <Valen> I use gedit, gcc and avrdude
[06:24:18] <theBear> over the years i done probly 90% of my programming in simple 'dumb' text editors, other 10% in pretty much anything with code highlighting and simple stuff like that
[06:24:31] <Valen> gedit does code highlighting ;->
[06:24:43] <masteraccurate> yes typing sources I use only notepad(win) or vim(lin)
[06:24:48] <vectory_> vim it is for me atm :)
[06:24:50] <theBear> yeah, you don't need a sdk or anything, just an avr-gcc/avrlibc toolchain/libs and avrdude or pony to program
[06:25:06] <vectory_> or an assembler
[06:25:08] <Valen> getting ready to program avrs in ubuntu was a matter of apt-get install gcc-avr avrlibc avrdude
[06:25:16] <masteraccurate> avrdude can connect an usb-ftdi-isp under linux?
[06:25:30] <Valen> dunno about that it seems to do lots of them
[06:25:47] <masteraccurate> how can I connect the controller to the hardware under linux?
[06:25:52] <masteraccurate> serial-ISP?
[06:25:57] <masteraccurate> or paralel-ISP?
[06:26:01] <theBear> usb-ftdi-isp isn't a 'standard' name for any kind of programmer, but it's most likely something like a usb->serial->stk500 clone in reality.. look at the webpage
[06:26:18] <masteraccurate> ok... to buy stk500 is the best way?
[06:26:22] <theBear> between avrdude and ponyprog, you can program just about any chip you can think of, with just about any programming hw you ever heard of
[06:26:36] <masteraccurate> so I have to do next time if I have more money for this
[06:27:13] <theBear> no, stk500 is just a very standardised serial protocol, supported by most programming utils, therefore if you are making a programmer and you emulate it you have good compatibility without having to change any programming utils
[06:27:18] <masteraccurate> I am asking because of the programmer I have... which can not programm AVR :(
[06:27:28] <theBear> it probably can, you just haven't worked out how yet
[06:28:23] <twnqx> grml
[06:28:34] <twnqx> avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = No error
[06:28:34] <twnqx> avrdude: stk500_send_mk2(): failed to send command to serial port
[06:28:41] <masteraccurate> in another channel on another network I was in some avr-Channel, they told me that my programmer works only with AT98
[06:29:21] <masteraccurate> so I have to buy anotherone... so I wanne buy stk500 and the mk2 programmer... is this good hardware?
[06:29:24] <twnqx> it might be that you have to make custom cables
[06:29:34] <theBear> masteraccurate, they might be right, or they might be fools... you got any idea what protocol your programmer uses (at the usb/serial end) ? or a link to some details ?
[06:29:35] <twnqx> for your programmer
[06:29:45] <theBear> twnqx, that kinda looks like it's pointed at the wrong port/device
[06:29:54] <masteraccurate> it can serial and bitbang
[06:29:59] <masteraccurate> but it don't works
[06:30:01] <twnqx> no, it just stops working the middle
[06:30:21] <masteraccurate> I have my controller on a breadbord
[06:30:37] <masteraccurate> and I was making all connections like in the Handbook of the programmer
[06:30:47] <twnqx> ok, without usb hub it works... better
[06:30:58] <masteraccurate> no
[06:31:07] <twnqx> my problem, not yours :P
[06:31:12] <masteraccurate> I was connecting directly to my pc
[06:31:13] <theBear> if it talks isp, and you connect the right things to the right places, then all you need is a programming util/app that knows BOTH how to talk to your programmer, AND the memlayout/details/etc of the specific avr you are trying to program
[06:31:19] <vectory_> twnqx: didnt you mean stk_6_00? or does it use the same protokoll as stk500?
[06:31:25] <masteraccurate> yes it can be a problem with a hub, i know
[06:31:31] <twnqx> vectory_: yes to both.
[06:31:43] <masteraccurate> yes I know how to connect.
[06:32:07] <theBear> masteraccurate, and what programming app/util you using ? does it 'know' the avr you are trying to program ?
[06:32:18] <twnqx> vectory_: http://pastebin.com/yKhhePaU closer :P
[06:32:22] <masteraccurate> thats not the problem... but the architecture is another ... in the handbook is written how to programm an Atmel AT98 controller but not an AVR
[06:32:22] <theBear> is the avr being powered and the reset not held in the wrong state ?
[06:32:45] <masteraccurate> I was measuring with some logic-tester
[06:32:47] <theBear> do you have a clock connected ?
[06:32:49] <masteraccurate> it was working
[06:33:00] <masteraccurate> clock?
[06:33:19] <masteraccurate> CLK?
[06:33:33] <theBear> you know, like a crystal or a oscillator or something
[06:33:38] <masteraccurate> yes I have
[06:33:43] <masteraccurate> 16MHz with 2 cap's
[06:33:59] <masteraccurate> electronic is not my problem
[06:33:59] <theBear> and is that avr capable of running a 16mhz clock with the default/factory fuse settings ?
[06:34:03] <RikusW> vectory_: the STK600 use STK500 protocol + extensions
[06:34:19] <RikusW> and its usb based without the packet headers of STK500
[06:34:22] <masteraccurate> thebear: I don't kno
[06:34:36] <theBear> how can you be sure the problem isn't outside the programmer ? see, if you don't know that, well, that's just one of MANY possibilities
[06:34:45] <masteraccurate> I can't connect the microcontroller so I can't make configurations
[06:34:55] <RikusW> masteraccurate: using avrdude ?
[06:35:08] <masteraccurate> no, AVR-FTDI-ISP-Prog.exe
[06:35:20] <masteraccurate> avrdude I have to learn first hot it works...
[06:35:27] <RikusW> and what programmer do you have exactly ?
[06:35:41] <masteraccurate> USB FTDI-Programmer
[06:35:42] <theBear> naturally, this applies to everyone, just that chips have various restrictions on initial programming, like many need a 1-8mhz clock to do the initial programming
[06:35:59] <masteraccurate> ok
[06:36:02] <masteraccurate> thats an idea
[06:36:10] <theBear> masteraccurate, see that app sounds like a specific one, does it have an option for the specific avr you are trying to program ? cos it would need one
[06:36:31] <vectory_> twnqx: check that you dont confuse reset and gnd, i did that and it partially worked but didnt programm x)
[06:37:49] <RikusW> masteraccurate: and do connect mosi -> mosi
[06:37:50] <masteraccurate> it's that program: http://www.r-tron.de/uatmel.htm
[06:37:57] <RikusW> not crossed over
[06:38:03] <masteraccurate> I know RikusW
[06:38:23] <masteraccurate> and the ftdi chip I have is the same... FT232R
[06:38:35] <masteraccurate> withg bitbang-mode it should work
[06:38:53] <masteraccurate> I can use the programmer for serial and paralel experiments
[06:39:10] <masteraccurate> I can switch some LED's or use IO
[06:39:46] <masteraccurate> the ISP-Programmer works... it is working with the program avr-ftdi-prog.exe and it connect to the programmer
[06:40:09] <masteraccurate> the configuration of programmer and the hardware is build right
[06:40:34] <masteraccurate> it only not want to connect the controller... i think if i buy some stk500 it wanne work
[06:40:40] <masteraccurate> with the controller
[06:41:38] <masteraccurate> but I not have enought informations to work with it.. i have to leran something more... if I fix the problem, i wanne tell you how... :) sorry, I think it wanne not work with the programmer I have...
[06:41:54] <masteraccurate> bye... cyal8r ;)
[06:42:10] <theBear> wow, what a weird dude
[06:42:20] <vectory_> said theBear
[06:42:27] <vectory_> ;)
[06:42:48] <theBear> heh
[06:43:08] <RikusW> maybe ft232r only pulls down SS during tx
[06:43:23] <RikusW> if thats connected to reset it won't work too well..
[06:43:40] <twnqx> we'll never know ;)
[06:44:02] <vectory_> i should be curious about that, too. still have an at89 lying around here
[06:44:10] <theBear> looks like a pretty 'universal' programming app on the link he gave, can assign various pins to various functions, a lot like an avrdude config file
[06:44:49] <theBear> kinda worrying how the ONLY place it mentions chip name/model is after you hit read/program tho
[06:45:03] <theBear> and how it has a fuse settings page with no specific model listed
[06:45:08] <theBear> fuses change between models
[06:45:29] <twnqx> is AS6.1 still beta?
[06:48:20] <RikusW> vectory_: the U2S might work on 89s51/52
[06:49:29] <RikusW> vectory_: basically the reset level is inverted, and I did implement that iirc
[06:52:07] <vectory_> but does avrdude appreciate that?
[06:53:44] <RikusW> not sure
[06:54:03] <RikusW> you said something like 81dude existed ?
[06:56:28] <twnqx> :/
[06:57:00] <twnqx> so avr studio can't see the chip either
[06:58:37] <RikusW> twnqx: don't you have a virtualbox capable pc ?
[06:58:51] <RikusW> I'm running XP on Mint right now :)
[06:59:03] <RikusW> no more rebooting for dev work :)
[06:59:14] <RikusW> DX11 games, well....
[06:59:20] <twnqx> abcmniuser told me that won't work because the stk600 uses more usb endpoints than vbox supports (2)
[06:59:32] <Tom_itx> morning peeps
[07:00:27] <RikusW> well the dragon works just fine in VBox
[07:00:45] <twnqx> that doesn't help me if i have a stk600 and no dragon ;)
[07:00:50] <Tom_itx> you gonna argue with a dragon?
[07:01:07] <RikusW> stk600 should work... I did have to install the extension pack though
[07:01:27] <twnqx> i always get "unable to enter programming mode"
[07:04:11] <twnqx> what is the current version of as6?
[07:05:16] <theBear> just ask the website man, it's likely to be more up2date than any of us
[07:06:03] <RikusW> twnqx: the LUFA mkii works fine in VBox 4.2.12 with extpack installed
[07:06:15] <RikusW> and both it and STK600 use the same protocol
[07:06:34] <RikusW> I used AS4 to test
[07:06:48] <twnqx> no idea
[07:07:00] <twnqx> the firmware with as4 is the old one
[07:07:13] <twnqx> as5/6 bring a newer firmware that cuases the problem
[07:07:29] <Tom_itx> as6 looks for minor version
[07:07:35] <Tom_itx> as4 didn't
[07:08:41] <Tom_itx> 5 wasn't as picky as 6 is
[07:09:37] <Tom_itx> 6 will ask to do a firmware update and won't continue until you do
[07:12:16] <Tom_itx> 6.1.2562 is the latest
[07:12:28] <Tom_itx> 4/29/2013
[07:12:43] <twnqx> :/
[07:12:54] <twnqx> i hope there's an upgrade grom the 6.0 i am just installing
[07:13:08] <Tom_itx> seems they post an update every week
[07:14:04] <Tom_itx> i have 4 5 5.1 6 and 6.1 all as separate installs
[07:14:31] <twnqx> i would use atmel's website if it wasn't for this annoying login and/or send email crap
[07:14:54] <Tom_itx> it is quite frustrating
[07:14:55] <Tom_itx> i agree
[07:20:14] <twnqx> wtf, atmel studio programmer
[07:20:28] <twnqx> why does the mousewheel not work in device selection drop-down...
[07:20:56] <Tom_itx> send them a bug report
[07:21:15] <twnqx> aaand still "failed to enter programming mode"
[07:21:33] <theBear> someone with more energy than me complain about googles doc/pdf viewers not working with mousewheels too :)
[07:25:53] <RikusW> theBear: Foxit reader works just fine with a mousewheel
[07:26:34] <theBear> foxit ? that's not the google one is it ?
[07:31:52] <timemage> twnqx, any chance you left them in debugwire mode?
[07:36:40] <jadew> twnqx, are you trying to program it while it's in a circuit?
[07:36:49] <twnqx> no
[07:37:19] <twnqx> chip is dropped into a soic->dip adapter which is plugged into the correct routign boards
[07:37:27] <twnqx> and i see correct vcc across the pins
[07:37:56] <Tom_itx> what chip?
[07:38:07] <Tom_itx> it isn't one that doesn't use spi for programming is it?
[07:38:14] <Tom_itx> like the mega128
[07:38:39] <Tom_itx> it uses pdo pdi instead
[07:38:51] <Tom_itx> later...
[07:45:48] <theBear> hmmm... is the statue of liberty black or white ?
[07:46:20] <twnqx> it'a an attiny13a, and it is supported, i use the right routing/socket cards (confirmed by stk600 readback), the aref0 jumper is not set, etc
[07:46:49] <jadew> so you can read it?
[07:47:12] <twnqx> the stk600? yes
[07:47:14] <twnqx> the chip? no
[07:47:42] <jadew> ok, because reading it would mean it successfully enters into programming mode
[07:48:00] <theBear> how can the programmer know you have the right adapters ?
[07:48:02] <twnqx> this thing is like windows
[07:48:22] <theBear> what, it sucks balls ?
[07:48:26] <jadew> theBear, it can't
[07:48:28] <twnqx> "i have an error, code 0xc0 instead of 0x00. but i won't tell you what it means or how you can solve it, muahahaha"
[07:48:31] <twnqx> yes it can
[07:48:34] <jadew> twnqx, do you have a scope?
[07:48:46] <theBear> jadew, i'm thinking maybe these 'adapter cards' have jumpers or something to identify themselves
[07:48:47] <twnqx> the stk600 can ID both the routing and socket cards through id pins
[07:48:58] <theBear> hehe, i thinked right
[07:49:10] <jadew> oh, smarter programmers than what I have
[07:49:15] <twnqx> jadew: nopw
[07:49:27] <jadew> twnqx, logic analyzer?
[07:49:30] <theBear> smarter is arguable, idiot-proof(-whenitworks) maybe
[07:49:31] <twnqx> nope
[07:50:00] <jadew> twnqx, try to skip the adapter and stuff
[07:50:05] <jadew> and connect stuff directly
[07:50:15] <jadew> see if that works
[07:50:28] <theBear> smarter than mine, but mine are either a single 74-buffer or just resistors :)
[07:50:51] <jadew> my first one was resistors too
[07:50:51] <twnqx> "connect stuff directly" is easier said than done with soic8 packegas :X
[07:51:07] <jadew> then I made an usbtiny and later on I made another one lufa based
[07:51:22] <jadew> twnqx, well, you said you have an adapter
[07:51:28] <theBear> meh, i'll cross that bridge when i come to it, my hw lives in the past
[07:51:54] <theBear> i wonder, wtf kinda socket can you put a soic 8 in without soldering ?
[07:52:08] <jadew> there are some really expensive ones
[07:53:15] <jadew> this one doesn't seem that expensive: http://www.hmcelectronics.com/product/Pomona/5250
[07:53:27] <twnqx> there are at least three
[07:53:38] <twnqx> expensive 3m ones
[07:54:21] <twnqx> and cheap chinese ones based on enplas sockets:
[07:54:23] <twnqx> http://www.ebay.de/itm/SOP8-SOIC8-SOIC-SOP-8-DIP-socket-adapter-programming-/220950824512?pt=LH_DefaultDomain_0&hash=item3371b20640
[07:54:37] <jadew> wow, that's cheap!
[07:54:38] <twnqx> bewar of varying width for soic8 though
[07:54:39] <theBear> 3m ? damn ! they're like yamaha, they make everything
[07:55:08] <twnqx> not all atmel soic8 will fit in there
[07:56:29] <twnqx> so i tried with a different chip, soldered directly to the adpater plate - nope, doesn't work either
[07:56:33] <twnqx> :(
[08:04:59] <Horologium> theBear, I think it's more green from the copper corrosion.
[08:41:26] <twnqx> generally, theBear: http://wvshare.com/column/Adapter_2.htm
[09:03:25] <twnqx> avrdude + buspirate to the rescue.
[09:33:41] <abcminiuser> Woot, Hackaday
[09:34:35] <Kev-> cool, link?
[09:34:48] <abcminiuser> http://hackaday.com/2013/05/10/microcontroller-enumerates-as-usb-printer-can-be-programmed-by-printing/
[09:45:09] <Horologium> congrats abcminiuser
[09:45:13] <Horologium> you made it to the big time!
[09:45:26] <abcminiuser> Apparently everyone's decided it's interesting a month later :P
[09:45:34] <Horologium> hehe.
[09:45:41] <Horologium> I thought it was interesting first time round.
[09:48:13] <theBear> hmm, you into midi eh ?
[09:52:56] <abcminiuser> I like all things
[09:53:02] <abcminiuser> Except I2C, no one likes that
[09:54:21] <theBear> hehe
[09:55:05] <ambro718> what's up with the missing c++ headers like type_traits and utility? Is this just my setup broken?
[09:55:25] <theBear> wow, what a well thought out and descriptive question !
[09:55:28] <RikusW> abcminiuser: what wrong with i2c ? :-P
[09:55:57] <theBear> maybe, err, mention what your setup is, or what you are trying to do
[09:56:15] <abcminiuser> RikusW, the lack of clock stretching made it SUCK for slaves
[09:56:15] * RikusW fortunately haven't had to use it yet
[09:56:22] <abcminiuser> Now it has it it's a little better
[09:56:25] <ambro718> theBear: use std::forward from <utility>
[09:56:53] <RikusW> and its quite a bit more complicated than uart/spi
[09:57:14] <theBear> so, can anyone else assemble an actual question out of that ?
[09:57:25] * RikusW wonders how d1w and i2c compares
[09:57:37] <RikusW> 1wire
[09:57:41] <theBear> is that a common abreviation for dallas ?
[09:57:55] <RikusW> not sure
[09:58:00] <theBear> hehe
[09:58:06] <RikusW> now it is :)
[09:58:22] <theBear> i2c was the hint that did it for me :)
[09:58:43] <RikusW> 1wire seems nice, not used it yet though
[09:58:58] <RikusW> didn't have to and don't have the time now
[09:59:12] <theBear> i2c is next on my list
[09:59:29] <Horologium> abcminiuser, there...I posted on your hackaday article..
[10:01:02] <theBear> heh, as usual, WOW ! yer average commenter on hackaday, pfft !
[10:01:09] <Horologium> hehe.
[10:01:11] <Horologium> yeah.
[10:01:18] <Horologium> I don't post too often but what the heck.
[10:01:33] <theBear> i mean, freescale devboards don't have any more storage or power or usb support than yer average avr
[10:01:54] <abcminiuser> I have a mass storage bootloader too :P
[10:03:19] <theBear> mmm! i thought there was problems with that, but my memory these days... pfft ! few years of painkillers and not sleeping right, amazing how much it can do for yer brain
[10:04:39] <theBear> on the same note, a hackaday commenter looking up something before commenting on it, no no no, that's not the hackaday way
[10:04:50] <Horologium> hehe.
[10:05:07] <Horologium> or asking why it's better than something else...
[10:05:09] <abcminiuser> It the post immediately after the one that it links to...
[10:05:17] <Horologium> heck, it's better because it's a hack!
[10:05:42] <abcminiuser> It's not practicalengineeringdesigns.com
[10:06:24] <Horologium> hehe.
[10:06:29] <Horologium> yeah,,,it's hackaday damnit!
[10:06:35] <Horologium> oh, wait, someone said that on there.
[10:06:36] <Horologium> ME!
[10:08:41] <ambro718> can someone check if their avr-g++ is also missing all C++ header files?
[10:09:03] <ambro718> e.g. <utility>, <type_traits>, <algorithm)
[10:10:01] <Horologium> how would I check that?
[10:10:06] <abcminiuser> ambro718, are those standard C++ headers?
[10:10:14] <ambro718> abcminiuser: of coure they are
[10:10:28] <ambro718> Horologium: #include <algorithm> and compile with avr-g++
[10:10:36] <abcminiuser> Well avr-libc doesn't implement the entire C++ standard
[10:10:43] <abcminiuser> So it's not neccesarily a given...
[10:10:50] <ambro718> but most of this stuff is templates only and platform-independent
[10:10:57] <abcminiuser> Wait isn't algorithm from STL?
[10:11:10] <ambro718> it's in the C++ standard
[10:11:48] <Horologium> test.cpp:1:22: fatal error: algorithm: No such file or directory
[10:11:58] <ambro718> weird...
[10:12:10] <abcminiuser> That's from STL, which isn't implemented
[10:12:17] <Horologium> but the avr toolchain supports C primarily..
[10:12:25] <abcminiuser> You basically get the standard C headers, plus one or two utility C++ headers
[10:12:28] <ambro718> there's no such thing as STL as far as C++ is concerned
[10:12:30] <abcminiuser> But no real support
[10:12:31] <Horologium> the C++ standard isn't fully supported.
[10:13:00] <ambro718> but there's almost nothing to "support"
[10:13:11] <Horologium> instantiation
[10:13:14] <ambro718> there's nothing platform-specific in std::forward and such
[10:13:21] <Horologium> doing that on an avr vs on a PC is totally different.
[10:13:27] <abcminiuser> Fantastic, please submit your STL implementation then, I'm sure others would appreciate it a lot
[10:17:06] <Horologium> abcminiuser, might have to use that printer spec to make myself an actual printer one of these days.
[10:21:36] <theBear> wow there it is ! only took 14 minutes for the question to appear
[10:28:17] <twnqx> rage.
[10:28:33] <twnqx> avr-gcc starts my program at 0x40c
[10:28:42] <twnqx> i have 1k flash
[10:33:37] <Valen> so should I be fancy and use structs and pointers to run my two current controlled LEDs
[10:33:48] <Valen> or should I just duplicate a bit of code
[10:33:58] <Valen> have one for LED_left and one for LED_Right
[10:34:33] <twnqx> make defines for addressing the LEDs
[10:34:42] <twnqx> and use that as parameter
[10:35:05] <Horologium> write it in fortran, cross compile to Java, port to C++, and use a C++ to mindfuck converter.
[10:35:35] <Valen> no hascal in there?
[10:35:46] <Horologium> that's a bit over the top doncha think?
[10:36:04] <Valen> I have defines for the LED's but I need to run a current control loop over both of them
[10:36:11] <Valen> IE read in ADC's and adjust PWM outs
[10:36:55] <Valen> I was thinking given its the same operation, if I put all the info into a struct along with pointers to the appropriate registers I can write one function to do the job
[10:37:06] <twnqx> hm
[10:37:09] <Horologium> should work.
[10:37:12] <Valen> and just pass that function a pointer to the individual struct
[10:37:17] <twnqx> my gcc install didn't build the tinystack crts :X
[10:37:19] <specing> Valen: write an inline function and let the compiler handle the duplication
[10:37:35] <Valen> its *way* above anything I have done in C before but it feels like the "right" way of doing it
[10:38:22] <Valen> specing: I don't really understand?
[10:38:23] <twnqx> .text 1036 0
[10:38:38] <twnqx> any idea how that happens for 10 bytes of my code?
[10:38:54] <theBear> call the function twice with appropriate options, compiler works it out at compiletime
[10:38:54] <Horologium> without seeing the code and all associated files, no clue.
[10:39:31] <Valen> theBear: thats what I'm saying to do, make a function, pass it a struct liberally using pointers
[10:39:39] <Valen> or is that too heavy for an avr?
[10:39:43] <specing> Valen: did you try -O2?
[10:39:54] <Valen> i haven't written the code yet
[10:40:04] <theBear> i only saw what specing said, reading everything is way too hard today
[10:40:06] <Valen> I'm debating the best way to write it before i start
[10:40:07] <specing> How did you get 1046 then?
[10:40:31] <theBear> err, twnqx and 1036 ?
[10:40:50] <twnqx> i shouldn't recycle makefiles
[10:40:50] <twnqx> there was -lm (and more) in there
[10:40:57] <twnqx> .text 72 0
[10:40:59] <twnqx> much better.
[10:40:59] <Valen> that'll get ya
[10:41:15] <Horologium> link libs in there and things grow.
[10:45:32] <twnqx> theBear: -lm etc
[10:45:46] <theBear> was talkin to specing
[10:46:22] <theBear> sorry bout the apathy over pointing words at people, but yer getting a lot more attention than i givin myself today
[10:49:02] <theBear> hate to sound like a flyback, and i'm goin back to bed in a minute, but seeing as i can't find anyone i know who is answering or got a charged phone tonight, i just gotta tell someone, i'm very sad today... i can't see the good around me for the bad around me, i need a hug :(
[10:49:31] * twnqx gives theteddybear a hug
[10:49:51] <theBear> heh, at least yer made me crack a grin
[10:51:02] <Horologium> hugs are for wussies.
[10:51:05] <Horologium> go kill something.
[10:51:09] <Horologium> that always makes me feel better.
[10:51:14] <twnqx> Oo
[10:51:23] <theBear> it's raining and storming too much, there's nothing around to kill
[10:51:30] <Valen> I damn near killed myself in the shower today
[10:51:37] <twnqx> oO
[10:51:38] <theBear> heh, did it make you feel better ?
[10:51:45] <Horologium> gotta be something or someone nearby.
[10:51:45] <Valen> but that was probably the broccoli i had for dinner.... ;->
[10:52:12] <theBear> o cam
[10:52:15] <Valen> wait, that's "made me wish i was dead" there's a difference
[10:52:17] <theBear> i can't walk far these days
[10:52:17] <inkjetunito> those damn veggies trying to kill innocent showering people
[10:52:33] <Horologium> veggieterrorists!
[10:52:40] <Valen> too much fibre i say
[10:52:45] <Valen> its bad for the nose
[10:53:00] <Horologium> so don't shove your nose up your own ass and no problem.
[10:53:09] <theBear> easier said than done
[10:53:16] <Valen> trust me the two were as seperated as possible
[10:54:25] <theBear> meh, few hundred years ago the french had a way to make them way more seperated than that
[10:54:47] <Horologium> la guillotine!
[10:54:53] <Valen> given the french level of hygiene I can understand that desire
[10:55:03] <Valen> oh yes, i went there ;->
[10:55:13] <Horologium> too bad for you.
[10:55:34] <theBear> lol
[10:55:42] <Valen> theBear: the toilet humour enhancing your mood?
[10:55:45] <Valen> ;->
[10:55:56] <theBear> not my mood, but it's working my face muscles a bit more
[10:56:04] <Horologium> smiling is painful.
[10:56:05] <Valen> <- Australian, nothing like a fart joke to "break the ice"
[10:56:11] <Horologium> specially if you haven't done it in a while.
[10:56:21] <Horologium> Watching an Aussie movie right now.
[10:56:25] <Valen> failblog might help
[10:56:27] <Horologium> Tomorrow When the War Began
[10:56:37] <Horologium> Aussie version of Red Dawn.
[10:56:43] <Valen> the books were "better"
[10:56:51] <Horologium> usually are.
[10:56:51] <theBear> heh, my osteo has actually been teaching me to exercise my face muscles recently for that and similar reasons
[10:56:52] <Valen> why do they always have to screw up explosions
[10:57:09] <Horologium> theBear, so your face doesn't freeze like that?
[10:57:16] <theBear> when the war began eh ? i like that nuclear disaster/sub one, i THINK it was called on the beach
[10:57:31] <theBear> Horologium, heh, basically, wind changes a lot this time of year
[10:58:47] <Valen> some failblogs I liked recently http://cheezburger.com/7436026624
[10:59:05] <Valen> http://cheezburger.com/7434754048 http://cheezburger.com/7434754048 http://cheezburger.com/7443755008
[10:59:57] <theBear> mmm kids are cute, they see things the same way i do
[11:00:23] <theBear> hehe saw the grenade yesterday, pretty special
[11:01:31] <Valen> don't you find out she cant throw with the rubber grenades?
[11:01:41] <Valen> http://cheezburger.com/7438492160
[11:02:14] <theBear> holy crap ! they got reimax in .ca ? but, the reiwa lease is specific to this state, in a very different country, that just doesn't make sense
[11:02:31] <theBear> oh, http://failblog.cheezburger.com/fails?newstream=true
[11:02:41] <theBear> wait, that looks like it won't work for someone else
[11:02:48] <theBear> meh, it's all i got
[11:02:53] <Valen> rofl
[11:03:03] <Valen> the dude's face looks like a meemface already
[11:15:52] <theBear> orright, enough hilarity, i'm gonna go cry into my pillow a little bit... and don't forget to smile, cos tomorrow will be a better day !
[11:16:02] <Horologium> remember
[11:16:06] <Horologium> no matter how bad it is
[11:16:11] <Horologium> it can ALWAYS be worse
[11:16:52] <theBear> heh, i used to believe that... but nevertheless, stupid human spirit won't let me stop doin whatever it is i do these days
[11:17:58] <Valen> sometimes the light at the end of the tunnel really isn't the train
[11:19:29] <theBear> c'mon, i said i don't wanna sound like flyback :) but in all seriousness, that only applies when you can see a light.... this is more like when yer child goes missing, they might be alive, they might be dead, but you can't rest 'cos all you can see is your child missing
[11:20:18] <Casper> theBear: reimax?
[11:20:21] <Casper> wat's that?
[11:21:08] <RikusW> estate agents
[11:21:15] <Casper> Ré/max
[11:21:17] <RikusW> seems they're in SA too
[11:21:23] <theBear> it's a realestate company here, and apparently with the same logo in .ca... kinda makes sense here tho, cos the generic/state guaranteed lease is a REIWA lease
[11:22:00] <Valen> i think they are in australia
[11:22:01] <Casper> rémax, one of our good client, and my boss know the founder personally
[11:22:23] <Casper> btw, one of their office got flooded
[11:22:32] <Casper> we might get the 20few computer to replace
[11:23:00] <Casper> we hope that the insurance accept the claim and all
[11:23:24] <Casper> (the roof pool (why do they have one? no idea) decied to break)
[11:23:35] <Valen> sif not have a roof pool
[11:23:38] <Casper> few inch of water...
[11:33:46] <twnqx> and those my fully digital single chip 50hz generator works.
[11:33:50] <twnqx> thus*
[11:34:42] <twnqx> aka while (1) { toggle (); _delay_ms(10); }
[11:34:54] <Valen> heh
[11:35:34] <Horologium> but you need sine waves.
[11:35:38] <Horologium> not square waves.
[11:35:40] <Horologium> they sound much better.
[11:35:52] <twnqx> the barking watchdog doesn't care
[11:35:55] <twnqx> it's silenced now
[11:36:08] <Valen> I can get you a 50Hz sine wave
[11:36:16] <theBear> 50hz hitting a dog ? wtf you use for a transducer ?
[11:36:18] <Valen> 240V RMS ok?
[11:36:38] <theBear> Valen, that's what transformers are for
[11:36:43] <Valen> wuss
[11:36:46] <twnqx> voltage dividers
[11:36:47] <Horologium> bah.
[11:36:50] <Valen> use a resistor divider
[11:36:54] <Horologium> just suck it right out of the wall in aussieland.
[11:36:55] <Valen> or a wet bit of paper
[11:37:03] <theBear> back in the 90's cerwin vega did demos of their junior earthquake subs with a 240vac->xlr cable
[11:37:08] <Valen> anyway night all
[11:37:16] <Horologium> way back when I remember my commodore 128 had fits in australia.
[11:37:28] <Horologium> the clock would always be wrong.
[11:37:43] <Horologium> as it was made for 60Hz and power down under was 50Hz.
[11:38:00] <Horologium> my alarm clock was the same way..
[11:38:05] <twnqx> errrrrr
[11:38:14] <twnqx> my 128 didn't have a RTC :X
[11:38:19] <Horologium> yea it did.
[11:38:29] <Horologium> vic-20, c-64, and c-128 all did.
[11:38:36] <Horologium> they just reset when the power went out.
[11:38:37] <twnqx> what the hell you talk about
[11:38:49] <Horologium> and relied on the line frequency for clock ticks.
[11:39:12] <theBear> an 'rtc' should depend on nothing for timekeeping
[11:39:18] <theBear> err, a
[11:39:40] <theBear> that's kinda the idea of them
[11:41:23] <Horologium> well, it wasn't what we call an RTC nowadays
[11:41:41] <Horologium> but it would count seconds and you could set the date and time and the system would keep track of it.
[11:41:47] <Horologium> till it powered off.
[11:41:54] <Horologium> and it used the line frequency as the time base.
[11:42:21] <theBear> that's just a line-zerocross-counter
[11:42:39] <twnqx> The clock requires an external 60Hz or 50Hz (programmable) TTL level input on the TOD pin for accurate time-keeping.
[11:42:45] <twnqx> refering to that CIA feature?
[11:43:34] <Horologium> TI$ was used to reference it.
[11:44:08] <Horologium> what 128 are you referring to twnqx ?
[11:44:15] <Horologium> atmega128?
[11:44:24] <twnqx> commodore
[11:45:22] <twnqx> wow
[11:45:29] * twnqx just looked at the schematic
[11:45:42] <Horologium> http://www.commodore.ca/manuals/128_system_guide/sect-19.htm#19.1.html search for TI$
[11:45:42] <twnqx> didn't know they really had that AC->TOD circuit in there
[11:46:32] <twnqx> 9V AC -> resistor deivider + Z diode -> CIA's TOD clock input
[11:46:55] <Horologium> yup.
[14:34:52] <siers> tzanger
[14:35:06] <siers> hello we was talking few days ago?
[14:35:25] <siers> i had problem with attiny2313 and eeprom
[14:35:36] <siers> some gays solved problem
[14:35:58] <siers> BOD fixed issue. Thank to all who helped :)
[14:36:21] <theBear> heh, those gays, is there anything they can't solve ?
[14:36:54] <Horologium> theBear, thought you were going to bed.
[14:38:04] <theBear> yeah, couldn't sleep
[14:38:19] <theBear> had a pill now, and another half a bottle of wine, but, time will tell
[14:38:33] <theBear> that's the problem with chronic pain and spending most of your time lying down, being tired aint easy
[14:38:41] <theBear> tho i gotta say, i'm slightly less morose
[14:38:50] <Horologium> what's the fun in that?!?!
[14:39:07] <Horologium> just figured up the cost to add a 10x12 foot extension to my deck...just under 350 dollars.
[14:39:37] <bluespark> hi, im new with micros i have one question about what is the main difference between avr 40 pin micros and 28 pin ? thank you
[14:40:05] <theBear> i'm gonna say 12 pins
[14:40:34] <theBear> Horologium, sounds about right.... most wood is CHEAP these days, and if yer know how to stick it to other wood, nice
[14:40:57] <Horologium> bluespark, there are several different AVR devices available in each of those packages.
[14:41:08] <theBear> few years back i made a 7' high platform for my bed (1 layer bunkbed) for under $30 !
[14:41:11] <Horologium> which particular chips are you looking at?
[14:41:27] <Horologium> theBear, yeah...doing this with treated lumber is a bit pricier though.
[14:41:37] <Horologium> and want to do it with full length runs which is even worse..
[14:42:50] <Horologium> bluespark, generally the physically smaller chips have less flash and ram,,,but not always..
[14:43:17] <theBear> Horologium, a little, but it's still cheap !
[14:43:49] <theBear> and when i think what i been paid (as part of a team) to build a similar deck for people that don't know how, it's a LOT more than that material cost suggests
[14:44:01] <Horologium> yup.
[14:44:05] <Horologium> is why I do it myself.
[14:44:18] <Horologium> got screwguns that can handle 3 inch deck screws so am good to go there.
[14:44:51] <Horologium> would rather do it with nails myself just because I'm a nailem kinda guy but the rest of the deck is done with coated stardrive deckscrews so gonna try to match it up best I can.
[14:46:06] <theBear> mmm, matching is good, generally i pick whatever is suitable for the timbers involved (soft/med/hard, and combination of deck vs joists hardness)
[14:46:12] <Horologium> bluespark, I would suggest starting with something like an atmega88 on the smaller side of if you want lots of program and variables space go with an atmega1284p in the 40pin dip package.
[14:46:17] <bluespark> Holorogium; I have for example atmel328 micro which has 28 pins and there are other avr micros with 40 pins avail. especially thos 12 pins more have probably additionl functionality comparing to 28 pins... something like this?
[14:46:48] <Horologium> they won't necessarily have additional functionality...usually the functionality is spread across the extra pins...
[14:46:50] <bluespark> Horologium, thank you for suggestions
[14:47:04] <Horologium> atmega328 is the 32K version of the atmega88 so it's all good.
[14:47:24] <theBear> generally in avr land, number of pins is just number of pins, smaller and bigger chips within a 'series' tend to have similar capabilities, apart from the pins
[14:47:27] <Horologium> with the atmega1284p you do get the added benefit of 2 USARTs that the atmega328 won't have.
[14:47:53] <Horologium> atmega328 is what's used in the arduino world for their standard processor.
[14:48:20] <Horologium> or, was, until they started adding all the bigger ones.
[14:48:54] <bluespark> Horologium, yes I have one arduino board, but Im courious of other chips
[14:49:40] <Horologium> I started with the atmega32 way back when then moved on to the atmega644p and atmega1284p chips for bigger and bigger programs.
[14:53:01] <bluespark> Horologium, interesting... i just learned something new... I think I got all the answers needed... thank you again -> good day... Im loging out... :)
[15:22:11] <Horologium> http://www.bugcomic.com/comics/whistlers-hummers-and-dum-de-dummers/
[16:17:53] <karika200> hi
[16:18:14] <karika200> I have some problems with sendind string on UART with ATmega8 to my PC's RS-232 port
[16:18:21] <karika200> I can send chars perfectly
[16:18:48] <karika200> but when I send a string, I got the first letter perfectly, and then just 0xff 0xff ....
[16:18:59] <karika200> This is my code: http://pastebin.com/kMJa1DLm
[16:23:29] <antto> how about not incrementing it from there
[16:23:48] <antto> send(*str); str++;
[16:24:53] <twnqx> the code that works for me is almost 1:1
[16:25:03] <karika200> I tried iantto, same.. :/
[16:25:19] <twnqx> static __attribute__ (( always_inline )) inline void uwc (const char data) {
[16:25:19] <twnqx> while (!(UCSR0A & (1 << UDRE0)));
[16:25:19] <twnqx> UDR0 = data | 0x80;
[16:25:19] <twnqx> }
[16:25:19] <twnqx> static __attribute__ (( always_inline )) inline void uws (const char * data) {
[16:25:20] <twnqx> while (*data)
[16:25:22] <twnqx> uwc (*data++);
[16:25:23] <twnqx> }
[16:25:25] <twnqx> it's like you read my code!
[16:25:44] <karika200> :))
[16:26:09] <twnqx> so i doubt it's the code.
[16:26:15] <twnqx> how is it connected?
[16:26:42] <karika200> nothing special, there's just a MAX232 between the 2 ports
[16:27:00] <karika200> If I send characters step by step it's ok..
[16:27:04] <karika200> send('a');
[16:27:07] <karika200> send'b');
[16:27:09] <karika200> etc...
[16:27:21] <antto> karika200 are the port settings "right" ?
[16:28:11] <antto> or are you sending the chars too fast maybe?
[16:28:26] <antto> what if you insert a small delay into the loop
[16:28:41] <karika200> I tried a 250ms delay
[16:28:45] <karika200> but nothing happens
[16:29:52] <twnqx> show one example of how you call sendstring
[16:30:28] <karika200> UARTSendString("Welcome to PMR Parrot Repeater v1.0\n");
[16:30:44] <twnqx> hm
[16:31:02] <twnqx> i would say... nothing wrong at all
[16:31:47] <karika200> I will try another terminal app... maybe...
[16:31:51] <karika200> the settings are correct
[16:31:58] <karika200> I checked it several times
[16:32:02] <karika200> *them
[16:32:21] <karika200> W\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff\0xff
[16:32:27] <karika200> this is what I get exactly
[16:32:46] <karika200> the first character is ok, but the others...
[16:33:41] <twnqx> do you have a schematic at hand? and: do you use a real serial port, or a usb one?
[16:34:28] <karika200> it's a real port
[16:34:39] <twnqx> wow, must be an old computer :P
[16:35:02] <karika200> yes, not a young one... ;]
[16:35:08] <karika200> the schematic is very simple
[16:35:18] <karika200> I just put an ATmega8 on a test PCB
[16:35:22] <karika200> and a MAX232
[16:40:26] <karika200> ok guy, thanks for the help, I reboot to other OS, and try with another terminal app
[16:40:39] <karika200> bye
[16:53:51] <tzanger> heh. yes, we're all gay here (re: siers report that "some gays solved the problem" :-)
[17:11:11] <siers> hello
[17:11:27] <siers> can anyone tell me difference in AVR portA from portB ?
[19:57:11] <stanreg> I have an attiny45. It contains two distinct code blocks. Depending on the pin input, it either runs code block A or B. A 3-position switch would be used to determine the 'code select'. I'm trying to see what the best sleeping strategy would be, after running the code.
[19:57:59] <stanreg> I suppose I could hook both code blocks to different INTs, and use the 3-position switch to fire either.
[19:59:05] <stanreg> Problem is, when the switch is in the 'neutral' (middle) position, I'd like the chip to be 'off'..
[19:59:25] <stanreg> and only turn 'on' on either extreme positions ... am I making sense?