#avr | Logs for 2012-11-30

Back
[00:00:52] <eadthem> anyhow thanks cya tomarow
[00:01:37] <nevdull> good luck and have fun with it
[00:03:03] <TechIsCool> I have 28 vias is that a good thing or a bad thing? http://techiscool.com/eagle/v3/
[00:03:51] <TechIsCool> 10 of them are grounds though
[01:42:24] <RikusW> this is bs -> http://www.techthefuture.com/technology/united-nations-threatens-to-regulate-internet-top-down/
[03:19:35] <DarkSector> Hey guys when the AVR boots what is the state of the pins?
[03:19:44] <DarkSector> Is it in a tristate?
[03:24:49] <nevdull> i think it might depend on the pins. ie JTAG pins TCK always has pullup resistor on at reset, etc.
[03:25:20] <nevdull> the other ones like TMS and TDI have it on if JTAG is ena.
[03:27:11] <nevdull> actually, i just found something in the avr32 datasheet i'm on and it and it says all GPIO pins after reset default as inputs with pullup resistors disabled
[03:28:44] <specing> DarkSector: check the datasheet
[03:35:33] <RikusW> DarkSector: look at the ports chapter
[03:35:46] <RikusW> but its usually inputs
[03:43:12] <philfine> Hello everyone
[03:45:19] <philfine> I have an DIY ISP using a at90usb162. I can do both debugging and programming using it, although I am unable to use it with avrdude to write either flash or eeprom. I believe it is some sort of emulator for jtag mkI.
[03:46:52] <philfine> I built it around 1 year ago, and the code was provided by someone here in the forum. Can you make a guess what I am running in the at90usb162. By the way I had to patch the code for this MC
[03:47:03] <philfine> s/forum/IRC
[05:20:15] <slidercrank> jadew`, thank you
[05:20:50] <slidercrank> Tom_itx, great. I have a 1.uf cap
[09:16:34] <iSaleK> Anyone around here using Altium Designer?
[09:17:50] <RikusW> I did use DXP2004 which is the same family
[09:18:01] <iSaleK> I want do distance two components exactly 48.26mm, is there an easy way to distance one component from another?
[09:18:20] <RikusW> don't know about the easy part...
[09:18:26] <iSaleK> I'm making my own arduino board so I need to distance two pins :)
[09:18:41] <RikusW> you can type the exact location in the object properties...
[09:19:15] <iSaleK> I tought of that but I was wondering if there is an easy way :)
[09:19:49] <RikusW> that would be 1900 mil right ?
[09:20:17] <RikusW> so far I found that nothing on Altium is easy :-P :S
[09:20:50] <iSaleK> Yea that's 1900mil :)
[09:20:55] <RikusW> if you use a grid of 100 mil it should be easy enough
[09:21:30] <iSaleK> I've did it by placing the components on 80mm and another on 128.26mm so it's ok but I tought there is an easier way :)
[09:21:44] <iSaleK> I lock them together so when I move one the other one moves to :)
[09:21:53] <RikusW> good idea
[09:22:04] <RikusW> the DXP gui is rather arcane....
[09:22:25] <iSaleK> I didn't use Eagle much but it's a bit confusing :)
[09:22:28] <RikusW> I need to read the tutorial files when starting with it again...
[09:22:34] <iSaleK> So for now I'm sticking with Altium :)
[09:22:45] <iSaleK> Maybe when someone forces me to pay the licence, I will switch to Eagle :)
[09:23:11] <RikusW> so you got it for "free" ? :-P
[09:33:50] <iSaleK> Yea, let's say that :D
[09:33:59] <iSaleK> "trial" version :)
[09:34:30] <iSaleK> I'm not sure if the pinout on arduino shield is important? For A0-5 pins
[09:35:42] <iSaleK> Because I'm making my own arduino board on signle layer pcb so it would make my life a lot easier if I could just put pins straight to the output header instead of leading top right pin to bottom left header :)
[09:44:43] <theBear> iSaleK, depends what you connect, if you are connecting your own boards/generic i/o devices, it should be fine, BUT you may have to program 'sneaky' to account for swapped pins (ie. if they aren't in order, and you connect them in order to some other board/chip, 0100 might look like 0001 when it comes out in the wrong order
[09:46:05] <theBear> that's fine if you're maybe spitting out lookup tables or entering a few values in bin notation, but if yer wanna just write a byte/whole port and see that same 'number' at the other end, the lines need to be in order
[09:48:08] <iSaleK> Well I'm making Arduino DuoMilovane but I don't know exactly wich pins go to D0, D1...etc to D13
[09:52:25] <theBear> i don't know anything about arduino boards
[09:53:50] <AR_> there are certainly schematics
[09:54:15] <theBear> it's true, over the years i musta seen 100's of them <grin>
[10:02:36] <nevdull> iSaleK: maybe http://dailyduino.com/wp-content/uploads/2008/11/arduino_pinout.png will help
[10:03:46] <iSaleK> So pretty much i'm screwed :)
[10:04:19] <iSaleK> I need to position pins to their right headers or I will have a huge headache while coding :)
[10:04:57] <nevdull> can you add in a shift register and use only one pin for data and let the shift register maintain the byte/bit order?
[10:06:21] <iSaleK> Well if I could manufacture double sided pcb it would be not the problem even with the original arduino pinout, but with single sided board it's way too hard :)
[10:07:08] <karlp> why do you even need/want it to be compatible at all?
[10:07:12] <nevdull> i've had good luck with a PDIP16 and an atmega328p on a single copper clad board
[10:11:20] <iSaleK> nevdull: I'm using ATmega328 for this one
[10:11:41] <iSaleK> karlp, I don't know, guess in Arduino IDE pins are from 0 to 13, not PD0, PD2 etc...
[10:12:26] <darknite> you need to check the pinmapping to see what is mapped to port d
[10:12:29] <darknite> http://www.hobbytronics.co.uk/arduino-atmega328-pinout
[10:12:45] <AR_> iSaleK, or you could just use the ATmega328 like you're supposed to instead of trying to put it on a board that matches the arduino
[10:13:02] <karlp> iSaleK: I mean, are you trying to be compatible with shields? or are you just making an avr board that you will program using arduino?
[10:13:47] <iSaleK> karlp: for now just the arduino board that will be programmed with arduino ide, later maybe I would like to use some shileds but that's not the priority :)
[10:14:02] <AR_> so just use the AVR
[10:16:18] <iSaleK> What do you mean use the avr? I didn't understand that part...
[10:16:48] <AR_> you dont need to put it on a board that matches the arduino board
[10:16:58] <AR_> you can even still program it using arduino software
[10:17:01] <RikusW> use breadboard...
[10:17:26] <nevdull> iSalek: i wrote a step-by-step instruction on how to use the atmega328 from the arduino on your own custom breadboard if you're interested. http://www.instructables.com/id/Build-a-Complete-AVR-System-and-Play-Mastermind/
[10:18:14] <nevdull> mornin' RikusW, how are you doing today?
[10:19:26] <RikusW> nevdull: morning, I'm fine, its afternoon here ;)
[10:20:17] <nevdull> aha! it's going on afternoon here, too actually :)
[10:24:19] <iSaleK> nevdull: I red your tutorial, it's nice but I guess I wasn't too clear about what I'm making... I have ATmega328 and I want to make a board that will mimic Arduino DuoMilovane board :)
[10:25:26] <iSaleK> I don't know If it is possible to change in arduino IDE that (for example) on my board D2 is not PB2 but PD2 or something like that
[10:26:40] <RikusW> you can change the core files
[10:28:39] <RikusW> you can actually remap the pins anyway you'd like to
[10:30:08] <slidercrank> http://www.binbin.net/photos/generic/2.5/2.54mm-0.1in.-pin-strip-pin-strip-1x36-st-.jpg whis is this thing called? A pin strip?
[10:32:44] <nevdull> ah thanks, iSaleK. sorry it wasn't a good match for you, although that breadboarded avr system has all the key components of the arduino, i believe (voltage regulation, external xtal crystal i believe, and others)
[10:33:47] <nevdull> it's a 40-pin breakaway male pin header
[10:34:08] <nevdull> 2.54mm (0.1") looks like
[10:34:28] <iSaleK> nevdull: yeah it doesn. Actually tutorial is very good. I was bulding myself some protoboard for AVR and since I was using AVR I tought I would make it Arduino (kinda) compatible :)
[10:34:46] <nevdull> iSaleK: sounds like a fun project :)
[10:34:57] <iSaleK> If I can remap pins in core files that's just great :)
[10:35:14] <slidercrank> nevdull, thank you
[10:35:19] <nevdull> slidercrank: sure thing
[11:34:10] <OndraSter> I broke it!
[11:34:12] <OndraSter> it does not enumerate again
[11:34:15] <OndraSter> for unknown reason
[11:34:40] <jadew`> you could use an usb analyzer, eh?
[11:53:22] <OndraSter> jadew`, hardware one, yes
[13:17:48] <OndraSter_> chmpf
[13:17:59] <OndraSter_> IF the device enumerates on my laptop
[13:18:02] <OndraSter_> it enumerates fine on my PC too
[13:18:11] <OndraSter_> but if I do ONE MORE power cycle it does not enumerate on my PC anymore again
[13:18:13] <OndraSter_> I DON'T GET IT
[13:18:15] <OndraSter_> it is so random
[13:18:25] <OndraSter_> on another laptop it enumerates when I let USB analyzer scope it..
[13:19:15] <RikusW> and without analyzer ?
[13:19:20] <jadew`> are the power levels ok?
[13:19:43] <jadew`> maybe some capacitor remains charged to a specific value
[13:20:03] <OndraSter_> RikusW, random
[13:20:04] <OndraSter_> IT IS ALL RANDOM
[13:20:30] <OndraSter_> let's see if USBLyzer works on w7 x64
[13:20:31] <RikusW> ugh
[13:30:42] <Tom_itx> you need a USB analizer
[14:37:41] <RikusW> My GPRS modem user guide -> http://www.sendsms.com.cn/download/Fastrack_M1306B_User_Guide_rev003.pdf
[14:38:04] <RikusW> It actually supports embedded apps using OpenAT
[14:40:37] <OndraSter_> nice :)
[14:50:01] <RikusW> OndraSter_: have a look why it must not be connected directly to a truck battery....
[14:50:23] <RikusW> seems automotive electronics must be rugged....
[14:50:48] <OndraSter_> I know that there are some serious spikes in cars/trucks/..
[14:51:34] <RikusW> look at fig 12...
[14:51:47] <RikusW> trucks got a disconnect switch on earth
[14:52:24] <RikusW> so the entire starter current may go through the antenna coax through the modem power cable to the battery.....
[14:52:34] <RikusW> 60A....
[15:11:03] <jacekowski> 60A?
[15:11:10] <jacekowski> is that a toy truck?
[15:14:16] <RikusW> hmm, ask the modem datasheet :-P
[15:14:57] <RikusW> well, before 60A is reached the modem pcb will blow....
[15:35:46] <gee_> quick progmem question; i've been all over google/avrfreaks trying to find an answer but nothing's evident, might be something in avr studio 6's GCC compiler causing this.
[15:36:23] <OndraSter> hmm?
[15:36:32] <OndraSter> causing what?
[15:36:52] <gee_> I'm building a tv-b-gone sort of contraption, which has "tvcode" structs stored in progmem - those are defined as "const struct tvcode_struct tvcode_### PROGMEM = { <data } and those work fine
[15:37:54] <gee_> but I've also got an array of pointers to those structs that I'm trying to put into progmem, the definition of that structure is "const struct tvcode_struct *tvcode_index[] PROGMEM = { &tvcode_000, &tvcode_001 ... }
[15:38:12] <gee_> compiler barfs on it, saying "variable tvcode_index must be const in order to be put into read-only section..."
[15:38:29] <OndraSter> hmm
[15:38:42] <OndraSter> I am no C/C++ god, I am afraid I can't help you there
[15:44:24] <jadew`> hey, what happened to seeedstudio?
[15:44:51] <OndraSter> huh?
[15:45:46] <jadew`> cheap site
[15:46:00] <jadew`> with electronics stuff, it seems to have vanished tho
[15:46:33] <OndraSter> I know
[15:46:45] * RikusW is feeding the M1306B 18V now, removed the 7812....
[15:46:51] <OndraSter> huh the website is gone
[15:46:59] <jadew`> told you
[15:47:04] <jadew`> it's been like this for days
[15:47:10] <jadew`> at least
[15:47:33] <OndraSter> well they 14 hours ago on twitter linked one of their products
[15:48:05] <RikusW> it just disconnected randomly the last few weeks, especially during large downloads...
[15:49:15] <jadew`> RikusW, you're not talking about seeedstuido, isn't it?
[15:49:45] <RikusW> no
[15:49:53] <RikusW> my modem....
[15:50:02] <RikusW> so whatys wrong with their site ?
[15:50:12] <jadew`> it's not there anymore
[15:50:21] <jadew`> it's been like this for days (as far as I know)
[15:50:36] <RikusW> the Great firewall maybe ?
[15:51:22] <jadew`> lol
[15:51:55] <OndraSter> I thought that seeeed was US based
[15:52:01] <jadew> nah
[15:52:14] <jadew> or if it is, it still ships from china
[15:52:14] <OndraSter> US based with china fab and parts sources
[15:52:18] <OndraSter> ah
[15:52:25] <OndraSter> afk
[16:00:08] <Malinuss> evening
[16:10:01] <OndraSter> evenin.
[16:17:58] <Malinuss> I need a domain email, but I don't want to buy a domain + set up server etc.. any ideas?
[16:18:44] <darknite> Malinuss: hmm, define domain email.. you could register a domain and usually do mailforwarding from the registrars control panel. or you could set it up to use gmail/google apps
[16:18:53] <darknite> or do you just need any domain?
[16:19:51] <Malinuss> okay I basically need some domainname for a email, so I can sample, haha... I can't use my uni email, because, well I'm taking half a year "off", so they closed everything..
[16:20:34] <Malinuss> and I don't feel like paying the money (even though it isn't much) for a domain name
[16:21:55] <darknite> ah
[16:22:57] <Malinuss> any ideas ;P? Or would I need to find someone with a domain willing to do the serivce (or buy my own ofc.)
[16:24:16] <darknite> you can check pm, i have a couple of domains i could add a forward addy to
[16:24:56] <darknite> has anyone tried rebuilding an avrisp mkii to supply target power as well? i saw a thread about it a while back
[16:30:55] <Malinuss> darknite, well I can't see why it wouldn't be possible. You could propalby just wire from the right USB-pins on the mkii
[16:31:35] <Malinuss> It shouldn't be harder then that, if you can find the pins on the board, that is
[16:31:50] <OndraSter> USB has some awful noise actually
[16:31:53] <OndraSter> poor analog lines!
[16:32:06] <OndraSter> ADC on those megas is pretty unhappy
[16:32:13] <OndraSter> I saw something like 50 - 100mV ripple
[16:32:23] <Malinuss> OndraSter, well maybe some caps would help?
[16:32:35] <Malinuss> OndraSter, so the Xboard won't allow usb-power :)?
[16:32:36] <OndraSter> I had there 10uF and 100nF right at the pins of the SMPS
[16:32:40] <OndraSter> why?
[16:32:41] <OndraSter> it does
[16:32:45] <OndraSter> on the breadboard ones there is LDO
[16:32:49] <OndraSter> to drop to 3.3V
[16:32:53] <OndraSter> on the arduino ones there is SMPS
[16:32:56] <OndraSter> that does the same job
[16:33:07] <Malinuss> and the noise is not a problem?
[16:33:14] <OndraSter> I haven't checked ripple on the LDO ones, but the SMPS ones have got about 5 - 10mV ripple
[16:33:20] <OndraSter> or was it 10 - 20mV...
[16:33:24] <OndraSter> it was much smaller than USB
[16:33:31] <OndraSter> well I create my own noise :P
[16:33:35] <OndraSter> but much smaller
[16:33:40] <Malinuss> that's not very much when you think about 5V
[16:33:46] <OndraSter> and the analog supply is actually filtered through choke
[16:33:52] <OndraSter> it is when you have got analog stuff
[16:34:04] <darknite> aha
[16:35:23] <OndraSter> I don't have DSO, only analog scope
[16:35:27] <OndraSter> 40MHz only even
[16:36:02] <Malinuss> oh
[17:02:25] <muhoo> i'm trying to get an old hello world to compile on a new system, and i'm getting this:
[17:02:28] <muhoo> blink.c:60:6: error: attempt to use poisoned "SIG_TIMER1_COMPA"
[17:02:37] <muhoo> poisoned???!
[17:02:46] <muhoo> who poisoned my ISR's?
[17:03:26] <muhoo> (this with avr-libc 1:1.8.0-2 on wheezy
[17:03:47] <muhoo> and gcc-avr 1:4.7.0-2)
[17:06:14] <muhoo> wow, that's a terrible error message. sed -e 's/SIG_TIMER1_COMPA/TIMER1_COMPA_vect/g' solved it.
[17:12:15] <OndraSter> SIG_ is old
[17:12:18] <OndraSter> heh
[17:12:21] <OndraSter> yes
[17:15:49] <kbs> a newbie question -- i'm wondering if there's a kit (prebuild board?) or pointers that lets me create an audio-jack based interface. It would plug into a desktop or mobile device via the audio port (like the square reader) and run some small programs on the board to communicate with a larger app running on the other end.
[17:20:40] <RikusW> jackpot -> http://archive.sierrawireless.com/Default.aspx?Folder=\AirPrime\Open_AT_SDK_All_devices\
[17:20:42] <RikusW> :)
[17:21:21] <OndraSter> kbs, huh
[17:21:25] <OndraSter> doubd it
[17:21:26] <OndraSter> doubt
[17:21:45] <RikusW> serial via audio ?
[17:22:02] <OndraSter> FSK
[17:22:25] <RikusW> why not plain UART ?
[17:22:34] <RikusW> 9600bps
[17:23:14] <RikusW> dual serial (L/R) using line in/out
[17:23:51] <RikusW> using a divider to lower to audio level on linein
[17:24:54] <OndraSter> plain UART?
[17:25:05] <OndraSter> audio is AC..
[17:25:18] <OndraSter> coupled
[17:25:41] <RikusW> ah
[17:26:05] <kbs> RikusW: sorry -- jut starting out, and not familiar with this idea -- is the basic idea that I drive the audio input by bitbanging one of the output lines?
[17:26:25] <OndraSter> I dare you to do that :). Audio input is 0.7Vpp I think
[17:26:33] <OndraSter> and AC coupled
[17:26:40] <OndraSter> on iphone they use(d to use) FSK
[17:26:44] <OndraSter> to get 9600 baud modem
[17:26:46] <OndraSter> "modem"
[17:27:19] <RikusW> why not use qpsk ? ;)
[17:27:46] <OndraSter> why not Zoidberg?
[17:29:21] <kbs> Some more context -- I just need to send a few 100 bytes into the plugged-in machine [be it desktop or mobile.] I figured the audio port might be the most convenient way; but is there a better approach altogether?
[17:30:17] <kbs> [the few hundred bytes are some signed, encrypted bytes that I gues roughly serve as part of a key]
[17:30:29] <jadew> any idea what MLC means when talking about HDDs?
[17:30:44] <jadew> on the label it's a number, like the serial number
[17:33:44] <RikusW> kbs: you could use CW
[17:33:59] <RikusW> like the good old morse code
[17:34:06] <OndraSter> multilevel cells, jadew
[17:34:08] <OndraSter> oh
[17:34:12] <OndraSter> on HDD
[17:34:12] <OndraSter> no idea
[17:34:37] <RikusW> just use the presence/absence of a tone
[17:34:57] <kbs> RikusW: as an ancient ham, that makes sense to me :-) but just to make sure I follow the basic idea -- am I using one of the output lines on an avr to generate tones?
[17:35:04] <OndraSter> RikusW, it has got one issue :)
[17:35:06] <OndraSter> time synchronization
[17:35:42] <OndraSter> you could use L out as clock, R out as data tx and line in as data rx...
[17:35:47] <OndraSter> clocked by the L out
[17:35:48] <RikusW> kbs: you could use a PWM output, and divide it down using resistors
[17:35:57] <kbs> RikusW: aah
[17:35:59] <OndraSter> clamp using diode
[17:36:00] <RikusW> OndraSter: why clock it ?
[17:36:20] <RikusW> fixed bitrate could be used...
[17:36:24] <OndraSter> because sound card runs at fairly stable 48/96/192kHz
[17:36:27] <OndraSter> while the chip.. who knows
[17:36:39] <OndraSter> try it and see
[17:36:41] <OndraSter> you can always add it
[17:36:55] <kbs> OndraSter: I think I'm starting to understand what you're saying as well -- apologies because I'm pretty ignorant and just starting to learn what's possible, etc.
[17:37:14] <OndraSter> I am overthinking it really
[17:37:27] <RikusW> kbs: for the PC to AVR you could use an AM detector and schmidt trigger
[17:38:34] <kbs> RikusW: nice. I think I'm content at this point if the data only has to go from the avr to the parent device; and I think I can see my way out by coding any smarts on the pc/mobile device
[17:39:01] <kbs> i just need to 'squirt' the bytes into hte parent device, and that's about all i'd like to do
[17:39:17] <RikusW> only PWM plus divider then..
[17:39:40] <kbs> thaks RikusW and OndraSter for the ideas :-)
[17:40:01] <RikusW> as OndraSter said you could use L for data and R for clock
[17:40:35] <RikusW> using only line in on the parent
[17:40:52] <RikusW> or maybe just a data line
[17:41:18] <kbs> I'll need some more reading to absorb all this, but I think I've got the gist of the idea; might be back to re-clarify.
[17:41:54] <kbs> the other cute idea I saw btw was to just use a magnetic head, and dispense with the avr altogether -- a-la http://cosmodro.me/blog/2011/mar/25/rhombus-square-iskewedi/
[17:42:34] <kbs> if there was a way to combine the two, that would have been nifty; but now I have to carry the reader and find a way to make a magnetic card
[17:46:44] <gee__> kbs - what kind of data rates/transfer times are you looking at for your audio interface?
[17:47:03] <gee__> any number of possibilities of ways to send data over audio, with varying levels of complexity
[17:47:08] <RikusW> OndraSter: If plain binary is sent to linein it would be readable too....
[17:47:28] <RikusW> you'll see the peaks each time it transitions
[17:47:54] <RikusW> positive peak for 0 to 1 and negative for 1 to 0
[17:47:55] <kbs> gee__: I only have a few hundred bytes to send one-way; so really I'm looking for the simplest solution for my inexperienced hardware skills
[17:47:56] <gee__> plain binary into an audio stream, you'll get DC balance problems - you're better off using NRZ or something
[17:48:43] <gee__> just so I've got the application straight, you'
[17:49:00] <gee__> you've got a handheld device that has collected data, and you want to plug this into an audio jack (of a computer?) to unload it
[17:49:41] <kbs> that's nearly correct. the hand-held device is just a static holder of encrypted bytes [to be used roughly as part of a key].
[17:50:10] <gee__> so just one way communication, basically the thing's an ID code
[17:50:14] <kbs> I'd like a convenient way to push those bytes into a desktop or mobile device conveniently; and I'm not beholden to an audio-based mechanism -- anything that's simple would be best
[17:50:20] <kbs> yes -- that's exactly right :-)
[17:50:31] <kbs> a rather big id code admittedly [a few hundred bytes]
[17:51:18] <kbs> I actually thought of using a big qr-code and taking pictures; but that's a bit too exposed for my situation
[17:51:18] <OndraSter> RikusW, those peaks would be rather small-ish
[17:52:12] <gee__> computer audio port will do it, you'd need a program running on the computer that's constantly sampling audio and looking for information
[17:53:17] <gee__> for most computers, you'll probably end up using the microphone port on the front of it
[17:53:39] <gee__> I'm almost thinking USB would be better/easier because you're more likely to find a USB port
[17:53:55] <OndraSter> <oh god USB>
[17:53:55] <kbs> right, but that would make the mobile device situation more tricky, no?
[17:54:04] <OndraSter> a lot
[17:55:00] <gee__> USB is actually pretty easy if you're doing HID stuff, the LUFA library makes things really easy
[17:55:29] <gee__> took me about 1/2 a day knowing nothing to get an AT90USB162 acting as a PC keyboard.
[17:55:29] <OndraSter> gee, thanks!
[17:55:33] <OndraSter> (sorry, I couldn't resist :D)
[17:55:46] <gee__> and I'm by no means any kind of superstar programmer.
[17:55:49] <Tom_itx> whiner
[17:55:49] <kbs> but that still leaves out things like the iphone doesn't it? (or am I missing something completely)
[17:55:58] <OndraSter> nope, iphone does not do it
[17:55:59] <gee__> right
[17:56:15] <gee__> hmm... but the iphone does have an audio jack with a microphone input.
[17:56:18] <OndraSter> I am very close to finishing USB CDC custom stack. Two issues - it enumerates successfuly only on my laptop and sends to PC only the first packet with the actual serial data
[17:56:24] <gee__> you'd need different cables for iphone versus computer
[17:57:04] <gee__> but it'll work.
[17:57:12] <OndraSter> iphone does usb host?
[17:57:32] <RikusW> OndraSter: seems you have found that USB under the hood is not as simple as userland USB ? ;)
[17:57:33] <gee__> It does in some weird modes... but anyway, using the microphone input, this ID tag idea is fairly possible
[17:57:49] <OndraSter> RikusW, the funny thing is - I have always been debugging it on my laptop where it worked almost just fine
[17:57:52] <OndraSter> then I tried it on my PC.. :D
[17:58:04] <OndraSter> over 24 hours spent on it already or so
[17:58:31] <gee__> tag hardware you'll need a micro holding the data, battery, pushbutton, and a few discretes to drive the audio output
[17:59:29] <kbs> right. Between RikusW and OndraSter ; have a few suggestions to look at along those lines, and let's see how it goes
[17:59:45] <gee__> mic inputs are biased a certain way (don't know exactly how they work) and I'm thinking you might just need to pull one of the pins to ground with a transistor to signal data at the computer, should be pretty simple
[18:00:45] <gee__> pretty much have the micro wake up, throw a data stream out a pin, and go back to sleep
[18:01:14] <kbs> i guess some of these things are simple once I have the knowledge, which i now sorely lack :-) but, thanks for the tips -- have a bunch of learning still to do.
[18:01:14] <gee__> on the PC/iphone end, just record microphone audio and look for edges... I'm thinking PC software is gonna the harder part
[18:01:30] <gee__> ah, sorry for being complex :)
[18:02:12] <kbs> i'm reasonably comfortable on the software side at least, being a programmer by trade. hardware has been only something i've occasionally dabbled in; and now i find myself actually having a need for something that doesn't seem to quite exist.
[18:02:33] <kbs> in short, might be back for more advice :-)
[18:02:48] <gee__> have you done any work with AVR chips, arduino, PICs or anything?
[18:03:19] <kbs> i little bit with avrs -- basically blinkenlight type things.
[18:03:33] <gee__> well the AVR side should be pretty straightforward
[18:03:59] <kbs> one hopes :-) these things seem to be harder and harder to put into a breadboard
[18:04:02] <RikusW> kbs: the AVR pins can be used as open drain
[18:04:22] <RikusW> set the port = 0 and use ddr for output
[18:04:51] <kbs> RikusW: ah, gotcha. yes -- that's basically blinkenlights isn't it :-)
[18:05:09] <gee__> rikus - I'd recommend using a separate resistor/transistor, it'll be able to handle a lot more abuse
[18:05:11] <kbs> i think i've even used the pwm thing to dim the leds, so i might be able to find my way around that bit
[18:06:45] <gee__> AVR will have to pretty much start up, set up a few pins/etc, set itself to wake up when you push a button, and go to sleep
[18:07:28] <gee__> when it wakes up, there'll be a loop reading through the data you want to send, doing some encoding on it, and sending it out an IO pin (which could be done with PWM, SPI or a few other methods)
[18:07:51] <gee__> and when that's done, back to sleep. Maybe even with a blinkenled. ;)
[18:08:13] <kbs> gee__: gotcha. I think i still might remember enough to do that once I re-read the data sheets :-) Btw, -- am I missing something with everyone using arduinos these days? the last time i just put the avr into a breadboard and went for it; what does using the arduino get me?
[18:08:20] <RikusW> kbs: I'll recommend using a timer to time the bit output
[18:08:35] <RikusW> that is if you do fixed bitrate
[18:09:03] <OndraSter> RikusW, I hate my PC - even before the second time the Device descriptor is sent it resets the bus :(
[18:09:06] <gee__> yeah, I started out the same way, building various things things out of mega8's on breadboards
[18:09:22] <gee__> apparently arduino's big advantage is software
[18:09:24] <kbs> RikusW: ok -- i will add that to the list of tips, thanks
[18:10:08] <RikusW> OndraSter: using different OSes ?
[18:10:15] <gee__> also it's a single card that just plain works, and it's cheap (about the price of an AVR programming pod) so there's a bit of beauty in it
[18:10:16] <OndraSter> no
[18:10:33] <kbs> gee__: ah, I see -- thanks for the info
[18:10:33] <OndraSter> well, my laptop runs W8 x64 and my PC runs W7 x64. My laptop is 6? years old AMD stuff, my PC is 1.5 years old P67 chipset
[18:10:59] <OndraSter> I am stripping it completely down
[18:11:36] <gee__> kbs - do you have a minimum bitrate?
[18:11:36] <gee__> if you
[18:12:01] <gee__> if you're moving a few hundred bytes at say, 300 baud, that's several seconds
[18:12:46] <kbs> gee__: well -- it's [in principle] part of a login sequence; so I'd like to get it across in maybe not more than 3-5 seconds if possible
[18:13:29] <gee__> what's getting sent across?
[18:13:44] <gee__> if it's just a cryptographic ID, you can't need that many bits
[18:14:33] <kbs> it's a signed, encrypted gpg key -- it's probably just around 100 bytes or so I think
[18:15:06] <kbs> no -- actually; closer to 1k it seems. hm :-)
[18:15:12] <RikusW> 1200bps would give 150 bytes/s
[18:15:31] <gee__> 1200bps would be hard over a microphone port
[18:15:48] <kbs> that's a good point about the data size, didn't consider that
[18:16:04] <gee__> actually I'd put 1200bps at about the maximum
[18:17:02] <gee__> the QR code idea is interesting... I'm just wondering if you could somehow make a "secure" QR code
[18:17:18] <gee__> like some handheld gadget that lights up with a QR code after you push a couple of buttons
[18:17:46] <gee__> or just some dumb thing made out of paper that keeps the thing covered from most angles or something
[18:17:49] <kbs> right. I would actually be ok with just printing the thing out [as the key itself is encrypted, and still needs a password]
[18:18:11] <kbs> but as you say -- i wasn't sure if there was a good way to keep the paper from observation as I used it
[18:20:34] <gee__> hmm..
[18:20:46] <gee__> there is NFC, though I don't have a single clue how it works on the software side
[18:21:15] <kbs> right, as well as the difficulty of using it on desktop + mobile
[18:21:16] <gee__> you'll need a NFC capable phone and a NFC dongle for your computer
[18:21:27] <gee__> and a card that transmits NFC
[18:21:50] <gee__> there's bluetooth, but you'd have to pair with everything first (might not be an issue)
[18:22:21] <gee__> gotta run - food
[18:22:32] <kbs> thanks for the ideas and brainstorming :-)
[18:38:39] <Bustamove> Is this channel abou AVR programming?
[18:38:43] <Bustamove> YESS
[18:40:10] <Bustamove> I can control a servo with my atmega1284p (50hz PWM). But my ESC which runs my motor wont go. ive tried 50hz, 8mhz and 16mhz.
[18:40:39] <OndraSter> ESC?
[18:40:52] <Bustamove> esc :p like brushless motor driver
[18:40:55] <OndraSter> ah
[18:42:20] <gee__> can you run the ESC by itself, without the atmel controlling it?
[18:42:32] <gee__> just to make sure that's not the problem
[18:43:39] <Bustamove> no.. i dont have a R/C controller. But it should be the same signals? i think i got it in programming mode as the motor beeped every third second until i plugged the power out.
[18:44:13] <Bustamove> the motor cables does the order matter
[18:44:18] <Bustamove> its not color coded on the esc
[18:45:46] <gee__> if it's just 3 wires, order won't matter, but your motor might run backwards (switch any two wires to change direction)
[18:46:04] <Bustamove> okay
[18:46:41] <gee__> I don't know what goes on between AVRs and motor controllers
[18:47:01] <gee__> err, between RC controllers and motor controllers
[18:47:49] <gee__> got access to an oscilloscope?
[18:48:33] <Bustamove> No! great idea tough would been so much easier
[18:49:34] <gee__> from what I can gather, you can pretty much strap an AVR PWM output to a speed controller input
[18:49:53] <gee__> set the PWM frequency to around 50Hz and vary the duty cycle to change speed
[18:51:23] <gee__> duty cycle has to be >50% before the motor starts spinning
[18:51:33] <gee__> this seems to be the behavior for most things I see
[18:51:49] <Bustamove> Works on my servo, yes..
[18:52:16] <Bustamove> maybe the esc is broke or something. maybe got into safe mode or something. read about it in the datasheet
[18:52:22] <Bustamove> >.<
[18:53:05] <gee__> suspecting either something's miswired between AVR/ESC, the ESR is in some sort of mode (you have to configure it or something), or the ESC's just plain broke.
[18:53:20] <gee__> I'd spend some quality time with the ESC manual
[18:53:44] <Bustamove> hmm yeah il lgive it another shot
[18:54:01] <gee__> g'luck
[18:54:16] <Bustamove> the thing is the esc got + and - but theres also + and - on the pwm wires (data too)
[18:54:20] <gee__> one of my co-workers actually has an AVR controlled remote control car with gyros, accelerometers and things
[18:54:25] <Bustamove> should i connect ground to each other
[18:54:42] <Bustamove> cool yeah its possible
[18:54:46] <gee__> I'd ask him but it'll be monday/tuesday at least
[18:55:00] <Bustamove> ask him which "hz" he runs please :)
[18:55:00] <gee__> if you're just jumpering over PWM+ and not PWM-, that might be it
[18:55:22] <gee__> PWM- should go to AVR ground
[18:55:52] <Bustamove> ya? the thing is if i connect + the avr becomes powered from the seperate esc source??
[18:56:42] <gee__> hang on, when you connect the PWM line the AVR powers up, and the AVR isn't being fed any other voltage/
[18:56:42] <gee__> ?
[18:57:19] <Bustamove> its magic!
[18:57:26] <Bustamove> http://i01.i.aliimg.com/img/pb/624/653/367/367653624_380.jpg
[18:57:35] <Bustamove> the power comes from the seperate +/-
[18:57:39] <Bustamove> which is the "battery"
[18:57:45] <Bustamove> i use an 12v adapter
[18:58:27] <gee__> what's the names on the pins on that 3 pin cable?
[18:59:17] <Bustamove> thats just pwm.. plus, minus, and data
[18:59:56] <Bustamove> with the working servo i can use a seperate battery with same ground. or else the avr dies
[19:01:10] <gee__> looking for a manual for that controller right now
[19:02:50] <Bustamove> nice.. so weird that the manual tells something about 8mhz / 16mhz. other websites tells it should be 50hz -> 400hz
[19:03:20] <gee__> can't find a manual
[19:03:55] <gee__> have a DMM?
[19:04:15] <Bustamove> yea w8
[19:04:23] <gee__> measure between pwm+ and pwm-
[19:04:32] <gee__> maybe the ESC is putting out 5 volts or something
[19:04:54] <Bustamove> ok 1 sec
[19:07:00] <Bustamove> hm if my multimeter tells that the current is negative
[19:07:11] <Bustamove> which pole is negative
[19:07:12] <Bustamove> the red?
[19:07:36] <Bustamove> trying to figure out if the adapter is connected wrong
[19:07:46] <Bustamove> lined cable is usually plus right
[19:07:51] <Bustamove> positive*
[19:08:33] <Bustamove> http://www.hobbyking.com/hobbyking/store/uploads/836379618X44143X22.pdf
[19:08:36] <Bustamove> datasheet btw
[19:11:26] <gee__> red = +5V (power your AVR with this)
[19:11:28] <Bustamove> got no voltage between pwm+ and pwm-.. it was there!
[19:11:38] <gee__> black = ground (connect to AVR ground)
[19:11:45] <gee__> white = PWM signal
[19:11:51] <gee__> send 50Hz with this.
[19:11:55] <Bustamove> so the esc is meant to give out power
[19:12:02] <gee__> looks like they all do
[19:12:06] <gee__> to power the RC receiver
[19:12:24] <gee__> anyway I'd borrow an actual RC receiver and make sure the ESC works, and do programming on it
[19:12:46] <gee__> 8/16KHz are the switching frequency that it throws at the motor, not what it's expecting on its signal input
[19:12:54] <Bustamove> ohh i see
[19:12:58] <Bustamove> that helps
[19:13:36] <gee__> sounds like almost all this stuff runs at 50hz
[19:13:54] <gee__> so yes, get an RC controller and test everything, make sure the controller's programmed etc.
[19:14:08] <gee__> once that works, disconnect the RC controller and hook up your AVR.
[19:14:54] <Bustamove> 5,5v so thats seems right
[19:23:24] <slidercrank> should avrdude see my programmer if the programmer isn't connected to a device?
[19:23:52] <slidercrank> what I get is: avrdude -p m8 -c usbasp
[19:23:52] <slidercrank> avrdude: warning: cannot set sck period. please check for usbasp firmware update.
[19:23:53] <slidercrank> avrdude: error: programm enable: target doesn't answer. 1
[19:40:44] <Bustamove> hey
[19:40:53] <Bustamove> try to set -F at the end
[19:41:02] <Bustamove> works for me and my usbasp
[19:41:10] <Bustamove> yes it should
[19:41:23] <Bustamove> and it does as it seems. just try -F
[19:42:00] <al1ta> hi all
[19:43:10] <Malinuss> hjelo
[19:47:29] <al1ta> I have a atmel xplain.. I bought acouple of years ago for hacking playstation 3.. now I'd like to use it for better utilization...
[19:48:03] <Casper> al1ta: first, you need to find out what IC it actually use
[19:48:13] <al1ta> is there a way to programming it without extra hardware under linux possible using arduino sdk?
[19:48:39] <Casper> al1ta: depend on the part, and what port you have on your pc
[19:50:59] <al1ta> ok.. what are you mean for 'what port'... sorry i'm really a newbie.. I think that it could be programmed by usb reprogramming the usb microcontroller
[19:51:40] <al1ta> it is at revision 5
[19:51:52] <Malinuss> al1ta, propably not, depends on if it has a bootlader that enables that..
[19:51:54] <al1ta> .. the xplain board
[19:52:16] <Casper> al1ta: as I said, depending on the part number (atmega8 for example) and the connectivity on the pc (parallel, serial, usb) then it may or may not be possible
[19:52:39] <al1ta> ok
[19:53:25] <Casper> and the xplain board have "nothing" to do with the chip on it
[19:53:59] <al1ta> it has a atmega128a1
[19:55:49] <Casper> look doable IF the ISP pins are exposed, and that it hasn't been configured with ISP disabled
[19:55:55] <Casper> do you have a parallel port&
[19:55:56] <Casper> ?
[19:56:43] <Tom_itx> xplain is xmega isn't it?
[19:56:45] <Tom_itx> that's PDI
[19:57:17] <al1ta> the board should have a pdi interface that could be accessed by usb and also 2 direct jtag one for usb chip the other for the atmel xmega chip
[19:57:22] <al1ta> yes it is a xmega
[19:57:42] <Tom_itx> yeah i've got one
[19:57:52] <Tom_itx> but you need a PDI programmer to do it
[19:57:54] <Tom_itx> or Jtag
[19:58:29] <Tom_itx> there are 2 or 3 versions of it
[19:58:33] <al1ta> do you know something about these projects..
[19:58:40] <Casper> al1ta: you just said atmega128a1, now you say xmega?
[19:59:06] <Tom_itx> it has a couple chips on it
[19:59:19] <al1ta> http://www.fourwalledcubicle.com/XPLAIN.php
[20:00:04] <Casper> ya atxmega128a1 no wonder why I didn't recognised atmega128a1 as a known part :D
[20:00:07] <al1ta> sorry the chip should be atmelxmega128a1
[20:00:41] <Casper> no, wrong again,
[20:00:55] <Casper> atxmega128a1 is the part number
[20:01:01] <Tom_itx> just a sec
[20:01:22] <al1ta> this project should trasform one of the microcontroller in a programmer avrisp mkii clone
[20:01:36] <Casper> but anyway, it's an xmega, you need pdi programmer, ask tom for his inexpensive one
[20:01:36] <Tom_itx> and it will
[20:01:44] <Tom_itx> i've made hundreds of em
[20:02:01] <al1ta> it would be great if i could find a way to use this board with arduino sdk
[20:02:44] <Casper> you don't want to use arduino junk...
[20:02:55] <al1ta> :-)
[20:02:55] <Tom_itx> i need to fix something here. brb
[20:05:49] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/xplain/Xplain_user_guide.pdf
[20:05:56] <Tom_itx> is that the one you have?
[20:06:45] <al1ta> yes it is
[20:06:56] <Tom_itx> if so, J100 is where you can program it
[20:07:07] <Tom_itx> i had to make a PDI cable to fit the Jtag header
[20:07:15] <Tom_itx> and use my programmer to program it
[20:07:43] <al1ta> so you are bypassing usb interface right?
[20:07:46] <Tom_itx> there might be a way to use the onboard USB chip to do it but i've not done that and don't know how
[20:07:48] <Tom_itx> yes
[20:08:18] <Tom_itx> the PDI pinout is in that document i think
[20:08:24] <Tom_itx> that or one in that directory
[20:08:41] <al1ta> yes
[20:08:43] <Tom_itx> Table 4-1
[20:09:02] <al1ta> what environment are you using to program the board?
[20:09:13] <Tom_itx> doesn't matter but i use studio
[20:09:16] <Tom_itx> you can use avrdude
[20:09:18] <al1ta> sorry.. may be this is a stupid question... I'm just a beginer
[20:09:53] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_User_manual_index.php
[20:10:00] <Tom_itx> the PDI pinout is on that page as well
[20:10:13] <Tom_itx> so you can make a jumper cable to program it from that
[20:10:14] <al1ta> atmel hasn't a development environment for linux right?
[20:10:24] <Tom_itx> not that i'm aware of
[20:10:31] <Tom_itx> use winavr and avrdude
[20:10:40] <al1ta> understoot
[20:10:45] <al1ta> understood
[20:11:03] <al1ta> thank you guys
[20:11:14] <al1ta> I'll be back here... veru nice place
[20:11:16] <Tom_itx> that's my programmer too btw
[20:11:17] <al1ta> very
[20:11:48] <Tom_itx> you may be able to jumper something on the board and use the onboard USB to program it
[20:11:59] <Tom_itx> i haven't done that and wouldn't be able to help
[20:20:43] <al1ta> http://www.fourwalledcubicle.com/files/XPLAINBridge_AVRDUDE.hex
[20:21:50] <Tom_itx> what's it say about it?
[20:21:57] <al1ta> this should be a firmware to flash the xplain and get a mkii programmer using the onboard usb microcontroller
[20:22:05] <Tom_itx> k
[20:22:12] <Tom_itx> i use lufa on my programmer as well
[20:22:21] <al1ta> anyway... where can I find your usbtiny mkii ?
[20:22:31] <Tom_itx> on that site i linked
[20:22:39] <al1ta> ok
[20:22:55] <al1ta> I will check
[20:23:00] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[20:23:01] <al1ta> thanks again
[20:23:14] <Tom_itx> there's a menu item to purchase if you're so inclined
[20:27:20] <al1ta> yes I saw
[20:27:54] <al1ta> cool do you build them ?
[20:28:36] <Tom_itx> yes
[20:28:52] <al1ta> great...
[20:29:27] <al1ta> do you know the extra price for shipping in europe ?
[20:29:50] <Tom_itx> same
[20:30:36] <Tom_itx> it takes a bit longer but i'm able to ship nearly anywhere for the $5
[20:30:41] <Tom_itx> standard post
[20:32:54] <al1ta> ok... I will try to use the usb to reprogram xplain board if not I think I will by a usbtiny mkii from you
[20:33:11] <Tom_itx> good luck
[20:33:31] <Tom_itx> do you know how to get it into program mode?
[20:33:45] <al1ta> If I get fun programming avr I will buy a programmer anyway :-)
[20:33:49] <al1ta> thanks a lot
[20:33:50] <Tom_itx> bring the HWB pin low and pulse the reset line low and it will be in program mode
[20:34:07] <Tom_itx> on the USB chip for that hex file you linked
[20:34:16] <Tom_itx> use DFU programmer to load it
[20:36:04] <al1ta> sorry may be another stupid question.. I'm a newbie.. ehat do you mean for DFU programmer ? could I flash the file simply using FLIP ?
[20:36:21] <Tom_itx> oh sure
[20:36:34] <Tom_itx> flip will work just the same as DFU
[20:36:43] <Tom_itx> i thought you were on linux
[20:36:49] <Tom_itx> flip is for windows
[20:37:55] <al1ta> ok I will check for this DFU... in the past I used flip just because I has been lazy and I've followed some tutorial...
[20:38:30] <Tom_itx> it might be easier to see if you've connected to it
[20:38:30] <al1ta> .. so I used FLIP running on a virtual machine inside linux
[20:38:36] <Tom_itx> give it a try
[20:39:21] <al1ta> Ok I will check... now here it's 3:30 am and I need to go to bed :-)
[20:39:27] <al1ta> thanks a lot again
[20:39:38] <Tom_itx> np
[22:10:38] <slidercrank> I have the following problem: "avrdude: warning: cannot set sck period, error: programm enable: target doesn't answer. 1, initialization failed, rc=-1" could it be because I didn't solder a quartz (crystal)? I thought an internal oscillator should be used by default
[22:13:59] <Horologium> have you changed the fuses from factory default?
[22:14:56] <slidercrank> I haven't changed anything. But this atmel8 I have was gifted to me. I don't now whether it's new or not
[22:15:03] <slidercrank> *I don't know
[22:16:11] <Horologium> from the factory, default is to run on the internal oscillator...if that has been changed you will need an external crystal or oscillator, depending on how it was set.
[22:16:14] <slidercrank> So I should ask the guy who gifted it to me whether he touched the fuse bits?
[22:16:26] <Horologium> or a programmer that does programming a different way than plain ISP.
[22:18:16] <slidercrank> let's assume he used a 4MHz crystal. Does it mean I have to use the same crystal to reprogram it? Even if I want to use a 16Mhz crystal later? So to solder a 4MHz crystal to change fuse bits. Then resolder the board to have a 16MHz crystal. This sequence?
[22:19:05] <Horologium> nope.
[22:19:41] <Horologium> again, kinda depends on how it is configured, but probably should be ok...there are high speed and low speed crystal settings but for programming they shouldn't make TOO much difference.
[22:20:07] <Horologium> and it's likely an atmega8, not an atmel8...just sayin.
[22:20:24] <slidercrank> yes, atmega8
[22:20:44] <slidercrank> thank you
[22:21:58] <Horologium> what programmer are you using anyhow?
[22:23:48] <slidercrank> usbasp
[22:24:30] <slidercrank> this model http://www.ebay.com/itm/USBASP-USB-AVR-Programmer-for-Atmel-USB-ASP-USBISP-ISP-Arduino-Bootloader-USA-/150739530304
[22:24:33] <Horologium> and that has the latest firmware on it?
[22:24:51] <Horologium> and you connected to the correct pins on the AVR
[22:24:54] <slidercrank> I don't know. And I don't know how to check it. I don't have another programmer to reprogram it
[22:24:57] <Horologium> and provided power to the AVR?
[22:25:37] <slidercrank> AVR is powered. I think I wired it correctly (but this is my first attempt at soldering so I could screw something up)
[22:26:19] <Horologium> for early play-around I prefer and recommend a solderless breadboard.
[22:26:29] <Horologium> much easier to fix screwups.
[22:26:55] <slidercrank> yeah. unfortunately I failed to find it in my city.
[22:27:02] <Horologium> and on that note, it is waaaay past bonzo's bedtime.
[22:27:09] <Horologium> circuitspecialists.com
[22:27:27] <slidercrank> well, I ordered it but it will take time to get delivered
[22:27:38] <Horologium> http://www.circuitspecialists.com/wb-102+j.html
[22:28:31] <slidercrank> so for now (while it's being shipped) I have to get my hands dirty with soldering