#avr | Logs for 2014-05-21

Back
[00:56:19] <hjohnson> anyone have code to bitbang I2C?
[01:01:16] <tzanger> not handy but it's pretty straightforward
[01:02:00] <tzanger> to output a '1' you turn the pin into an input (thus letting the pullup do its job) and to output a '0' you set the pin low and turn it to an output
[01:02:44] <tzanger> from that you then build up a "bit tx/rx" pair of routines that can output a 1/0 and wait the bit time before returning with the pin state
[01:02:56] <tzanger> then build up start/stop bus condition routines, and so on
[01:08:10] <hjohnson> yeah
[01:08:48] <hjohnson> well, the trick I've been thinking about is flipping it basically between high-z and so forth
[01:09:34] <hjohnson> basically I need a small uC that has CAN Bus and I2C... unfortunately Atmel's small CAN AVR is only I2C
[01:09:41] <hjohnson> er doesn't do I2C
[01:16:13] <tzanger> I just explained how to emulate open collector outputs
[01:16:43] <tzanger> if you don't trust yourself ou can always use small signal diodes (cathode pointing toward the uC) to absolutely make sure you can't drive the bus high
[01:19:05] <hjohnson> naw I do trust myself to do it...
[01:24:22] <hjohnson> tzanger: it's more that I have the opposite of Not Invented Here syndrome... I'd rather lift as much other work as I can so that I can actually do interesting stuff. :)
[01:26:00] <tzanger> hjohnson: that's not a bad idea, although I have found in general that MOST of the embedded code found for free online is worth every penny
[01:26:07] <tzanger> this is especially true for FPGA related code
[01:26:14] <tzanger> good god is most of that utter shit
[01:30:23] <hjohnson> tzanger: oh, tell me about it
[01:30:39] <hjohnson> tzanger: that's why I'm using an exar UART in my project rather than building it in an FPGA
[01:36:42] <tzanger> ok but you could build a decent uart instead of using external silicon
[01:37:05] <tzanger> I ended up writing my own I2C master (nothing fancy) because the opencores one was so bad
[02:07:32] <hjohnson> tzanger: yeah, but I'm not really interested in building a uart, not the point of my project... I'd rather just have one that will work
[02:34:14] <tzanger> hjohnson: bah, what's a little scope creep? :-)
[08:10:41] <ub|k> I was expecting to be able to program the ATmega32 using TxD/RxD after burning it with the arduino firmware
[08:11:03] <ub|k> is that a fair expectation?
[08:20:12] <megal0maniac> Yes, but you also need to set up the reset pin correctly
[08:21:18] <megal0maniac> ub|k: http://electronics.stackexchange.com/questions/61537/what-is-the-cap-for-in-arduino-reset-circuit
[08:21:43] <megal0maniac> I believe that if you just reset the chip normally, there's a 1S window for the bootloader
[08:24:16] <megal0maniac> But if you have a DTR line accessible from your USB to serial then that's the easy way to do it.
[08:32:59] <ub|k> megal0maniac: i'll have a look later, thanks :)
[16:13:29] <vlavr91> hello everyone, I am trying to load a usb bootloader using the avr risp ii. I am using atmel studio and am able to read the device signature and voltage of my xmega in device programming. I can also program the bootloader but after doing this, I can't connect to my xmega over USB in FLIP. I feel like I am missing something. Can anyone help me out?
[16:41:50] <RikusW> The flip bootloader should be on the xmega by default...
[17:00:56] <bonerplusplus> what about the USB bootloader?
[18:01:54] <FoxGT> What the hell happened to Tom's site??
[18:17:49] <FoxGT> Does anyone have anything on Tom's USBTiny MkII? pins? Maybe a .pdf on it?
[18:20:21] <megal0maniac> FoxGT: What do you need to know?
[18:21:33] <FoxGT> primarily pins.
[18:22:45] <FoxGT> I bought a mkII from Tom with the intentions on learning how to program microcontrollers, but I don't access to any information now.
[18:22:52] <Tom_itx> what do you want to know?
[18:23:08] <megal0maniac> Ah, the man of the hour
[18:23:14] <megal0maniac> 'Night :)
[18:23:42] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[18:24:01] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_User_manual_index.php
[18:24:41] <Tom_itx> dyndns dumped my site because they wanted to start charging
[18:24:43] <Tom_itx> so i moved it
[18:25:09] <FoxGT> Tom, you're a lifesaver!
[18:26:29] <Tom_itx> it's in the channel topic fwiw
[18:26:44] <megal0maniac> Tom_itx: Just noticed, you might want to let Dean know about the change for the LUFA docs
[18:26:49] <FoxGT> I'm blind
[18:26:53] <Tom_itx> just goes to show who pays attention :D
[18:27:11] <Tom_itx> megal0maniac what do you mean?
[18:27:20] <megal0maniac> http://www.fourwalledcubicle.com/files/LUFA/Doc/140302/html/_page__l_u_f_a_powered_projects.html#Sec_LUFACommercialProjects
[18:27:28] <Tom_itx> oh
[18:27:31] <Tom_itx> yeah i suppose
[18:27:37] <megal0maniac> It's minor but still
[18:27:50] <Tom_itx> i haven't seen him here in a while
[18:28:04] <Tom_itx> besides, it's the interweb... i expect broken links
[18:28:32] <Tom_itx> there's probably a dozen others i should notify as well
[18:28:48] <Lambda_Aurigae> if they can't check the topic then to heck with em!
[18:29:07] <Tom_itx> google should find it
[18:29:20] <Tom_itx> that'll tell ya how efficient google bots are..
[18:29:58] <Tom_itx> although i think i added a no bot thing to the site
[18:30:34] <Lambda_Aurigae> from here google is still looking at the dyndns link.
[18:31:08] <Tom_itx> the other one has been up a couple months
[18:32:33] <megal0maniac> Tom_itx: Heh. You're on Pinterest http://www.pinterest.com/pin/319966748497280499/
[18:33:02] <Tom_itx> i wondered why i got email from them the other day
[18:33:08] <Tom_itx> spam
[18:40:02] <IsaacGT> Prepare yourselves, I'm about to ask a reaaaally dumb question
[18:40:12] <IsaacGT> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/6pin_isp.jpg
[18:40:50] <IsaacGT> Suppose one were completely ignorant as to which way is up or down...
[18:41:00] * megal0maniac smacks IsaacGT preemptively
[18:41:09] <IsaacGT> Yeah, I just asked that.
[18:41:10] <IsaacGT> lol
[18:41:15] <megal0maniac> IsaacGT: As in they ignore gravity?
[18:41:33] <IsaacGT> Hypothetically, a no gravity situation.
[18:41:42] <Lambda_Aurigae> pin 1 is marked there.
[18:42:00] <megal0maniac> (There's almost always a dot on the PCB indicating pin1)
[18:42:29] <IsaacGT> I mean on the usbtiny.
[18:42:37] <IsaacGT> I know which is which on the microcontroller.
[18:43:13] <IsaacGT> Ohhhhh
[18:43:15] <megal0maniac> IsaacGT: Well you'd have a cable for that. And the cable is keyed
[18:43:17] <IsaacGT> nevermind.
[18:43:18] <IsaacGT> lol
[18:43:25] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_MkII_Rev1-1_overview_brd_txt.jpg
[18:43:32] <Tom_itx> see the "1" on the plugs?
[18:43:39] <megal0maniac> Was just about to post that
[18:43:52] * megal0maniac smacks IsaacGT again for good measure
[18:43:54] <IsaacGT> Yeah, I just saw that right after.
[18:43:56] * megal0maniac leaves
[18:43:57] <Tom_itx> it's on the 'how to use it' page
[18:43:58] <Tom_itx> :D
[18:44:26] <IsaacGT> My highly intelligent self defaulted to: That's an older model, doesn't apply here.
[18:44:40] <IsaacGT> Then I scrolled back up & saw "1"
[18:45:16] <Tom_itx> the plug pinouts haven't changed
[18:45:37] <Tom_itx> a few features/components have changed a bit but not that much
[18:49:51] <IsaacGT> Awesome! Thanks! Good to hear the site isn't down.
[21:15:29] <scottstamp> Anyone ever used this particular FTDI unit for AVR programming? I can't find any use of it online and I don't really understand how they work well enough to figure it out on my own.
[21:15:56] <scottstamp> http://www.digikey.com/product-detail/en/UM232H-B-WE/768-1161-ND/3770838
[21:18:34] <Tom_itx> why are you stuck on that particular one?
[21:20:01] <Roklobsta> see my site http://helix.air.net.au/index.php/avrdude-and-ftdi-232h/
[21:20:23] <Roklobsta> it's spite. that's why.
[21:21:00] <Roklobsta> scottstamp: AVDUDE 6.1 works in linux too with the UM232H
[21:21:41] <Roklobsta> but you need to make some minor adjustments to the avrdude.conf to make it go. the pin defs needed to change going from v5 to v6
[21:22:13] <scottstamp> Honestly, I had no idea what I was buying I just knew it could probably do programming. Lol. But okay cool, so at least it's the same chipset.
[21:22:24] <scottstamp> Just different pin names
[21:22:40] <Roklobsta> I have used my UM232H with AVRDUDE and at other times for serial I/O. It's a nice multifunction widget.
[21:23:25] <scottstamp> If I manage to keep my room magic-smoke free this one's destined to be a flasher.
[21:30:13] <Casper> grrr why isn't there a 40 bits integer on avr :(
[21:30:29] <Casper> 32 is not enought for what I wanted to do, 64 is overkill
[21:32:38] <Casper> 32 bits give me a 49 days counter... precise to the ms...
[21:32:53] <Casper> I guess I'll have to settle for 1/100 of a second
[21:34:08] <Roklobsta> make your own 40 bit type. I am sure there are hooks in gcc for you to do it.
[21:36:21] <Roklobsta> scott that's pretty nifty.
[21:38:03] <Roklobsta> scottstamp: it might have the same wire colours as the C232HM
[21:43:04] <scottstamp> Yellow: C1, D1 Orange: C0, D0 Green: C2, D2 Brown: C3, D3 Grey: C4, D4 Purple: C5, D5 White: C6, D6 Blue: C7, D7 Black: Ground
[21:43:12] <scottstamp> (sorry, that's for me 'cause I'm fucking colourblind :P)
[21:53:13] <scottstamp> Roklobsta, it's pin-compatible. Nice find!
[21:53:44] <scottstamp> Looks like it has another GPIO port broken out as well.
[21:55:52] <Roklobsta> suck it and see.
[21:56:43] <Roklobsta> in the 6.1 avrdude.conf um232h and c232hm definitions the pin number needs to chnage from starting at 1 to starting at 0. Just decrement the pin values by one. I have made a patch to avrdude HQ
[21:57:10] <Roklobsta> so it'll be in v6.2
[23:12:36] <Engen> Hi guys, just wondering for those of you who work with verilog, is there a certain 'copypasta' you place at the beggining of every file for the sake of documentation?