#avr | Logs for 2015-05-30

Back
[04:11:13] <aditya3098> Hello, I accidentally programmed my atmega644 with "External Clock" and I disabled jtag, anyone have any idea how I can feed a clock into it so I can fix it? I have a bunch of other avrs and crystals handy, but only a USBASP programmer.
[04:16:00] <aditya3098> Hello, I accidentally programmed my atmega644 with "External Clock" and I disabled jtag, anyone have any idea how I can feed a clock into it so I can fix it? I have a bunch of other avrs and crystals handy, but only a USBASP programmer.
[04:16:10] <aditya3098> Sorry, accidental double post
[06:19:52] <antto> i did the same to a 328 :/
[06:20:38] <antto> just the ext. clock.. i don't have any jtag so that doesn't help in my case
[06:24:10] <Lambda-Aurigae> it's easy.
[06:24:12] <Lambda-Aurigae> got a 555?
[06:24:20] <Lambda-Aurigae> or another microcontroller?
[06:24:48] <Lambda-Aurigae> generate a nice 1MHz(give or take) pulse with either...or even 500KHz or so..
[06:25:08] <Lambda-Aurigae> feed that to the X1 pin I believe...would have to look that up again..but it's one of the crystal pins.
[06:27:23] <antto> i'll try that
[06:28:25] <antto> btw, i see atmel has 32bit chips.. what are the compiler options for them?
[06:28:34] <antto> does avrgcc support them?
[06:32:11] <Lambda-Aurigae> atmel has lots of things.
[06:32:17] <Lambda-Aurigae> what 32bit chips are you talking about?
[06:32:23] <Lambda-Aurigae> avr32 or arm?
[06:32:41] <Lambda-Aurigae> both of which are supported by gcc I suppose.
[06:33:11] <Lambda-Aurigae> I don't know anybody that uses avr32 chips though...I tried them a couple of times..found them rather complex and overrated and under powered.
[06:33:26] <Lambda-Aurigae> avr32 is dying in the face of ARM.
[06:33:50] <antto> i'm not fully sure.. but basically a uC which can do faster processing and with bigger numbers than 8bit uCs
[06:34:13] <antto> ah, so ARM is a better candidate
[06:34:13] <Lambda-Aurigae> an 8bit can do any size number you want.
[06:34:17] <Lambda-Aurigae> just a matter of speed.
[06:34:35] <antto> sure.. just moar instructions per operation :>
[06:34:46] <Lambda-Aurigae> there are even some ARM chips in dip package out there these days.
[06:34:53] <Lambda-Aurigae> they aren't very powerful but they do exist.
[06:34:54] <antto> i have to deal with pic18F* at work
[06:35:01] <Lambda-Aurigae> ick.
[06:35:03] <antto> i'm getting really sick really quick
[06:35:06] <Lambda-Aurigae> now, pic32...that's a slick chip.
[06:35:21] <antto> yes.. we looked into pic32
[06:35:24] <Lambda-Aurigae> still a bit complex like the pic18 but not the same processor core at all.
[06:35:31] <antto> HOWEVER.. it's still "pic" >:(
[06:35:33] <Lambda-Aurigae> I like the pic32mx270f256b myself..
[06:35:36] <Lambda-Aurigae> it's MIPS
[06:35:39] <antto> i hate their IDE
[06:35:44] <Lambda-Aurigae> with PIC hardware slapped on.
[06:35:44] <antto> can't stand it
[06:35:47] <Lambda-Aurigae> I don't use the IDE.
[06:35:55] <Lambda-Aurigae> I use vi,,,or maybe kate...
[06:36:15] <antto> i need an IDE, but theirs is just terrible, slow..
[06:36:36] <antto> and i don't have a license for their compiler :/
[06:36:40] <Lambda-Aurigae> who does?
[06:36:45] * Lambda-Aurigae whistles innocently.
[06:36:47] <antto> ;P~
[06:36:58] <Lambda-Aurigae> xc compilers are open source anyhow.
[06:37:07] <antto> how does that help?
[06:37:08] <Lambda-Aurigae> just takes a PHd in rocket science to compile them.
[06:37:12] <antto> i mean.. it runs in demo mode
[06:37:38] <Lambda-Aurigae> you can get the source for the full version xc compiler
[06:37:43] <Lambda-Aurigae> take out the check code
[06:37:47] <Lambda-Aurigae> and compile it yourself.
[06:38:05] <antto> i use SDCC for pic, but it has loads of tricky aspects
[06:38:36] <Lambda-Aurigae> I just use hacked xc compilers myself.
[06:38:46] <Lambda-Aurigae> the license manager is easy to fix.
[06:38:57] <antto> i'm not a h4x0r ;P~
[06:39:01] <Lambda-Aurigae> me either.
[06:39:09] <Lambda-Aurigae> but, I don't do it for work either.
[06:39:18] <antto> i need that sh*t for work ;]
[06:39:22] <Lambda-Aurigae> I am more an old school hacker.
[06:39:32] <antto> u hack with le hammer? ;]
[06:39:42] <Lambda-Aurigae> it's still legal to take the xc source, pull out the addons that do the license check, and compile it yourself.
[06:39:52] <Lambda-Aurigae> might take 4 to 8 hours to get it all pulled out and compiled though.
[06:40:04] <Lambda-Aurigae> no..I was hacking before idiots started spelling things with numbers.
[06:40:16] <antto> huehue
[06:40:26] <antto> must have been quite long ago ;P~
[06:41:06] <antto> so uhm.. ARM, eh?
[06:41:14] <Lambda-Aurigae> well, I started with electronics when I was 8 and computers when I was 12 and knew more about the computers in the highschool than anybody else did, including(specially) the teachers.
[06:41:22] <Lambda-Aurigae> yes...ARM
[06:41:45] <antto> gonna look into that
[06:41:45] <Lambda-Aurigae> if you have access to circuit boards and soldering gear and such..or can get the boards made up for you..
[06:42:02] <Lambda-Aurigae> there are a dozen ARM manufacturers out there at least these days.
[06:42:12] <Lambda-Aurigae> most arm chips are SMT
[06:42:16] <antto> we got soldering gear, but it's not very advanced
[06:42:37] <Lambda-Aurigae> you can get some ARM cortex 0 series chips in dip package though.
[06:42:48] <antto> yeah.. these things are tiny and have many legz x_x
[06:43:44] <antto> ARM will have longer datasheets than pic18 i bet ;P~
[06:43:44] <Lambda-Aurigae> LPC1114FN28
[06:44:00] <Lambda-Aurigae> http://www.nxp.com/products/microcontrollers/product_series/lpc1100/LPC1114FN28.html
[06:44:14] <specing> antto: ARM has several hundred dozen datasheets
[06:44:19] <Lambda-Aurigae> 32bit processor at 50MHz....32K flash, 4K sram, 28pin dip.
[06:44:28] <specing> -dozen lol
[06:44:40] <Lambda-Aurigae> specing, actually, you can probably leave that in.
[06:44:47] <specing> ok
[06:44:55] <Lambda-Aurigae> dozens of manufacturers with many many different chips.
[06:45:12] <antto> specing i know there are hundreds of ARM-based chips with all kinds of different flavours
[06:45:19] <antto> if that's what you meant
[06:45:53] <Lambda-Aurigae> the pic32mx270f256b beats that chip in many ways except for price.
[06:46:29] <antto> price.. and their ugly IDE and compiler
[06:47:10] <Lambda-Aurigae> actually, the pic beats in price too.
[06:48:03] <antto> that NXP chip.. what compiler supports it?
[06:48:17] <Lambda-Aurigae> their compiler.
[06:48:22] <Lambda-Aurigae> probably gcc as well.
[06:48:57] <Lambda-Aurigae> the nxp chip is 5.84 from digikey...the pic32 is 5.18 in US Dollars
[06:49:17] <Lambda-Aurigae> http://www.digikey.com/product-detail/en/LPC1114FN28%2F102,12/568-10143-5-ND/3430860
[06:49:24] <Lambda-Aurigae> http://www.digikey.com/product-search/en?x=18&y=19&lang=en&site=us&keywords=pic32mx270f256b-50i%2Fsp
[06:50:12] <Lambda-Aurigae> http://www.meatandnetworking.com/tutorials/lpc1114fn28-with-open-source-tools/
[06:50:19] <Lambda-Aurigae> yup...gcc
[07:06:29] <specing> antto: yeah but with AVR, all you need is in one 1200 page datasheet
[07:06:59] <specing> with ARM, then 200 page ds is just a summary and you have to look into specific peripheral/features datasheets for more
[07:20:04] <Lambda-Aurigae> specing, 1200 pages?
[07:20:07] <Lambda-Aurigae> what datasheet is that?
[07:20:34] <specing> some fatty
[07:20:46] <specing> idk which
[07:21:58] <Lambda-Aurigae> atmega1284p is only 646 pages.
[07:22:03] <antto> i'm more concerned about the compile tools
[07:22:23] <Lambda-Aurigae> gcc
[07:22:33] <Lambda-Aurigae> most arm chips are supported under gcc.
[07:22:40] <antto> which gcc?
[07:22:57] <specing> Lambda-Aurigae: thats 20 pages short
[07:22:58] <antto> do you mean it's all there when i download mingw32?
[07:23:01] <Lambda-Aurigae> gcc is gcc...you just have to compile it to support ARM..then add in the chip specific information.
[07:23:22] <Lambda-Aurigae> http://www.meatandnetworking.com/tutorials/lpc1114fn28-with-open-source-tools/
[07:25:17] <Lambda-Aurigae> there are tutorials out there all over the place.
[07:25:56] <Lambda-Aurigae> hell, just get an rPI and write your code in C and compile it right on the rPI.
[10:17:34] <rue_bed> most of the usefullness of a chip is in the include files that define its io ports
[10:17:59] <rue_bed> if your not using the os to just to os stuff
[10:18:38] <LeoNerd> That's an interesting claim
[10:45:28] <sudden6> Hello is it possible to also use the crystal from a pl2303 chip for an atmega at the same time?
[10:47:41] <LeoNerd> No. Though if the PL2303 has a "clock out" ability you could set the ATmega into "External Clock" mode
[10:50:27] <sudden6> doesn't seem that's the case..
[10:50:50] <LeoNerd> Maybe vice versa? Can the PL be driven by external clock that you can provide from the ATmega?
[10:51:23] <sudden6> nope
[10:52:48] <sudden6> What if I just attach the XTAL1 pin to the OSC2 pin of the pl2303?
[10:53:11] <LeoNerd> It's possible it might work but I don't know for sure. I shouldn't think it would damage anything though, so TIAS? ;)
[10:53:31] <sudden6> TIAS?
[10:53:36] <LeoNerd> Try It And See
[10:54:01] <sudden6> well^^ I'll report back if that works ;)
[11:27:41] <specing> sudden6: can't you run on internal osc?
[13:38:05] <hypermagic> hi
[13:39:03] <LeoNerd> Heya RikusW :)
[13:39:07] <LeoNerd> LTNS
[13:39:14] <RikusW> hi LeoNerd
[13:39:40] <RikusW> I've been online yesterday for a bit
[13:39:50] <LeoNerd> RikusW: How's it going? I had some interesting success with a project of mine lately...
[13:40:26] <RikusW> Going well thanks :)
[13:40:33] <RikusW> which project would that be ?
[13:40:37] <LeoNerd> I managed to (successfully) run I2C, well.. a tiny variant of it, over 95m of unshielded cable right around a stage, including straight over a 415V 3ph inlet carrying about 40A
[13:41:39] <RikusW> :O
[13:41:43] <LeoNerd> My radio stuff also went really well
[13:41:58] <twnqx> with 240V differential signalling? :>
[13:42:04] <RikusW> what speed did you clock the i2c at ?
[13:42:08] <LeoNerd> Also I have an interesting idea that might amuse you - ever worked with either of WS2812 LEDs ("Neopixels"), or DMX-512?
[13:42:11] <LeoNerd> Ah, only 20kHz
[13:42:17] <twnqx> ws2812 <3
[13:42:19] <LeoNerd> I think. It was purely software implementation
[13:42:41] <RikusW> I've only heard of DMX-512
[13:42:56] <RikusW> not heard of neopixels yet
[13:42:56] <LeoNerd> I say "I2C", but it was actually a full-duplex variant, using a clock+data pair in each direction
[13:43:18] <LeoNerd> It looks like I2C to a logic analyser so it was easy for me to debug, but as each pair of wires is unidirectional, I can optoisolate it much easier
[13:43:37] <hypermagic> do you like to roll bits in or just set appropriate bit ?
[13:43:51] <LeoNerd> Mmm?
[13:46:26] <hypermagic> ( x |= bit; x <<= 1; ) || ( x |= (bit << bitindex); )
[13:46:44] <LeoNerd> Oh I see.. I rolled them
[13:47:05] <LeoNerd> I reused the ACK/NACK slot as a DONE/MORE indicator, because the sender is still in control of that ninth bit
[13:47:25] <hypermagic> parity ?
[13:47:27] <LeoNerd> So to a logic analyser it looks like regular I2C, but on the receiver, the receiver knows if it's just got the last byte. When it processes the STOP condition it checks to see
[13:47:46] <hypermagic> oh sounds like ps2
[13:47:54] <hypermagic> ps/2
[13:48:00] <LeoNerd> I turned out to occasionally have phantom or missing clocks, so sometimes the receiver would miss a single bit somewhere or get an extra one... that usually fell out when the STOP condition found the wrong state
[13:48:19] <hypermagic> happens
[13:48:35] <hypermagic> check parity, and timeout
[13:49:04] <LeoNerd> Oh.. this was all fairly hastily hacked up for a yearly stage show I help run
[13:49:17] <LeoNerd> Now it's finished, I plan to rip that part out and do it over RS485 instead
[13:49:20] <LeoNerd> Then I can do a multidrop bus
[13:49:33] <hypermagic> you dont like spacewire ?;)
[13:49:55] <LeoNerd> Not heard of it
[13:49:56] <hypermagic> differential signaling can be added
[13:50:12] <hypermagic> it is self clocked
[13:50:19] <LeoNerd> Bandwidth isn't an issue for me... this is low-BW control signals for theatrical cue control
[13:50:34] <hypermagic> LeoNerd, http://en.wikipedia.org/wiki/Data_strobe_encoding
[13:50:37] <LeoNerd> But reliabillity is.. it's embarrasing when nobody opens the curtain ;)
[13:51:01] <hypermagic> well they use this on spacecraft and aeroplane buses
[13:51:11] <LeoNerd> Mmm :)
[13:51:23] <hypermagic> but i'd add an ecc too ofc
[13:51:37] <hypermagic> you need at least parity
[13:52:10] <LeoNerd> I'm intending to do some kind of 8bit checksum, sequence nubmering, retry...
[13:52:22] <hypermagic> 8,4 Hamming ? :)
[13:52:31] <hypermagic> SECDED
[13:53:51] <hypermagic> https://orion.math.iastate.edu/linglong/Math690F04/HammingCodes.pdf
[13:55:21] <Lambda-Aurigae> I like the old send it forward-send it backward-compare at the far end thingie...worked for legos!