#avr | Logs for 2014-05-17

Back
[00:33:26] <rue_more> anyone know if dx ships to canada ok?
[00:35:11] <pseydtonne> Hmmm... not off hand.
[00:35:48] <pseydtonne> It's China -- they'll probably give you less grief than the US
[00:37:00] <rue_more> iirc last time I tried to order soemthing they couldn't take my credit card, which was good, I saved myself from a extranious $200 order of junk
[02:03:26] <rue_more> I cant find anything on DX that isn't cheaper on aliexpress
[03:10:07] <ali1234> the at90usb82 has a "ps/2" mode on the usb pins - it just changes the output voltage and the protocol must be handled in software...
[03:10:34] <ali1234> the atmega8u2 does not have this feature, but it still allows to drive the usb pins from software, and it has a different register that disables the 3.3v regulator
[03:11:20] <ali1234> so assuming the chip is running at ~5v, does that mean the atmega8u2 is also capable of doing ps/2 and usb over the same cable?
[07:08:34] <ivanshmakov> A shift register is probably the simplest SPI device possible. What could I use as an example of a similarly simple I²C (TWI) device?
[07:12:59] <Yotson> ivanshmakov, a pcf8574 port expander perhaps?
[07:18:33] <N2TOH> SPI decives are basically all shift register devices, it's what the register values mean that complicates maters
[07:20:55] <ivanshmakov> Yotson: Looks like so. Thanks!
[07:21:38] <ivanshmakov> N2TOH: … And a counter, for the “data ready” signal to the internal circuits.
[08:28:26] * Lambda_Aurigae really likes the pcf8574 chips.
[08:31:12] <Yotson> loads of similar variants around. 16 bits for example, with or without interrupt pin, with or without (partial) settable address.
[08:31:40] <Lambda_Aurigae> yup.
[08:31:41] <Yotson> "i2c port expander" on google returns loads of options already. :)
[08:31:48] <Lambda_Aurigae> and lots of spi port expanders too.
[08:32:11] <Lambda_Aurigae> I like the i2c variants because they use far fewer pins when running multiples.
[08:32:34] <Lambda_Aurigae> I've run as many as 16 pcf8574 chips on the same bus but you can run far more.
[08:34:56] <Lambda_Aurigae> hmm..maybe 16 is the max.
[08:34:59] <Lambda_Aurigae> but still.
[08:35:06] <Yotson> doesn't the 8574 only has 4 address pins?
[08:35:10] <Yotson> ah, that. :)
[08:35:12] <Lambda_Aurigae> only 3 address pins.
[08:35:22] <Lambda_Aurigae> but there is the pcf8574 and pcf8574a
[08:35:28] <Lambda_Aurigae> different base addresses.
[08:35:37] <Lambda_Aurigae> 8 of each base address.
[08:36:29] <Lambda_Aurigae> the thing that throws people with the pcf8574 is the open drain outputs.
[08:38:54] <Lambda_Aurigae> they make great i2c interfaces for LCD displays.
[08:52:31] <ivanshmakov> Lambda_Aurigae: What’s the point of using open drain outputs with /LCD/ (as opposed to: /LED/) displays?
[08:53:59] <Lambda_Aurigae> ivanshmakov, the open drain has no real advantage there really...I use them on hd44780 LCD displays, not just direct drive lcd displays.
[08:56:38] <Lambda_Aurigae> in fact, open drain tends to make things a bit more difficult, but still works well for me.
[08:58:44] <ivanshmakov> Lambda_Aurigae: It depends on the particular use case, but unless for the “screen capacity” reasons, I’d rather use a Nokia 5110 LCD. And they are SPI.
[08:59:41] <Lambda_Aurigae> yeah.
[08:59:46] <Lambda_Aurigae> I haven't gotten any of those yet.
[09:00:02] <Lambda_Aurigae> but I have a stack of 16x2 and 16x4 character LCDs
[09:01:37] <Duality> i was just thinking would it be possible to compile some assembly code with c code? like i have a bit of assembly code and add it to the assembly code generated by the c compiler?
[09:01:48] <ivanshmakov> Duality: Sure.
[09:01:49] <Duality> And i know about inline asm :)
[09:01:51] <Lambda_Aurigae> it is possible.
[09:02:05] <Duality> but like a sepperate file or something that only consists of assembly
[09:02:09] <Lambda_Aurigae> you can also include asm subroutines as separate files.
[09:02:16] <Duality> nice
[09:02:49] <Lambda_Aurigae> http://www.atmel.com/images/doc42055.pdf
[09:03:09] <ivanshmakov> Lambda_Aurigae: Well, the prices for such text LCDs at the outlets I order from are much higher than for 5110s. (Or at least they were, the last time I’ve checked.)
[09:03:24] <Lambda_Aurigae> http://www.nongnu.org/avr-libc/user-manual/group__asmdemo.html
[09:03:59] <Lambda_Aurigae> Duality, those are both for you....links 1 and 3 from google search of avr mixing c and assembly
[09:04:47] <Lambda_Aurigae> ivanshmakov, I wouldn't doubt it. I got a box of 50 assorted character lcd displays for 10 dollars about 3 years ago.
[09:05:24] <Duality> Lambda_Aurigae: the asmdem link gives a 404
[09:06:53] <Duality> Lambda_Aurigae: nvm i miss copied
[09:31:11] <Lambda_Aurigae> that's good cause it's the avr-libc main page..heh
[09:32:24] <Lambda_Aurigae> I love the beer-ware license.
[09:32:38] <Lambda_Aurigae> * ----------------------------------------------------------------------------
[09:32:39] <Lambda_Aurigae> * "THE BEER-WARE LICENSE" (Revision 42):
[09:32:39] <Lambda_Aurigae> * Joerg Wunsch wrote this file. As long as you retain this notice you
[09:32:39] <Lambda_Aurigae> * can do whatever you want with this stuff. If we meet some day, and you think
[09:32:39] <Lambda_Aurigae> * this stuff is worth it, you can buy me a beer in return. Joerg Wunsch
[09:32:39] <Lambda_Aurigae> * ----------------------------------------------------------------------------
[09:38:28] <Lambda_Aurigae> http://ucexperiment.wordpress.com/2012/02/09/mixing-c-and-assembly-in-avr-gcc-and-avr-studio-4/
[09:38:33] <Lambda_Aurigae> another one fer ya.
[13:34:05] <vlavr91> hello ehello everyone how do I install a usb DFU bootloader to my xmega? i have no idea where to start and I would really appreciate if anyone pointed me to any tutorials
[14:04:06] <Tom_itx> vlavr91, use an isp programmer
[14:04:17] <Tom_itx> set the boot fuses and load it in the boot area
[14:05:18] <Tom_itx> and set the boot size
[14:24:36] <hetii> Hi :)
[14:25:10] <hetii> Did some of you know some USB hub with at least 4 port and in DIP package?
[14:39:53] <Lambda_Aurigae> hetii, good luck finding a usb hub chip in dip package.
[14:40:01] <Lambda_Aurigae> best off finding a tiny hub and just using that.
[14:42:16] <hetii> Interesting is that some time ago i have of usb hub on dip packages and my girl by accident put it into trash.
[14:46:23] <Lambda_Aurigae> I've looked for usb hub chips in the last 2 years and never found one in dip package.
[14:48:00] <hetii> I found this: http://octopart.com/tusb2140bn-texas+instruments-520199
[14:48:14] <hetii> but its big :)
[14:48:56] <hetii> huh and in USB 1.1 :(
[14:49:01] <hetii> *1.0
[14:50:04] <hetii> so suppose will nned use TUSB2046BVF or TUSB2077APT
[14:50:18] <Lambda_Aurigae> is that a currently produced chip?
[14:51:02] <Lambda_Aurigae> nope...TI says obsolete, no longer produced
[14:51:04] <hetii> or μPD720114
[14:51:16] <Lambda_Aurigae> looks like some people still have them in stock though.
[14:51:55] <Lambda_Aurigae> the uPD one is not dip though.
[14:58:11] <hetii> True, but TQFP 48 also is some option for me if I don`t find any in DIP packages.
[15:03:34] <hetii> 5 port hub in DIP: http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC141555.pdf but USB 1.0
[15:04:08] <tzanger> heh
[15:04:34] <tzanger> just go get one of these: https://www.kickstarter.com/projects/arainnovation/arahub-the-worlds-best-most-beautiful-usb-3-hub
[15:28:42] <Lambda_Aurigae> that freescale chip is no longer manufactured either.
[15:32:52] <umquant> has anyone used the ethercard enc28j60 library ?
[15:34:58] <Lambda_Aurigae> can't say as I have ever heard of it.
[15:35:12] <Lambda_Aurigae> I use the tuxgraphics enc28j60 package.
[15:36:18] <Lambda_Aurigae> aaaand, the reason I've never heard of or used it is it is for the ardweeny platform.
[15:36:57] <umquant> I am trying to figure out if it has arduino dependencies
[15:37:03] <Lambda_Aurigae> dunno.
[15:37:08] <Lambda_Aurigae> one would have to dig through it and see.
[15:37:13] <umquant> yup
[15:37:22] <Lambda_Aurigae> but it appears to be specifically for the arduino platform.
[15:37:36] <Lambda_Aurigae> so I would guess it has hooks into the arduino system.
[15:37:51] <umquant> looks to me like the tux lib is perfect. All I have to do is send and recv udp data
[15:38:16] <Lambda_Aurigae> on the tuxgraphics site there is a non-ip data sender too.
[15:38:36] <Lambda_Aurigae> runs on ethernet without the overhead of IP addressing...just uses mac addresses and is fast.
[15:39:24] <umquant> oh wow never would have thought of doing that. Is that pretty common for ethernet capable embedded devices?
[15:39:35] <Lambda_Aurigae> http://tuxgraphics.org/electronics/200901/avr-ethernet-realtime.shtml
[15:39:42] <Lambda_Aurigae> common? no
[15:39:54] <Lambda_Aurigae> it's usually used for point to point high speed comms over ethernet cable though.
[15:40:09] <umquant> I am essentially making an expansion module for a PLC
[15:40:11] <Lambda_Aurigae> doesn't play nicely with networks where you have to go over routers and some switches.
[15:41:16] <umquant> Then it may be perfect for my application. Essentially my module just talks directly to the PLC. Our "unit" networks don't have any type of routing or dhcp
[15:41:57] <Lambda_Aurigae> read that link.
[15:42:54] <umquant> "dropped support for higher-level protocols such as udp" lol
[15:42:57] <Lambda_Aurigae> some switches will block non-IP traffic...and wifi adapters.
[15:42:59] <umquant> well it is still interesting
[15:43:09] <Lambda_Aurigae> it's a fun toy...I've used it here and there.
[15:43:27] <umquant> I mean for custom systems that don't need IP it looks awesome
[15:43:38] <Lambda_Aurigae> yeah.
[15:43:50] <Lambda_Aurigae> but stick with hubs if you have to branch out...or really dumb switches.
[15:44:36] <Lambda_Aurigae> but the tuxgraphics IP stack is awesome too.
[15:44:41] <Lambda_Aurigae> they run it on an atmega8.
[15:44:47] <Lambda_Aurigae> works well on an atmega1284p too.
[15:45:27] <umquant> Sweet! For testing I am using an atmega328p. If this project goes well and the higher ups like it I have to figure out the production BOM
[15:45:29] <Lambda_Aurigae> heck, with a bit of work one might could run it on an attiny85
[15:46:27] <Lambda_Aurigae> I find the hardest to get part(most expensive for me) is the magjack.
[15:46:41] <Lambda_Aurigae> but I've recently come across several dead wifi routers that have magjacks in them.
[15:46:51] <umquant> Hmm that will be fun looking into
[15:47:17] <Lambda_Aurigae> they aren't expensive,,,but I've gotten everything else as free samples or bought in bulk at sales really cheap.
[15:47:43] <umquant> Honestly I may end up using some linux capable ARM board. The cost savings stand to be substantial so an extra $100 or whatever for a embedded linux board wouldn't matter
[15:47:51] <Lambda_Aurigae> they are around 2.00 USD retail really so not bad.
[15:48:01] <umquant> ah okay that isn't bad
[15:48:47] <Lambda_Aurigae> https://www.sparkfun.com/products/8534
[15:48:51] <umquant> the system I am looking to replace is $1000USD so if I came in at half of that (which would be a huge amount for the system) the savings would be huge
[15:49:02] <Lambda_Aurigae> cheaper than when they first came out...they were like 15 dollars each back then.
[15:49:30] <umquant> damn
[15:49:53] <vlavr91> what is an ISP programmer?
[15:49:58] <Lambda_Aurigae> haha...for another 0.95 you can get a breakout board that lines the pins up nicely.
[15:50:08] <Lambda_Aurigae> vlavr91, In System Programming programmer.
[15:50:28] <umquant> Lambda_Aurigae: ever mess with the wiznet ethernet solutions? Like the wiz820 IO?
[15:50:32] <Lambda_Aurigae> it is a device that connects your PC to the AVR to allow you to upload programs to the AVR
[15:51:10] <vlavr91> where can I buy one for an xmega?
[15:51:15] <Lambda_Aurigae> can't say as I have umquant
[15:51:22] <Lambda_Aurigae> vlavr91, atmel.com
[15:51:29] <Lambda_Aurigae> or Tom_itx has one that works for xmega I believe.
[15:51:40] <umquant> vlavr91: check out amazon or ebay for cheap usbasp ones
[15:51:46] <Lambda_Aurigae> eeww nooo!
[15:51:48] <Lambda_Aurigae> not usbasp!
[15:51:59] <umquant> oh really?
[15:52:03] <dioioib> vlavr91: you could also look at digikey or mouser
[15:52:05] <umquant> I have used that for a while now
[15:52:12] <Lambda_Aurigae> umquant, for xmega?
[15:52:15] <umquant> sorry for bad recomendation
[15:52:19] <umquant> oh whoops didn't see that
[15:52:57] <Lambda_Aurigae> usbasp is an ok hacked bitbanged usb interfaced programmer for hobby use but I wouldn't recommend anything use vusb(bitbanged usb) for commercial use.
[15:53:12] <Lambda_Aurigae> and I don't think the usbasp does xmega PDI programming interface.
[15:53:35] <umquant> Oh okay good to know
[15:53:56] <umquant> I always intended to purchase the AVRISP mkII
[15:54:07] <Lambda_Aurigae> looks like the atmel Avrisp MkII works for xmega.
[15:54:24] <Lambda_Aurigae> and I'm pretty sure Tom_itx's programmer does PDI for xmega.
[15:54:26] <umquant> I got an AVR dragon for free but it seems to be bricked
[15:54:31] <Lambda_Aurigae> oops.
[15:55:31] <vlavr91> ok thanks
[15:56:00] <Lambda_Aurigae> let me find the link for Tom_itx site
[15:56:28] <Lambda_Aurigae> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[15:56:40] <Tom_itx> it does
[15:56:47] <Tom_itx> the commerce site is down
[15:57:00] <Tom_itx> would have to deal with me direct
[15:57:10] <Lambda_Aurigae> it does ISP, PDI, and the new TIP for the teeny tiny attiny chips.
[15:57:17] <Lambda_Aurigae> err
[15:57:20] <Lambda_Aurigae> TPI, not TIP
[15:59:16] <vlavr91> if I had tom's programmer, can i just connect the PDI pins of the microcontroller to his programmer?
[15:59:25] <Lambda_Aurigae> and I'll leave you in Tom_itx's capable, if rather slimy, hands..
[15:59:36] <Lambda_Aurigae> as I have to go build a bathroom.
[16:35:19] <umquant> Lambda_Aurigae: I am having trouble finding the SPI pin mappings in the Tux library. Is it just mapped somehow via the MCU you pick in the makefile?
[16:35:51] <umquant> nevermind found it
[16:53:50] <megal0maniac> vlavr91: Yip, just hook it up to the programmer (and supply power to the xmega)
[17:24:22] <Tom_itx> just remember xmegas are 3.3v devices
[17:24:48] <Tom_itx> under the weather here or i'd be more chatty
[17:25:17] <Tom_itx> 4 wire hookup
[17:25:39] <Tom_itx> SCK, DATA, +V, GND
[17:26:36] <Tom_itx> the programmer is buffered for lower voltages under VBUS
[17:36:16] <umquant> Lambda_Aurigae: when you used tux ethernet lib was your device a client or a server?
[18:00:48] <Lambda_Aurigae> umquant, I've played with both but usually server.
[18:01:36] <Lambda_Aurigae> current project with that is sending email by doing a telnet like connection to the smtp server.
[23:22:03] <umquant> anyone have experience writing udp clients with the tuxgraphics ethernet lib?
[23:22:33] <umquant> server is easy to get going but having trouble figuring a client that just sends data on some interval
[23:28:43] <perole> anyone know how to make smaller via's in eagle?
[23:28:56] <umquant> perole try #pcb
[23:30:24] <vorsorken> perole: you should be able to just type a number in the drill and diameter boxes
[23:31:02] <perole> yeah, but then I get a funny circle around it + drc complains
[23:31:32] <perole> doing a qfp-100 with 0.5mm pitch, so the default minimum drill of 0.5mm is making it a little awkward
[23:32:26] <perole> tried adding the drill in options->set->drill, and also set minimum drill under drc sizes
[23:34:32] <vorsorken> I usually try to get a DRU file from the place I'm getting the PCBs fabbed. If their rules say the drill is too small, that probably means they can't drill that small. Not sure why it wouldn't work after decreasing the min drill size in the DRU file though.
[23:35:34] <perole> agle can be such a major PITA, just today learned that holding ctrl down while moving a piece will align it to the grid you're using
[23:36:00] <perole> while clicking the piece actually
[23:39:52] <vorsorken> yep it's about as unintuitive as a user interface can be...but I have a pretty large part library built up and I've learned most of the quirks so I can't be bothered to switch to anything else
[23:40:22] <vorsorken> might try kicad on my next board though
[23:43:52] <perole> Haven't really tried anything else, people say that most stuff sucks tho