#avr | Logs for 2014-12-06

Back
[05:15:03] <LeoNerd> Woo. My DIP8->SOIC8 ZIF socket adapter arrived. Now I can HVSP the even tinier ATtiny chips. :)
[05:15:11] <LeoNerd> .. except I don't have any yet
[09:04:21] <bezoka> hello, is in attiny13a SPI interface?
[09:04:58] <LeoNerd> SPI for ICSP? Yes, I believe so
[09:05:16] <LeoNerd> Same pinout as the 25/45/85
[09:05:43] <bezoka> SPI for communication with other uC
[09:06:01] <LeoNerd> Ah, no. I forget if it has the USI though... the 25/45/85 do
[09:06:28] <LeoNerd> Hmm.. the tiny13 doesn't; I don't know about the 13A
[09:07:16] <bezoka> okay, thanks :)
[09:11:52] <A124> bezoka: USI can work in mode compatible with SPI
[09:12:13] <A124> So.. but its kinda different. Versatile, and that comes with the little extra ahndling
[09:12:49] <A124> And Attiny13 is a very small cheap micro, which.. also relates to hardware.. none almost.
[09:13:14] <bezoka> yea I know it
[09:14:18] <LeoNerd> The tiny{2,4,8}8 chips are pinout the same as the tiny13, but a bit fancier in hardware... so they have the USI that can talk SPI
[09:14:44] <LeoNerd> Though to be fair, you've only got 5(+1) GPIO pins on that, and if you're going to dedicate 4 to SPI there doesn't seem much point :)
[09:15:01] <bezoka> :D
[09:15:34] <bezoka> when I will use reset pin as normal io, it will block "reset"?
[09:15:42] <Tom_itx> yes
[09:15:49] <Tom_itx> hv to reset it
[09:16:07] <LeoNerd> Buy one of my HVSP boards ;)
[09:16:18] <Tom_itx> u r not selling em
[09:16:22] <Tom_itx> :)
[09:16:39] <LeoNerd> Hmm.. I have a tindie account.. when the new batch of hopefully-bugfixed boards arrive, then I will
[09:16:43] <LeoNerd> The first batch had a bug
[09:16:57] <Tom_itx> feature enhancement
[09:17:25] <LeoNerd> Heh.. no, definitely a bug. It just didn't turn off the RESET line enough to ever work
[09:17:41] <LeoNerd> I patched one with a scalpel and 28awg kynar, that worked
[09:17:43] <Tom_itx> is that why you swapped those resistors?
[09:18:04] <LeoNerd> Yah
[09:18:24] <LeoNerd> I made a mistake in the very beginning, as I was drawing out the schematic right from the breadboard
[09:26:34] <bezoka> okay, I will use atmega8 in my project
[09:27:26] <bezoka> which of interfaces is the best to communicate with arm?
[09:27:29] <bezoka> hmm
[09:27:33] <bezoka> with other uC*
[09:57:59] <megal0maniac> bezoka: SPI is nice and simple. I2C is less simple but better suited for certain applications and uses 1 less wire
[09:58:27] <bezoka> I am newbie so I will use SPI :D
[09:58:42] <megal0maniac> You've been a newbie for a long time. What have you been doing?
[10:00:05] <bezoka> all except learn about uC :D
[10:01:32] <LeoNerd> Two less
[10:01:40] <LeoNerd> Well, depends on the devices.
[10:02:37] <megal0maniac> LeoNerd: Assuming 2 devices
[10:03:15] <LeoNerd> Hrm? No
[10:03:22] <LeoNerd> SPI is 3 shared wires plus 1 wire -per device-
[10:03:28] <LeoNerd> I²C is 2 wires for the entire bus
[10:03:52] <LeoNerd> Well, you can get away with 2 shared wires if you only ever need output -or- input, and not both
[10:05:10] <megal0maniac> LeoNerd: But it's 3 wires if you only have 2 devices, you can tie /SS to ground on the device
[10:05:22] <LeoNerd> Uhhmmm... no you can't
[10:05:40] <LeoNerd> Verymuch can't. Most SPI-driven devices -need- to see the edges on the SS line to start/stop transactions
[10:05:54] <megal0maniac> Actually...
[10:05:58] <megal0maniac> Yes
[10:06:19] <megal0maniac> You're right. Where the hell did I read otherwise? Probably an Arduino page
[10:06:29] <LeoNerd> Heh
[10:06:40] <megal0maniac> Sorry, I should know better. I have actually done this before :P
[10:28:54] <Mr_Sheesh> LeoNerd don't ever forget ground :P
[10:29:21] <LeoNerd> Mr_Sheesh: Well sure, but that's not a GPIO pin out of the micro controller
[10:31:17] <Mr_Sheesh> True that. I've just seen newbies not know it's needed, like not knowing common anode LEDs means "connect the anode to Vcc", saw that one this week, web site misled them; Much frustration ensued. I deal with people from "First AVR/Arduino project" to "what the heck is THIS AVR ASM code doing!?"
[10:33:09] <LeoNerd> Heh.. Well.. This is #avr and not #arduino.. ;)
[10:35:13] <A124> Is there anyone with board connected and give me a favor? Upload me successful avrdude upload output?
[10:35:32] * A124 mangled the sentence.
[10:39:07] <A124> Can anyone with a connected boad supply me with successful upload verbose log? Please.
[10:43:43] <LeoNerd> I can in about 15 minutes
[11:54:27] <CasperAtWork> rue_shop4: ya there? do you do brazing?
[11:54:45] <CasperAtWork> steel and nickel... can you brass with copper rods?
[15:13:00] <hetii> HI :)
[15:13:50] <specing> Anyone here managed to compile GNAT for AVR?
[15:15:37] <hetii> If I have for eg MFRC522 rfid reader is it important how I send data to it? I have some example where first NSS line(SSEL) is low then its transmit two bytes, (register then data) and after all SSEL it gose high.
[15:16:53] <hetii> what in the case if I will set SSEL low and then push data from some buffer in sequence like (register/data/register/data) and then afterall set SSEL high
[15:17:47] <hetii> Is it make difference for any SPI device when I set/reset SSEL line?
[19:26:23] <apo_> ugh
[19:27:58] <Lambda_Aurigae> ugh ugh mmpf.
[19:28:48] <apo_> My I2C USI thing does its address detection just fine (which involves both reads and writes)... then fails at the second write after that
[19:29:00] <apo_> it just times out in the ack code
[19:29:43] <Lambda_Aurigae> never used the USI...and I have little experience with i2c issues...mine have just worked so far.
[19:29:55] <apo_> I really hate the USI right now :p
[19:30:07] <Lambda_Aurigae> can imagine.
[19:30:13] <LeoNerd> I've never tried using the USI for I²C... it sounds inconvenient
[19:30:18] <apo_> it is
[19:30:18] <Lambda_Aurigae> I'm playing with pic32 and usb right now myself....talk about ugh.
[19:30:22] <LeoNerd> Easy enough for SPI.
[19:30:28] <apo_> Lambda_Aurigae: lufa <3
[19:30:29] <LeoNerd> That said I've never overly liked I²C in the first place ;)
[19:30:37] <LeoNerd> I only use it if there's no other choice
[19:30:45] <Lambda_Aurigae> apo_, lufa is AVR...
[19:30:45] <Tom_itx> lufa isn't ported to pic
[19:30:52] <apo_> Lambda_Aurigae: Yup :D
[19:30:59] <Tom_itx> tell you what... you port it and i'll use it
[19:31:07] <Lambda_Aurigae> 32bit AVR isn't available in dip package.
[19:34:09] <Lambda_Aurigae> just wish they had a 32bit pic in a 40pin dip package...only one available is a 28pin dip.
[19:43:05] <apo_> ... that's it. I give up. I'll just get a frickin' atmega8.
[19:43:29] <apo_> they're probably cheaper anyway ~_~
[19:50:27] <apo_> Freedom \o/
[20:25:03] <abcminiuser> USI is an ungodly mess
[20:25:14] <abcminiuser> "Here's a shift register and half a counter, have fun"
[20:25:41] <abcminiuser> The new incantation of it is the SERCOM in the new SAM devices, except the new one is brilliant
[20:29:54] <apo_> pretty much.
[22:33:23] <apo_> abcminiuser: I /almost/ got it working, though
[22:33:30] <apo_> Probably put 15 hours into this damn thing :(
[22:36:39] <yonax> Has anyone ever had issues with _delays()? _delay_ms(10); reads about 600 us on my scope
[22:41:32] <Tom_itx> did you define F_CPU ?
[22:41:55] <yonax> Tom_itx: It's set as F_CPU 16000000UL
[22:45:59] <yonax> Probing CKOUT shows 16Mhz too
[22:48:32] <apo_> yonax: Ratio 16, got a prescaler somewhere?
[22:48:59] <apo_> wait, prescaler would make it slower
[22:49:21] <Tom_L> i don't think that applies to delay
[22:49:47] <Tom_L> prescaler is for timers not system clock
[22:52:02] <apo_> Tom_L: Are you sure your F_CPU is set before you include util/delay.h?
[22:52:10] <apo_> ergh, yonax *
[22:52:16] <apo_> I should go to bed
[22:52:21] <Tom_L> heh
[22:53:11] <yonax> apo_: oh shit
[22:53:17] <yonax> apo_: that did it. my bad
[22:53:18] <apo_> :)
[22:53:41] <Tom_L> figured it was something to do with F_CPU
[22:53:46] <apo_> #ifndef F_CPU /* prevent compiler error by supplying a default */
[22:53:50] <apo_> Great choices right there
[22:54:18] <yonax> damn delay.h
[22:54:26] <yonax> thank you both for your help. Greatly appreciated.
[22:54:31] <apo_> you're welcome
[22:54:54] <apo_> (Always check your warnings. And always get rid of your warnings. And enable all warnings. :p)
[22:56:42] <yonax> Just enabled that option. That would have save me some time. Thanks for the tip apo_