#avr | Logs for 2017-01-03

Back
[00:18:10] <Emil> rue_house: "avr interrupt" to a browser
[00:18:36] <Emil> selecr the gnu savannah libc thingy one
[00:18:37] <rue_house> its called threading, and this thread failed
[00:19:35] <Emil> Anycase, cli only disables the interrupts, not the masks, which are monitored by the circuitry
[00:20:18] <Emil> So calling sei will result in pending interrupts being executed
[00:21:16] <rue_house> purrrrfec
[00:21:18] <rue_house> t
[00:21:38] <rue_house> ok int0 is initialized, the pwm overflow is set up
[00:21:55] <Emil> http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
[00:22:01] <rue_house> figure out what they functions are called and write them...
[00:22:25] <rue_house> PERFECT thats the doc I was gonna search for
[00:25:52] <Emil> They are the standard INT0_vect and PCINT0_vect
[00:26:01] <Emil> if I looked correctly
[00:26:26] <rue_house> INT0_vect is the only one valid for a t13
[00:26:41] <rue_house> ISR( TIM0_OVF_vect ) {
[00:26:41] <rue_house> pwmFlag++;
[00:26:42] <rue_house> }
[00:26:44] <Emil> pin change shpud be there too
[00:26:49] <rue_house> thats a nice short interrupt handler!
[00:27:03] <Emil> TIM0?
[00:27:10] <Emil> Isnt it TIMER0
[00:27:40] <rue_house> TIM0_OVF_vect SIG_OVERFLOW0 Timer/Counter0 Overflow ATtiny13
[00:27:56] <Emil> also remember to call sei(); before mainloop
[00:27:58] <Emil> oh okay
[00:30:45] <rue_house> 8| it compiled, wow
[00:30:54] <rue_house> I wonder if it'll work
[00:32:18] <rue_house> hmmmmm hardware is ready on the bench.....
[00:32:31] <rue_house> it after bedtime... but, atleast I'd know if it works
[00:33:10] <rue_house> whats worse, a day of working burning to know if a peiece of code will work when you get home and have time to try it, or a day or burning your head trying to figure out why a simple peice of code dosn't work
[00:33:55] <rue_house> or (cause I'm doomed) a day or yerning to get home and take a peice of code to the next level of testing
[00:34:21] <rue_house> bah, I'm gonna test it
[00:34:26] <rue_house> TO THE SHOP
[00:37:14] <rue_shop> dosn't work\
[00:37:33] <rue_shop> signal input on pb1
[00:37:49] <rue_shop> pwm off pin pb0
[00:49:37] <rue_house> the timer might be overflowing too fast, I'll do math later
[07:48:30] <mcastillo> Hello... I'm developing a bootloader for a ATMega2560, My bootloader blinks a LED and is working fine. I'm reading the flash memory, but I can't see where is the bootloader, as all I see are FF bytes.
[07:48:39] <mcastillo> what could be the problem?
[07:48:54] <mcastillo> bootlaoder section can't be read?
[07:51:33] <^Richard> are lock bits set?
[08:05:57] <mcastillo> LB = no memory lock features enabled; BLB0 = no lock on SPM and LPM in Application Section; BLB1 = no lock on SPM and LPM in Boot Section
[09:30:04] <rue_house> the only mistake I can find is that the incomming signal pin was set for pwm output
[09:47:32] <rue_shop> dosn't work, maybe there is another interrupt enable I forgot\
[09:57:26] <Tigzee> rue_shop, any code?
[10:52:12] <carabia> Tigzee: unless you have understood by now, he finds intrinsic value in his monologues rather than wanting active help, or even contributions from others for that matter
[11:39:11] * _ami_ tries to find a i2c/twi device on my desk.
[11:47:38] * _ami_ found DS32231
[12:00:23] <carabia> ACK
[14:42:41] <Jartza> hobla
[16:17:10] <Jartza> hmmh
[16:17:27] <Jartza> maybe I'm stupid, but I can't figure out a way to enter my project to HaD 1k compo
[16:18:25] <Jartza> ahh
[16:18:30] <Jartza> well yea. had to add the project first
[16:19:27] <Jartza> https://hackaday.io/project/19248-512-byte-8-color-vga-demo-with-attiny5
[16:19:32] <Jartza> sure, it's still work-in-progress
[16:19:36] <Jartza> let's see what I can make of it
[16:30:13] <Emil> Niceee
[19:15:14] <inflex> damn, that's brilliant to see what can be done with the T5, I've done work on the T10 but ... doing it on a T5 is all that much cooler
[19:16:08] <Lambda_Aurigae> Jartza is awesome.
[19:16:34] <inflex> shame it needed the more stable clock
[19:18:09] <Lambda_Aurigae> yeah...no way it can do vga on the internal RC oscillator.
[19:29:30] <interrobangd> Lambda_Aurigae, yesterday, i found a solution @avrfreaks forum
[19:29:40] <interrobangd> http://www.avrfreaks.net/forum/attiny104-self-programming
[19:29:45] <Lambda_Aurigae> good.
[19:30:01] <interrobangd> yes, 100% my solution, also in ASM!!
[19:30:15] <interrobangd> .. and its exactly my dev board^^
[19:30:20] <Lambda_Aurigae> looks like assembly.
[19:30:24] <Lambda_Aurigae> in fact
[19:30:33] <Lambda_Aurigae> it looks just like the assembly out of the datasheet!
[19:30:35] <Lambda_Aurigae> oh my.
[19:31:25] <interrobangd> not at all
[19:31:33] <interrobangd> but simmilar
[19:32:09] <interrobangd> "benteven" works for Atmel ;)
[19:32:42] <Lambda_Aurigae> they just left out the register names and used the addresses instead.
[19:32:48] <Lambda_Aurigae> otherwise, it's pretty much the same code.
[19:33:34] <interrobangd> i.e. 0x33 for CCP
[19:33:50] <interrobangd> but why?
[19:34:02] <interrobangd> random?
[19:36:48] <Jartza> inflex: it's not even done yet :P
[19:37:08] <Jartza> nobody has even liked my project page yet :D
[19:37:21] <inflex> Aww :(
[19:37:46] <interrobangd> i know there are 32 free registers, but the number of any other dont listet on the manual. he use number 33. ...wayn
[19:38:22] <Lambda_Aurigae> 32 general purpose registers.
[19:38:30] <Lambda_Aurigae> 0x33 is the nvmcmd register.
[19:38:46] <Lambda_Aurigae> 0x3C is the CPP
[19:38:56] <toddpratt> the nevermind command register
[19:39:07] <Lambda_Aurigae> nvm = non volatile memory
[19:39:21] <toddpratt> yeah
[19:39:28] <interrobangd> toddpratt, y made my day
[19:39:33] <carabia> interrobangd: !! yay !!
[19:39:40] <carabia> can you stop boring me now?
[19:40:20] <Lambda_Aurigae> 0x3C is the CCP register...not CPP...bad fingers.
[19:40:26] <interrobangd> yes
[19:40:33] <interrobangd> my mistake#
[19:40:56] <Lambda_Aurigae> page 23, section 18.12.1 gives the register address for the CCP register
[19:41:32] <carabia> CCP is just a letter away from the commies
[19:41:39] <carabia> don't touch that
[19:41:41] <Lambda_Aurigae> page 197, section 20.7.2 gives the register address for the NVMCMD register.
[19:42:08] <Lambda_Aurigae> interrobangd, don't try to tell me they aren't listed in the manual...they are there.
[19:42:53] <interrobangd> MY MISTAKE. A summary is also on page 245
[19:43:11] <Lambda_Aurigae> yup.
[19:43:20] <interrobangd> but now the solution is clear, yesterday....
[19:43:31] <Lambda_Aurigae> as I've said many times....read the datasheet before starting work with the chip...
[19:44:35] <interrobangd> oh yeah y lucky box, y always read the book first, understand a read ahead!
[19:44:58] <interrobangd> but it dosnt metters today
[20:40:11] <carabia> day by day the textual output of inhabitants of this channel gets worse, it's not exactly clear how long this trend can continue until all the lines turn into basically random strings of characters
[20:44:03] <carabia> perhaps the datasheet struggle has something to do with that fact, too
[20:46:44] <Casper> sdfhsjaedrfarytkwsazdexfcb wq44qresdfghj236w2szdcv2 245y6sfgvb rtgqwe4513
[20:47:47] <ewong> Attack of the Kittens?
[20:48:26] <carabia> jfkjdsgfg fd8 gn 932fjf9 gior38gfj‰‰§
[20:56:03] <ewong> it's an epidemic!
[21:05:05] <arij> hi
[21:05:28] <arij> if i wanted to completely erase an atmega32u2 and start from scratch
[21:05:33] <arij> what would I put on the chip
[21:05:47] <arij> I want it to be like I just got it from the factory
[21:11:24] <carabia> after you smoke them i'm not sure if that's possible
[21:13:09] <arij> i have 5 of them - idunno why but they are all locked
[21:13:20] <arij> apparently i need to erase it to set NO_LOCK
[21:13:36] <arij> so I can then change the divide by 8 fuse
[21:26:58] <cehteh> AVR's have a chip erase command
[21:27:38] <cehteh> that will clear flash and possibly EEPROM, duno about clock fuses, maybe not, but lock fuses should be cleared too, read datasheet
[21:29:14] <cehteh> you can just keep the clkdiv/8 fuse and then in your main() change the prescaler to your desired rate right at the start, thats sometimes easier
[22:43:02] <kline> whats the generally favoured assembly toolchain for avrs on linux? I normally use avr-libc, but I've got a project coming up that's entirely assembly, and avr-gcc doesn't seem to be the best tool for that, wanting to link in it's own runtime etc and extra complications with linker scripts making it harder to precisely place code
[23:17:32] <Xnke> Hello, folks
[23:18:16] <Xnke> laying out a board with an ATmega128A, TQFP-64 package. Do I need to connect both VCC pins, or is one sufficient?
[23:25:00] <carabia> naa, it was an april fools joke at atmel when they designed the chips. they put them there for shits and giggles so that it'd take more effort to do a board layout
[23:28:09] <carabia> it's a well-known friday-afternoon activity at the atmel engineering dept. to gather round in the auditorium and do stand-up on the subject of how people are still so silly to use all of them
[23:28:29] <carabia> s/silly/fucking dumb
[23:31:12] <Xnke> I figured it was for *ease* of routing, not to make it harder. seeing as they're on opposite sides of the package and all...
[23:31:45] <Xnke> But hey, some people gotta be sarcastic about it so why not let'em have something there.
[23:32:16] <carabia> well some chips have more than 2 vccs, and even if not, you still have to draw an additional track. Not to even mention if you want to decouple them
[23:32:24] <carabia> ...hrrrr
[23:32:57] <carabia> so are you ready to answer? do you want to phone a friend of perhaps ask the audience?
[23:35:19] <carabia> if you *need* to, no, much the same way nothing is really *needed* to be done except taxes and eventual death
[23:36:43] <carabia> but to get more reliable operation, yes connect them and use decoupling caps
[23:37:44] <carabia> cause 100n 0603 or 0805 are a dime a dozen and easy to solder by hand
[23:59:24] <rue_house> it works!
[23:59:32] <interrobangd> yeah
[23:59:51] <rue_house> to convert the output of the rpm meter form 16 bits to 8 bits, I'd shifted it left 8 bits!