#avr | Logs for 2014-11-18

Back
[01:02:09] <ferdna> is anyone here a dad or a mom?
[01:02:37] <ferdna> well i bought a wipes warmer... however i do not know if i can leave it on all the time... or i need to turn it off after a period of time...
[01:02:41] <ferdna> http://www.walmart.com/ip/Prince-Lionheart-Ultimate-Wipes-Warmer/2700598
[01:02:44] <ferdna> that is the one
[09:45:14] <nn7> In my copy of avr studio, delay.h doesn't have a _delay_ms function!
[09:46:32] <nn7> what is this nonsense
[12:15:00] <hypermagic> nn77, you don't really need that
[12:15:08] <hypermagic> just set up a timer and wait n ticks
[12:15:40] <hypermagic> the wait n ms routine does aome nops in a loop according to your F_CPU ...
[13:54:00] <TechChristoph> does someone of you guys using the bus pirate from dangerous prototypes ?
[14:01:15] <vsync1> how'd you go about making a circuit with relays that triggers when signal goes high and when also
[14:01:47] <vsync1> when signal falls. signal is a square wave naturally
[14:04:40] <vsync1> and obv. not efficient or wise
[14:04:46] <vsync1> i am aware
[14:27:36] <Duality> ls
[14:27:38] <Duality> uh
[14:27:40] <Duality> not a terminal
[14:27:54] <Duality> does anyone know of a good atmega-16 serial bootloader ?
[15:09:19] <lubskogreg3> hi folks
[15:12:06] <lubskogreg3> quicke question: is it legal to change GICR to 0x00 in the last line of "ISR (INT0_vect)" ??
[15:17:19] <hypermagic> vsync1, sorry i don't use relays
[15:18:43] <hypermagic> try mosfets ?
[16:12:55] <boozler> I have a hex file that was compiled for the Arduino Uno board. Will this hex file run as expected on an Arduino Pro Mini (both atmega382p)? I've already found how to upload it using the command line...
[16:14:10] <asteve> have you tried uploading it?
[16:14:25] <boozler> not yet, thought I better ask first
[16:14:54] <asteve> same underlying chip, perhaps pin aliases are different?
[16:15:35] <boozler> I don't know
[16:15:45] <boozler> maybe I should ask the sparkfun people about that
[18:36:11] <Shavik> So I'm thinking of having building a system with say a 32u4 on a "baseboard" with card edge connectors for "modules". Each one would have it's own AtMega328 or something similar. I've been thinking of a couple different board to board communication methods.
[18:36:51] <Shavik> I've looked at SPI, I2C, and stuff like Rs422/485. I2C would be affected by the long traces / board connections I think. SPI might work but was also worried about interference, etc.
[18:36:53] <Shavik> Thoughts?
[18:37:41] <Lambda_Aurigae> i2c can go a meter or so.
[18:37:59] <Lambda_Aurigae> it is made for inter board communications like that.
[18:38:14] <Lambda_Aurigae> keep your speeds low enough and you are good to go.
[18:38:30] <Lambda_Aurigae> 400KHz i2c should be fine across multiple boards.
[18:38:50] <Lambda_Aurigae> and it has the advantage of being an addressed bus.
[18:39:14] <Lambda_Aurigae> unfortunately, multi-master i2c isn't so easy, but if you use master/slave/slave you are good to go.
[18:39:56] <Lambda_Aurigae> spi kinda needs slave select lines for each device.
[18:40:07] <Lambda_Aurigae> and is still master/slave dependent.
[18:42:05] <Lambda_Aurigae> kinda all depends on what you want to do with the inter-board communications.
[18:42:10] <Shavik> Yea, my current implementation was to use SPI with slave select lines as well as "interrupt" lines from each slave
[18:42:20] <Shavik> Use some shift registers for the master to handle those lines
[18:42:25] <Lambda_Aurigae> I would go with i2c with interrupt lines.
[18:42:40] <Shavik> One thing that may throw a wrench in this
[18:42:45] <Lambda_Aurigae> each interrupt line tied to a slave address.
[18:42:50] <Shavik> I'd really like this to be able to be a "hot pluggable" system
[18:42:52] <Lambda_Aurigae> cuts down the number of lines.
[18:42:58] <Shavik> Don't know if that is possible with SPI either
[18:43:06] <Lambda_Aurigae> no reason it couldn't be.
[18:43:31] <Shavik> Would imagine it would be more capable. Thought about also having power card edge connectors connect "first" as to power up the slave before data lines would connect
[18:43:38] <Lambda_Aurigae> you would have your address tied to the slot somehow with some simple address pins tied high or low to tell the board in that slot what its address is.
[18:44:02] <Lambda_Aurigae> I would have power last personally, but that's just me.
[18:44:09] <Shavik> figured with I2C, with something else added to the bus it may cause the I2C to lockup as I've experienced in the past
[18:44:33] <Lambda_Aurigae> that's all in your implementation.
[18:44:54] <Lambda_Aurigae> the best would be CAN bus.
[18:45:36] <Lambda_Aurigae> but that will require can devices on each board and kicks the price up.
[18:46:00] <Lambda_Aurigae> unless you bitbanged the CAN protocol but that's a horse of a different flavor.
[18:46:19] <Shavik> Haven't really played with CAN before.
[18:46:28] <Lambda_Aurigae> me either.
[18:46:44] <Lambda_Aurigae> I did play with 9bit rs232 once for just such a thing.
[18:47:02] <Lambda_Aurigae> bit 9 high means an address...bit 9 low means data.
[18:47:34] <Lambda_Aurigae> send a byte with bit 9 high and it would put the device at that address in listen mode...then send commands/data with the bit 9 low.
[18:53:05] <Shavik> interesting concept
[18:53:15] <Lambda_Aurigae> unfortunately, not mine.
[18:54:11] <Lambda_Aurigae> https://www.sealevel.com/support/article/AA-00146/0/What-Is-9-Bit-Data-Framing.html
[18:56:07] <Shavik> thanks
[18:56:24] <Lambda_Aurigae> and,
[18:56:29] <Lambda_Aurigae> avr usart can do 9bit
[18:57:10] <Shavik> I'm actually working on something at work that this may be useful for
[18:57:15] <Shavik> It's a 485 shared bus
[18:57:32] <Shavik> and I currently check each 'packet's address
[18:57:48] <Shavik> But it does seem to be a minimal amount of processing so I'm not sure it'd be worth it tbh
[18:57:59] <Lambda_Aurigae> by sending an address "byte" you can then ignore anything after the address byte that isn't meant for you.
[18:58:42] <Shavik> I currently send a : then the address byte so very minimal time is required anyway
[18:59:50] <Lambda_Aurigae> atmega1284p datasheet shows how to do 9bit framing
[19:00:10] <Lambda_Aurigae> or, at least, transmit 9bit data.
[19:02:38] <Lambda_Aurigae> I kinda came up with the idea after reading my first AVR datasheet then discovered it wasn't a new idea.
[19:02:49] <Shavik> Thats always fun
[19:02:53] <Shavik> I remember just a few weeks ago
[19:03:02] <Shavik> "reinventing" the cleared to send signal
[19:03:04] <Shavik> :P
[19:03:09] <Lambda_Aurigae> hehe.
[19:03:14] <Lambda_Aurigae> CTS/RTS rocks.
[19:03:30] <Shavik> yea, then I was like oh cool I can XON or XOFF.. oh. 485
[19:03:31] <Shavik> nope
[19:05:07] <Lambda_Aurigae> MacGyver rocks.
[19:05:13] <Shavik> Reading about CAN now.
[19:05:21] <Shavik> Seeing if it's viable for this
[19:05:25] <Lambda_Aurigae> just got the whole 7 seasons and 2 movies.
[19:05:33] <Lambda_Aurigae> on episode 3 of season 1 now.
[19:05:42] <Shavik> I've never really sat down and watched MacGyver. Just watched it when it's on
[19:05:49] <Lambda_Aurigae> same here.
[19:05:54] <Lambda_Aurigae> never got to watch much of it.
[19:06:37] <Lambda_Aurigae> the science in it kinda sucks.
[19:07:02] <Lambda_Aurigae> some of it definitely doesn't do what it's supposed to.
[19:07:03] <Lambda_Aurigae> but,
[19:07:34] <Lambda_Aurigae> the ideas are good and if you know the chemistry and/or physics behind what it supposed to be you can do some interesting things.
[19:07:38] <Shavik> Think I fell off the wagon reading wikipedia about can
[19:07:43] <Lambda_Aurigae> hehe.
[19:07:51] <Shavik> arbitration
[19:07:53] <Lambda_Aurigae> CAN can be a bit off the wall strange.
[19:08:14] <Lambda_Aurigae> a hardware/software bus implementation.
[19:10:25] <Shavik> Trudging through this http://www.ti.com/lit/an/sloa101a/sloa101a.pdf
[19:10:54] <Lambda_Aurigae> there is an AVR with built in CAN too.
[19:20:45] <Shavik> Just read there are I2C buffer IC's. That they used them for I2C backplanes aka hotplugging
[19:24:26] <Lambda_Aurigae> yup.
[19:25:05] <Lambda_Aurigae> again, adding cost to your board.
[19:28:17] <Shavik> Seems most google results look negatively at any form of hot plugging on spi and i2c
[19:34:16] <Lambda_Aurigae> it can cause glitches on the lines for certain.
[19:35:05] <Lambda_Aurigae> by implementing a little buffering, such as a simple 2 way buffer chip that's less than a dollar, it's not too bad. I would also add some error recovery software but that shouldn't be difficult either.
[19:39:19] <Shavik> http://www.nxp.com/documents/data_sheet/PCA9511A.pdf is one I found. But its around $1.5-2.5
[19:41:21] <Shavik> TI's appear to be a bit cheaper. TCA4311A at around $1.85-$1.20
[19:42:19] <Shavik> Analog device's chip is ~$5!
[19:45:37] <Lambda_Aurigae> looks like they are all pricy.
[19:46:32] <Shavik> I think the TI one would be worth the cost for the peace of mind
[19:46:41] <Lambda_Aurigae> ok...I've given enough bad advice tonight I think.
[19:46:46] <Lambda_Aurigae> time to head for bed.
[19:46:47] <Shavik> Hot plugability is kind of a major feature here
[19:46:55] <Shavik> Have a good night
[20:01:20] <neinmm> any attiny84 pros in here ever use one with a sh1106 or ssd1306 i2c oled?
[20:35:02] <sajdkasd> i had a logic analyzer watching the uart on an arduino during its rerogramming, i trying to understand the data that gets sent over those i see the back and fourth, but i cant find like a protocol specification, for instance i see there is 0x30 0x20 received then 0x14 0x10 sent in response
[20:38:25] <Casper> sajdkasd: get the datasheet for the avr it use, open the Programming section
[20:38:29] <Casper> the protocol is there
[20:38:38] <sajdkasd> that all seems for iscp
[20:38:54] <sajdkasd> is icsp spec the same?
[20:39:15] <Casper> in circuit serial programming
[21:11:36] <sajdkasd> omg this is so annoying
[21:11:57] <sajdkasd> http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf - trying to compare what im seeing in the logic analyzer to this