#avr | Logs for 2014-02-07

Back
[07:25:02] <Roter> Well guys.. Its done, i bougth the atmega32 mcu, changed the speeds, and now the led blinks evert second!
[07:25:08] <Roter> Thank you guys, for helping me
[07:25:18] <Thrashbarg> yay
[07:25:19] <Roter> now its time to learn, how to program it
[07:25:37] <Roter> and probably, the next thing im going to add, is maybe a buzzer
[08:06:15] <Roter> Well i was retarted...
[08:06:37] <Roter> My old mcu was set at the wrong Hz in the code
[08:06:51] <Roter> i changed it to correct, and then programmed it
[08:07:19] <Roter> only now i noticed, that i have to first build the solution(compile), then program the chip.
[09:28:37] <DusteD> Greetings, n00b endianness question, gcc. If I have uint16_t array[2] PROGMEM = { 0x010a, 0x020b }; will pgm_read_byte( array + 2 ) then return 02 or 0b ?
[09:33:37] <jacekowski> DusteD: undefined
[09:33:54] <jacekowski> DusteD: it will read beyond the end of that array
[09:34:44] <DusteD> the array is 4 bytes long, so wouldn't array+2 equal the first byte in the second element?
[09:34:59] <jacekowski> no
[09:35:04] <DusteD> since pgm_read_byte do not know the array element size as far as I can understand from the docs
[09:35:08] <PoppaVic> because you don't understand types or pointers or indexing or accessing
[09:35:12] <jacekowski> array+3 == third element
[09:35:25] <jacekowski> +2*
[09:35:40] <jacekowski> array+3= fourth element
[09:37:01] <DusteD> That would be true of an array with byte size elements, but how would pgm_read_byte, which simply takes an address as parameter, be aware of the element size ?
[09:37:13] <jacekowski> if, array is of uint16_t type and for example &array==8, then &(array+1)==10
[09:37:57] <DusteD> I'll write a test program, sorry for disturbing.
[09:37:59] <jacekowski> DusteD: pointer operation is done before it's passed to pgm_read_byte
[09:38:22] <DusteD> Oh!
[09:41:59] <DusteD> Oh, that's obvious.. I should try to be less stupid -_-
[11:09:52] <zmo> hi!
[11:12:42] <zmo> I'm using a jtagice3 programmer for my project, and I'd like to choose at upload time whether I want to preserve the EEPROM or not... Does anybody has a way to do it in one command or with a pipe (to not dump eeprom data in a temporary file uselessly)?
[11:12:46] <zmo> (sorry for asking the same question as on #arduino)
[11:13:29] <zmo> basically, I'm only asking for a "recipe" that someone has in his shell history or in a Makefile somewhere, otherwise, I'll try to figure it out by myself
[12:09:23] <Duality> what does rjmp .+4 do ?
[12:10:33] <myself> it increments the instruction pointer a bit to the left
[12:10:44] <myself> then a shift to the right
[12:11:07] <myself> put your registers on your hips
[12:11:28] <Duality> that doesn't make sense
[12:11:29] <myself> and bring your stack pointer in tight
[12:14:53] <Duality> i see . is current instruction pointer and +4 is four instructions further ?
[12:16:56] * Duality has disassembled some source he made, and is currently studying the source :)
[12:17:20] <balrog-k1n> disassembled... that must be illegal
[12:18:10] <Duality> balrog-k1n: did I use the correct term ?
[12:18:45] <balrog-k1n> Duality: i think so.. was just kidding
[12:19:52] <Duality> balrog-k1n: I know, but then I got scared that I didn't use the correct term :)
[12:20:54] <Duality> balrog-k1n: dissasembling a Phone bootloader is that illegal ?
[12:23:50] <tomatto> is better to do foo >>= 8; instead of foo /= 0xff; ?
[12:25:16] <balrog-k1n> nope, foo >>= 8 could be used instead of /= 0x100, but not 0xff
[12:26:13] <tomatto> balrog-k1n: so 256 instead of 255 it is?
[12:26:26] <balrog-k1n> tomatto: yep
[12:27:17] <tomatto> thanks
[12:28:35] <tomatto> balrog-k1n: and when i have uint8_t foo; should i do 255 - foo or ~foo?
[12:29:36] <balrog-k1n> tomatto: my guess is that the compiler will treat same way
[12:29:40] <balrog-k1n> and output whatever is faster
[12:30:11] <balrog-k1n> so it wouldn't matter which one is in the code
[12:34:27] <tomatto> when i use 255 - foo it increase code by 26 bytes
[14:04:50] <Duality> nothing better then working with avr, and listining to some chiptunes :)
[15:10:57] <twnqx> there is: working with avr and having them produce chiptunes
[16:38:41] <antto> Duality or... http://youtu.be/qa7CbkrriOI?t=17s
[16:43:24] <antto> (the thing that ticks in those two things is teh atmega2561)
[16:48:02] <hjohnson> ok.. why am I architecting interrupt driven device drivers from scratch again?
[16:48:05] <hjohnson> though it's kind of fun
[18:32:45] <Honeyclaw> anyone here have experience with oshpark.com pcb fab service?
[18:34:22] <OndraSter> nope, but try hackvana :)
[18:35:56] <Honeyclaw> I'm shopping around. hackvana was my first choice, but I was under the impression that I could get away with some break-away tabs, but when I gave some links to my design, I got the impression from mitch that the people at the fab he uses will not want to do the board as a single job
[18:47:52] <Tom_itx> Honeyclaw i've used them yes
[18:48:09] <Tom_itx> hackvana is pretty good
[18:48:33] <Tom_itx> i used laen (oshpark) for prototypes a few times
[18:58:44] <Honeyclaw> Tom_itx: do you happen to know if they allow designs that have daughterboards on breakaway tabs? The oshpark FAQ describes slots, but doesn't mention if tabs with mousebites are OK
[19:02:16] <Tom_itx> they do up their pannels that way
[19:02:49] <Tom_itx> i suppose if you emailed lean he could do that but it just depends where your parts are layed out on the board in relation to the rest of the batch
[19:03:37] <hackvana> Honeyclaw: Hi
[19:03:44] <hackvana> Tom_itx: Hi
[19:04:27] <Honeyclaw> hackvana, hi!
[19:04:32] <hackvana> :-)
[19:04:51] <Honeyclaw> I always read your nick as husqvarna, for better or worse
[19:04:52] <hackvana> The fabs I use don't like to see separate designs together on the same panel
[19:05:02] <PoppaVic> I suspect these places would also enjoy if you ordered a whole board - regardless what parts it holds, too - mirroring and rotation and daughtercards, etc
[19:05:19] <hackvana> Because what happens is that their usual customers, Chinese people, are really shifty, and they try aggregating other people's designs then reselling the boards
[19:05:28] <hackvana> So the fabs feel they're being cheated out of work
[19:08:13] <Honeyclaw> hackvana: that situation makes sense. what would you say then my best route (pun) will be then, assuming I want to keep my PCB with daughterboards on breakaway tabs?
[19:10:45] <Honeyclaw> part of the problem for me now, is that separating my design in to multiple logical boards in kicad seems to be tough - the netlist references won't be saved (or regenerated in a meaningful way) when I split the design to separate schematics/pcbs
[19:12:46] <hackvana> Honeyclaw: Maybe this is best discussed in #hackvana, I don't want to spam the good folks in #avr :-)
[19:13:06] <Honeyclaw> yea I was just thinking the same
[19:13:31] <Honeyclaw> long live atmel!
[19:14:04] <Tom_itx> i've ordered pannels before with vscore
[19:14:08] <Tom_itx> what about that?
[19:14:32] <xorm> hey Tom_itx, have you ever had to deal with UL certification?
[19:14:58] <Tom_itx> nope
[19:15:40] <hackvana> Tom_itx: My gallery of panels: http://imgur.com/a/K3TrG
[19:15:48] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/new_batch/DSC_0001.JPG
[19:15:51] <Tom_itx> they came like that
[19:15:54] <hackvana> About half I've panelised, the other half the customer panelised
[19:16:11] <hackvana> GP :-)
[19:16:19] <Tom_itx> yup