#avr | Logs for 2013-05-04

Back
[00:21:15] <Qantourisc> Before I run of and make my own RS485 protocol: Does anyone know a dead-simple excisting one ?
[00:24:32] <Casper> 2 devices or more?
[00:24:53] <Qantourisc> Casper: more
[00:25:06] <Casper> :( I was gonna suggest half duplex serial... :(
[00:25:11] <Qantourisc> Casper: :)
[00:25:37] <Qantourisc> Casper: problem with sutch a simple protocol: it's hardly worth making a standard :)
[00:26:02] <Qantourisc> and defening set values ... makes it less simple to pick-up, but without them it's no standard ...
[00:26:45] <Qantourisc> basicly <command><data><crc?>
[00:27:13] <Casper> 9 bits communication can be usefull too
[00:27:24] <Casper> 9th set = start of packet? :D
[00:27:24] <Qantourisc> I know !
[00:27:33] <Qantourisc> but that's harder with uart's no ?
[00:27:38] <Qantourisc> or to code on pc's :p
[00:27:49] <Casper> shouln't be hard
[00:27:54] <Casper> 9 bits is standard
[00:28:17] <Qantourisc> Casper: iirc all pc commands reading from serial read 8 bits ?
[00:28:44] <Casper> there is a 9 bits mode
[00:28:59] <Qantourisc> Never seen it in my life / me checks
[00:29:02] <Casper> you need to read the 9th bit off another register I think, not sure
[00:29:44] <Qantourisc> "bytesize – Number of data bits. Possible values: FIVEBITS, SIXBITS, SEVENBITS, EIGHTBITS" <= first fail :)
[00:30:02] <Qantourisc> Could also use 5 bits :)
[00:30:11] <Qantourisc> and just send 2 bytes for 1 byte
[00:30:19] <Casper> 2 nibbles...
[00:30:24] <Qantourisc> euu yes sorry
[00:30:50] <Casper> and it should have a 9 bits mode, if not, get a better library :D
[00:30:52] <Qantourisc> actually, crank that up to a bit: Start-Flag, Stop-Flag :)
[00:31:16] <Qantourisc> Casper: could contact the dev :)
[00:31:49] <Qantourisc> "The standard UART hardware (8251 etc.) doesn't support 9-bit-data modes."
[00:31:50] <Qantourisc> hmz
[00:32:27] <Qantourisc> Casper: Greate idea 9bit, but I don't want to put myself on an software/hardware 9bit hunt
[00:32:31] <Casper> which is dead since what... 486 time?
[00:35:06] <Qantourisc> ok you need CRC in there: to prevent nodes from seeing the wrong thing as sync
[00:35:37] <Qantourisc> or you need data-escaping, or nibles
[00:35:39] <Casper> midi use 8 bits communication, but 7 bits data
[00:36:29] <Qantourisc> yea but at the end of the day, you probably still want to read out 8 bit at a time :)
[00:36:55] <Qantourisc> remember dead-simple is the goal :)
[00:38:21] <Casper> so maybe send 3 bytes, which is like 1aaaaaaa 0abbbbbb 0bbccccc A is first 8 bits, B is next 8 bits, C is 5 bits checksum
[00:39:26] <Qantourisc> Casper: that would be simplish enough
[00:39:50] <Qantourisc> easy enough to code in any language
[00:40:39] <Casper> of course, you could extend to 32 bits, and have less checksum, more efficient, but 4 bytes of data might be too much
[00:42:04] <Qantourisc> hmmm
[00:42:09] <Qantourisc> then again nibles are simpler :)
[00:42:21] <Qantourisc> Casper: cause if you want to send more then 2 bytes ...
[00:42:28] <Qantourisc> you don't have to start bit-shifting
[01:01:05] <Qantourisc> Casper: Think i'd be like: SEMR DDDD ? <Start of transaction><End of transaction><Master/Slave><Reserverd/Goto 7bit><Nible>
[01:01:26] <Qantourisc> massive overhead though :)
[01:01:36] <Qantourisc> Or drop the end of transaction :)
[01:01:41] <Qantourisc> that's -1 bit
[01:01:58] <Qantourisc> mwea i'll wing it later
[01:03:00] <Qantourisc> Should also code the programming logic while designing this :)
[01:11:49] <Casper> is your bus an open collector kind?
[01:15:52] <Qantourisc> Casper: RS485
[01:15:57] <Qantourisc> Casper: why?
[01:16:04] <Qantourisc> Casper: well i don't have a bus yet :)
[01:25:41] <Qantourisc> Casper: RS485 is a twisted pair bus with complementory signals
[01:31:13] <Qantourisc> Seemed like the best one for the job: possible long distances next to 220v beeing switched on and off :p
[03:54:42] <megal0maniac> Qantourisc: http://dx.com/p/ttl-to-rs485-module-for-arduino-green-163849
[03:55:02] <megal0maniac> (Ignore the fact that it says "arduino". It isn't relevant)
[03:55:28] <Qantourisc> megal0maniac: yes, something like that
[03:55:58] <Qantourisc> Why are there some many R's (more then 4) and why are there 2 c's on there ?
[03:56:41] * Qantourisc fetches the electrical schema
[03:57:10] <megal0maniac> It's just a MAX485 breakout. Datasheet will answer all of your questions :)
[03:58:44] <Qantourisc> megal0maniac: no schematics from the provider
[03:58:46] <Qantourisc> can't use ;p
[03:58:54] <Qantourisc> or i could recreate them by looking at the pcb ;p
[03:59:54] <megal0maniac> Um... http://www.usconverters.com/downloads/max491.pdf
[04:00:16] <Qantourisc> Aaand can't order them :)
[04:02:18] <megal0maniac> How so?
[04:02:54] <Qantourisc> well i could, but would be easier to order in 1 place :p
[04:04:13] <megal0maniac> Better still: http://www.ebay.com/sch/i.html?_nkw=rs485+ttl
[04:04:51] <Qantourisc> still figuring out the shecmatics :p
[04:04:59] <megal0maniac> The pins on those breakouts is pin-for-pin exactly what you get on the bare chip. Except with supporting circuitry and conn-blocks
[04:05:07] <megal0maniac> Why do you need the schematics?
[04:05:35] <megal0maniac> Pg7 on the datasheet explains the chip, and thus explains the board
[04:06:32] <Qantourisc> because the datasheet mentions no requirement for all those resistors :)
[04:08:53] <Qantourisc> hmmm seems to be there for noise reduction
[04:09:06] <OndraSter> 100nf I am guessing?
[04:09:09] <Qantourisc> but nothing that is perse defined in the schematics
[04:09:24] <Qantourisc> OndraSter: photo of the board is too small ;p
[04:09:28] <Qantourisc> so no idea
[04:09:43] <Qantourisc> it's an SMD so it's not going to be mutch
[04:10:19] <Qantourisc> But I would still need schematics, can't have them terminated with a resistor !
[04:11:02] <megal0maniac> Then take them off. The boards are like $2 :P
[04:11:09] <Qantourisc> true
[04:11:41] <Qantourisc> But here is the other thing: If at all possible, i'm planning on making the board tiny ;)
[04:11:50] <Qantourisc> and if it's not too costy :p
[04:12:10] <Qantourisc> besides where is the fun ? :)
[04:12:57] <OndraSter> fuck you adobe "need to restart computer to finish installing update of adobe reader"
[04:12:57] <OndraSter> WHY
[04:13:06] <OndraSter> you are application, you are not changing the kernel of the OS
[04:15:56] <Qantourisc> OndraSter: use evince or somethin
[04:16:20] <Qantourisc> or if you don't like GTK, Foxit pdf iirc
[04:18:32] <OndraSter> I don't like linux to start with
[04:18:36] <Qantourisc> dam only a maximum of 128 devices on the bus :)
[04:18:39] <OndraSter> I used to use foxit, but it soemtimes bugged
[04:18:45] <Qantourisc> OndraSter: evince is avaible for windows
[04:18:48] <OndraSter> so I switched to adobe reader
[04:19:00] <OndraSter> which, until it randomly bugs out, works fine
[04:19:06] <Qantourisc> :)
[04:22:23] <Qantourisc> hmmm a max of 32 devices ?
[04:22:34] <Qantourisc> (depening on the chip)
[04:23:02] <Qantourisc> then again, who wants to debug 32 devices ? :)
[04:23:12] <Qantourisc> (case one goes haywire)
[04:26:47] <Qantourisc> !mpc pause
[04:26:51] <Qantourisc> hmmm
[04:27:07] <Qantourisc> right /exec :)
[04:47:53] <megal0maniac> OndraSter: Get Adobe Reader 9 and kill updates. Everything after 9 is pretty much bloatware
[04:50:59] <Valen> actually XI has gotten better
[04:57:16] <OndraSter> but I don't like running outdated versions :P
[05:06:02] <KebabBob> Get foxit reader
[05:06:10] <KebabBob> Free and much lighter than adobe
[05:08:05] <Valen> has some compatibility issues with forms and the like though
[05:09:02] <dunz0r> Iirc Evince is quite nice.
[05:34:17] <skroon> is it possible to use the arduino libraries, in my avr projects as well?
[05:37:43] <skroon> for example say I want to use the Serial librarie of arduino in order to talk over UART
[08:51:33] <Casper> Qantourisc: the reason is that some bus handle multiple transmission at the same time, by having the device that output a 0 getting the priority, the one that send a 1 at the same time must stop...
[08:51:43] <Casper> so consider collisions
[08:56:54] <bitd> Ok, coming from someone who always used arduino libs: whats an easy way to implement the micros() function?
[08:57:04] <bitd> I need to figure out the time between two pulses.
[09:05:06] <vectory> bitd using a counter and interrupts caused by each edge of the pulse. i.e. int0 interrupt
[09:05:27] <vectory> counter/timer
[09:10:45] <jigoe> If I am just testing spi, can I pull SS low or do I need a falling edge?
[09:11:16] <jigoe> For an atemga644p
[09:30:34] <Qantourisc> Casper: a no
[09:31:20] <Qantourisc> jigoe: connect a switch ? then you can pull up and down and you have an edge ?
[09:31:36] <Casper> Qantourisc: some of those are easy to code when you bitbang
[09:31:50] <jigoe> Qantourisc, Could do, but does it require one?
[09:31:55] <jigoe> Or can I just pull low?
[09:32:07] <Casper> "output bit, if input != bit then stop"
[09:32:18] <Qantourisc> Casper: yea, but you are giving up our transmission line no ?
[09:32:24] <jigoe> I don't have a logical analyser to see if the rpi pulls ce low.
[09:32:49] <Qantourisc> jigoe: @what bitrate ?
[09:32:53] <jigoe> 500kHz
[09:33:12] <Qantourisc> smolly, yea, not going to be able to monitor that without a scope :)
[09:53:36] <skroon> what are nice tools to simulate circuits visually?
[10:01:43] <Tom_itx> http://www.soft-zilla.com/2011/10/free-circuit-simulator.html
[10:01:49] <Tom_itx> google found that
[10:02:03] <skroon> I would like to hear from someone that has actually used them
[10:02:22] <skroon> on google there is just too much choice, would like to hear from actual experience which one is good
[10:03:15] <Horologium> entirely depends on what you need to do with it.
[10:03:23] <Horologium> so try a few and see which one works for you.
[10:04:02] <eatyourguitar> that project is based on a web version of that same simulator
[10:04:07] <eatyourguitar> its kinda old
[10:04:22] <eatyourguitar> probably java
[10:04:59] <eatyourguitar> skroon I use LTspice, its free and it works
[10:06:16] <skroon> eatyourguitar: I hear LTspice a lot indeed, i'm on Mac though. I saw it has a "winebottled" version that boots up windows in a virtual, however i'm not too big of a fan of that
[10:06:34] <skroon> eatyourguitar: what would be the main difference between ltspice and something like ngspice?
[10:06:49] <eatyourguitar> I have not used ngspice
[10:06:56] <skroon> or is it like apples vs oranges
[10:07:04] <eatyourguitar> they are all based on the same old project
[10:07:15] <eatyourguitar> it branched off into like 10 different versions
[10:07:42] <eatyourguitar> some got polished up nice, are available on other platforms etc.. but you have to pay
[10:07:50] <eatyourguitar> LTspice still free
[10:08:24] <eatyourguitar> if you learn one of them your good for the other versions as well
[10:08:32] <Horologium> typical...ask for a recommendation then come up with multiple reasons not to take the recommendation.
[10:08:39] <skroon> I have some older spice books around , maybe I should start reading them again :)
[10:09:00] <skroon> Horologium: what's wrong with that?
[10:09:15] <skroon> Horologium: isn't that where a discusion can start?
[10:09:30] <eatyourguitar> I think I'm pro-LTspice
[10:09:45] <eatyourguitar> you don't need books
[10:09:47] <skroon> eatyourguitar: cool, well i'll definitly take a look at that, thanks
[10:09:52] <eatyourguitar> all the info is online
[10:17:02] <skroon> eatyourguitar: how does "labview" fall into these categories? is it also a good circuit simulator?
[10:18:55] <eatyourguitar> never used it so I can't really say
[10:19:06] <eatyourguitar> I only use LTspice
[10:19:26] <eatyourguitar> more important though, I actually build the things and see what happens
[10:19:44] <eatyourguitar> simulation is a false sense of things looking good %50 the time
[10:19:47] <eatyourguitar> at least for me
[10:20:04] <eatyourguitar> I do mostly analog electronics
[10:20:19] <skroon> eatyourguitar: i'm really new to analog circuitry and don't have a scope, so would like to find a way to somehow have a "poor man's" way of seeing what kind of signals my circuit is suppose to have
[10:20:20] <eatyourguitar> very rare that I do anything with an AVR these days
[10:21:26] <eatyourguitar> what exactly are you building?
[10:21:36] <eatyourguitar> I build guitar pedals and synthesizers
[10:21:47] <skroon> ah cool
[10:21:48] <Tom_itx> yeah i remember that...
[10:22:10] <eatyourguitar> I just purchased a cheapish 25mhz owon scope for $257 shipped
[10:22:11] <skroon> well i'm basically just playing around, i'm really intrestted in "the internet of things" kind of stuff, so having networked sensors :)
[10:22:15] <eatyourguitar> one day shipping
[10:22:48] <eatyourguitar> so your analog is mostly interfacing the analog inputs of an AVR or arduino?
[10:22:50] <skroon> when looking at scope i'm always confused by all of the options :-) so I find it hard to buy one
[10:23:09] <skroon> eatyourguitar: yes indeed, analog interfacing or controller relays etc
[10:23:14] <eatyourguitar> I purchased the cheapest 2ch scope that does not suck
[10:23:45] <eatyourguitar> you can get a DSO nano but thats might only be usefull to look at pretty pictures
[10:23:59] <Tom_itx> those like the one dean got seem good
[10:24:16] <eatyourguitar> depends on what kind of accuracy you require
[10:24:48] <eatyourguitar> if I need to calibrate a dc signal with a trimmer to 5v within 0.001v I need good stuff
[10:24:53] <skroon> that DSO nano looks pretty cool actually, what do you mean "usefull to look at pretty pictures", as in it's read only stuff?
[10:25:03] <skroon> Tom_itx: which one was that ?
[10:25:26] <eatyourguitar> like the real work you do on a scope requires some extra functions and a good DC accuracy
[10:25:36] <eatyourguitar> some way to test calibration
[10:25:43] <eatyourguitar> re-calibrate if you need to
[10:26:11] <Tom_itx> skroon, i can't recall the name right now
[10:26:22] <eatyourguitar> my scope has difference and summing modes built in
[10:26:33] <eatyourguitar> and usb
[10:26:58] <eatyourguitar> so when I scope two signal I can make a graph in the computer showing the margin of error over time
[10:27:24] <eatyourguitar> without that, you would need to make a special differencing front end for your scope with opamps
[10:27:46] <skroon> would that DSO nano be a good scope to start with perhaps? and would It be good enough to work with AVR projects?
[10:27:52] <Tom_itx> rigol
[10:27:55] <eatyourguitar> and then you have the +/- error of your opamps added to the +/- error of the cheap scope
[10:28:02] <skroon> I also saw some scope that work together with iPad
[10:28:19] <skroon> Tom_itx: i've heard of that brand before indeed
[10:28:21] <Tom_itx> http://dx.com/p/rigol-ds1052e-5-6-tft-lcd-50mhz-2-channel-digital-color-storage-oscilloscope-30573
[10:28:31] <eatyourguitar> rigol DS1052
[10:29:08] <eatyourguitar> thats the exact same price as rigol.com
[10:29:23] <eatyourguitar> DX is a horrible retailer
[10:29:25] <skroon> I would like to play with RF as well, that probably dictates the type of scope I wan to get as well right?
[10:29:34] <eatyourguitar> they take 3 months to send your stuff
[10:29:36] <Tom_itx> yes
[10:29:46] <Tom_itx> you would probably need higher bandwidth
[10:29:52] <eatyourguitar> but if you don't mind waiting and you want some hdmi cables they are good
[10:30:12] <eatyourguitar> if you want to scope the AVR digital lines you need nice scopes
[10:30:28] <eatyourguitar> I can just buy a fake salae off aliexpress for that
[10:30:29] <Tom_itx> i got a saleae for avr
[10:30:37] <eatyourguitar> $10
[10:30:41] <eatyourguitar> that was easy
[10:31:04] <eatyourguitar> they have 16ch 100mhz for < $100 now
[10:31:16] <eatyourguitar> on aliexpress
[10:31:43] <skroon> so what kind of bandwidth would I be looking at to play with RF and AVR digital lines?
[10:31:52] <Tom_itx> aliexpress is also a broker
[10:31:58] <eatyourguitar> like ebay
[10:32:05] <eatyourguitar> but not an auction site
[10:32:11] <Tom_itx> right
[10:33:07] <skroon> does DSO's look pretty cool actually :)
[10:33:38] <eatyourguitar> I asked for docs to this function generator and this is what I got back http://us03.i.aliimg.com/ae_message/b/5c/a1/d2/43/351411097/450x450.jpg
[10:33:40] <eatyourguitar> lol
[10:39:01] <eatyourguitar> skroon, http://owon.co.uk/wsb4318264101/pdsSeries.asp
[10:40:25] <eatyourguitar> compare to the DSO http://www.adafruit.com/products/468
[10:40:32] <eatyourguitar> 10mv resolution
[10:41:32] <eatyourguitar> the owon is 5mv
[10:41:49] <eatyourguitar> not exactly 1mv but I can live with it
[10:50:10] <eatyourguitar> I just checked the specs on the rigol DS1052, it is 19mv
[10:51:03] <eatyourguitar> the owon is cheaper, has a larger screen, and better resolution. imagine that
[10:51:11] <eatyourguitar> but less Mhz
[11:43:20] <Nebukadneza> heho
[11:44:07] <Nebukadneza> i've got a really bad problem with a storebought usbasp, which seems to come with a bootloadHID bootloader (http://www.obdev.at/products/vusb/bootloadhid.html) installed. the bootloader engages when the programmer is plugged into usb AND the idc10 cable to the target is connected
[11:44:23] <Nebukadneza> which is quite dumb, because ... uh, i'd like to program then
[11:44:51] <Nebukadneza> i haven't found any way to tell the bootloader to overwrite (i.e. delete) itself... is that possible?
[11:46:10] <Tom_itx> isp will delete it
[11:46:37] <Nebukadneza> mh, the question is how to ISP this thingy without tons of hassle
[11:46:45] <Nebukadneza> i.e. soldering directly to the pins of a quite small smd avr ;(
[11:46:57] <Tom_itx> my programmer works find for that
[11:47:09] <Nebukadneza> works find for that?
[11:47:29] <Tom_itx> overwriting a bootloader
[11:48:20] <Tom_itx> why do you want to remove the bootloader?
[11:49:20] <Tom_itx> maybe you should solder the avr to a board first
[11:49:27] <Tom_itx> or make a holder to program them
[11:49:48] <Nebukadneza> no no, the problem is different
[11:49:56] <Nebukadneza> i have a circuit i want to ISP with an usbasp
[11:50:05] <Tom_itx> like this: http://tom-itx.dyndns.org:81/~webpage/attiny2313/attiny9.jpg
[11:50:45] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/attiny2313/attiny2.jpg
[11:50:51] <Nebukadneza> the usbasp i bought in a store has a bad bootloader: when i plug the usbasp into usb without a connected target, it boots normally
[11:51:15] <Nebukadneza> but when i first connect the target, and then plug the usbasp into usb, then the bootloader boots, allowing me only to self-upgrade the usbasp, instead of flashing the target
[11:51:49] <Tom_itx> i got away from using those bit banged usb programmers
[11:52:29] <Nebukadneza> bitbanged usb programmers?
[11:52:37] <Tom_itx> usbasp
[11:52:38] <Tom_itx> etc
[11:53:15] <Nebukadneza> well, i don't have much choice here
[11:53:35] <Tom_itx> the choice you have doesn't seem to be working
[11:53:46] <Nebukadneza> only because i need to get the @$*()!@% bootloader off there ;)
[11:54:18] <Tom_itx> you will probably need an isp programmer to remove it
[11:54:23] <Nebukadneza> mhhh
[11:54:35] <Nebukadneza> if i connect two usbasps head to head with their IDC10 cables, that'll explode, right?
[11:54:41] <Tom_itx> that's the chicken / egg dilemma with bitbanged programmers
[11:54:58] <Nebukadneza> mh
[11:55:03] <Nebukadneza> i do have another working usbasp ;)
[11:55:35] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[11:55:38] <Tom_itx> that's what i use
[11:57:34] <Tom_itx> i'm not exactly sure what you're trying to do
[11:57:49] <Tom_itx> but if you erase the bootloader on the usbasp, it will no longer be a programmer
[11:57:53] <Nebukadneza> getting a bootloaderHID off an avr without ISPing it
[11:58:09] <Tom_itx> is it a usb avr?
[11:58:16] <Tom_itx> what chip is it?
[11:58:27] <Nebukadneza> 8L
[11:58:37] <Tom_itx> so no it's not a usb chip
[11:58:52] <Tom_itx> back to what i just said...
[11:58:56] <Tom_itx> but if you erase the bootloader on the usbasp, it will no longer be a programmer
[11:58:59] <Nebukadneza> i should ISP it...
[11:59:02] <Nebukadneza> uhm
[11:59:02] <Nebukadneza> wrong
[11:59:07] <Nebukadneza> it can no longer self-upgrade
[11:59:26] <Tom_itx> well either way you need an isp programmer to fix it
[11:59:44] <Tom_itx> wired up to the spi pins
[11:59:45] <Nebukadneza> i have one, i just don't want to solder it to the chip itself ;/
[12:00:03] <Tom_itx> find some traces to the pins you can solder to
[12:00:21] <Tom_itx> that's the chicken / egg thing of bit banged usb programmers
[12:00:44] <Nebukadneza> if they didn't fuck up their bootloader everything would've been good
[12:01:01] <Tom_itx> or get a decent programmer to start with
[12:01:48] <Nebukadneza> i need to integrate this into a closed device, so no chance for that
[12:02:19] <Tom_itx> with field updates via usb?
[12:02:52] <Nebukadneza> yeah
[12:05:51] <Horologium> solution...plug into usb first then plug to target board.
[12:06:12] <Nebukadneza> and every time i need to do that, i need ~30minutes to open the device
[12:06:33] <Nebukadneza> ;(
[12:06:40] <Horologium> another of those problems with bitbanged usb.
[12:07:01] <Horologium> you don't just leave it plugged into the usb port of the computer?
[12:07:14] <Nebukadneza> no ;/
[12:08:04] <Horologium> guess I don't understand why not....or why it takes 30 minutes to open the device.
[12:11:28] <Nebukadneza> its a quite complicated device with the electronics quite deep down inside
[12:11:42] <Horologium> I meant the programmer.
[12:11:56] <Nebukadneza> yes, i glued the programmer inside the device
[12:11:59] <Nebukadneza> connected it to the avr inside
[12:12:03] <Horologium> oh.
[12:12:05] <Nebukadneza> and pulled a usb cable to its case
[12:12:08] <Nebukadneza> where i installed a usb socket
[12:12:23] <Nebukadneza> so i can just walk up to the device, connect usb, and upgrade its firmware / edit eeprom configuration
[12:12:25] <Horologium> now it makes sense why you can't leave the programmer connected tot he pc
[12:12:40] <Nebukadneza> yes ;)
[12:12:53] <Nebukadneza> and why disconnecting the target from the programmer is a hassle
[12:12:56] <Horologium> why didn't you just put usbasploader on the avr in the device rather than adding a second usb programmer?
[12:13:10] <Nebukadneza> we have quite some space problems there ;/
[12:13:17] <Nebukadneza> i would've liked to
[12:13:28] <Horologium> it would have removed the extra hardware doing it that way.
[12:14:16] <Horologium> sounds like a flawed design,,but nothing we can do about that now...
[12:14:42] <Horologium> you need to wipe the usbasp completely and reload just the usbasp software to it with a second avr programmer.
[12:15:35] <Horologium> so, somehow you need to bring the programming pins of the avr out to be able to connect to them, even temporarily....without knowing which chip is used by that particular usbasp, it is impossible for us to tell you which pins to bring out or how.
[12:15:54] <Horologium> usbasp is just a generic software package that can be put on many different avr chips to make a usbasp programmer.
[12:16:37] <Nebukadneza> it seems like the normal "vanilla" hexfiles work
[12:16:44] <Nebukadneza> (for the mega8)
[12:16:56] <Nebukadneza> i'm just starting to solder thin wires directly to its pins...
[12:18:01] <Horologium> is that programmer using the hardware spi port for the programming output pins?
[12:18:13] <Horologium> if so then the only one you need to solder to is the reset line.
[12:45:52] * RikusW saw a Hawker Hunter being flown today :)
[12:47:39] <kobrien> I've lost the ability to program my atmega48p after updating the fuses using my avrispv2. how do I reset to factory?
[12:47:59] <RikusW> what was the new values you used ?
[12:48:51] <kobrien> RikusW: -U lfuse:w:0x40:m -U hfuse:w:0x8c:m -U efuse:w:0xff:m
[12:50:36] <kobrien> device signature is changing constantly
[12:50:47] <Horologium> RikusW, at an airshow?
[12:50:55] <WhaleBoobs> if one of two identical batteries charge full charge in a couple of minutes and looses charges equally as fast
[12:50:58] <WhaleBoobs> whats teh problem
[12:51:26] <Horologium> you have a bad battery.
[12:51:27] <RikusW> you programmed DWEN for one thing...
[12:51:27] <RikusW> Horologium: yes
[12:51:37] <RikusW> kobrien: and you set it as external clock as well...
[12:51:39] <WhaleBoobs> Can i fix it? its brand new
[12:51:58] <RikusW> you need external crystal lfuse = 0xFF NOT external clock
[12:52:14] <WhaleBoobs> Can i remove safery circuit and charge it like regular in charger?
[12:52:20] <kobrien> oh! yeah, I'm using an external 16Mhz crystal
[12:52:22] <WhaleBoobs> i got short circuits etc in my device
[12:52:27] <RikusW> kobrien: if you have access to HVPP use that to reporgram the fuses
[12:52:36] <Horologium> WhaleBoobs, without knowing a lot of stuff, no way to answer that...what kind of battery, what kind of charger, and on and on.
[12:52:47] <RikusW> kobrien: the crystal is of no use with your current lfuse setting
[12:52:53] <WhaleBoobs> 18650, with a very simple charger..
[12:53:10] <kobrien> RikusW: noted. thanks. (this is day 1 for me)
[12:53:19] <RikusW> kobrien: do you have a dragon/stk ?
[12:53:26] <Horologium> kobrien, you could also use an external clock source to drive it while you reprogram it....like use a 555 timer to generate a clock signal.
[12:53:41] <RikusW> Horologium: he set DWEN too...
[12:53:46] <Horologium> oh..
[12:53:47] <Horologium> hmmm.
[12:53:51] <Horologium> that could cause issues then.
[12:54:19] <Horologium> yup..time for an HVPP
[12:54:26] <RikusW> there is another way
[12:54:44] <kobrien> I don't have a dragon/stk
[12:54:54] <kobrien> I have many 555s
[12:55:03] <kobrien> oh, I see that won't work
[12:55:26] <Horologium> with DWEN on you need an HVPP to get around what you did.
[12:55:48] <kobrien> Horologium: ok. I'll see if I can dig one up from a friend
[12:55:51] <RikusW> Horologium: there is another option for DWEN
[12:56:23] <WhaleBoobs> Ive never had luck with batteries and chargers. what charger should i buy with a $80 dollar budget? for 18650 batteries
[12:56:30] <RikusW> connect a uart tx pin at the right baud to the reset pin and send 0x06 to disable dW temporarily (until power cycle)
[12:56:45] <RikusW> default dW baud is clock / 128
[12:56:58] <RikusW> but I think CKDIV8 will affect it too
[12:57:00] <Horologium> WhaleBoobs, you should not skimp on charger for lithium batteries of any kind.
[12:57:09] <RikusW> which is set in this case
[12:57:22] <Horologium> WhaleBoobs, it still sounds like you have a bad battery....
[12:57:34] <RikusW> kobrien: got any other AVRs around ?
[12:57:46] <RikusW> and perhaps a 14.745MHz crystal ?
[12:58:29] <kobrien> RikusW: I have a few AVRs, but not that crystal
[12:58:39] <WhaleBoobs> Horolohium. ok i guess ill just buy another battery. does theese simple chargers do their job at full charging batteries?
[12:58:43] <RikusW> 7.372 MHz ?
[12:58:54] <Horologium> WhaleBoobs, no clue what charger you have...
[12:59:53] <kobrien> RikusW: I just checked my box, I only have another 16Mhz
[13:00:16] <Amkei> hello, I've got a huge problem getting AVRStudio running. Maybe someone can give me a hint how to solve.
[13:00:39] <Amkei> I'm newbie btw.
[13:01:03] <WhaleBoobs> its the one to the left
[13:01:03] <WhaleBoobs> http://i3.minus.com/ibwjpKQC6DzMhy.jpg
[13:01:08] <Horologium> so, what is your problem Amkei ?
[13:01:12] <WhaleBoobs> mtlc 0420
[13:01:34] <RikusW> kobrien: in short set the CKOUT bit in the fuses of another AVR
[13:01:41] <Amkei> First I installed AVR-Studio 4.19 but cause it isnt able to debug c++ (it's crashing all the time when I want to debug my code) I decided to try AS5 and 6.
[13:02:27] <RikusW> kobrien: then connect its CKOUT pin to the XT1 pin on the bricked AVR and use its UART TX pin to send 0x06 to the Reset pin on the bricked AVR
[13:02:41] <kobrien> RikusW: ok, I follow
[13:02:42] <RikusW> the baud you'll need is then 16MHz /8 /128
[13:02:45] <Amkei> Now when I start AVR Studio5 the startpage is empty and nothing happend. Only at the right side there is a frame "file in solution"
[13:02:59] <Amkei> Its running in a VM under Windows XP32
[13:03:11] <RikusW> kobrien: (/8 /128 should work, but if not, try only /128)
[13:03:17] <kobrien> RikusW: cool, I'll work on that
[13:03:24] <RikusW> kobrien: there is a doc on dW at ruemohr.org
[13:03:44] <Amkei> I installed all additional tools without problems.
[13:04:08] <RikusW> if you have a 14.745MHz crystal it can even be connected to a PC serial port via a TTL - RS232 translator
[13:04:34] <RikusW> kobrien: 0x06 is the temporary disable command for dW
[13:05:10] <kobrien> RikusW: ok, thanks.
[13:05:47] <Horologium> Amkei, maybe someone else here will be able to help you with this once they wake up and see it...
[13:06:41] <Amkei> hope soo, I need to solve it as quick as possible, I'm student and have to do a project :((
[13:07:08] <Horologium> you can also contact atmel tech support via email..they might be able to help you.
[13:07:10] <Amkei> Lost two days with install, deinstall, search and try
[13:07:32] <Horologium> as I run linux exclusively, I don't do atmel studio...or avr studio as it was called before version 6
[13:08:12] <Amkei> that could be also an option for me, but I prefer to use the Studio
[13:10:02] <RikusW> kobrien: new fuse values EHS -> FF DC FF
[13:11:39] <RikusW> *ehl
[13:11:47] <kobrien> RikusW: thanks. I've just noticed two things. 1: I have another one of these chips. I can use that chip and attempt fixing this one later. 2: AVR Dragon is €40...not bad, wouldn't mind getting one if I can't fix it.
[13:13:05] <RikusW> kobrien: leave RSTDSBL and DWEN bits = 1 (disabled)
[13:13:16] <RikusW> both will brick the AVR
[13:15:18] <RikusW> kobrien: the other option is to reprogram the fuses using HVPP but building a simple programmer
[13:15:58] <RikusW> I'd suggest applying 12V via a 1k5 resistor to reset
[13:15:58] <RikusW> the datasheet explains how to rewrite fuses using HVPP, rather simple actually
[13:16:58] <kobrien> RikusW: this sounds like a good option. I'll try that approach
[13:18:13] <RikusW> HVPP does require 21 connections be made...
[13:18:33] <Horologium> just a few toggle switches.
[13:18:38] <kobrien> RikusW: ok, gonna try the new fuse settings. All I want to do is enable my external 16Mhz crysta.
[13:18:51] <kobrien> are the values you gave just that?
[13:19:06] <RikusW> just change lfuse to FF
[13:19:10] <RikusW> thats enough for that
[13:19:52] <RikusW> and do have 18/22pf caps on both sides of the crystal to ground
[13:21:02] <kobrien> ok, great. i do
[13:22:59] <Amkei> btw. to give a better look what I'm talking about: http://s14.directupload.net/images/130504/jplw9qsc.png
[13:23:35] <Horologium> yup...looks like a problem...windows...
[13:30:18] <kobrien> RikusW: think I bricked this one too. I just changed lfuse to FF and the ISP is throwing connection errors
[13:32:20] <RikusW> only lfuse ?
[13:32:27] <kobrien> RikusW: yes
[13:32:27] <RikusW> 0xFF ?
[13:32:30] <kobrien> yes
[13:32:41] <RikusW> check that the crystal is properly connected
[13:32:45] <RikusW> to XT1 and XT2
[13:33:02] <RikusW> and a 18 or 22 pF cap on each one
[13:33:05] <RikusW> to ground
[13:36:22] <kobrien> RikusW: oh, only one was going to ground. now both are, but same problem
[13:37:16] <RikusW> what command did you use to write the fuse ? avrdude ?
[13:37:37] <kobrien> RikusW: avrdude -c avrispv2 -p m48p -P usb -U lfuse:w:0xFF:m
[13:40:23] <RikusW> seems right
[13:40:49] <kobrien> RikusW: I'll check my wiring
[13:42:34] <RikusW> good idea
[13:43:40] <kobrien> seems om
[13:43:43] <kobrien> o*
[13:43:44] <kobrien> k
[13:50:00] <RikusW> well FF is the right lfuse value for 8 - 16 MHz crystals
[13:59:16] <kobrien> RikusW: I'm not entirely sure, but the ceramic capacitors I have on the crystal may not be capacitors...
[13:59:58] <RikusW> make sure its 18pF
[14:00:12] <RikusW> 100nF won't do
[14:00:56] <kobrien> I took them out and I can program the chip
[14:01:21] <kobrien> I'll have a look around for 18pF caps
[14:01:33] <RikusW> wrong caps then
[14:01:40] <RikusW> is it in a breadboard ?
[14:02:20] <RikusW> parasitic capacitance might be enough for now
[14:02:20] <Horologium> if you are on a solderless breadboard, the metal strips provide enough capacitance to kick off the oscillator.
[14:02:29] <kobrien> RikusW: yes. hey my light it blinking :) it works. the clock probably isn't stable though without the caps right?
[14:02:36] <RikusW> :)
[14:02:38] <kobrien> :D
[14:02:40] <kobrien> thanks
[14:02:43] <Horologium> caps are mostly for startup aren't they?
[14:03:00] <RikusW> afaik for stabilisation too
[14:03:16] <kobrien> look at that baby go
[14:05:34] <RikusW> to enable CKOUT set lfuse = BF
[14:06:04] <Nebukadneza> mh
[14:06:30] <Nebukadneza> speaking of fuses, i'm just trying (still ;P) to burn usbasp on my hardware, and the makefile states it wants -U hfuse:w:0xC9:m -U lfuse:w:0xEF:m on m8...
[14:06:42] <Nebukadneza> oh
[14:06:47] <Nebukadneza> and the moment i ask the question it works ;)
[14:06:58] <kobrien> RikusW: I'm done for today, but thanks for your help. I'll work from the log to fix the other chip
[14:07:08] <RikusW> ok
[14:09:56] <Nebukadneza> Tom_itx, Horologium -- i achieved my target, thanks for your help ;)
[15:52:16] <eatyourguitar> not my site http://modularsynthesis.com/avrsynth/avrsynth.htm
[15:52:22] <eatyourguitar> how cool is that?
[16:19:45] <Horologium> eatyourguitar, the background is annoying as hell.
[17:57:38] <vectory> can i connect a microphone to an osciloscope?
[17:57:50] <vectory> given the right adapter for connection
[17:58:25] <vectory> maybe it needs at least amplification ...
[18:03:07] <Horologium> depends on the oscilloscope.
[18:03:24] <Horologium> a microphone can be connected easily enough.
[18:03:35] <Horologium> depending on the type of microphone, you may or may not see anything.
[18:04:41] <Horologium> a 4 inch speaker hooked to a scope gives decent results though.
[18:24:50] <vectory> Horologium: speaker would be a hack :)
[18:26:01] <Horologium> yeah, so?
[18:26:08] <Horologium> for a mic you will likely need some kind of amp.
[18:26:48] <Horologium> my first scope was a single channel heathkit when I was 15 or so and I used to use a speaker as a mic to see my voice and other sounds.
[18:27:32] <vectory> i jsut wonder if it would be accurate. appearantly a few cycles difference in my timing detune my tone scale :)
[18:39:15] <ptrkOP> I have Free ISP iinstalled and am trying to program an Atmega328 on my Arduino.
[18:39:29] <ptrkOP> I am getting this error
[18:39:29] <ptrkOP> avrdude.exe: AVR device not responding
[18:39:29] <ptrkOP> avrdude.exe: initialization failed, rc=-1
[18:39:29] <ptrkOP> Double check connections and try again, or use -F to override
[18:39:29] <ptrkOP> this check.
[18:39:45] <ptrkOP> The light is on, on the Arduino and the programmer.
[18:39:51] <Horologium> what programmer are you using?
[18:39:57] <ptrkOP> UBasp
[18:40:08] <ptrkOP> USBasp
[18:40:20] <ptrkOP> Downloaded the most current driver and it is recognized
[18:41:03] <ptrkOP> Do you think it could be that this chip has the Arduino bootloader on it?
[18:41:42] <Horologium> and you have the programmer connected to the isp pins on the avr?
[18:41:54] <ptrkOP> The ISP pins on the Arduin
[18:41:57] <ptrkOP> o* board
[18:42:15] <ptrkOP> Do I need to take it off and breadboard it?
[18:42:17] <Horologium> I don't give a squat about arduino...I'm asking about the avr chip.
[18:42:32] <Horologium> I don't know what pins are connected to what on arduinos..I don't use them.
[18:43:46] <Horologium> for programming an avr you need power, clock, and programmer connected...
[18:43:49] <ptrkOP> The ISP header is connected to the ISP pins. I double checked on the schematic
[18:44:25] <ptrkOP> Ok, clock is on the board as well.
[18:45:46] <Horologium> and you have the board powered as well?
[18:45:51] <ptrkOP> Yes.
[18:46:14] <ptrkOP> In FreeISP I do not see "Atmega328" as a selectable device.
[18:46:23] <ptrkOP> I can use ATMEGA128, correct?
[18:46:23] <Horologium> I know nothing about freeisp.
[18:46:30] <Horologium> you can not.
[18:46:31] <ptrkOP> it is just a front end for avrdude
[18:46:36] <Horologium> it's a different chip..different series.
[18:46:49] <ptrkOP> Ok, let me try AVR dude by itself
[18:47:13] <Horologium> atmega328 is same as atmega88 only with more flash and ram mostly.
[18:49:43] <ptrkOP> So I could use -p m88 for avrdude
[18:49:52] <Horologium> no.
[18:49:57] <Horologium> chip signature is different.
[18:50:19] <Horologium> unless you edit the avrdude configuration file.
[18:50:29] <ptrkOP> Which one do I use then. I do not see the 328 listed in options for -p
[18:51:04] <Horologium> I use atmega1284p and atmega644 chips...which are included in the version of avrdude I have.
[18:51:16] <Horologium> perhaps you should get a modern release of avrdude.
[18:52:39] <ptrkOP> m1284p. I have that one listed
[18:54:37] <Horologium> m328p is listed in my avrdude.conf file.
[18:56:17] <ptrkOP> Whoops I am blind.
[18:56:27] <Horologium> grep is a wonderful thing.
[18:56:43] <Horologium> but, you are probably on windows.
[18:56:46] <ptrkOP> I got it to work from AVR dude. Thanks for the help. Sorry for being kind of obnoxious
[18:56:50] <ptrkOP> sadly I am
[18:57:17] <vectory> isnt m328p also different from m328?
[18:58:16] <Horologium> they are.
[18:58:51] <Horologium> though, the regular 328 is rather old and, I think, out of production.
[19:02:04] <Tom_itx> avrdude.exe: initialization failed, rc=-1
[19:02:09] <Tom_itx> means it can't see the chip
[19:02:43] <Tom_itx> also i have a fairly current avrdude.conf on my site if you need one
[19:10:29] <angs> what current (ampere) value does an atmega168a output from its pin?
[19:10:49] <Horologium> that depends on the load and the voltage the chip is running at.
[19:11:08] <Horologium> or do you mean, what is the maximum current output for the chip?
[19:11:31] <angs> yes
[19:11:34] <angs> sorry
[19:11:41] <Horologium> it's in the datasheet.
[19:12:24] <angs> I could not find it, do you know what chapter do I need to look at
[19:12:46] <Horologium> 40ma per i/o pin.
[19:12:59] <Horologium> page 303
[19:13:03] <Tom_itx> absolute maximum ratings
[19:13:07] <Tom_itx> it's there
[19:13:12] <angs> thank you
[19:13:12] <Tom_itx> for the looking
[19:13:59] <angs> thanks
[19:27:20] <vectory> so instead of using a timer with interrupt, i'd rather fix delay intervals and count cycles. at least i take a look at the list file now :)
[21:56:12] <OndraSter__> holycrap it is late
[21:56:15] <OndraSter__> .. or is it early :P
[21:56:29] <OndraSter__> playing minecraft, then did two homeworks and now I am continuing the minecraft
[21:56:34] <OndraSter__> (tekkit, so it is much more fun)