#avr | Logs for 2014-05-19

Back
[03:11:30] <rue_more> taking apart 192 power supplies, pulling out power transistors, some diodes, some fuses, some inductors, some transformers
[03:11:33] <rue_more> fun fun fun
[03:14:09] <RattusRattus> rue_more: the question has to be "why?" surly its not becuase its more cost effective to buy the PSUs than buy those componants? is it to "refurbish" the PSUs (but in that case you'd be changing all wet caps..)
[03:14:29] <rue_more> the psu's were free
[03:14:45] <rue_more> I'm collecting the transistors to make a 12' mecha
[03:15:20] <rue_more> its got like 94 axies
[03:15:56] <RattusRattus> :-) 'aint nothing like "but its free" to spure you on a salvage hunt :-)
[06:21:15] <hetii> Hi :)
[06:29:10] <RattusRattus> hi hetii
[06:59:10] <hetii> Did some of you know what kind of protocol is the best to have bullet proof uart communication ? HDLC/ppp or lenght based protocol ?
[07:55:23] <umquant> I am using an atmega328p with the tuxgraphics networking lib, I was wondering what is the best way to store webpage markup files for configuration of the device
[07:55:38] <umquant> I was thinking maybe I could store it on an SD or external flash chip?
[08:11:34] <malinus> umquant, yes SD is easy enough to interface with. USB-not so much.
[08:11:51] <malinus> idk. if lufa even have stacks for that
[08:12:26] <malinus> I mean, lufa has stacks for all kind of stuff, but I wouldn't assume it. You can check if you want.
[08:12:55] <umquant> man this may even be an application where I should just use a 32bit mcu and just have some type of embedded linux on it
[08:14:03] <umquant> this is a project for an IO card that will interface with a PLC.
[08:14:50] <malinus> umquant, yeah TCP/IP and small 8bit mcu doesn't go that good toghetherg
[08:48:20] <umquant> malinus, yea that's what it seems like
[09:02:30] <RattusRattus> umquant: if you decide that a full on Linux box is the right thing for you take a look at the beagle bone black
[09:03:54] <umquant> RattusRattus: Will do. I actually did some r&d for another project based on the beagleboard xM. The company that makes those also does custom designs / reshashes if you want to product it in volume for a product
[09:04:27] <blathijs> Hey folks. I'm having a bit of trouble with flashing an atmega256rfr2 through JTAG. It seems that, at some point during the flash procedure, some of the pins starting outputting 0V instead of being floating. Does this sound familiar?
[09:07:00] <blathijs> The problem for me is that I don't have easy access to VCC for my JTAGICE3 to detect the voltage, so I connected VTARGET to my board's SCL pin which has a pullup through VCC. But it seems that at some point, the SCL pin gets pulled to ground, which makes the JTAGICE3 think my VCC is gone and prevent further operations from happening. When this happens, a few of the pins are at 0V (they can sink enough current to light up a led, so they're not ...
[09:07:06] <blathijs> ... just floating)
[09:15:53] <blathijs> Note that this only happens when I put a 10k resistor between SCL and VTARGET, when connecting directly JTAG programming works (but then I2c breaks because the JTAGICE3 seems to keep SCL high
[09:16:15] <blathijs> so it breaks when connected like this: VCC - 2K - SCL - 10k - VTARGET
[10:20:37] <myself> rue_more: thanks for the offer on the PATA stuff, I did notice while searching around ("pata avr programmer" were my search terms) that one of the links is to stuff hosted on a dyndns account, which of course is gone now. Is there an updated place to find that info?
[10:21:10] <myself> rue_more: I'm not specifically interested in pursuing it myself (more projects than time already), but as a curiosity I think it's fascinating, and I'm interested in the code changes that avrdude needed.
[10:24:11] <blathijs> I ended up replacing the resistor with a diode, now its seems to work properly. Still don't understand exactly what was going on, though.
[10:52:56] <hetii> re ;)
[10:54:01] <hetii> Q: I have UART slave device that need work in 3.3v and my MCu operate at 5v. What is better to use resistor divider or zener diode? The speed is 9600 baud rate.
[10:54:30] <hetii> and use it just for TX line of MCU or both ?
[10:58:04] <blathijs> hetii: For the RX line of the MCU, things will work directly, since the 3.3V from the slave will register as "HIGH" on your 5V MCU
[10:58:24] <blathijs> hetii: The TX line needs something to prevent blowing up the slave device. I don't know which approach is better
[10:58:43] <blathijs> hetii: Resistor divider should work at that low speed I think, so that's probably easiest
[10:59:06] <Casper> use a divider
[11:53:17] <hetii> hmm When UART is used then the pull-up resistor is used ?
[11:54:53] <hetii> My power supply is around 4.17, when i put resistor 2.2kohm to ground on tx line i have 4.08 v
[12:51:34] <blathijs> hetii: I don't think you need a pullup resistor for the UART, the line is always driven either high or low when the UART is enabled
[12:53:12] <hetii> Ok but i thought there is a open colector output and my plan was to use internal pull-up resistor as one of the divider
[12:54:42] <blathijs> hetii: I don't think the AVR UARTs do open-collector, though that might be an option you can enable, not sure
[13:19:32] <guanche> http://www.ebay.com/itm/1pcs-Pro-Mini-atmega328-Board-16M-5V-for-Arduino-Compatible-Nano-/171297066215?pt=LH_DefaultDomain_0&hash=item27e219cce7
[13:19:49] <guanche> that sort of boards can also be programmed through isp, aren't they?
[13:20:06] <guanche> providing the board has connection to each pin
[13:23:29] <ali1234> hetii: to answer your early question, ppp is probably overkill for 9600 bps. you can almost certainly get away with simple framing codes. you will want to rigorously implement it though
[13:35:19] <ali1234> hetii: i've achieved up to 460800bps between two AVRs on the same board. i used a simple protocol like the one described here: http://eli.thegreenplace.net/2009/08/12/framing-in-serial-communications/
[13:35:30] <ali1234> (which as the page says, is a simplification of ppp)
[13:35:45] <megal0maniac_afk> Yay less protocol overhead!
[13:37:59] <Kev> guanche, should be
[13:40:16] <megal0maniac_afk> guanche: Beware of HVSP though, the capacitor on RESET won't allow programming to work. ISP should be fine
[13:40:31] <megal0maniac_afk> The actual full-sized nano has an ISCP header
[13:40:35] <megal0maniac_afk> *ICSP
[13:47:47] <Kev> the iduino has a 6pin header too
[13:48:25] <hetii> ali1234: thx, i will check it
[13:57:43] <umquant> is it common for 32bit mcu
[13:57:54] <umquant> mcus to use filesystems in their applications*
[13:58:47] <umquant> like FAT or NTFS. Or is that utilized mostly when the mcu is running some type of embedded OS
[14:01:28] <ali1234> it's fairly common. consider an embedded data logger
[14:01:47] <ali1234> probably doesn't run an OS. probably does log to a filesystem-formatted memory card.
[14:02:30] <ali1234> they may not have a full filesystem implementation though. only being able to write to files in the root directory for example is one shortcut which is sometimes used
[14:03:12] <umquant> Gotcha. My use case is storing webpage markup somewhere. The webpages are served when the device is configured via a browser
[15:37:26] <ub|k> which programmer setting should i use to program an atmega32 flashed with the arduino bootloader?
[15:37:44] <ub|k> i have TxD and RxD hooked up to the arduino programmer
[15:37:49] <ub|k> and i've removed the arduino chip
[15:49:09] <megal0maniac_afk> ub|k: You'll need to connect reset as well
[15:53:19] <ub|k> megal0maniac_afk: yeah, that's connected too
[15:53:34] <ub|k> when i reset power, the led on PB5 blinks as expected
[15:53:57] <ub|k> but then i cannot establish communication with the chip
[16:12:53] <Kev> ub|k, did you put a pull up on the reset pin ?
[17:16:34] <vlavr91> Is there any place I can order xmegas with a USB bootloader on them?
[17:19:37] <malinus> vlavr91, ebay. Might I ask why you want usb bootlader on them?
[17:20:03] <megal0maniac_afk> vlavr91: Perhaps http://www.batsocks.co.uk/products/BreadMate/XMega%20PDI%20USB.htm
[17:20:09] <megal0maniac_afk> If you ask nicely
[17:21:50] <malinus> oh sorry, xmegas
[17:21:56] <malinus> good luck with that :D
[17:22:52] <tylerj> Atmel offers a pre-programming service but I suspect highish MOQ
[17:24:37] <megal0maniac_afk> Oh, you don't have to ask nicely. They're already programmed
[17:24:49] <tylerj> From a manufacturing side of things, most of the products i've worked on just have a standard 5/6 pin ICSP programming header, or pins to work with POGO pins.
[17:25:02] <megal0maniac_afk> tylerj: If I'm not mistaken, USB xmegas come with DFU from the factory
[17:25:10] <specing> vlavr91: you can build a cheap dasa programmer for 1-2$
[17:25:11] <tylerj> ah okay :)
[17:25:17] <specing> to bootstrap the real one
[17:25:21] <tylerj> thats nice :)
[17:25:25] <specing> is a nice fallback, too
[17:25:31] <megal0maniac_afk> specing: For xmega?
[17:25:36] <megal0maniac_afk> PDI?
[17:25:56] <specing> xmega no SPI anymore?
[17:26:07] <megal0maniac_afk> Nope. Never was
[17:26:19] <specing> or ISP or whatever it is called, havent done avrs in aa loooooooong time
[17:26:46] <megal0maniac_afk> Yeah, ISP
[17:26:51] <specing> dont the xmegas come preflashed with a bootloader of sorts anyway?
[17:26:59] <megal0maniac_afk> The USB ones iirc
[17:27:09] <tylerj> PDI / ISP / ICSP same thing really
[17:27:16] <specing> so vlavr91> Is there any place I can order xmegas with a USB bootloader on them?
[17:27:23] <specing> they all have it?
[17:27:27] <megal0maniac_afk> tylerj: Um.. not at all
[17:28:18] <megal0maniac_afk> PDI is like I2C and ICSP uses SPI. The physical link, framing, protocol, everything is different
[17:28:30] <megal0maniac_afk> Commandset too. PDI can be used for debug as well
[17:28:44] <tylerj> sorry, i didn't say that well.
[17:29:21] <megal0maniac_afk> specing: I could be wrong, but yeah. That's what I remember
[17:29:23] <tylerj> I meant that they are used for the similar purpose in context of this conversation. to program a chip.
[17:29:43] <tylerj> thread on avrfreaks: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1041526
[17:30:56] <tylerj> atmel: http://www.atmel.com/images/doc8429.pdf
[17:31:07] <tylerj> saddly doesn't specify if parts are or are not.
[17:31:57] <tylerj> If you want something smaller than standard header: http://www.tag-connect.com/
[17:32:09] <tylerj> for standard ICSP programming.
[18:19:20] <hetii> Hi :)
[18:22:57] <hetii> I have some issue with uart communication. I have just one physical uart on my MCU but I need get data from two device, so I use two interrupt for both RX from my device and then set depend trigger event on this interrupt i drive RX line of my uart. Both devices don`t send data on this same time, so this should work.
[18:24:02] <hetii> But i notice now i get garbage when have line like: while ((UART_BUF[0] != 'O')){...}
[18:24:20] <hetii> and wondering why
[18:27:44] <hetii> hmm ok i see that somewhere else i get this issue ...
[18:30:00] <Lambda_Aurigae> hook up only one device to the UART lines and see what happens.
[18:34:42] <hetii> Now i just one device in such configuration: device1->INT0->(in interrupt i drive PD4 that is connected to RXD of uart) <- and here have garbage. Device 2 is disconected from INT1
[18:39:11] <hetii> from device1 as i see the frame are ok.
[18:56:16] <hetii> Ok have no clue, when my devices emit message then I got junk on RXD line of uart, but when i send some bytes from terminal to this same TXD line of my device1 then all my characters are fine in RXD line.
[19:01:57] <hetii> ok as i see only the first message is corrupted, when my device1 resend it in loop then its fine.