#avr | Logs for 2013-12-20

Back
[01:37:38] <ColdKeyboard[a]> Can someone tell me why are base resistors from v1.1 removed in v1.2 of TV-B-Gone? Here is 1.1 http://learn.adafruit.com/system/assets/assets/000/006/198/original/tvbgone11.png and here is 1.2 https://raw.github.com/adafruit/TV-B-Gone-kit/master/pcb/tvbgone3sch.png
[06:02:41] <Duality> any good place to get attiny84s for a decent price ?
[07:30:05] <FoxGT> I got mine from ebay. :P
[07:33:32] <twnqx> hm, 2€70
[08:53:10] <_abc_> Hello. I got vusbtiny for fun and burned the sofwtare into a t45, as per instructions, and set the fuses. It does not get recognized by any computer I own as a valid usb device. Has anyone tested this a bit? I do not have hvp right now, needed to access the t45 again.
[08:53:28] <_abc_> Will reset it later, but, first, does anyone know about problems...
[08:53:55] <_abc_> Just how 'bad' is code out there on the net really. This project looked trustworthy, avrdude supports it. Bummer?
[09:06:06] <_abc_> Are there known clock spread issues with t45s? Like internal clock way out of spec or not syncing nicely? I understand this project uses clock self calibration to adjust the t45's clock to 16.5MHz for proper USB work
[09:31:07] <kdehl> There's no danger in mixing TTL and HC circuits, is there?
[09:31:47] <twnqx> pure TTL + HC is not a good idea iirc
[09:32:12] <twnqx> iirc HC -> TTL might be destructive as the TTL draws more current than cmos outputs are supposed to deliver#
[09:38:22] <_abc_> the code and instructions I used are from here: http://www.simpleavr.com/avr/vusbtiny
[09:38:44] <_abc_> twnqx: HC is strictly compatible with TTL
[09:38:53] <_abc_> C is not
[09:39:02] <_abc_> without H
[09:39:11] <_abc_> HC fan out is 4 TTL iirc
[09:39:15] <_abc_> fan in is not a problem
[09:40:00] <twnqx> i though you needed HCT for that.
[09:40:12] <_abc_> only thing HC does not like is weird gate oscillators, monostables and the like where there is negative (!) resistor feedback between output and input of an inverting gate
[09:40:22] <_abc_> twnqx: ah yes it has to be HCT
[09:40:31] <_abc_> HCT is compatible with TTL, HC not so much
[09:40:41] <_abc_> I was wrong, sorry.
[09:40:44] <_abc_> >> kdehl
[09:41:48] <_abc_> I got bitten by the feedback issue several times. One component which causes problems is 74HC(T)40{4,6}0 whih refuses to work with a 32kHz xtal wired on its inverter gate in the osc.
[09:43:02] <_abc_> So any ideas on the vusbtiny issue? Tiny45 tested with software as at http://www.simpleavr.com/avr/vusbtiny, circuit as there, is not recognized on usb by 2 systems.
[09:43:28] <_abc_> I just had a t45 and wanted to do something with it.
[09:44:22] <kdehl> Hm. Okay...
[09:44:56] <kdehl> I just ordered a bunch of 74xx chips off ebay, and took the cheapest ones for each kind. Some of them were LS, some were HC
[09:45:16] <kdehl> Wait. TTL and LS are the same thing, no?
[09:45:22] <kdehl> Shit, now I'm confused.
[09:45:29] <_abc_> no, LS is newer and better and faster than TTL
[09:45:35] <_abc_> but compatible
[09:46:05] <kdehl> Oh. So TTL is the original 74xx series?
[09:46:05] <twnqx> low power schottky versus high speed cmos
[09:46:09] <twnqx> yes
[09:46:12] <kdehl> Ah.
[09:46:25] <kdehl> Well, then it was LS and CE that I'm mixing, sorry.
[09:46:37] <twnqx> ce... doesn't ring a bell for me
[09:46:51] <kdehl> HC! Damnit!
[09:46:58] <_abc_> heh
[09:47:08] <_abc_> HCT can be mixed with TTL and LS
[09:47:16] <kdehl> But not HC?
[09:47:31] <_abc_> iirc logic levels for HC are not ok for LS etc
[09:48:16] <kdehl> But I'm running everything at 5 V.
[09:48:32] <_abc_> http://www.eevblog.com/forum/microcontrollers/v-usb-and-atmega-problems/ bah vusb is a problem in itself
[09:48:44] <twnqx> sigh, why did i even buy optocoulers
[09:48:48] <twnqx> if i still have some
[09:49:43] <_abc_> "VUSB will work if you have a 1.1 compliant USB port. plug it into a 2.0 host and all bets are off. the host will most likely not be able to detect correctly that he has to switch down to 1.1 speeds."
[09:49:48] <_abc_> YAY
[09:49:57] * _abc_ goes to find his $2 1.0 usb hub
[09:50:43] <twnqx> i thought that was done by the pullup/down
[09:51:37] <rue_bed> whats vusb?
[09:51:51] <rue_bed> the connect detection?
[09:52:33] <_abc_> argh even my $2 hub is USB 2.0
[09:52:34] <twnqx> vusb is the software usb 1.1 implementation
[09:52:41] <_abc_> rue_bed: the software usb stack
[09:53:00] <_abc_> rue_bed: rue_bed for non usb devices
[09:53:16] <_abc_> rue_bed: sick? rue_bed suggests horizontal position.
[09:53:54] <_abc_> aanyway I am quite sick of vusb games
[09:54:13] <_abc_> will get another hub tomorrow for $1 this time, I *know* that one is slower
[09:54:35] <_abc_> I just want to see this pos working once, that's all.
[09:54:51] <rue_bed> snow day!
[09:55:00] <_abc_> I wonder if there is a propeller vusb stack implementation. Must be easyer to get the timings right at 200MHz...
[09:55:19] <_abc_> rue_bed: snowing? You once said you are in BC I think?
[09:55:20] <rue_bed> comany vehicle accidents cost too much to bother going out for jobs
[09:55:36] <_abc_> nice you can stay home
[09:56:05] <rue_bed> I thought you wrote the usb stack from scratch?
[09:56:05] <_abc_> I'm at 45 deg N in Bucharest and it is dry outside but there is a freezing fog floating in the air which chills you like a chicken in a fast freezing tunnel
[09:56:15] <_abc_> rue_bed: you are confusing me with abcminiuser
[09:56:21] <_abc_> I am not he and he is not I
[09:56:25] <twnqx> also
[09:56:34] <twnqx> abcminiuser wrote something else
[09:56:42] <twnqx> that's for the USB enabled devices
[09:56:44] <_abc_> rue_bed: abciminuser is Dean, he works for Atmel now iirc
[09:56:52] <twnqx> worked* afaik
[09:56:55] <_abc_> I'm an independent developer unrelated to him
[09:57:05] <_abc_> twnqx: he wrote LUFA
[09:57:08] <twnqx> yes
[09:57:20] <twnqx> but lufa does not have any software usb on gpio pins, no?
[09:57:28] <_abc_> "VUSB really is a pest that needs to die. The only reason it has for exisiting is to show off some low level programming skills of a madman. It was made becasuse there were very few small cpu's available with an on board USB hardware block. ( simply because the USB hardware block is large )."
[09:57:33] <_abc_> well said
[09:57:54] <_abc_> twnqx: iirc LUFA runs only on parts with a hw usb stack inside
[09:57:59] <twnqx> exactly.
[09:57:59] <_abc_> twnqx: so the answer is no
[10:03:45] <_abc_> umm is there a command on linux to cause a usb bus or end point to reset?
[10:03:48] <_abc_> command line?
[10:06:48] <_abc_> anyway, vusb is an interesting beast
[10:10:21] <rue_bed> I thought he was the one who wrote the first 1.0 implementatin for hte 2313
[10:11:44] <rue_bed> _abc_, you cant, or I could get my card reader working right
[10:12:07] <rue_bed> I think the only way is to remove and reinstall the kernel module for the hub
[10:13:47] <_abc_> ohci_hcd I think
[10:13:50] <_abc_> or ehci
[10:19:50] <_abc_> yeah you do like for f in usbhid uhci_hcd ohci_hcd ehci_hcd; do rmmod $f; done
[10:20:02] <_abc_> then put them back (usbhid last)
[10:20:23] <_abc_> that resets the buses and reenumerates all attached devices. USB mouse and keyboard won't work in between the 2 command sets
[10:24:14] <AllinYourhead> ohoy! Any recommended resistor value for serial resistors for SPI-bus device when ISP-header is connected to the same bus? 5V ATmega device
[10:28:00] <_abc_> 220 ohm but you may have to slow down the programmer
[10:31:09] <AllinYourhead> great, the ISP header and ATmega should be direct connected, and resistors before slave SPI device?
[10:31:37] <FoxGT> What are you guys using for your compiler?
[10:33:42] <_abc_> AllinYourhead: more or less. If you ensure the slave is in reset and tristates its MISO you can ignore even that, otherwise use the resistor. It needs to be coordinated with any existing protection resistors in the programmer itself
[10:35:42] <AllinYourhead> excellent! thank you
[10:36:10] <_abc_> AllinYourhead: also make sure the slave spi device cannot be confused by programming data. Hold it in reset.
[10:36:25] <AllinYourhead> its a rather stupid ADC-IC
[10:36:31] <_abc_> or wire SS such that it is not selected
[10:36:55] <_abc_> resistor pullup or pulldown on SS for when atmega is in reset/programming mode
[10:37:07] <AllinYourhead> will do!
[11:11:32] <kdehl> Um... how does e.g. a 286 CPU interface with a 30-pins SIMM? The CPU outputs up to 24 bits on the address bus, but the simm needs to be strobed twice in order to generate a byte on its data pins...
[11:39:31] <_abc_> North Bridge memory manager
[11:39:40] <_abc_> kdehl: this is not an #avr question
[11:40:20] <kdehl> _abc_: I know. But people in here seem to know so much about this stuff.
[11:41:24] <_abc_> kdehl: search datasheetarchive.com for mmu or such. Memory manager unit.
[11:41:52] <_abc_> kdehl: for old plain boards like 286s it was done using LSTTL multiplexers and a small automaton
[11:42:17] * _abc_ is curious if old mmu datasheets are still around
[11:43:05] <_abc_> kdehl: okay search for "dram controller"
[11:43:09] <_abc_> on datasheetarchive.com
[11:45:07] <kdehl> _abc_: Ah, right. Found stuff. Thanks!
[11:48:46] <twnqx> kdehl: be reminded that the move of memory controllers into the CPU was pretty recent, with the core i generation (amd was a bit earlier with their opterons)
[11:49:17] * twnqx records expenses. what a pain...
[11:59:42] <kdehl> twnqx: Right.
[12:00:08] <kdehl> I found the Intel 8202 Dynamic Ram Controller.
[12:00:22] <_abc_> okay that is old, you can understand easily what it does
[12:01:16] <kdehl> Heh. Seems like the organization of the memory was just the same, even though it didn't use the later 30-pins SIMM, but just a ton of DRAM DIL chips.
[12:01:24] <_abc_> yes
[12:01:37] <kdehl> _abc_: Indeed. That's why I like old hardware. It's easier to understand.
[12:02:15] <kdehl> I mean, usually the principle is just about the same.
[12:02:32] <_abc_> sdram works on slightly different principles, also ddram
[12:05:31] <kdehl> Alright.
[12:09:50] <kdehl> Yeah, it makes a whole lot more sense now.
[12:15:27] <kdehl> It doesn't say so explicitly, but I assume that the clock speed of the memory controller must be at least twice as fast as the bus speed to the CPU, because it has to strobe the row and column to the DRAM. Is that right?
[12:16:19] <kdehl> I guess it has to be even faster in reality, because I guess there are more things for it to control...
[12:19:05] <kdehl> Huh. I in theory I guess you could use a memory controller to let an arbitrary wide bus use a single 8-bit 30-pin SIMM as the entire RAM, instead of using one SIMM per bank...
[12:20:22] <learath> ... you can't make a 30 pin sim wider than it is
[12:31:32] <kdehl> learath: Why not? It's the same thing as when a Pentium's 64-bit data bus accesses a 72-pins SIMM with a 32-bit data bus.
[12:40:37] <learath> you can ignore the extra (garbage) bits, but that's not using an arbitrarily wide data bus
[12:40:40] <learath> it's refusing to use one
[12:40:58] <learath> you're not going to get more than 8(9) bits out of a 30 pin sim
[12:41:05] <learath> (per cycle)
[12:43:39] <kdehl> Yeah. Well, I guess I was just speaking without thinking. (I tend to do that a lot!)
[12:45:25] <kdehl> I was just thinking that maybe you could force, e.g., a 286 (with a 16-bit data bus) or even a 386 (with 32-bit data bus) to use a single 30-pin SIMM, if you had an complex enough memory controller.
[12:46:08] <kdehl> I just has never hit me that you actually _need_ a memory controller for DRAM. I've only used SRAM in the past, and those are quite easy to use. Just connect address bus and data bus and you're done.
[12:47:19] <kdehl> But on the other hand, I doubt controllers like that exist.
[12:47:28] <kdehl> Unless you make your own FPGA.
[12:52:03] <twnqx> hm
[12:52:16] <twnqx> in fact even the C64 used dram with his 6502 :P
[13:01:58] <kdehl> Yeah, it's kinda crazy.
[13:39:27] <dnsa> could someone help me wiring of AVR Dragon to atmega168-au (32TQFP). here is the ISP pins of the Dragon http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRDragon/AVRDragon_ISP_Description.htm
[13:39:47] <dnsa> on the system, I connected the pings to the corresponding pins on http://www.atmel.no/webdoc/avrdragon/avrdragon.SCKT3200A2.html however I could not connect the RESET pin
[13:40:05] <dnsa> on the circuit the reset pin of atmega168a is connected to the 5V supply with 10k resistor
[13:40:13] <bss36504> Youre gonna need that
[13:40:21] <bss36504> it wont program otherwise.
[13:41:54] <dnsa> normally I connect the reset pin of atmega to the 5V with 10k resistor and I connect AVR Dragon's Vcc to the 5V pin
[13:42:42] <bss36504> No, the reset pin is required for ISP programming regardless of it's "normal operation" configuration
[13:45:20] <dnsa> hmm in order to use AVR dragon to program a surface mount MCU, do I need to have a separate pin for the reset pin?
[13:46:02] <dnsa> I did not allocate a separate pin for the reset pin, just connected to the 5V with 10k. In that case, is there anything I can do?
[13:46:21] <dnsa> everything is already soldered
[13:47:16] <dnsa> I have these terminals: 5V, GND, MOSI, MISO, SCK on the PCB that they are directly connected to the atmega168-au
[13:47:25] <bss36504> Well if you didnt attach the reset pin to the ISP header, it doenst matter what tool you use, you wont be able to make it work.
[13:47:34] <bss36504> doesn't*
[13:49:40] <dnsa> then I will remove 10 k which will break the connection to the 5V, then solder the reset pin of dragon to the AVR directly. it should work right?
[13:50:09] <dnsa> is it okay to connect reset pins directly or would I need 10 k between them?
[13:52:19] <bss36504> Not between them, and the 10K pull-up should* be ok in place. After that, at least in my experience, getting the dragon to work is hit or miss.
[13:52:35] <bss36504> Then again, I never tried that hard and instead switched to a JTAGICE3
[13:52:45] <bss36504> (btw, totally worth $99)
[13:54:05] <dnsa> I got it today but have not unboxed it yet
[13:54:25] <bss36504> 1) unbox 2) plug in to PC 3) plug into board.
[13:54:34] <bss36504> (you'll still need that reset though)
[13:54:45] <dnsa> would the terminal pins that I have (5V, gnd, mosi, miso, sck) be enough to program the MCU on board?
[13:55:33] <bss36504> ISP requires MOSI, MISO, SCK and RESET, plus 5V and gnd for reference. thats why there are 6 pins
[13:58:27] <dnsa> do you know why ISP use reset pin?
[13:58:56] <dnsa> if I short connect to 5V and RESET, would it damage anything
[14:00:33] <bss36504> because the communication is essentially SPI, and SPI requires a chip select. Since Atmel had 2 options A) make a distinct CS pin (in this case, reset) or B) assign some GPIO to be the CS pin, which could break things and be hard to control, they specify that the reset pin must be used for programming. Beyond that, if you think about it, there is no other way that puts the mcu into a known state without any questions asked.
[14:02:04] <dnsa> it makes sense, thank you.
[14:02:13] <bss36504> good, no problem
[14:05:48] <dnsa> do you always allocate a separate pin to access the reset pin on the MCU?
[14:09:27] <bss36504> well, the reset pin is a reset pin by default, and I've never used it as a GPIO.
[14:11:33] <bss36504> unless you mean on the ISP connection, in which case, yes, I always connect it
[14:18:53] <dnsa> thanks
[14:24:25] <bss36504> not a problem
[14:37:57] <N1njAway> Hi bss! Bye bss!! Have a great weekend! :D
[14:38:51] <bss36504> Hi N1njAway! Have a good weekend yourself!
[14:49:46] <_abc_> ahh activity!
[14:50:10] <_abc_> Have you guys used vusb with success before? Recently, on newer hardware? I read it is a hack, I tried something today, and could not make it work.
[14:51:45] <twnqx> i haven't tried it in ages
[14:58:16] <_abc_> nice
[15:14:42] <bitd> So, I am thinking about buying an STK500.
[15:14:46] <bitd> Is it still worth it?
[15:14:56] <bitd> Or should I go for a stk600
[15:36:31] <beaky> hello
[15:36:37] <beaky> how do i make my own programer with attiny
[15:36:46] <beaky> i broke my isp programer
[16:21:45] <carabia> ahahha
[16:21:52] <carabia> i just laughed my ass off
[16:22:08] <carabia> "mugen power" :D 2.7 ah 3.8 single cell litbium batt $44
[16:22:15] <carabia> lithium
[16:26:22] <carabia> ...mugen power 5.5ah single cell 3.8V $89 :D
[16:27:19] <carabia> gee wiz i can even get a 2.2 Ah 3s1p 3.7V lipo-pack for ~20 bucks
[16:27:32] <carabia> so for 20 bucks 6.6 Ah... got, what a rip-off
[17:52:38] <rue_house> anyone have a copy-paste they can give me for an atmega32 of initializing the adc to continious convert one channel?
[17:59:51] <Tom_itx> the 168 should be similar
[18:00:12] <beaky> how do i switch ac power from an avr
[18:00:40] <Tom_itx> same way you ran 15v through it
[18:05:43] <twnqx> i would go with a mosfet, a diode and a relais :P
[18:08:46] <Tom_itx> triac
[18:08:55] <twnqx> it's beaky... relais
[18:09:16] <Tom_itx> wall switch
[18:09:18] <twnqx> galvanic isolation seems recommended :P
[18:10:07] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/toaster_oven/control_sch.png
[18:10:15] <Tom_itx> right part of that schematic will do it
[18:10:45] <twnqx> pfff
[18:10:46] <Tom_itx> proof: http://tom-itx.dyndns.org:81/~webpage/toaster_oven/blinktest2.jpg
[18:10:52] <twnqx> optoinsulated triac...
[18:10:59] <twnqx> why not just rab a solid state relais and be done
[18:11:00] <Tom_itx> it is
[18:11:01] <twnqx> grab
[18:11:11] <Tom_itx> the opto is a triac opto
[18:11:15] <Tom_itx> zero crossing
[18:11:49] <twnqx> don't traics not turn off without zero crossing anyway?
[18:12:09] <twnqx> which is why most solid state relais can switch AC, but not DC?
[18:12:10] <Tom_itx> you want to be able to turn them back off
[18:12:17] <Tom_itx> so you need the triac opto
[18:12:59] <antto> always pull your skirt up a bit when crossing zero
[18:54:01] <FoxGT> Tom!
[18:54:30] <FoxGT> Does this winavr have a compiler to convert to .exe for the practice exercises in the book?
[18:58:42] <Tom_itx> .exe?
[19:00:56] <FoxGT> to practice making the projects as an excutable on windows.
[19:01:04] <FoxGT> Like the hello world thing
[19:01:12] <FoxGT> or temperature chart
[19:01:15] <Tom_itx> studio
[19:01:29] <Tom_itx> but it produces a .hex file
[19:01:32] <Tom_itx> for the avr chip
[19:02:18] <Tom_itx> you can get avr gcc from atmel separate from studio but i can't seem to find the link for it
[19:03:23] <FoxGT> I mean to practice learning c on windows. In this book there are a lot of projects that I would have no idea how to do on the avr.
[19:03:55] <FoxGT> I figured I could use that programmer's notepad, but no idea how to compile it.
[19:04:10] <Tom_itx> bloodshed C++
[19:04:11] <FoxGT> Also, do you recommend studio over winavr?
[19:04:20] <Tom_itx> no not really
[19:05:08] <Tom_itx> http://www.bloodshed.net/devcpp.html
[19:06:38] <FoxGT> awesome! Thank you!
[19:07:01] <Tom_itx> the K&R book?
[19:14:59] <FoxGT> yes
[19:15:00] <N2TOH> is the K&R book in PDF format yet?
[19:15:11] <FoxGT> yes
[19:15:41] <Tom_itx> N2TOH you didn't see the link?
[19:25:18] <N2TOH> Tom_itx, this one? http://www.bloodshed.net/devcpp.html
[19:32:56] <Tom_itx> no the k&r pdf
[19:33:13] <N2TOH> no I did not