#avr | Logs for 2014-01-08

Back
[04:52:55] <The_Coolest> I think I'll try to get USBASP working on my attiny85, usbtinyisp is just not going to work with chips with 64K< flash
[08:53:34] <_abc_> What EXACTLY does the dfu-programmer error 'Failed to read 12288 bytes from device.' mean. Exit code is 1. I have no clues. The target is at90usb162:4,24 , the command was dump
[08:53:43] <_abc_> This looks like a Windows style error.
[08:53:52] <_abc_> 'Something bad happened. Bye.'
[08:54:11] <_abc_> Could someone please tell me where to look? Before I start reading the dfu-programmer source?
[08:55:03] <_abc_> lsusb -v says the device DFU is 'AT90USB162 DFU' no version no nothing
[08:55:22] <_abc_> Manufacturer Atmel serial 1.0.5
[08:55:41] <_abc_> This is a avrprog mk2 clone so it should say something else, no?
[09:33:24] <TLoFP> is this an appropriate place to ask about atmell arm m3?
[09:33:52] <tzanger> yes
[09:34:10] <tzanger> well mostly. atmel-arm seems to get discussed here often enough that it doesn't matter
[09:34:36] <TLoFP> great: with the native USB on the m3, are there software frameworks that would allow the m3 to directly write to disk on a host PC?
[09:35:01] <TLoFP> I am only used to communicating with USB on avrs via a VCP (virtual com port), but that is rather slow
[09:35:52] <TLoFP> I would like for the processor to be able to write to disk on a host pc at full speed USB with minimal CPU involvement (minimal ARM cpu time)
[09:36:03] <tzanger> the host PC is not a USB device
[09:36:24] <TLoFP> ?
[09:36:40] <tzanger> and I'm not sure if the USB port on the specific M3 is a host device
[09:37:14] <tzanger> you can't plug the ARM into the PC and expect the PC to look like a disk to the ARM, which is what it sounds like what you are asking
[09:37:43] <tzanger> you can plug the ARM into the PC and have the PC see the ARM as a disk device and read/write to it as if it was a disk
[09:39:02] <TLoFP> tzanger, they have USB host and Device
[09:39:22] <TLoFP> tzanger, oh, ok I get it
[09:40:00] <tzanger> I havent' seen any PC which is OTG capable other than a few linux device drivers (USB gadget support) and even then you need OTG capable controllers which most PCs don't have
[09:40:28] <tzanger> basically until now you've been implementing either VCP or something similar on the ARM
[09:40:44] <tzanger> you need to implement a mass storage device, so that your ARM looks like a disk to the PC
[09:40:55] <tzanger> how fast is the USB port on the ARM? is it USB 1.1 or 2.0?
[09:41:22] <TLoFP> tzanger its high speed, 480 MBits
[09:45:56] <TLoFP> tzanger, if I implement the ARM to be a mass storage device then I would somehow have to copy the data in chuncks and delete it
[09:46:19] <TLoFP> seems ineffecient, there is also very limited memory on the arm further complicating the issue
[09:48:41] <yunta> TLoFP: can't you just write your data in bulk endpoint to pc, and receive on pc with your own driver (libusb) ?
[09:49:24] <TLoFP> yunta, that sounds like what I want to do. is there software written that I can use? or would I have to write such a driver and implement the software on the arm myself?
[09:49:57] * TLoFP reading up on libusb
[09:50:07] <yunta> pc side driver is very simple to write if you can work in user space (libusb)
[09:50:24] <TLoFP> yunta, wow, that sounded greek to me
[09:50:52] <tzanger> yep, mass storage is a block device
[09:51:01] <yunta> just read about libusb first :)
[09:51:10] <tzanger> there's nothing preventing you from going high speed with a com port :-)
[09:51:26] <yunta> it neat little library that allows writing custom usb drivers without touching operating system's kernel
[09:51:36] <tzanger> I have some experience with libusb as well. I have a USB3 design I hit 300MByte/sec on with libusb
[09:51:39] <yunta> *it's
[09:51:47] <TLoFP> wow!
[09:52:10] <yunta> I use it for xmega... and not even coding C, but ruby!
[09:52:16] <TLoFP> tzanger, I am trolling about google right now, do you know any examples/tutorials of the arm-m3 implementing such an idea
[09:52:25] <TLoFP> yunta, what the xmega can do it?
[09:53:01] <yunta> xmega doesn't do 480, only 12
[09:53:29] <TLoFP> mhh, but it has DMA
[09:53:39] <learath> Ahh cnn. top story: "Rodman's a wacko"
[09:53:40] <TLoFP> so I might actually be able to usee all of that bandwidth
[09:53:52] <learath> Can someone explain what "news" means to them?
[09:53:55] <yunta> it's not high-speed, it's 2.0 but full-speed only
[09:54:07] <TLoFP> this stuff is fascinating
[09:55:58] <tzanger> TLoFP: not sure. I'm sure that there are examples but USB stacks always make me a little sick
[09:56:04] <tzanger> they're more ocmplex than necessary IMO
[09:56:11] <carabia> ah i love me some digikey
[09:56:22] <TLoFP> tzanger, I see. I really want to study it
[09:56:45] <carabia> 1284 6€ rather than 644 locally 12€ or so
[09:58:57] <TLoFP> I have some pretty modest requierements: I want to write to disk at roughly 1.8 MBits/s, right now I tried it with a VCP and wasn't able to get those data rates
[10:01:14] <yunta> for 1.8M bits/s full-speed is enough - making thing much easier to code from uc pov, I guess
[10:01:40] <yunta> 1.8M Bytes/s would be more challenging
[10:02:32] <tzanger> well not with VCP; use a vendor-specific protocol and libusb
[10:02:38] <tzanger> it's really straightforward, and easier than VCP for sure
[10:02:54] <yunta> I don't even know what VCP is :)
[10:03:42] <tzanger> virtual com port
[10:04:06] <tzanger> it's a specific "profile" where if you adhere to it, you don't need to use special drivers or software to work as a serial port
[10:04:34] <tzanger> same with MSD, UVC, HID... these are all generic implementations that you can elect to implement for "plug and play" kind of functionality
[10:05:30] <TLoFP> tzanger, so I would use libusb to write my own usb driver?
[10:06:31] <tzanger> yes, alhtough it's really not difficult. "driver" makes it sound more than it is
[10:06:56] <tzanger> you open the device, select the endpoint and then read/write to it much like a file
[10:07:09] <tzanger> if you want to get fancy with async I/O to really push the bandwidth then you can do that but it's *really* not necessary
[10:07:13] <RikusW> tzanger: agreed, USB is overly complicated
[10:07:21] <tzanger> especially for only 1.8Mbit/sec
[10:07:27] <learath> only in some cases
[10:07:35] <learath> other cases it's amazingly trivial
[10:08:08] <tzanger> hell, I was getting 285MByte/sec with the sync I/O API. going async only got me another what, 9%
[10:08:27] <RikusW> maybe someone should make a USB3 to Open spec bus bridge...
[10:08:39] <tzanger> RikusW: it already exists
[10:08:48] <tzanger> the FX3 parallel inteface is entirely generic
[10:09:01] <RikusW> from which company ?
[10:09:10] <tzanger> you can make it as complex or simple as you want
[10:09:12] <tzanger> Cypress
[10:09:23] <tzanger> the FX3 is the USB3 brother to the FX2LP
[10:09:32] <RikusW> ah, heard of that and forgotten it again...
[10:09:33] <tzanger> uses an ARM instead of 8051
[10:09:55] <yunta> TLoFP: ruby example, fast enough for your needs: http://pastebin.com/e48qUTxH
[10:11:00] <tzanger> Ruby is one of those things I need to learn. I run everything on Redmine which is a Rails environment
[10:11:24] <tzanger> I can hack little bits of it here and there but it's well beyond me at this point
[10:11:47] <yunta> redmine may not be the best point to start ruby :)
[10:11:58] <tzanger> :-)
[10:12:04] <tzanger> well it's my only desire to work on ruby
[10:12:07] <tzanger> er rather
[10:12:12] <tzanger> it's the only reason I want to work on ruby
[10:13:04] <yunta> that's good too
[10:13:13] <yunta> it's just that you may be lost at times
[10:14:06] <TLoFP> thanks for the sample
[10:14:15] <tzanger> oh I'm used to being lost. it's how I learn
[10:14:55] <yunta> then you may just love rails :)
[10:15:02] <yunta> it's all moving *so* fast
[10:15:17] <yunta> and apps are just big piles of gems
[10:15:27] <yunta> webs of gems if you're unlucky
[10:16:03] <julius_> hi
[10:16:32] <julius_> does this look like a 10pin avr cable end? will it go into a 10pin male connector? http://cdn-reichelt.de/bilder/web/xxl_ws/C151/PFL_10.png
[10:17:18] <tzanger> yep
[10:17:31] <tzanger> 2x5 0.100" IDC
[10:18:29] <julius_> do you really need extra tools to get the cable into the connector or will some force do?
[10:19:00] <learath> crimping IDC by hand sucks.
[10:19:08] <learath> 2x5 is probably doable though
[10:19:35] <julius_> just need todo this once, maybe twice so im not that hot on buying tools
[10:19:40] <jacekowski> julius_: you need tools
[10:19:55] <jacekowski> julius_: it's a very simple tool
[10:20:09] <julius_> yeah, says here that you can use "force" http://store.curiousinventor.com/blog/attach-idc-sockets-to-ribbon-cable
[10:20:19] <jacekowski> julius_: ahm, ribbon type
[10:20:28] <jacekowski> julius_: good luck pushing that with tools
[10:20:32] <jacekowski> without*
[10:20:42] <jacekowski> vice may be able to do it
[10:20:49] <learath> Good idea? No. Work? Possible.
[10:21:09] <julius_> ok
[10:21:23] <yunta> pliers are enough...
[10:21:45] <learath> pliers are not square
[10:21:51] <learath> pie r round
[10:21:54] <learath> ... wait....
[10:22:14] <tzanger> julius_: the special tool for an IDC connector is just a handheld ratcheting clamp or a desk press. I always used a small vise. get it aligned, tighten down, perfect.
[10:22:21] <julius_> so you just put a 10pin cable in it and press? since there are two rows right after another, wouldnt that combine one cable with 2 "exits"?
[10:22:44] <tzanger> oh, julius_ pasted the link describing exactly what I do
[10:22:48] <julius_> will do, even if it breaks its not expensive
[10:23:06] <tzanger> julius_: look carefully at the connector and wire, you can see how it works without causing shorts
[10:23:36] <jacekowski> julius_: not if you align it correctly
[10:23:49] <julius_> tzanger, havent ordered yet, from the pictures i cant see it. but i guess they thought about that
[10:23:50] <jacekowski> julius_: they are slightly offset
[10:24:02] <tzanger> julius_: there are two rows:
[10:24:04] <tzanger> u u u u u u
[10:24:07] <tzanger> u u u u u u
[10:24:13] <julius_> i see
[10:24:17] <jacekowski> more like v v v v v v
[10:24:26] <tzanger> ok sure, v v v :-)
[10:24:26] <julius_> :)
[10:24:44] <julius_> be right back
[10:24:44] <tzanger> that is why the pinout is always 1 3 5 7 9 and 2 4 6 8 10
[10:33:10] <julius_> thx for the infos guys
[10:55:56] <_abc_> slow? Try 3MBps
[10:56:03] <_abc_> Whoa
[10:56:06] <_abc_> Sorry reading backlog
[10:56:11] <The_Coolest> heh
[10:56:22] <_abc_> 16:37 < _abc_> What EXACTLY does the dfu-programmer error 'Failed to read 12288 bytes from device.' mean. Exit code is 1. I have no clues. The target is at90usb162:4,24 , the command was dump
[10:56:26] <_abc_> 16:37 < _abc_> This looks like a Windows style error.
[10:56:29] <_abc_> 16:37 < _abc_> 'Something bad happened. Bye.'
[10:56:31] <_abc_> 16:38 < _abc_> Could someone please tell me where to look? Before I start reading the dfu-programmer source?
[10:56:35] <_abc_> Asking again, perhaps new eyes might take a look?
[10:56:37] <_abc_> 16:39 < _abc_> lsusb -v says the device DFU is 'AT90USB162 DFU' no version no nothing
[10:56:40] <_abc_> 16:39 < _abc_> Manufacturer Atmel serial 1.0.5
[10:56:43] <_abc_> 16:39 < _abc_> This is a avrprog mk2 clone so it should say something else, no?
[10:57:36] <The_Coolest> hey _abc_, can't help you there though, sorry
[10:57:53] <The_Coolest> Been dealing with my programmer woes these past 2 days
[10:58:00] <_abc_> Yeah tell me about it
[10:58:05] <The_Coolest> killed an ATtiny85 in the process
[10:58:06] <_abc_> Fed up with non working payware
[10:58:11] * RikusW used a hammer once to crimp IDC :-D
[10:58:13] <_abc_> Killed or HVprog enabled?
[10:58:18] <RikusW> I prefer using a vice now
[10:58:21] <The_Coolest> lol RikusW
[10:58:33] <_abc_> RikusW: That succeeds 20% of the time
[10:58:46] <_abc_> And always looks bad
[10:58:49] <RikusW> the key is to tap not hit it...
[10:58:56] <The_Coolest> _abc_ I HVSP'ed it (High Voltage Smoke Programming)
[10:59:00] <RikusW> it was 40 pin ide btw :-P
[10:59:01] <_abc_> Yeah
[10:59:16] <_abc_> The_Coolest: it is relatively easy to recover a hv recover a tiny, as opposed to a mega
[10:59:26] <_abc_> RikusW: BIG hammer ;)
[10:59:38] <The_Coolest> I did it once. but yesterday I forgot the pullup on the 12v line
[10:59:48] <The_Coolest> so the chip and transistor died
[10:59:52] <RikusW> _abc_: multiple taps...
[11:00:11] <RikusW> but a vice is much better
[11:00:43] <The_Coolest> _abc_ I was trying to get my usbtiny to support chips larger than 64KB but evetually admitted defeat. So I modified USBasp to run on the ATtiny85, so now my USBTiny board is running USBasp and works like a charm
[11:02:30] <The_Coolest> _abc_ USBasp is great. not very fast, but it's pretty awesome. I've even used it as a bootloader on a couple of boards of mine to self program the chip directly over usb
[11:03:21] <_abc_> Is that LUFA based?
[11:03:30] <The_Coolest> v-usb
[11:03:32] <_abc_> I was unable to get usbasp going and also killed a 85 with it
[11:03:47] <_abc_> usbasp did not work on any of my hosts, usb device not recognized
[11:03:57] <The_Coolest> _abc_ it was a pain in the ass, but I eventually got it to work
[11:04:04] <_abc_> Before blowing the fuses I verified the code in the tiny85 carefully.
[11:04:09] <_abc_> The_Coolest: how
[11:04:43] <The_Coolest> You have to use very specific pins for USB or modify the usbconfig file
[11:05:13] <The_Coolest> I wanted to get mine working without an xtal, that was a challenge, but I found some source code which works.
[11:05:18] <_abc_> Hm? I used the standard setup. Did not modify anything. Are you saying the original hex file works?
[11:05:23] <_abc_> Or did you have to tweak it.
[11:05:41] <_abc_> I did the xtal less variant.
[11:06:34] <The_Coolest> _abc_ this was my starting point: https://sites.google.com/a/simpleavr.com/simpleavr/avr/vusbtiny
[11:07:43] <The_Coolest> the fuse setting on that page, don't copy paste it like I did before :P
[11:09:05] <The_Coolest> when you change the pins used for USB you also have to take into account that you need to change the interrupt configuration as well. That firmware there seemed to work for me after some tinkering
[11:09:15] <The_Coolest> i gtg for a bit
[11:10:02] <The_Coolest> http://i.imgur.com/ijur8MM.jpg?1 http://i.imgur.com/TGbKnvc.jpg?1
[11:12:45] <tzanger> you've got yourself a matchstick ISP
[11:14:08] <antto> O_o
[11:14:36] <antto> http://i.imgur.com/0m6Sk6E.jpg
[11:14:39] * antto hides
[11:45:45] <_abc_> Okay so the avrispmkII not working issue was solved by downgrading to avrdude5.10 (from 6.0.1)
[11:45:56] <_abc_> There is a thread online where Dean explains this and they found the fix
[11:46:27] <_abc_> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1119127 I do not understand what they changed, the embedded firmware or avrdude?
[12:16:06] <_abc_> The_Coolest: back to the issue. What exactly did you do to make it work, please, and did you use linux?
[12:21:21] <foo__> hi everyone! i've been trying to connect a 7 segment LED display (common cathode) to port B of an ATtiny2313, but as soon as i try to display e.g. an 8 the controller no longer responds when trying to reprogram, even if i remove the controller from the circuit. any ideas what i might be doing wrong?
[12:33:29] <The_Coolest> _abc_ no need for linux
[12:33:56] <The_Coolest> honestly I'm not 100% sure what I changed to get it working I played with it originally for days.
[12:34:07] <The_Coolest> If you want I can upload the working source.
[12:41:21] <_abc_> antto: that stk200 clone looks a bit cleaner than one of my old ones ;)
[12:41:49] <_abc_> The_Coolest: just the working hex and fuses would be nice. What was wrong with the fuses on simpleavr.com?
[12:50:33] <_abc_> The_Coolest: About those fuses, please clarify...
[13:02:04] <foo__> anyone?
[13:02:15] <_abc_> At the time The_Coolest I looked at the fuses one by one, and all were ok
[13:02:21] <_abc_> I mean bit by bit
[13:05:40] <The_Coolest> _abc_ the fuses, you need E1 on low, to enable the internal PLL
[13:05:51] <_abc_> Hm?
[13:05:52] <The_Coolest> And I use 0xDD on high
[13:05:54] * _abc_ looks
[13:06:32] <The_Coolest> _abc_ it depends on your wiring
[13:06:47] <The_Coolest> I mean my hex may not fit your config, unless you're using a breadboard
[13:06:53] <_abc_> ugh
[13:07:01] <_abc_> I built is on a breadboard as shown at the website.
[13:07:10] <_abc_> Did not work but I suspected clock or fuses.
[13:07:31] <_abc_> So, looking at fuses, E1 on low and DD on high? And extra FF?
[13:07:56] <_abc_> DD due to BODEN issues?
[13:07:58] <The_Coolest> pretty much, let me confirm
[13:08:20] <The_Coolest> HFUSE=0xdd
[13:08:20] <The_Coolest> LFUSE=0xe1
[13:08:40] <_abc_> He used 5D. What's the difference?
[13:08:49] <The_Coolest> I'm pretty sure I used 0x5D only unchecked the reset disable bit till I confirm the firmware works as I want it to
[13:08:55] <_abc_> He used E1 5D FF and that's what I used
[13:09:05] <The_Coolest> err I mean I used the defaults that usbtiny came with
[13:09:22] <The_Coolest> http://www.engbedded.com/fusecalc/ << Very useful
[13:09:26] <_abc_> Ah wait so it should work before programming RESET as gpio, right?
[13:09:31] <_abc_> I mean be detected on USB etc
[13:09:36] <The_Coolest> 0x5D vs 0xDD is the reset disable fuse
[13:09:49] <_abc_> So I used exactly your fuses
[13:09:56] <The_Coolest> it should. give me a minute,
[13:10:00] <_abc_> E1 5D FF
[13:10:10] <_abc_> his page gives: avrdude -c usbtiny -p t45 -V -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xff:m
[13:10:34] <_abc_> This is exactly what I used except I ran the hfuse:w:0x5d:m last after hex verification
[13:11:29] <The_Coolest> yeah, I wouldn't do 0x5D until you've confirmed it works. the reset pin is used as the CS/SS/Reset pin on the programmer
[13:11:57] <The_Coolest> I just press the reset button on the target manually when testing
[13:12:18] <The_Coolest> _abc_ this is my wiring: http://i.imgur.com/k5DqZIw.png
[13:12:25] <The_Coolest> PB4 - D+, PB3 - D-
[13:12:57] <The_Coolest> R4 and R5 are just 2x1K (instead of a single 2K resistor)
[13:13:43] <_abc_> R3 is not fitted I hope?
[13:14:10] <The_Coolest> R3 is optional, it's a 1M pulldown for the D+. It should work fine without it
[13:14:21] <_abc_> ok
[13:14:42] <_abc_> And it worked?
[13:14:53] <_abc_> Looks like what I used. Did you mod the firmware?
[13:16:19] <_abc_> The_Coolest: ?
[13:16:38] <The_Coolest> _abc_ yes I had to change a few things to get it working
[13:16:44] <_abc_> Ah?
[13:16:53] <_abc_> Details? ;)
[13:16:56] <The_Coolest> basically my D+ and D- were switched with his
[13:17:16] <_abc_> I tried switching D+ and D- in hardware
[13:17:20] <The_Coolest> but I don't really remember what I else I changed, because I spent days on it and it was like 4 months ago
[13:17:21] <_abc_> All combinations
[13:17:29] <_abc_> I see. Okay, thanks.
[13:17:33] <The_Coolest> one sec,
[13:23:56] <The_Coolest> _abc_ I'm uploading what I've got
[13:24:02] <_abc_> The_Coolest: okay, thanks.
[13:24:54] <The_Coolest> http://www.alcpu.com/Hidden_Stuff/isps.zip
[13:24:57] <The_Coolest> _abc_ ^
[13:25:21] <The_Coolest> the tinyasp-firmware is USBasp for the ATtiny85
[13:25:22] <_abc_> thanks
[13:25:34] <The_Coolest> Works pretty well on my board
[13:25:39] <_abc_> What exactly did you have to change, the firmware or the host?
[13:26:16] <The_Coolest> I took USBasp firmware, stripped it of all PORTC\PORTD calls as they aren't there on the tiny
[13:26:27] <The_Coolest> removed the SPI part of it
[13:27:04] <_abc_> ah
[13:27:13] <The_Coolest> I'm not 100% done with it, as I want to convert it to taking advantage of the USI interface, but it's not possible with the way I've routed the ISP header on my board.
[13:27:22] <_abc_> So your code is tinyasp-firmware right?
[13:27:38] <_abc_> Did you have issues with newer avrdude?
[13:27:45] <_abc_> I tried 6.0.1 and had trouble
[13:27:49] <_abc_> 5.x seems to work
[13:27:53] <The_Coolest> I haven't tried, still on 5.10
[13:27:57] <_abc_> k
[13:28:43] <The_Coolest> either way, all you really need is to get the attiny picked up by windows when you plug it in
[13:28:55] <The_Coolest> that gave me a headache for days till I figured it out
[13:31:46] <The_Coolest> It actually still give me a headache from time to time when I play with different v-usb stuff
[13:32:20] <_abc_> Yes, I used linux and windows, and no fun
[13:32:49] <The_Coolest> that dreaded "Unknown USB device"
[14:06:19] <The_Coolest> _abc_ any luck?
[14:08:09] <learath> What's the pool on HP/Agilent/Keysight's new name?
[14:18:25] <_abc_> The_Coolest: I am not trying that now, have to get a tiny85 tomorrow or Friday
[14:18:49] <_abc_> learath: pool?
[14:29:20] <The_Coolest> oh ok
[14:31:04] <learath> _abc_: They change names every few years
[14:31:12] <learath> after they gave up on HP
[14:31:13] <_abc_> learath: not that frequently.
[14:31:29] <_abc_> learath: I am willing to bet it will be a GoogleAbleCompoundName
[14:31:34] <_abc_> Probably shorter than that
[15:25:41] <jerkey> http://reboots.g-cipher.net/time/time.asm
[15:31:00] <dmws> could anyone tell what does U on UPLL mean?
[15:52:17] <uhsf> Using ATmega32U4 to make a keyboard, is it necessary to use pull-up resistors for switches in the circuit or is it possible to use only the internal pull-up resistors of the uC?
[16:04:23] <prpplague> uhsf: i wouldnt count on the internal ones, as you may need to tweak the values...
[16:08:16] <uhsf> if it's possible, then I will try it, maybe the values will be good enough
[16:10:36] <kdehl> What kind of keyboard are you using?
[16:13:32] <The_Coolest> Anyone seen the Phantom keyboard?
[16:13:55] <PoppaVic> it prolly wears purple
[16:14:35] <uhsf> I was going to use 10 kOhm and the internal resistor is 20-50 kOhm according to the documentation, it shouldn't make a big difference and it would simplify the design a lot.
[18:14:38] <julius_> for a solid state relais, Vf is 1.2v (typical) at 20ma so assuming a atmega8 does put out 5v the resistor between ssr and atmega would be: (5v-1.2v)/0.02a = 190ohm?
[18:27:08] <uhsf> To send data from one ATmega32U4 to another in only one direction, is it possible to use a USB cable? What pins should be used on the sender and the receiver? Does clock need to be sent over somehow?
[18:31:04] <Tom_itx> why not serial
[18:32:44] <Epsilon-Auriga> uhsf: yeah, you can use a usb cable, but not with the usb protocol unless the 32u4 supports usb-otg.
[18:33:29] <learath> pretty sure it's device only
[18:34:39] <Epsilon-Auriga> yup..device only...so no device to device usb.
[18:34:50] <Epsilon-Auriga> need something with usb-otg to do device to device connection.
[18:35:36] <Tom_itx> the 1287 is the only otg one
[19:04:13] <uhsf> Tom_itx: I could use serial, but how convenient are serial connectors compared to USB? The cable must be easy to connect/disconnect.
[19:04:29] <Casper> julius_: check the datasheet of the SSR, it may have a build in one, or an active circuit that limit the current...
[19:04:47] <Valen> if its avr > avr I would use serial
[19:05:04] <Valen> why bother with all the overhead of usb
[19:05:38] <Epsilon-Aurigae> uhsf: shouldn't be a problem connecting and disconnecting...and you only need 2 wires if you are only doing one way comms.
[19:05:45] <Epsilon-Aurigae> GND and TX
[19:05:51] <uhsf> Epsilon-Aurigae: learath: Valen: What exactly is the limitation of USB in my situation. As I said I only need communication in one direction.
[19:06:10] <Tom_itx> uhsf use phone jacks etc
[19:06:13] <Epsilon-Aurigae> uhsf: usb either needs host and device or usb-otg to usb-otg.
[19:06:26] <Epsilon-Aurigae> that chip will work as usb device only.
[19:06:32] <Epsilon-Aurigae> it will not do usb-otg or usb host.
[19:06:47] <Valen> usb is a massive protocol stack
[19:06:51] <uhsf> Epsilon-Aurigae: do you have an example of serial connector that can be use in every day usage?
[19:06:51] <Tom_itx> like i said, 1287 is the only otg in the 8bit line
[19:06:53] <Valen> you have to do all of it
[19:07:13] <Valen> and it must be bi-directional
[19:07:23] <Valen> serial is set up 2 registers and an ISR
[19:07:27] <Epsilon-Aurigae> use async serial...just need a ground reference and one wire to send data one way...will need to likely send the data several times to make sure you get it without errors.
[19:08:24] <uhsf> I'm using SparkFun ATmega32U4 breakout board. I'd like to use the USB port already on this board for sending data, but a second USB port on the receiver board.
[19:08:35] <Epsilon-Aurigae> I would use rj45 or similar modular plug...like phone cables.
[19:08:39] <Epsilon-Aurigae> rj45 being network.
[19:08:52] <Epsilon-Aurigae> but, just use simple 2 wire phone cables and rj-11 plugs..
[19:09:09] <uhsf> I don't need the USB "protocol" or anything, just the convenience of the USB port.
[19:09:26] <Epsilon-Aurigae> so you will need to bitbang serial comms over those pins.
[19:09:36] <Epsilon-Aurigae> but you might find that there is other hardware on those lin
[19:09:39] <Epsilon-Aurigae> lines
[19:10:53] <Epsilon-Aurigae> hmm.
[19:10:57] <julius_> Casper, only a diode in the input circuit
[19:11:11] <Epsilon-Aurigae> not sure if the D+ and D- lines are gpio on that chip..have to look.
[19:12:05] <Epsilon-Aurigae> nope.
[19:12:15] <Epsilon-Aurigae> so, no, you can't use the USB connection for other things.
[19:12:29] <Epsilon-Aurigae> the USB pins on the microcontroller are dedicated to USB connection.
[19:12:39] <Casper> julius_: then you do need the resistor then, and your math appear to be right
[19:14:30] <uhsf> Tom_itx suggested to use phone jack. That's an interesting idea, I haven't thought of serial this way. Is there any other examples I should consider?
[19:14:58] <PoppaVic> a stereo - or mono - jack
[19:15:03] <uhsf> I agree that using USB cable for comm that is not USB would seem strange
[19:15:33] <PoppaVic> <shrug> usb is.. serial.
[19:16:34] <julius_> Casper, thx
[19:16:50] <Tom_itx> unless you need a shielded signal
[19:17:00] <uhsf> so the clock from either uC doesn't need to be sent over... and I only need TX and GND? Why GND? I'm curious.
[19:17:19] <PoppaVic> uhsf: for fun- http://ww1.microchip.com/downloads/en/DeviceDoc/22288A.pdf
[19:17:30] <julius_> i cant find a maximum forward voltage rating for a1n4148 - is there none?
[19:17:47] <julius_> 1n4148 that is
[19:18:43] <Epsilon-Aurigae> uhsf: because you have to have some kind of reference point for the data line...
[19:19:33] <Epsilon-Aurigae> PoppaVic: that wont solve anything...it is usb device only..
[19:20:13] <Epsilon-Aurigae> uhsf: async serial just relies on known timing on both ends...no clock necessary.
[19:21:31] <Casper> julius_: there is no such thing as max forward... in forward it conduct, and will have about 0.7V drop, what you are thinking about is max reverse
[19:22:03] <uhsf> ok, now I'm almost completely sold on the idea of mono jack, I will think about it some more.
[19:23:26] <julius_> casper, no i know about max reverse...was just wondering if there is a limit
[19:23:30] <uhsf> another thing is that the serial comm will eventually be wireless. Is it still good with the idea of serial with only TX and GND?
[19:23:46] <learath> no.
[19:23:51] <julius_> good night channel :)
[19:24:23] <Epsilon-Aurigae> uhsf: well, depends on how you are doing the wireless...
[19:24:56] <uhsf> what more should be involved then for the serial wireless signal to be sent?
[19:25:46] <uhsf> I will need the most simple basic wireless serial communication. one way only from one ATmega32U4 to another.
[19:26:59] <uhsf> why not just take the TX data and send it wireless? the GND reference would be missing?
[19:28:18] <Epsilon-Auriga> one might want to learn how electronics and wireless communications work.
[19:30:10] <Epsilon-Auriga> maybe someone else is willing to teach basic electronics tonight...it's beyond my ability and gumption at the moment.
[19:31:36] <uhsf> someone please just give me a hint about how to send a simple serial wireless signal from one ATmega to another
[19:32:46] <uhsf> it seems I would just use some basic antenna board on both sides and send the same signal to the same pins used when wired
[19:32:59] <PoppaVic> you vibrate a wire. I'd just buy a couple modules.
[19:34:26] <uhsf> but my question was about why it's not good to go the TX and GND serial route for my design if it's eventually gonna be wireless
[19:34:59] <Epsilon-Auriga> what radio transmitter and receiver set are you going to use to go wireless?
[19:35:01] <PoppaVic> why do you care? Just go on with the show.
[19:35:47] <uhsf> I'm trying to make a decision but don't want to change everything when I will implement wireless.
[19:36:30] <uhsf> I don't know what radio devices I will use then but it will be the most simple I find.
[19:36:37] <Tom_itx> what distance?
[19:36:58] <uhsf> more simple than bluetooth, maybe the xbee or something more simple.
[19:37:13] <uhsf> only need 2 meters distance or so
[19:37:47] <uhsf> it's even better if it doesn't work further than 2-3 meters
[19:38:03] <Epsilon-Auriga> xbee isn't necessarily simpler than bluetooth.
[19:38:37] <PoppaVic> "Fantasy. Do not attempt. Cars can't jump on trains."
[19:42:12] <uhsf> I was suggested something like this: http://www.futurlec.com/Radio-418MHZ.shtml
[19:42:56] <Epsilon-Auriga> that could work.
[19:43:58] <uhsf> But I'm making a wired device first, I'm trying to choose parts to order right now and I only have the link between the two devices to figure out.
[19:44:13] <uhsf> It's the most difficult part of my design.
[19:46:24] <Epsilon-Auriga> so, if you use that radio set from futurlec, you still need TX and GND from the sending microcontroller to the transmitter.
[19:46:56] <Epsilon-Auriga> and from the receiver to the receiving microcontroller you need digital data out and GND.
[19:47:13] <Epsilon-Auriga> using the USART in async mode
[19:47:49] <Epsilon-Auriga> and to communicate with the two devices without the radio modules, you need TX from sender connected to RX on receiver and GND connected to both.
[19:48:47] <uhsf> Epsilon-Auriga: ok that information is precious to me
[19:48:50] <Epsilon-Auriga> if you don't understand why you need the GND then I suggest reading Getting Started in Electronics by Forrest M. Mims III before going any farther.
[19:51:41] <uhsf> I will take note of all this and I will read about USART in async and TX, RX, GND.
[19:53:02] <Epsilon-Auriga> it seems to me you need to learn basic electronics before going into more advanced projects.
[19:53:17] <learath> What fun is that
[19:54:10] <Epsilon-Auriga> learath: there's always the energetic high voltage method of learning about electricity.
[19:54:19] <Epsilon-Auriga> it involves a fork and an electrical outlet.
[19:54:38] <Epsilon-Auriga> the great mystery, 3 holes, which one is not safe?
[19:55:50] <uhsf> I know, I'm very new to electronics. I have a B.Sc in biotechnology but I really want to do this one project it's been haunting me for a long time.
[19:56:23] <uhsf> It's kinda overkill to learn all this just for one project but I guess it's worth it.
[19:56:47] <Epsilon-Auriga> 128 pages is a lot to read to learn electronics...
[19:57:25] <learath> Epsilon-Auriga: I'm a big fan of that method
[19:57:30] <learath> particularly with politicians
[19:57:40] <Epsilon-Auriga> learath: for me it was little brothers.
[19:57:55] <Epsilon-Auriga> and homemade tesla coils.
[19:58:11] <uhsf> If I had money I think I'd pay someone to do the project for me and as must be very simple for an EE.
[19:58:51] <uhsf> I know some of the basics. I had an electricity course in college.
[19:59:47] <Epsilon-Auriga> I taught myself electronics as a kid starting with that book I mentioned earlier..
[20:00:02] <Epsilon-Auriga> that book and the other electronics mini notebooks by the same author.
[20:02:10] <uhsf> I wish someone in my family encouraged my as a kid. Unfortunately my brain disappoints me in understanding Vcc, GND, pull-up resistor and stuff like that.
[20:02:40] <uhsf> or maybe I just needs more time spend in this field
[20:02:50] <Epsilon-Auriga> nobody encouraged me.
[20:03:01] <Epsilon-Auriga> I started by fixing a radio that my father threw away.
[20:03:09] <Epsilon-Auriga> pissed him off that I fixed it where he couldn't.
[20:03:57] <Epsilon-Auriga> that was,,,,38 years ago or so.
[20:04:26] <uhsf> it's like my brain always wants to see where and how the electrons flow exactly and is unable to abstract directly to voltage and current and power, C, R, etc