#avr | Logs for 2015-03-22

Back
[02:35:50] <Casper> ... on a sidenote, they found out that the recommended dose of vitamin D was underestimated by 10 times..
[02:54:48] <w|zzy> :/ I'm screwed.
[03:05:55] <Xark> Casper: Where did you see this?
[03:06:28] <w|zzy> The internet!
[03:06:46] * Xark found an article. :)
[03:07:09] <w|zzy> Link? The onion?
[03:07:59] <Xark> http://www.medicaldaily.com/we-need-more-sunshine-vitamin-vitamin-d-deficiency-may-be-more-widespread-previously-326546
[03:08:06] <Xark> Hehe, haven't checked there yet... :)
[03:35:37] <theBear> wtf ? why is everyone talking about vitamin D today ?
[04:11:15] <Tekkkz> hello guys
[04:11:41] <Tekkkz> malinus: I have found something out again!!
[04:12:30] <malinus> Xark: thanks for sharing the "news", we get about once a year, in every country, on every media
[04:13:05] <Tekkkz> malinus: look my .map file, are the interrupt vectors exported correctly? http://pastebin.com/eLxKvKmi
[04:13:08] <malinus> "It's winter guys, what kind of article should we do?" "What about, we don't get enough vitamin D" "GREAT! It's probably true, beucase it was true last year too"
[04:13:54] <malinus> Tekkkz: can I see your makefile?
[04:15:34] <Tekkkz> okay
[04:15:47] <Tekkkz> http://ix.io/h0L
[04:15:48] <Tekkkz> Makefile
[04:17:20] <malinus> looks a lot like mine
[04:21:15] <Tekkkz> hm but why doesnt it works
[04:22:38] <Tekkkz> can you check all flags please?
[04:23:52] <malinus> nothing seems to be our of order there. It should be your code, I think?
[04:29:49] <Tekkkz> i know, but i cant solve it alone
[04:30:00] <Tekkkz> please help me, im already crying cause i didnt got it since 5 days
[04:37:21] <Tekkkz> malinus: do you want to get something for your help? ;)
[04:37:28] * Xark manages to squeeze (a re-write) of Adafruit GFX library onto an ATtiny85 (with ~1KB to spare) -> https://imgur.com/WKg33E7
[04:39:00] <Xark> ...now to get USI SPI happy :)
[04:39:37] <Tekkkz> whats the display?
[04:40:39] <Xark> Tekkkz: Cheap $8 SPI TFT LCD (320x240, 24 bit).
[04:41:02] <Tekkkz> from where?
[04:41:18] <Xark> They are all over ebay...getting a link
[04:41:45] <Xark> https://www.tindie.com/products/mmm999/22-inch-serial-tft-spi-lcd-screen-module-hd-240-x-320-5110-compatible
[04:42:13] <Tekkkz> ahh nice
[04:42:15] <Tekkkz> btw
[04:42:21] <Xark> You can also find similar ones that are 1.8" (128x128)
[04:42:46] <Xark> https://www.tindie.com/products/mmm999/18-inch-tft-lcd-display-module-st7735s-51avrstm32arm-816-bit (cost more??)
[04:43:34] <Xark> Tekkkz: A bit slow, this is why I optimized the Adafruit library. About ~20FPS on 328P with hardware SPI (can do a bit of work while xfer in progress).
[04:44:23] <Xark> These displays really want a 20 or 25 MHz SPI clock (not ~8MHz or less).
[04:44:46] <Xark> Still, pretty nice display option for <$10
[04:45:17] <Tekkkz> do you know why my ISR's (interrupt vectors) doesnt work on my project. If im using an ISR (doesnt matter which, all the same) my code doesn't boot and resets the whole time? my code: main.c (http://ix.io/h1L) board.h (http://ix.io/h1M) iocomfort.h (http://ix.io/h1N) Makefile ( http://ix.io/h1O) FIRMWARE.MAP (http://ix.io/h1P)?
[04:45:36] <Tekkkz> and i will buy such a display, didnt used any displays yet
[04:48:28] <Xark> Tekkkz: Hmm, for one thing you didn't declare your interrupt routine as an interrupt (needed to save context properly).
[04:49:21] <Xark> Actually, nevermind. The ISR() does that already. :)
[04:49:50] <Tekkkz> hehe ok
[04:50:24] <Tekkkz> i think they arent exported correctly into the map file or?
[04:52:05] <Xark> Hmm, not sure. Looks reasonable (I see vectors at 0).
[04:52:56] <Tekkkz> ahh
[04:52:58] <Tekkkz> hm
[04:53:02] <Tekkkz> mahn, why isnt it working
[04:53:24] <Tekkkz> do you have a sample makefile and can compile my code and giveme the hex file to check if it works please?
[04:58:01] <Xark> Sorry, I don't.
[05:01:01] <Tekkkz> mhh
[05:01:04] <Tekkkz> why isnt it working
[05:02:04] <Xark> Tekkkz: Do you have an LED to debug with? Perhaps see if it ever gets to ISR?
[05:02:49] <avrdude> Hello, i am running this code on an at90can128: http://pastebin.com/Cy4k798P but i only receive a bunch of null-chars.. anyone know why? the code is copied from the datasheet
[05:04:46] <avrdude> btw, there is an error on the datasheet USART0_Transmit example function. it uses UCSRA0, which should be UCSR0A
[05:06:26] <avrdude> oh, and the comments are a bit misleading, sorry. i have set 1 stop bit, not 2
[05:06:38] <avrdude> but i tried with 2 as well, and still.. only null chars received
[05:07:17] <Tekkkz> Xark: i have a led to debug, the problem is: if i compile with an ISR in my code, it resets the whole time and nothing works, if i commend the ISR out, it works!
[05:09:32] <Xark> Tekkkz: Interesting. Even if you don't try to initialize the interrupt?
[05:10:11] <Tekkkz> what do you mean with initializing the interrupt?
[05:12:45] <Xark> I mean just declaring the ISR, but not setting the registers to generate interrupt.
[05:13:46] <Tekkkz> ho? so you mean using the isr but not the init_timer?
[05:14:13] <Tekkkz> = dont work
[05:14:35] <Xark> Tekkkz: I am trying to fine out if it is just creating ISR function, or something in "main".
[05:16:04] <avrdude> ok, i forgot to set F_CPU, but i am still only seeing null on the output :(
[05:16:14] <Tekkkz> its just the ISR function cause i can use any interrupt vector - wont work at any, but if i remove the ISR it works
[05:18:02] <Xark> Tekkkz: I see. Sure does point to a build problem...
[05:18:16] <Tekkkz> so we need to have a look at my makefile?
[05:18:31] <Tekkkz> makefile => http://ix.io/h1P
[05:18:47] <Xark> 3AM for me, so no, sorry. :)
[05:19:10] <Tekkkz> mahn no!!! dont go sleeping now
[05:19:18] <Tekkkz> im trying to solve this since 5 days
[05:19:19] <Xark> Tekkkz: However, surely you can find a working example somewhere to see what is different.
[05:19:21] <Tekkkz> i need you!!
[05:20:45] <Tekkkz> Hm you mean a working makefile?
[05:21:08] <Xark> Yes (ideally with a simple ISR example).
[05:22:36] <Tekkkz> hm puh
[05:22:46] <Tekkkz> but now im eating something, see you later, n8
[05:22:58] <Tekkkz> uhh
[05:23:09] <Tekkkz> good night, is the shorten form of it n8 too in english?
[05:23:29] <avrdude> no
[05:23:39] <Tekkkz> hmpf
[05:24:14] <avrdude> :p
[05:25:07] <Tekkkz> hehe
[05:25:52] <Xark> Close enough. :) TTYL
[05:26:17] <Tekkkz> TTYL?
[05:27:05] <avrdude> ok, i figured it out, the baudrate was super-wrong
[05:27:19] <Tekkkz> haha
[05:27:32] <Tekkkz> so when Xark is leaving now, avrdude, can you help me?
[05:27:47] <avrdude> maybe? whats the problem?
[05:28:02] <Tekkkz> puh
[05:28:06] <Tekkkz> you didnt read it?
[05:28:27] <avrdude> no, i joined 5 minutes ago..
[05:28:45] <Tekkkz> ahh yes :D
[05:28:49] <Tekkkz> wait, im writing it
[05:31:26] <Tekkkz> do you know why my ISR's (interrupt vectors) doesnt work on my project. If im using an ISR (doesnt matter which, all the same) my code doesn't boot and resets the whole time? my code: main.c (http://ix.io/h1L) board.h (http://ix.io/h1M) iocomfort.h (http://ix.io/h1N) Makefile (http://ix.io/h1P) FIRMWARE.MAP ( http://ix.io/h1O)? i think they arent exported correctly into the map file or? i have a led to debug,
[05:31:29] <Tekkkz> the problem is: if i compile with an ISR in my code, it resets the whole time and nothing works, if i commend the ISR out, it works! its just the ISR function cause i can use any interrupt vector - wont work at any, but if i remove the ISR it works
[05:33:20] <Tekkkz> any ideas?
[05:36:03] <avrdude> man, i have no idea.. that is some crazy difficult code to read
[05:36:32] <Tekkkz> my code? nah, its not difficult, its verry few
[05:36:37] <Tekkkz> 10 lines of code
[05:37:18] <Tekkkz> its just makefile and map you need to look at
[05:38:05] <avrdude> OCR0A = 0x26;
[05:38:07] <avrdude> ok :-/
[05:38:30] <Tekkkz> ?
[05:38:32] <avrdude> im not good with makefiles, sorry
[05:39:05] <Tekkkz> hmm shit, no problem
[05:39:15] <Tekkkz> can you give me your makefile so i can check it?
[05:39:35] <avrdude> my point was that a line like "OCR0A = 0x26; //0x26" is difficult to understand.. first of all, the comment doesnt add any info.. you should say what this line is trying to accomplish.. also, i have to calculate myself which bits are set, which makes it even more difficult
[05:39:49] <Tekkkz> nonono
[05:39:57] <Tekkkz> this isnt a register where bits are
[05:40:03] <Tekkkz> its the compare value for ctc mode
[05:40:09] <Tekkkz> its just 0x00 to 0xff
[05:40:11] <Tekkkz> any value
[05:40:15] <avrdude> so put that in a comment -_-
[05:40:31] <Tekkkz> hm ok
[05:40:53] <avrdude> just my advice, if you others are going to read your code :)
[05:41:08] <Tekkkz> hm yeah you are right
[05:41:11] <Tekkkz> hm
[05:41:19] <Tekkkz> can you show me your makefile pls?
[05:43:06] <avrdude> sure, http://pastebin.com/rDBdNviA
[05:43:22] <avrdude> this is generated from atmel studio though, so i have no idea whats going on with it
[05:44:09] <Tekkkz> thx
[11:24:05] <Tekkkz> Hello!
[11:25:05] <Tekkkz> avrdude, Xark, malinus, Lambda_Aurigae, RattusRattus: I solved my problem: I didnt told the linker flags for which avr device it should link so it genrerated a false IVT
[12:13:24] <Tekkkz> for what stands gpio?
[12:13:40] <antto> general purpose input/output
[12:15:01] <Tekkkz> ahh so i can use this name for init_gpio to initialise the i/o pins?
[12:16:56] <Tom_itx> well that was silly
[12:17:05] <Tekkkz> Tom_itx: what?
[12:17:16] <Tom_itx> no device defined in the makefile
[12:17:21] <Tekkkz> oh no
[12:17:24] <Tekkkz> not in the mkaefile
[12:17:29] <Tekkkz> jsut no at the ldflags
[12:19:16] <Tekkkz> im having a bath now, bye
[12:34:50] <Tom_itx> zlog
[13:13:40] <Tekkkz> Tom_itx: whats there?
[13:15:08] <Tekkkz> zlog
[15:18:29] <Tekkkz> is it right that normally at spi if the SS pin is high the chip isnt activated, is it low its activated and high after it gots low the data is shiftet?
[23:56:20] <Flipp_> is there a way to get avr-gcc to make a global load from flash instead of sram? marking it const doesn't seem to change the opcodes