#avr | Logs for 2017-02-11

Back
[04:03:07] <_ami_> damn, i screwed one pcb :/ https://pbs.twimg.com/media/C4X54osWEAAhrNg.jpg
[04:03:36] <_ami_> putting force on pulling a stuck solder wire on solder pad :/ it was such a bad idea :/
[04:03:54] <_ami_> two out of three turns out to be okay! https://pbs.twimg.com/media/C4X52YfW8AAqVdI.jpg
[04:03:59] <_ami_> https://pbs.twimg.com/media/C4X55oeWYAAuLmu.jpg
[04:06:37] <_ami_> ok. so default settings for attiny13a is 9.6 MHz.(Int. osc)
[04:31:39] <rue_bed> heh
[04:31:42] <rue_bed> nice ascii
[04:38:43] <Fleck> thats fixable with a single wire _ami_ :D
[06:22:33] <_ami_> rue_bed: thanks, put my pic just for bragging ;)
[06:28:12] <_ami_> Fleck: yah! indeed! :)
[10:37:17] <Jartza> hallo
[11:05:49] <_ami_> Jartza: yo! wats up
[11:08:16] <hetii> yo :)
[11:17:12] <Jartza> not much up
[11:17:36] <Jartza> booting up the Weber Smokey Mountain and pushing some ribs in it :)
[16:44:22] <lawncat> What does _gc stand for in a header file?
[16:44:31] <lawncat> global constant?
[16:45:04] <lawncat> what's the naming convention conversion between what's in the datasheet and what's in the header file?
[16:45:24] <lawncat> ie: there's no PSADV
[16:45:29] <lawncat> PSADIV
[16:46:00] <Xark> lawncat: Which header file are you looking at?
[16:46:57] <Xark> Sounds like a non-standard MS thing I have seen. https://msdn.microsoft.com/en-us/library/4xs93xhk.aspx
[16:47:41] <Xark> (.NET interop extension in now "dead" C++/CLI aka C++/CX)
[16:47:50] <lawncat> iox256a3.h
[16:50:08] <lawncat> BTW, instead of the datasheet's PSADIV, I use CLK.PSCTRL... how the hell am I supposed to know this?
[16:50:16] <Xark> Hmm, not sure, but "global constant" seems a good guess/
[16:50:33] <lawncat> actually, it's in the superheader
[16:50:55] <lawncat> the next higher left-indented title
[16:51:21] <lawncat> PSCTRL is there, but I dont know about cpu
[16:52:26] <lawncat> I'm really a cat so dealing with this stuff isn't trivial. The kind with the smushed face that just looks at you
[16:53:26] <lawncat> so I'll check the header I'm under for the actual register name
[16:53:51] <lawncat> so now i execute the magic CCP instruction and do CLK.PSCTRL = CLK_PSADIV_1_gc;
[16:54:03] <lawncat> that looks kind of dumb
[16:54:28] <lawncat> we already know it's CLK and PSCTRL, so why not just CLK.PSCTRL = PSADIV_1;
[16:54:50] <lawncat> although i waffle between having the redundancy and not
[16:55:30] <Xark> My guess is likely to avoid confusion about what constant goes in what register (as well as ease name collision).
[16:56:13] <lawncat> sure. my problem is largely with mapping what the datasheet says and the header files say
[16:56:37] <lawncat> is having the header open at all times and searching through it normal when programming an atmel avr?
[16:56:45] <Xark> lawncat: Right. Not much documentation for that AFAIK. I just read the headers. :)
[16:57:18] <lawncat> That's dumb. But if that's how it's done, then that's what I'll do.
[16:57:31] <Xark> Typically. Cur the register name from datasheet and then search the header. :)
[16:57:37] <Xark> Cut*
[16:57:57] <Xark> Maybe there is some documentation...I haven't found it.
[16:58:00] <lawncat> I find having cygwin installed helps... grep -r... and less... great things for lot sof headers
[16:58:33] <lawncat> I guess...there's another header I should look at too, because there's CPU_t and I'm using CPU, so it's getting set somewhere else
[16:59:08] <Xark> Hmm. This may be useful (at least makes the header files "prettier"). http://www.atmel.com/webdoc/avrlibcreferencemanual/group__avr__io.html
[16:59:34] <lawncat> ah, a reference manual.... i should have started with that. thanks
[16:59:40] <Xark> Notepad++ "Find in Files" is handy too.
[17:00:08] <lawncat> I was just going to install n++... it can do regexes too... less is nice when you have one file but if there are going to be more, having tabs is better
[17:00:29] <lawncat> than multiple console windows.
[17:15:59] <lawncat> what plugin do you use for the markup for those header files?
[17:35:18] <lawncat> There's actually documentation (although this is the wrong chip class): http://www.atmel.com/Images/doc32005.pdf
[17:36:09] <lawncat> Programming is never easy, and it's never fun, but if it was, it wouldn't be called programming
[17:37:16] <lawncat> I really wish I could get the header files markup to work because it would make stuff like bold, etc a lot more useful
[17:59:42] <Lambda_Aurigae> programming is lots of fun
[17:59:46] <Lambda_Aurigae> and it's usually easy.
[18:00:03] <Lambda_Aurigae> unless you use ada or pascal or something like that.
[18:13:15] <specing> lol
[18:13:38] <specing> the hardest part of Ada is getting a working toolchain for your MCU
[18:48:41] <Lambda_Aurigae> I thought it was the lobotomy.
[18:51:51] <Jartza> hallo
[19:00:26] <Emil> Holla
[19:04:23] <Xark> lawncat: Not positive, but that markup looks very similar to Doxygen. However, much easier to use the website...
[19:05:28] <Jartza> started playing with attiny817 a while ago
[19:05:31] <Jartza> it's fantastic
[19:05:38] <Jartza> really
[19:05:47] <enhering> Hi.
[19:06:30] <Xark> Jartza: In what sense?
[19:06:56] <Xark> 16-bit timer? :)
[19:07:24] <Jartza> that's one
[19:07:34] <Jartza> CCL, SPI, I2C, USART
[19:07:38] <Jartza> fractional baud rate
[19:07:45] <Jartza> event system
[19:07:47] <Jartza> memory mapped flash
[19:07:57] <Jartza> MUL
[19:07:57] <enhering> good night
[19:08:02] <Xark> Wow...does sound like an upgrade.
[19:08:09] <Xark> enhering: Night
[19:08:41] <Jartza> they shouldn't call it tiny
[19:08:44] * Xark peruses the reference manual...
[19:08:57] <Jartza> it's the next gen of AVR with Microchip periferias
[19:08:59] <enhering> which ic are u talking about?
[19:09:06] <Jartza> attiny817
[19:09:23] <enhering> I looked for it, but could not find some days ago
[19:09:50] <enhering> Found.
[19:09:55] <enhering> 6 legs...
[19:10:07] <enhering> Must move slowly.
[19:12:05] <enhering> Anybody heard of carabia?
[19:12:12] <Jartza> 6 legs?
[19:12:25] <enhering> In the atmel picture they show six legs...
[19:12:32] <Jartza> attiny817 is 24 pins
[19:12:34] <sebus> tiny817 is 24 pins
[19:12:38] * sebus o/
[19:12:43] <enhering> But now I see the truth.
[19:12:45] <enhering> :)
[19:12:53] <enhering> Sorry for the wrong leg count.
[19:13:10] <enhering> They should make onw of these with CAM
[19:13:15] <enhering> or CAN
[19:13:18] <enhering> never know
[19:13:36] <Jartza> "CIPs allow the peripherals to operate independently of the core, including serial communication and analog peripherals. Together with the Event System, that allows peripherals to communicate without using the CPU, applications can be optimized at a system level. This lowers power consumption and increases throughput and system reliability."
[19:14:03] <enhering> I wonder how do you program these.
[19:14:18] <enhering> a USART independent of the core.
[19:15:35] <Jartza> just look at the (preliminary) datasheet... which is about 600 pages :)
[19:16:41] <Jartza> btw... iar workbench says it supports attiny1617 too
[19:16:51] <Jartza> which sounds like attiny817 but with 16k of flash?
[19:17:07] <sebus> 817 has CRCSCAN?! Awesome. I usually fight with placing crc in eeprom and doing crc against flash...
[19:17:13] <Jartza> oh and it has DAC too
[19:20:53] <Jartza> what else. bootloader support, capacitive touch... rtc (not real time clock) :)
[19:21:05] <Jartza> rtc is "real time counter"
[19:32:42] <Jartza> I need to dig a bit deeper to CCL but I guess one could do a lot with that
[19:33:06] <Jartza> like rotary encoder etc.
[19:36:11] <Jartza> manchester encoder
[19:58:47] <Emil> How's the gcc support
[20:06:36] <Casper> gcc support of what?
[20:07:51] <Emil> 817
[20:09:37] <Casper> most likelly great if supported, or not supported... no avr-gcc on my system right now... which I should reinstall...
[20:09:46] <Casper> ... stupid circular dependency...
[20:30:20] <enhering> One question: can atmega328p run at 16MHz and 3.3v?
[20:30:34] <Emil> enhering: "no"
[20:30:51] <enhering> Thanks, Emil
[20:31:24] <Emil> It might, but it is "overclocking"
[20:31:47] <enhering> I read something about it not being able to.
[20:31:55] <enhering> Just confirming
[20:33:10] <Emil> enhering: oh some of them definitely can
[20:33:25] <Emil> most, dare I eveb say
[20:34:10] <enhering> hum
[20:41:30] <enhering> "When leaving earth many go to a staging area for their next assignment, depending on what level they are on or have attained while on earth they can hang out there and visit with people they know or past family members---often one and the same. How long one remains there depends on the privilege they have earned during their entire existence." http://www.ufolou.com/p/blog-page_46.html
[20:51:11] <Xark> enhering: Not great for a final product, but in my experience AVRs are pretty happy at 16Mhz@3.3v. I get 5v pro-minis and power them with 3.3v and haven't had trouble.
[20:51:34] <enhering> Thanks, Xark.
[20:52:30] <enhering> • Speed Grade: – 0-4MHz@1.8-5.5V,0-10MHz@2.7-5.5.V,0-20MHz@4.5-5.5V
[20:52:31] <enhering> This is what the datasheet says:
[20:52:48] <enhering> They are probably staying in the safe side
[20:53:37] <Xark> Yep. I've heard the EEPROM can start having trouble overclocked (but I rarely use that).
[20:56:46] <enhering> I have assembled my boards with 8MHz crystals and 20pf capacitors but when I switched on the right fuses the atmega328p bricked. After bricking two of them I decided to use the internal oscillator until I could figure what the problem was.
[20:57:18] <enhering> I must be doing something very wrong
[20:59:57] <sebus> enhering feed avr with external clock (xtal2 input) from eg. 555 timer or other mpu and try again...
[21:00:20] <enhering> good idea, sebus
[21:00:24] <enhering> thanks
[21:02:02] <sebus> also about overclocking... I pushed some avrs up to 75-80MHz @ 5V and 36.864MHz @ 3.3V but eeprom and adc fails often.
[21:02:42] <enhering> 75MHz is a lot
[21:05:35] <sebus> 16MHz on 328p @ 3,3V usually works, but that depends on safe area of chip + osc internal capacity (additional 4..12pF) and it happened to me that there was no oscillation with "some" crystals.
[21:06:57] <enhering> I'll try to turn on the crystal again soon, now that I know that the modules are working.
[21:07:15] <sebus> enhering I was just experimenting how far alu and flash may be pushed
[21:07:19] <Xark> enhering: Check datasheet on crystal. 20pf isn't always right (and sometimes you need resistors).
[21:07:20] <enhering> I just do not understand the difference between full swing mode and the other modes
[21:08:01] <enhering> I'm using the ABM7 8MHz crystals
[21:08:43] <enhering> load capacitance, from datasheet is 18pF
[21:09:03] <sebus> Xark i'd preffer use 10.. and enhering.. full swing mode is for regular crystals tied to xtal1 and xtal2
[21:09:26] <enhering> sebus, that is how I tied the crystal
[21:10:04] <enhering> those 0205 capacitors are quite hard to solder. truly tiny
[21:12:15] <Evidlo> can someone remind me the drawback of using the reset pin as an input?
[21:12:35] <Evidlo> or output
[21:13:06] <Evidlo> I usually take the chip out of the socket when I program it
[21:13:25] <enhering> Will you use a USB to serial converter to upload stuff to the chip?
[21:13:27] <enhering> Ok
[21:14:03] <sebus> Evidlo "/reset pin may act as (weak) i/o", says for eg. datasheet from attiny2313
[21:28:10] <Evidlo> enhering: I am not
[21:28:26] <Evidlo> sebus: I just need an extra analog input. Also the device of interest is an attiny85
[21:44:11] <sebus> Evidlo it should work, just disable reset / debugwire function.
[22:16:53] <lawncat> Where's the "Build hello world" and "adjust system clock, enabhle pll, do wait loop and do hello world over uart until hello world received from other side" guides? http://www.atmel.com/webdoc/index.html